CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Error with rhoCentralFoam in Shock tube (https://www.cfd-online.com/Forums/openfoam/111245-error-rhocentralfoam-shock-tube.html)

himanshu28 January 1, 2013 08:45

Error with rhoCentralFoam in Shock tube
 
hi,

i have been working with the tutorial file of compressible flow in the open foam of Shock tube During the process the Mesh of the geometry is happening quiet easily but when i am running the solver it is giving me the error message as follows:
************************************************** *************
vaio@ubuntu:~/OpenFOAM/vaio-2.1.1/run/shockTube$ rhoCentralFoam
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.1 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.1.1-221db2718bbb
Exec : rhoCentralFoam
Date : Jan 01 2013
Time : 19:08:08
Host : "ubuntu"
PID : 5824
Case : /home/vaio/OpenFOAM/vaio-2.1.1/run/shockTube
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

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

Create mesh for time = 0

Reading thermophysical properties

Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<perfectGas>>>>>
Reading field U

Creating turbulence model

Selecting turbulence model type laminar
Reading thermophysicalProperties

fluxScheme: Kurganov

Starting time loop

#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 void Foam::divide<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::Vect or<double>, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
#4 Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::operator/<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>(Foam::GeometricField<Foam::Vect or<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
#5
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/rhoCentralFoam"
Floating point exception (core dumped)
vaio@ubuntu:~/OpenFOAM/vaio-2.1.1/run/shockTube$ ^C
vaio@ubuntu:~/OpenFOAM/vaio-2.1.1/run/shockTube$


I am new to the open foam and not able to find the solution of the problem if anybody has encountred the same problem please help in resolving the issue.:confused::confused::confused::confused::con fused::confused:

Thanks
Himanshu..:)

Tushar@cfd January 2, 2013 05:11

Hello,

Check the following thread, it will be helpful to you.

http://www.cfd-online.com/Forums/ope...am-detail.html

Best regards,
Tushar

praveen January 6, 2013 03:10

You are getting floating point exception due to negative pressure or density. Try changing the limiter or reducing time step or cfl number.

Lantiantiger January 7, 2013 15:41

I've been having the exact same error as himanshu28. (Bear in mind, I'm running the tutorial file with NO modifications...)

Quote:

You are getting floating point exception due to negative pressure or density. Try changing the limiter or reducing time step or cfl number.
I tried reducing the timestep from 1e-6 to 1e-9, same error. Reducing maxCo from 0.2 to 0.02 also did not change the error.

Forgive me, I'm new to OpenFoam, but I can't figure out what you mean by limiter.

himanshu28 January 8, 2013 05:40

Quote:

Originally Posted by Lantiantiger (Post 400592)
I've been having the exact same error as himanshu28. (Bear in mind, I'm running the tutorial file with NO modifications...)



I tried reducing the timestep from 1e-6 to 1e-9, same error. Reducing maxCo from 0.2 to 0.02 also did not change the error.

Forgive me, I'm new to OpenFoam, but I can't figure out what you mean by limiter.

The limiter are termed as interpolation scheme while solving the hyperbolic PDEs to calculate from cell center to the face. for more details you ca refer to OPENFOAM user guide section 4.4.1. My problem is still not solved yet. If you get some result please share

Thanks
Himanshu:)

himanshu28 January 8, 2013 08:21

Error Persist..!!!
 
2 Attachment(s)
Quote:

Originally Posted by praveen (Post 400286)
You are getting floating point exception due to negative pressure or density. Try changing the limiter or reducing time step or cfl number.

hello,
thanks for reply

I have tryed your suggestions but the the error is still persist i am attaching the executable of shocktube if you can check it would be a great help.Attachment 18040

Attachment 18041
thank you

immortality January 8, 2013 11:09

I have same this error with rhoCentralFoam for a long time.is rhoPimpleFoam more stable?

Lantiantiger January 8, 2013 13:06

Alright, I've tried 10 different limiters, and I'm still getting the same error. The original limiter was linear, with reconstructs for rho, U, and T using vanLeer, vanLeerV, and vanLeer respectively. I commented out the reconstructs and tried different limiters for the default and still get the same error message.

I've also tried using the shockTube example in sonicFoam, same error message.

dhuckaby January 11, 2013 14:49

Hello Himanshu,

