MazenDraw |
July 18, 2019 07:02 |
Help with setting up BC for Pressure in stirred tank multiphase simulation
1 Attachment(s)
Hello Foamers!
I am trying to run a multiphase simulation using reactingTwoPhaseEulerFoam solver in a stirred tank. For now I sat the rotation velocity of the rotating zones to 0. I have used setFields to fill 75% of the tank with water and 25% with air (check the attachments), because I do not want the water to escape through the outlet in the top. I sat the flow for both water and air to laminar. Turned off all the bubble forces and switched my air inlet with a wall. All of this just to simplify as much as possible and narrow down where the problem is.
I noticed that when I change the gravity acc. value and make it very small (e.g -9.81e-2), the solver would continue to work. If I set it to the normal value -9.81, the min/max values of air volume fraction get very big, and the solver stops. So I figured it is probably a problem with the BC of pressure, since it is directly related to the gravity acc.
There are two files for the pressure in 0 folder. One is p and the other is p_rgh. From what I understood, p is the total pressure and p_rgh is the total pressure minus the hydrostatic pressure. Please correct me if I am wrong!
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
walls
{
type calculated;
value $internalField;
}
outlet
{
type calculated;
value $internalField;
}
}
// ************************************************************************* //
Code:
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: 6
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 1e5;
boundaryField
{
walls
{
type fixedFluxPressure;
gradient uniform 0;
value uniform 0;
}
outlet
{
type prghPressure;
p $internalField;
value $internalField;
}
}
// ************************************************************************* //
I want my outlet to act like an atmospheric opening. So is this the right setting? What could be causing the solver to stop in this way?
Since U.air and U.water might be related to this issue, here they are:
U.air:
Code:
walls
{
type slip;
}
outlet
{
type pressureInletOutletVelocity;
phi phi.air;
value $internalField;
}
U.water:
Code:
walls
{
type noSlip;
}
outlet
{
type pressureInletOutletVelocity;
phi phi.water;
value $internalField;
}
The error if it is of any interest:
Code:
PIMPLE: Iteration 20
MULES: Solving for alpha.air
MULES: Solving for alpha.air
MULES: Solving for alpha.air
MULES: Solving for alpha.air
MULES: Solving for alpha.air
alpha.air volume fraction = 6.28261e+52 Min(alpha1) = -1.91281e+66 Max(alpha1) = 2.43384e+66
Constructing face momentum equations
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/usr/lib64/libc.so.6"
#3 Foam::DICPreconditioner::calcReciprocalD(Foam::Field<double>&, Foam::lduMatrix const&) at ??:?
#4 Foam::DICPreconditioner::DICPreconditioner(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:?
#5 Foam::lduMatrix::preconditioner::addsymMatrixConstructorToTable<Foam::DICPreconditioner>::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:?
#6 Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:?
#7 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#8 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
#9 Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
#10 Foam::fvMatrix<double>::solve() at ??:?
#11 ? at ??:?
#12 __libc_start_main in "/usr/lib64/libc.so.6"
#13 ? at ??:?
Floating point exception
|