CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   buoyantSimpleFoam with equationOfState rhoConst crashes (https://www.cfd-online.com/Forums/openfoam-solving/196546-buoyantsimplefoam-equationofstate-rhoconst-crashes.html)

Moa_miche December 7, 2017 08:44

buoyantSimpleFoam with equationOfState rhoConst crashes
 
Hello,

I wanted to calculate the hydrodynamics and heat transfer of a stirred tank with the buoyantSimpleFoam solver. For this i merged the cases of buoyantCavity and mixerVessel2D with a MRF for the rotor of the stirred tank. If I am using the equationOfState perfectGas it is working fine and I get the velocity and temperature field. Now I wanted to use the equationOfState rhoConst and therefore changed my thermophysicalProperties-file like this:

thermoType
{
type heRhoThermo;
mixture pureMixture;
transport const;
thermo hConst;
equationOfState rhoConst;
specie specie;
energy sensibleEnthalpy;
}


In addition I inserted rho:

equationOfState
{
rho 10;
}


If I start the solver now I get the following error in the laminar and turbulent case:

Starting time loop

Time = 1

DILUPBiCG: Solving for h, Initial residual = 1, Final residual = 0.00404327, No Iterations 1
GAMG: Solving for p_rgh, Initial residual = 0.996177, Final residual = 0.00740903, No Iterations 5
time step continuity errors : sum local = 2.42478, global = -7.73459e-15, cumulative = -7.73459e-15
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 in "/lib64/libc.so.6"
#3 Foam::dimensioned<double> Foam::operator/<double>(Foam::dimensioned<double> const&, Foam::dimensioned<double> const&) at ??:?
#4
at ??:?
#5 __libc_start_main in "/lib64/libc.so.6"
#6
at ??:?
Floating point exception
gott@master:~/OpenFOAM/gott-2.3.x/run/buoyantCavity> ICE default IO error handler doing an exit(), pid = 240390, errno = 11

Why is my simulation crashing? Is it not possible to use the equationOfState rhoConst with the buoyantSimpleFoam-Solver? Or how can i calculate with an incompressible fluid a heated stirred tank else?

Help is really appreciated :) I trust in your knowledge,

kind regards,

Michael

Moa_miche December 8, 2017 01:24

After some research i found the answer myself. I used OF2.3.x and there is a bug in the source code. In the pEqn.H at the end you find this:

if (closedVolume) { p += (initialMass - fvc::domainIntegrate(psi*p)) /fvc::domainIntegrate(psi); p_rgh = p - rho*gh; }

For incompressible equations of state the compressibility psi is zero and therefore you get an error for closed volumes. The bug is already corrected in the new OF5.

if (!thermo.incompressible() && closedVolume)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
p_rgh = p - rho*gh;
}

With the additional condition !thermo.incompressible() you are not entering the loop for incompressible flows.

Michael

calf.Z March 12, 2019 21:10

Quote:

Originally Posted by Moa_miche (Post 674445)

[/SIZE] if (!thermo.incompressible() && closedVolume)
{
p += (initialMass - fvc::domainIntegrate(psi*p))
/fvc::domainIntegrate(psi);
p_rgh = p - rho*gh;
}

With the additional condition !thermo.incompressible() you are not entering the loop for incompressible flows.

Michael

So you men that for compressible flows, it should enter the loop and adjust the pressure level to obey overall mass continuity?


All times are GMT -4. The time now is 01:31.