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

rhoSimpleFoam for sub-sonic compressible aerodynamics.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 22, 2018, 04:32
Default rhoSimpleFoam for sub-sonic compressible aerodynamics.
  #1
New Member
 
Ben
Join Date: Oct 2016
Posts: 25
Rep Power: 10
bentkj is on a distinguished road
Hi everyone, I am attempting to run a simulation of a commerical jet (NASA common research model) at 37,000ft where the flow is mildly compressible with a freestream Mach = 0.2, but local regions are observed accelerate up to M~0.5 based on simpleFoam results of the same setup. Because of this local acceleration in the flow field exceeding M= 0.3, I am trying to get a solution to account for compressibility with the rhoSimpleFoam solver. However, after setting it up and attempting to run it, rhoSimpleFoam returns an error:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 4.1
Exec   : rhoSimpleFoam
Date   : Jan 22 2018
Time   : 16:10:40
Host   : "ben-ubuntu1604"
PID    : 42862
Case   : /home/ben/OpenFOAM/ben-4.1/run/CRM_WingWakeImpingement/CRM-Unstruct-CLmax-12deg-RANS-SA-rhoSimpleFoam
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p	 tolerance 1e-07
    field U	 tolerance 1e-07
    field nuTilda	 tolerance 1e-07
    field e	 tolerance 1e-07

Reading thermophysical properties

Selecting thermodynamics package 
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type RAS
Selecting RAS turbulence model SpalartAllmaras
Selecting patchDistMethod meshWave
SpalartAllmarasCoeffs
{
    sigmaNut        0.66666;
    kappa           0.41;
    Cb1             0.1355;
    Cb2             0.622;
    Cw2             0.3;
    Cw3             2;
    Cv1             7.1;
    Cs              0.3;
}

No MRF models present

No finite volume options present


Starting time loop

wallShearStress wallShearStress:
    processing all wall patches

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 0.989842, Final residual = 0.0636575, No Iterations 12
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.0615403, No Iterations 12
smoothSolver:  Solving for Uz, Initial residual = 0.996507, Final residual = 0.0711557, No Iterations 12
smoothSolver:  Solving for e, Initial residual = 0.757366, Final residual = 0.054747, No Iterations 3
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0389688, No Iterations 9
time step continuity errors : sum local = 1.55654e-08, global = -2.36362e-18, cumulative = -2.36362e-18
rho max/min : 0.543587 0.121896
smoothSolver:  Solving for nuTilda, Initial residual = 0.999812, Final residual = 0.0697661, No Iterations 4
ExecutionTime = 217.24 s  ClockTime = 218 s

Time = 2

smoothSolver:  Solving for Ux, Initial residual = 0.00316191, Final residual = 0.000227228, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.0822842, Final residual = 0.0060974, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.0018152, Final residual = 0.000137586, No Iterations 4
smoothSolver:  Solving for e, Initial residual = 0.00229383, Final residual = 0.0001295, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.952563, Final residual = 0.0461374, No Iterations 3
time step continuity errors : sum local = 3.33308e-07, global = -1.90393e-18, cumulative = -4.26755e-18
rho max/min : 17.3624 0
smoothSolver:  Solving for nuTilda, Initial residual = 0.00043298, Final residual = 3.11907e-05, No Iterations 4
ExecutionTime = 322.94 s  ClockTime = 323 s

Time = 3

smoothSolver:  Solving for Ux, Initial residual = 0.00067038, Final residual = 5.0315e-05, No Iterations 4
smoothSolver:  Solving for Uy, Initial residual = 0.00196303, Final residual = 0.000150027, No Iterations 4
smoothSolver:  Solving for Uz, Initial residual = 0.000252499, Final residual = 1.9195e-05, No Iterations 4

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#4  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#5  ? at ??:?
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7  ? at ??:?
I understand that there seems to be an attempt to divide by zero somewhere hinting an incorrect BC setup but I cannot uncover what's wrong with my set up. I've also attached my 0/, fvSchemes, fvSolutions, and polyMesh/boundary file below. Because of the 5file upload limit I've consolidate the 0/* files as one 0folder.txt.