I think the problem is the initial conditions. According to your ./0 directory, your pressure is initialized to 0 (Pa) and the temperature 1 (K). It appears that you did not run "setFields" before running "rhoCentralFoam".

Dave

immortality January 12, 2013 03:49

i dont want to use non homogenious initial condition so deleted setFieldsDict.is it ok?

dhuckaby January 14, 2013 08:27

You can use a homogeneous initial condition, but for the simulation to run, the initial pressure should be a positive number (1e5 Pa). The temperature might also need to be increased ( > 200K) due to the thermodynamic parameterization.

himanshu28 January 15, 2013 23:54

Quote:

Originally Posted by immortality (Post 401478)
i dont want to use non homogenious initial condition so deleted setFieldsDict.is it ok?

Can you please tell me how to run a setfieldDict file the procedure i adopt s
is
$ blockMesh
$ <solver> /in this case rhoCentralFoam

what alterations i need to perform to run this case.Since i am new to open foam your guidance will help.

Thank You

Himanshu

Linse January 16, 2013 04:37

@immortality: If you have no gradients at any place, what flow would you have? So keeping a completely homogeneous case without any gradients or differing values in my opinion contradicts the principle of flow. But that is your decision to make.
The important thing indeed is that you need to have a case which has conditions acceptable to the solver.
If you really do not want to change anything via the setFieldsDict, please change 0/p and 0/T to reasonable values! Temperatures below 200 K are difficult to some of the thermodynamic libraries. And pressures below 1000 Pa most probably are below limits for using a control-volume approach as the FVM is one. (More info on that: Look for Knudsen-number and direct simulation monte carlo DSMC)

@himanshu28:
- The alteration you need to make should be simply running the command "setFields" just after blockMesh. Then your case should be set up correctly and you should have a nice shocktube simulation. The different pressure zones you can define within system/setFieldsDict.
- In general for working with the tutorials, it is advantageous to have a look into the "Allrun" file. Usually all the steps are conducted in the right order in there.
The basic approach actually would be to first conduct simply "./Allrun", then do the single steps from the Allrun-file by hand.

himanshu28 January 17, 2013 07:25

Thanks alot !!!
 
Quote:

Originally Posted by Linse (Post 402126)
@immortality: If you have no gradients at any place, what flow would you have? So keeping a completely homogeneous case without any gradients or differing values in my opinion contradicts the principle of flow. But that is your decision to make.
The important thing indeed is that you need to have a case which has conditions acceptable to the solver.
If you really do not want to change anything via the setFieldsDict, please change 0/p and 0/T to reasonable values! Temperatures below 200 K are difficult to some of the thermodynamic libraries. And pressures below 1000 Pa most probably are below limits for using a control-volume approach as the FVM is one. (More info on that: Look for Knudsen-number and direct simulation monte carlo DSMC)

@himanshu28:
- The alteration you need to make should be simply running the command "setFields" just after blockMesh. Then your case should be set up correctly and you should have a nice shocktube simulation. The different pressure zones you can define within system/setFieldsDict.
- In general for working with the tutorials, it is advantageous to have a look into the "Allrun" file. Usually all the steps are conducted in the right order in there.
The basic approach actually would be to first conduct simply "./Allrun", then do the single steps from the Allrun-file by hand.

Hi linse,
Thank a lot for your guidance.

Regards
Himanshu..:)

anishtain4 January 17, 2013 13:15

Quote:

Originally Posted by Linse (Post 402126)
@immortality: If you have no gradients at any place, what flow would you have? So keeping a completely homogeneous case without any gradients or differing values in my opinion contradicts the principle of flow.

Actually that is one perfect way every developer uses when they are just crazy about a difficult bug, having no gradient does not contradict anything to prevent the simulation and produce error, if you don't have gradient but flow that is what you should call contradict.

immortality December 4, 2013 13:06

I had an entry in the tube with higher pressure,then a gradient there was and movement occurred due to incoming fluid.

RygeltheXVI February 23, 2018 00:20

Other thread of interest
 
This other thread:

https://www.cfd-online.com/Forums/op...ntralfoam.html

may be of interest to people having a similar problem. I can say the bounding on energy equation method suggested helped avoid stability problems I was encountering during solution startup.

Good luck with you own simulations!


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