Dear Ait,
please always answer to the mailing list, so that everyone can give input.
Your boundary conditions seem correct.
Have you tried with small initial time step sizes?
You could also set your initial condition similar to your Dirichlet
condition for your Sn = 0 boundary so that you have a better initial guess.
Best regards
Alex
On 10/19/2015 11:37 AM, Ait Mahiout Latifa wrote:
Hi,
i try to write the bc and bi like this:
//! Specifies which kind of boundary condition should be used for
//! which equation for a finite volume on the boundary.
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);
}
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::snIdx] = 0.0;
}
}
//! 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] = 0*-1.e-6; // 1 bar = e5 Pa
}
else
{
values[Indices::contiWEqIdx] = 0.0;
values[Indices::contiNEqIdx] = 0.0;
}
}
//! Evaluates the initial value for a control volume. For this
//! method, the 'values' parameter stores primary variables.
void initial(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
int scvIdx) const
{
values[Indices::pwIdx] = 2.e7; // 200 kPa = 2 bar
values[Indices::snIdx] = 1.0;
}
and i tried the solutions you propose, but the problem don't converge.
What we can do?
Best regards
--
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