Please wait...
×

Error

Posted Fri, 28 Nov 2008 18:47:54 GMT by Niels Christian Onno Gilse
I am working on a vertical 2D density dependent flow model to simulate saltwater intrusion in a peninsula.
The model works under natural conditions but now I need to include the effects of irrigation wells in the profile.
The soil has a very high hydraulic conductivity so there is a high degree of recirculation of the abstracted water.
And the density of abstraction wells is generally high in the profile so I plan to simulate them as a continuous line of abstraction.

This is what i have got so far:

1. A transient flux boundary with a zero concentration constant mass boundary (1st kind) at the top surface to simulate the infiltration of precipitation plus irrigation(where the evapotranspiration is deducted from the abstracted volume).

2. A line of transient well boundaries (4th kind) inside the mesh (z = 10mbsl) that simulates the abstraction.

[u]My questions are:[/u]
a) How do I simulate that the irrigation water has a certain mass concentration that reenters the aquifer? ( I have tried to put a "reversed" fresh water condition on the wells, but without luck)
b) How do I ensure that the abstracted water volume equals the reinfiltrated plus the evapotranspirated volumes?

Thank you!

Best regards
Niels Christian, Copenhagen
Posted Mon, 01 Dec 2008 13:48:11 GMT by Denim Umeshkumar Anajwala
Dear Niels Christian,

before suggesting the one "perfect" solution, I have some additional questions:

1. Does the mass concentration of the re-entering water have to be a function of the pumped concentration at the wells?
2. Can evapotranspiration be calculated in advance, or does it also depend on the model properties at a certain time?

If everything is known in advance, you could calculate the concentration at the top nodes, or the mass flux into the model on top (in the latter case using the divergence form of the transport equation!).
If you need the dependencies, it is a little bit more complex. The only solution here would be a module for the programming interface, which calculates concentration or mass flux from the abstraction concentration and additional parameters.

Hope this helps for the moment.

Peter

Posted Tue, 02 Dec 2008 01:23:37 GMT by Niels Christian Onno Gilse
Dear Peter
The evapotranspiration is calculated on advance but I guess that the mass that reenters the system preferably has to be a function of the pumped concentration due to the non-linearity of the process.

I have had a short look at the IFM help files and it seems like a fairly big task to make my own module since i do not have much programming experience in C.

But if you can briefly line out what functions I could use to do the following, I might give it a shot.

I guess the procedure would be something like:
On PreSimulation:
1. Identify the well and relevant flux boundary nodes.

On PostTimeStep:
1. get the mass concentration and pumped volume for every well node and calculate the abstracted total mass.
2. Calculate the total flux volume from the flux nodes at the next timestep.
3. Calculate and set the mass concentration in the flux nodes.

The help is much appreciated!

- Niels Chr.

Posted Tue, 02 Dec 2008 12:12:44 GMT by Denim Umeshkumar Anajwala
Dear Niels,

here's some outline of the code as a first idea (without any checking and warranty) in C++ syntax (so you should choose C++). This code calculates the total abstraction of mass from the system at well bcs, the total injection at flux bcs (assuming there's only injecting 2nd kind bcs), and sets fixed concentrations to all the nodes of the flux bcs.

PostTimeStep:

int nn=IfmGetNumberOfNodes(pDoc);
double mass = 0.;  // total mass taken from the system at well bcs
double flow = 0.;  // total flow at 2nd kind bcs
IfmBudget *mb = IfmBudgetMassCreate (pDoc);
IfmBudget *fb = IfmBudgetCreate(pDoc);
for (int i=0;i<nn;i++){
  if (IfmGetBcFlowType(pDoc, i)==IfmBC_SINGLE_WELL){
        mass = mass + IfmBudgetQueryMassAtNode (pDoc, mb, i);
  }
  else if (IfmGetBcFlowType(pDoc, i)==IfmBC_NEUMANN){
        flow = flow + IfmBudgetQueryFlowAtNode (pDoc, fb, i);
  }
}

IfmBudgetClose (pDoc, mb);
IfmBudgetClose (pDoc, fb);

for (int i=0;i<nn;i++){
  if (IfmGetBcFlowType(pDoc, i)==IfmBC_NEUMANN){
      double c = mass / flow;
      IfmSetBcMassTypeAndValueAtCurrentTime(pDoc, i,IfmBC_DIRICHLET, 0, c);
  }
}

Cheers,
Peter

Posted Tue, 02 Dec 2008 21:14:10 GMT by Niels Christian Onno Gilse
Hi Peter
That is great! I think I can get a long way with that script.
But I have a problem regarding the IFM so I have posted a question in the IFM programming board.

Thanks again!

NC
Posted Wed, 03 Dec 2008 07:16:51 GMT by Denim Umeshkumar Anajwala
I've seen that two 'int' were missing in the code above, so I've changed it.

Peter

You must be signed in to post in this forum.