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/)
-   -   sonicFoam "prism" tutorial not working when inlet velocity is increased (https://www.cfd-online.com/Forums/openfoam-solving/219112-sonicfoam-prism-tutorial-not-working-when-inlet-velocity-increased.html)

hemanthgrylls July 16, 2019 05:08

sonicFoam "prism" tutorial not working when inlet velocity is increased
 
hello foamDudes

I took up a tutorial case $FOAM_TUTORIALS/compressible/sonicFoam/RAS/prism

the default inlet velocity boundary condition in the tutorial was 650(which is M =1.89)

In 0 folder i have changed velocity from (650 0 0) to (1030 0 0) at inlet, top and bottom wall boundaries to get to Mach 3 over the prism, i havent changed anything else and then this error shows up while i try to run it:

HTML Code:

Time = 3.25e-05

Courant Number mean: 0.056095 max: 0.45764
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 0.00361405, Final residual = 1.25973e-07, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0121551, Final residual = 5.68609e-07, No Iterations 2
smoothSolver:  Solving for e, Initial residual = 0.00566519, Final residual = 3.57166e-07, No Iterations 2


--> FOAM FATAL ERROR:
Negative initial temperature T0: -32.7705

    From function Foam::scalar Foam::species::thermo<Thermo, Type>::T(Foam::scalar, Foam::scalar, Foam::scalar, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar, Foam::scalar) const, Foam::scalar (Foam::species::thermo<Thermo, Type>::*)(Foam::scalar) const) const [with Thermo = Foam::hConstThermo<Foam::perfectGas<Foam::specie> >; Type = Foam::sensibleInternalEnergy; Foam::scalar = double; Foam::species::thermo<Thermo, Type> = Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>]
    in file /home/pawan/OpenFOAM/OpenFOAM-v1812/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 54.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&)sh: 1: addr2line: not found
 addr2line failed
#1  Foam::error::abort()sh: 1: addr2line: not found
 addr2line failed
#2  Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::TEs(double, double, double) constsh: 1: addr2line: not found
 addr2line failed
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, bool)sh: 1: addr2line: not found
 addr2line failed
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct()sh: 1: addr2line: not found
 addr2line failed
#5  ?sh: 1: addr2line: not found
 addr2line failed
#6  __libc_start_mainsh: 1: addr2line: not found
 addr2line failed
#7  ?sh: 1: addr2line: not found
 addr2line failed
Aborted (core dumped)

please help me out in fixing this error to run the simulation at high mach numbers.
(i have later changed k and epsilon values in 0 folder but still the same story)

giovanni.medici August 1, 2019 15:40

Apparently you reach nonphysical temperatures, this several different reasons may lead to this behavior.
In order to assess it several infos are missing from your post:
  • 0 folder
  • checkMesh output,
  • fvSchemes used
  • fvSolution used
  • controlDict
If everything above is setup properly (BC, high quality mesh, low order schemes, properly set up of PIMPLE and relaxations, appropriate timestep... ), and still the computation explode, I suggest you to use fvOptions and add some limiters, in particular limiting temperature, so as to avoid nonphysical issues.

During the first part of the computation, the flow develops and hence it may reach very strong gradients (in particular near the object of interest). Hence by introducing temperature limiters, a decrease convergence / flow development rate can be expected, but overall computation stability shall be stiffer.

gridley2 August 1, 2019 20:34

Seeing as how your timestep is good in this case, my bet is that you're using a scheme for temperature which can oscillate in the presence of sharp gradients, leading to zero temperatures. You can check if this is the issue by changing the temperature scheme to upwind.

hemanthgrylls August 2, 2019 03:24

I have resolved this issue successfully, by replacing the mesh, i just made a bad mesh! reducing the time step also dint work.

I suggest everyone to use ICEMCFD instead of doing blind meshing inside Mesh button of Ansys workbench. make sure aspect ratio is less than 20 in the regions away from the wall, there is no issue with cells with aspect ratio of even 200 closer to the walls.

a greatman once said:
"One who owns the Mesh, owns the solution"

Openfoam is not like fluent, it does not have robust automated adjustments which can manage divergence issues. In OF we need to tweak the schemes and paramaters a bit but the end result that OF gives you is more reliable is what i feel. cheers!

thanks a lot for the replies


All times are GMT -4. The time now is 10:25.