Dear Ait,
the method converge, but there is no simulation with paraview,
i.e,.that nothing happens.
What does it mean? Do you have paraview output?
If yes:
- Check if the initial state and the dirichlet conditions you specify
are correct in your paraview output
- Increase and decrease the water injection rate by orders of magnitude
and see if it has any effect
- If there is no effect do some debugging to check whether you ever
enter the if statement in your Neumann inflow boundary
Best regards
Alex
On 10/19/2015 04:26 PM, Ait Mahiout Latifa wrote:
Dear Alex,
i try this proposition, so i have the code:
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] = -1.e-8; // 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
{
const GlobalPosition& globalPos =
fvGeometry.subContVol[scvIdx].global;
if (globalPos[0] < 20+eps_ && globalPos[1] < 20+eps_ )
{
values[Indices::pwIdx] = 2.e7; // 200 kPa = 2 bar
values[Indices::snIdx] = 0.0;
}
else
{
values[Indices::pwIdx] = 2.e7; // 200 kPa = 2 bar
values[Indices::snIdx] = 1.0;
}
}
//! Evaluates the source term for all phases within a given
//! sub-control-volume. In this case, the 'values' parameter
//! stores the rate mass generated or annihilated per volume unit
//! in [kg / (m^3 * s)]. Positive values mean that mass is created.
void source(PrimaryVariables &values,
const Element &element,
const FVElementGeometry &fvGeometry,
int scvIdx) const
{
values[Indices::contiWEqIdx] = 0.0;
values[Indices::contiNEqIdx]= 0.0;
}
the method converge, but there is no simulation with paraview,
i.e,.that nothing happens.
Beste regards.
2015-10-19 14:12 GMT+02:00 Alexander Kissinger
<[email protected]
<mailto:[email protected]>>:
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 <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