yes, it is impossible to impose on one node three boundary conditions to
two equations. You could however impose:
S_n=0, q_w . n = -1.e-8
or
q_w . n = -1.e-8 and q_n.n=0
Best regards
Alex
On 10/19/2015 09:23 AM, Ait Mahiout Latifa wrote:
Dear Alex,
thank you for your answer; So, i understand that it's impossible in
DuMux to impose in the same times: Dirichlet and Neumann boundary
conditions. That's it?
Best regards.
2015-10-19 9:12 GMT+02:00 Alexander Kissinger
<[email protected]
<mailto:[email protected]>>:
Dear Ait,
as far as I can see your boundary conditions setup is not feasible.
if x=580m and y=580m: S_n=1 and P_w=350 bar
Dirichlet boundary condition for mass balances, that's ok.
if x=20m and y=20m: S_n=0, q_w . n = -1.e-8 and q_n.n=0
Dirichlet bc for the non-wetting phase and Neumann bc for both
equations. That will not work. What you will end up with according
to your implementation below is:
q_w . n = -1.e-8 and q_n.n=0
The Dirichlet bc does not have any effect because SnIdx is the
same than contiNEqIdx.
You have two mass balances in your system at one node you can only
choose Dirichlet or Neumann for each mass balance.
In general when your system does not converge, try the following:
- check your initial conditions in the initial vtu file, are they
as you expect them to be?
- smaller initial time step size
- set the inflow to zero, and gradually increase it
Best regards
Alex
On 10/17/2015 12:02 AM, Ait Mahiout Latifa wrote:
Hi,
i try to change the boundary conditions in tutorial_coupled
problem. The domain is 600m*600m, and the boundary conditions are:
if x=580m and y=580m: S_n=1 and P_w=350 bar
if x=20m and y=20m: S_n=0, q_w . n = -1.e-8 and q_n.n=0
and nos flux in the rest of domain.
So, i try to do like in decoupled problem, and i write:
void boundaryTypes(BoundaryTypes &bcTypes, const Vertex &vertex)
const
{
const GlobalPosition &globalPos =
vertex.geometry().center();
if (globalPos[0] > 580-eps_ && globalPos[1] > 580-eps_) //
bcTypes.setAllDirichlet();
if (globalPos[0] < 20-eps_ && globalPos[1] < 20-eps_)
{
bcTypes.setDirichlet(Indices::snIdx);
bcTypes.setNeumann(Indices::contiWEqIdx);
bcTypes.setNeumann(Indices::contiNEqIdx);
}
else // neuman for the remaining boundaries
bcTypes.setAllNeumann();
}
//! Evaluates the Dirichlet boundary conditions for a finite
volume
//! on the grid boundary. Here, the 'values' parameter stores
//! primary variables.
void dirichletAtPos(PrimaryVariables &values, const
GlobalPosition& globalPos) const
{
if (globalPos[0] > 580-eps_ && globalPos[1] > 580-eps_ )
{
values[Indices::pwIdx] = 1.5e7; // 1 bar = e5 Pa
values[Indices::snIdx] = 1.0; // 0 % oil saturation on
left boundary
}
else if (globalPos[0] < 20-eps_ && globalPos[1] < 20-eps_ )
{
//values[Indices::pwIdx] = 3.5e7; // 1 bar = e5 Pa
values[Indices::snIdx] = 0.0; // 0 % oil saturation on
left boundary
}
}
//! Evaluates the boundary conditions for a Neumann boundary
//! segment. Here, the 'values' parameter stores the mass
flux in
//! [kg/(m^2 * s)] in normal direction of each phase. Negative
//! values mean influx.
void neumann(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
const Intersection &intersection,
int scvIdx,
int boundaryFaceIdx) const
{
const GlobalPosition &globalPos =
fvGeometry.boundaryFace[boundaryFaceIdx].ipGlobal;
if (globalPos[0] < 20-eps_ && globalPos[1] < 20-eps_ )
{
values[Indices::contiWEqIdx] = -1.e-8;
values[Indices::contiNEqIdx] = 0.0;
}
// no-flow on the remaining Neumann-boundaries.
else
{
values[Indices::contiWEqIdx] = 0.0;
values[Indices::contiNEqIdx] = 0.0;
}
}
but in execution, i have the output file joint to this mail.
Please,how we can implement these boundary conditions in a
coupled problem?
Thank you for the help.
Kind regards.
2015-10-16 23:15 GMT+02:00 Ait Mahiout Latifa
<[email protected] <mailto:[email protected]>>:
Hi, is it possible to implement boundary like this:
for example, we have and domain 600m*600m, and we have impos
the boundary contitions:
if x =20m and y=20m: Sn=0.0 and q_w . n = -e-8, and q_n.n = 0
The method used in decoupled problem to implement in the same
times Dirichlet and Neumann conditions not walk in
tutorial_coupled problem. So is it possible to implement in
the same times Dirichlet avec Neumann conditions in an part
of an domain, in tutorial_coupled problem?
Thak's for the hel.
_______________________________________________
Dumux mailing list
[email protected] <mailto:[email protected]>
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
--
Alexander Kissinger
Institut für Wasser- und Umweltsystemmodellierung
Lehrstuhl für Hydromechanik und Hydrosystemmodellierung
Pfaffenwaldring 61
D-70569 Stuttgart
Telefon:+49 (0) 711 685-64729 <tel:%2B49%20%280%29%20711%20685-64729>
E-Mail:[email protected]
<mailto:[email protected]>
--
Alexander Kissinger
Institut für Wasser- und Umweltsystemmodellierung
Lehrstuhl für Hydromechanik und Hydrosystemmodellierung
Pfaffenwaldring 61
D-70569 Stuttgart
Telefon: +49 (0) 711 685-64729
E-Mail: [email protected]
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux