Posted Tue, 16 Feb 2021 11:27:11 GMT by Guillem Buxo-Escapa
Hello,

I am working on a model of a coastal aquifer using the sea as a boundary. The model is a 2D cross section, similar to the Henry problem and considers density variations.

The model flow BCs consist of a constant flow (Neumann BC) entering the model through the inland boundary, and a constant head (Dirichlet BC) along the seaside border.

For the mass BCs, I want that any inflow produced in the seaside boundary has a concentration of 35 g/L (saltwater), but any outflow has the ambient concentration of the aquifer fluid.

I thought of evaluating the fluid rate budget at each node, and assign a value of the concentration depending on its symbol (using an if function), but this option does not exist in the expression editor as the rate budget is not available.
Any ideas would be greatly appreciated!

PS: I don't know (yet) how to script using python
Posted Wed, 17 Feb 2021 06:32:38 GMT by Peter Schätzl Grundwassermodellierer
You don't need a script for this, simply use a Concentration-type BC along with a minimum mass flow constraint with a value of 0. I think there's also an example model for this in the benchmarks collection available for download (with the demo data package), reproducing the Henry problem. Using the convective form of the transport equation, an outflowing boundary will let the salt mass pass with whatever concentration it has at the boundary. In divergence form, this works as well, but might be less stable as the mass outflow is based on an internal calculation that might not always be precise enough rather than the formulation of the equations as in convective form.
Posted Wed, 17 Feb 2021 13:05:11 GMT by Guillem Buxo-Escapa
Thank you Peter, that's exactly what I needed.

I was sure there had to be an easy way for implementing that kind of BC.

You must be signed in to post in this forum.