CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

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

Register Blogs Community New Posts Updated Threads Search

View Poll Results: what should be the first check to fix "negative initial temperature" error
0 folder 2 50.00%
constant folder 1 25.00%
system folder 1 25.00%
Voters: 4. You may not vote on this poll

Like Tree1Likes
  • 1 Post By hemanthgrylls

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 16, 2019, 06:08
Lightbulb sonicFoam "prism" tutorial not working when inlet velocity is increased
  #1
New Member
 
Dumbledore
Join Date: Jun 2019
Posts: 10
Rep Power: 7
hemanthgrylls is on a distinguished road
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)

Last edited by hemanthgrylls; July 16, 2019 at 09:23. Reason: typos
hemanthgrylls is offline   Reply With Quote

Old   August 1, 2019, 16:40
Default
  #2
Member
 
Giovanni Medici
Join Date: Mar 2014
Posts: 48
Rep Power: 12
giovanni.medici is on a distinguished road
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.
giovanni.medici is offline   Reply With Quote

Old   August 1, 2019, 21:34
Default
  #3
New Member
 
Gavin Ridley
Join Date: Jan 2019
Location: Tennessee, USA
Posts: 25
Rep Power: 7
gridley2 is on a distinguished road
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.
gridley2 is offline   Reply With Quote

Old   August 2, 2019, 04:24
Smile
  #4
New Member
 
Dumbledore
Join Date: Jun 2019
Posts: 10
Rep Power: 7
hemanthgrylls is on a distinguished road
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
gridley2 likes this.
hemanthgrylls is offline   Reply With Quote

Reply

Tags
sonicfoam, supersonic flows


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
serial udf to parallel udf radioss Fluent UDF and Scheme Programming 10 January 19, 2019 09:56
Defined inlet velocity is different with inlet velocity on CFX post jonpewpew CFX 2 November 2, 2017 17:40
Setting Density for Velocity Inlet Face arkie87 FLUENT 0 November 7, 2012 16:15
Velocity inlet boundary condition for porous medium Chander CFX 3 March 11, 2012 22:18
UDF paraboloid velocity inlet Ronak Shah FLUENT 0 June 4, 2003 10:44


All times are GMT -4. The time now is 14:17.