Hi There,

In a transient simulation, is it possible to assign a variable mass concentration to an injection well that is equal to the mass concentration value of an abstraction well at a previous time (with a constant time delay)? Per say if groundwater is abstracted at iteration "n" with a mass concentration of 1000 mg/L and reinjected at iteration "n"+3 with the same concentration.

Thanks,

Louis
The Graphical User Interface (GUI) does not provide this option. However, you can write a customized plugin (C/C++) or a Python script which is doing this job.

Here is a quick outline: In a transient simulation you have to retrieve the concentration and the time.

Use the callback [font=courier][color=blue]postTimeStep()[/color][/font]

You can retrive the concentration at current time with
[font=courier][color=blue]
double IfmGetResultsTransportMassValue
(
IfmDocument pDoc,
int nNode
);
[/color][/font]

To set the mass concentration at another node please use:
[font=courier][color=blue]
int IfmSetBcMassTypeAndValueAtCurrentTime
(
IfmDocument pDoc,
int nNode,
int bcType,
int bcUnst,
double nValue
);
[/color][/font]

Here are the correpsonding parameters you may use:
[font=courier]
IfmDocument pDoc
Handle of document data.
int nNode
Node number.
int bcType
Mass B.C. Type:
IfmBC_NONE (0) = no boundary condition
IfmBC_DIRICHLET (1) = Dirichlet (1st kind)
IfmBC_NEUMANN (2) = Neumann (2nd kind)
IfmBC_CAUCHY (3) = Cauchy (3rd kind)
IfmBC_SINGLE_WELL (4) = Single well (4th kind)
Note: (a) if IfmBC_NONE is used an existing B.C. Is deleted,
(B) do not use a type larger than IfmBC_GRADIENT_FTYPE.
int bcUnst
double nValue
Value to be set:
If bcUnst == 1 (i.e., Unsteady) the nValue represents
The power ID (an integer) of the time-dependent function,
The power ID must be in a range available in the problem,
If the power ID does not meet a valid number an error is echoed;
If bcUnst == 0 (i.e., Steady-state) the nValue is the
Constant boundary value assigned at the current time.
[/font]

I think, a DirichletBC for the mass is what you are looking for.

You may retrive the current simulation time in the callback [font=courier][color=blue]postTimeStep()[/color][/font]by using:
[font=courier][color=blue]
double IfmGetAbsoluteSimulationTime(IfmDocument pDoc);
[/color][/font]
The simulation time can be also used as a reference value to calculate the time for the time shift.
Please check also the FEFLOW Help: http://www.feflow.info/html/help71/feflow/mainpage.htm#t=13_Programming%2Fifm.htm

You must be signed in to post in this forum.