To avoid confusion, I've named by boundaries to utilize the wildcard (".*") for the boundaries and walls of the geometry. Unfortunately, my mesh file is large (>1gb) and sharing it is difficult. The mesh was created with ICEM (unstructured) and imported into openfoam with the fluent3Dmeshtofoam utility. checkMesh returns a 'Mesh OK' result and simpleFoam runs it well.

If it matters, I am also running OFv4.1 on Ubuntu1604.

Any input is really much appreciated as this stage is vital for my research! Thank you very much in advance!!
Attached Files
File Type: txt 0folder.txt (7.2 KB, 42 views)
File Type: txt fvSchemes.txt (1.5 KB, 43 views)
File Type: txt fvSolution.txt (1.9 KB, 42 views)
File Type: txt boundary.txt (2.2 KB, 27 views)

Last edited by bentkj; January 22, 2018 at 06:55.
bentkj is offline   Reply With Quote

Old   January 22, 2018, 12:46
Default
  #2
Senior Member
 
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17
rcastilla is on a distinguished road
Hello,
In my experience, rhoSimpleFoam is quite unstable even for moderate Mach numbers. I would suggest to try with rhoCentralFoam although it is a transient solver. It is density based and it is much more stable for high compressibility.

Best regards

Robert
rcastilla is offline   Reply With Quote

Old   January 22, 2018, 17:58
Default
  #3
New Member
 
Joseph Urich
Join Date: Mar 2009
Location: Pittsburgh, PA
Posts: 21
Rep Power: 17
jurich is on a distinguished road
Hello Ben,

If you look at Time = 2, density max/min go to 17.3 and 0. That's your divide by zero. You can add rhoMax and rhoMin parameters to your fvSolution file to limit this and let the solution get started, but it indicates an error in your problem set up.

In your U file you have the internalField velocity set to the same value as your free stream boundaries. In the first couple of solver steps, that will produce high gradients as it interacts with your geometry. Especially since you have second order schemes. You may want to cut that to ~1/10 of the value, or even 0.

Take a look at the rhoSimpleFoam squareBend tutorial for solver settings; your settings seem more like simpleFoam settings.

Best of luck.
jurich is offline   Reply With Quote

Old   January 23, 2018, 03:11
Default
  #4
New Member
 
Ben
Join Date: Oct 2016
Posts: 25
Rep Power: 10
bentkj is on a distinguished road
Quote:
Originally Posted by jurich View Post
Hello Ben,

If you look at Time = 2, density max/min go to 17.3 and 0. That's your divide by zero. You can add rhoMax and rhoMin parameters to your fvSolution file to limit this and let the solution get started, but it indicates an error in your problem set up.

In your U file you have the internalField velocity set to the same value as your free stream boundaries. In the first couple of solver steps, that will produce high gradients as it interacts with your geometry. Especially since you have second order schemes. You may want to cut that to ~1/10 of the value, or even 0.

Take a look at the rhoSimpleFoam squareBend tutorial for solver settings; your settings seem more like simpleFoam settings.

Best of luck.
Thanks for your suggestion Mr Joseph. Like you mentioned, limiting the density (rho) does help progress the solution by a few more steps, but the problem lies with my setup. I'm still unable to discover what's wrong but will continue looking (squarebend tutorial runs fine).

Cutting the internalfield velocity to (0 0 0) also helps the simulation progress and changes the error message to:

Code:
Time = 3

smoothSolver:  Solving for Ux, Initial residual = 0.546285, Final residual = 0.00166209, No Iterations 8
smoothSolver:  Solving for Uy, Initial residual = 0.350791, Final residual = 0.0015506, No Iterations 6
smoothSolver:  Solving for Uz, Initial residual = 0.356911, Final residual = 0.00232054, No Iterations 6
smoothSolver:  Solving for e, Initial residual = 0.923695, Final residual = 0.000999545, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.720858, Final residual = 0.00235791, No Iterations 5
time step continuity errors : sum local = 6.81735e-05, global = 1.32415e-18, cumulative = 7.3745e-19
rho max/min : 1 0.1
smoothSolver:  Solving for nuTilda, Initial residual = 0.0552017, Final residual = 0.000316008, No Iterations 4
ExecutionTime = 444.17 s  ClockTime = 445 s

Time = 4

smoothSolver:  Solving for Ux, Initial residual = 0.404296, Final residual = 0.00108116, No Iterations 8
smoothSolver:  Solving for Uy, Initial residual = 0.242708, Final residual = 0.00102003, No Iterations 6
smoothSolver:  Solving for Uz, Initial residual = 0.207327, Final residual = 0.00175429, No Iterations 6
smoothSolver:  Solving for e, Initial residual = 0.553096, Final residual = 0.000721111, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.697383, Final residual = 0.00574708, No Iterations 5
time step continuity errors : sum local = 0.000101322, global = 1.23099e-19, cumulative = 8.6055e-19
rho max/min : 1 0.1
smoothSolver:  Solving for nuTilda, Initial residual = 0.421538, Final residual = 0.00308192, No Iterations 4
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3  log in "/lib/x86_64-linux-gnu/libm.so.6"
#4  Foam::nutUWallFunctionFvPatchScalarField::calcYPlus(Foam::Field<double> const&) const at ??:?
#5  Foam::nutUWallFunctionFvPatchScalarField::calcNut() const at ??:?
#6  Foam::nutWallFunctionFvPatchScalarField::updateCoeffs() at ??:?
#7  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::evaluate() at ??:?
#8  Foam::RASModels::SpalartAllmaras<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correctNut(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
#9  Foam::RASModels::SpalartAllmaras<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::correct() at ??:?
#10  ? at ??:?
#11  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12  ? at ??:?
From what it looks like seems there's some problems with the turbulence model setup (and possibly wallfunction?). For reference, I've initialised the turbulence parameters nut and nuTilda according to: https://turbmodels.larc.nasa.gov/spalart.html. I will need to double check.
bentkj is offline   Reply With Quote

Old   January 23, 2018, 03:16
Default
  #5
New Member
 
Ben
Join Date: Oct 2016
Posts: 25
Rep Power: 10
bentkj is on a distinguished road
Quote:
Originally Posted by rcastilla View Post
Hello,
In my experience, rhoSimpleFoam is quite unstable even for moderate Mach numbers. I would suggest to try with rhoCentralFoam although it is a transient solver. It is density based and it is much more stable for high compressibility.

Best regards

Robert
Thank you for your suggestion Robert. is rhoCentralFoam valid even for mildly compressible (M=0.3 to 0.6) and turbulent flows? I will try it out. Thank you.
bentkj is offline   Reply With Quote

Old   January 24, 2018, 15:29
Default
  #6
Senior Member
 
Robert Castilla
Join Date: Apr 2009
Location: Spain
Posts: 110
Rep Power: 17
rcastilla is on a distinguished road
Quote:
Originally Posted by bentkj View Post
Thank you for your suggestion Robert. is rhoCentralFoam valid even for mildly compressible (M=0.3 to 0.6) and turbulent flows? I will try it out. Thank you.
Yes, at least I have used it for a wide range of Ma and turbulent flow.
Good luck
Robert
rcastilla is offline   Reply With Quote

Old   October 1, 2018, 04:18
Default
  #7
Member
 
madz
Join Date: Sep 2018
Posts: 34
Rep Power: 8
maddy11 is on a distinguished road
Hi Robert,


I'm an Openfoam beginner. I'm modelling transonic flow around RAE2822 aerofoil. Rhocentralfoam seems to be running for almost 44 hours now. The deltaT seems to show e-09 when I actually gave e-04. Can you please tell me why this is happening?
maddy11 is offline   Reply With Quote

Reply

Tags
common research model, compressible, error, rhosimplefoam


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
Compressible 2D airfoil rhoSimpleFoam fatal error volScalarField none jfournier OpenFOAM Running, Solving & CFD 4 September 28, 2017 07:28
compressible, rhoSimpleFoam, multi-species, steady state, rocket nozzle David_C OpenFOAM Running, Solving & CFD 1 April 18, 2017 12:01
how is rhoSimpleFoam a compressible steady statefor compressible flow cleoo OpenFOAM Pre-Processing 2 September 22, 2016 04:23
compressible flow, rhoSimpleFoam, boundary conditions Aeronautics El. K. OpenFOAM Running, Solving & CFD 0 June 26, 2016 15:27
compressible flow calculation error using rhoSimpleFoam solver student4326 OpenFOAM Running, Solving & CFD 7 November 2, 2015 12:34


All times are GMT -4. The time now is 02:32.