CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Help running an invicid compressible nozzle flow using openFOAM (http://www.cfd-online.com/Forums/openfoam-solving/72484-help-running-invicid-compressible-nozzle-flow-using-openfoam.html)

rbozinoski February 7, 2010 17:32

Help running an invicid compressible nozzle flow using openFOAM
 
1 Attachment(s)
Hi Foamers,

I am very new to OpenFOAM and have only been playing around with it for about a month(very unsuccessfully I might add). I have heard great things about this cfd toolkit and wanted to start getting my feet wet with some of its capabilities. I've gone through some of the tutorials and have read a lot of journal articles where OpenFOAM was used and am convinced that OpenFOAM will be a great tool for my future research aspirations. Unfortunately, my first few attempts at using it for cases other than what's packaged with the tutorials have not gone very well. So what I finally did was focus all my efforts on learning OpenFOAM by first using the following Fluent tutorial.

http://courses.cit.cornell.edu/fluent/nozzle/step4.htm

This tutorial outlines a simple inviscid nozzle flow problem and I wanted to reproduce the results using OpenFOAM. I converted the mesh using 'fluentMeshToFoam' and then tried to first generate an initial flow field using potentialFoam and then launch an inviscid case using rhoSonicFoam. I was unsuccessful with both. I've attached a tarball of my case files and was hoping someone could help me understand what I am doing wrong and how to properly launch this case. I will admit that I don't have a clear understanding of how to properly implement the boundary conditions or how to get more information regarding the current capabilities in OpenFOAM.

Once again, thank you all in advance and any assistance would be greatly appreciated.

rbozinoski February 10, 2010 10:20

Can anyone please offer any advice or help. Still very much lost with OpenFOAM.

Thank you in advance.

xisto February 11, 2010 11:36

Hi Radoslav

What is the problem? you need to be more specific.

I have seen your case (rhoSonicFoam) and you make some mistakes.

In the /0/p the internalField of pressure must be the value that you specify at the outlet.

Try also to lower your deltaT.

Best luck

Cheers,

CX

rbozinoski February 12, 2010 01:08

1 Attachment(s)
Hello Carlos,

Thank you so much for replying. I took your advice and set the internal pressure field to the exit pressure and lowered my time step but I still get the following error:

**********************

Create time

Create mesh for time = 0

Reading thermodynamicProperties

Reading field p

Reading field T

Reading field U


Starting time loop

Time = 1e-06


Max Courant Number = 0.00504052



request for surfaceScalarField phi from objectRegistry region0 failed
available objects of type surfaceScalarField are

4
(
phiv
limitedLinearLimiter(rho)
differenceFactors_
weightingFactors
)
#0 Foam::error::printStack(Foam::Ostream&) in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/rhoSonicFoam"
#3 Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvsPatchField, Foam::surfaceMesh> >(Foam::word const&) const in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#4 Foam::totalPressureFvPatchScalarField::updateCoeff s(Foam::Field<Foam::Vector<double> > const&) in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#5 Foam::fvMatrix<double>::fvMatrix(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensionSet const&) in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#6 Foam::fv::gaussConvectionScheme<double>::fvmDiv(Fo am::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) const in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libfiniteVolume.so"
#7 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double , Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::word const&) in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/rhoSonicFoam"
#8 Foam::tmp<Foam::fvMatrix<double> > Foam::fvm::div<double>(Foam::GeometricField<double , Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/rhoSonicFoam"
#9 main in "/home/rbozinoski/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/rhoSonicFoam"
#10 __libc_start_main in "/lib/libc.so.6"
#11 _start at /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:116


From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/rbozinoski/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 140.

FOAM aborting

Aborted

******************************

I tracked down the problem to the total pressure/temperature boundary conditions. It seems to be complaining about the variable phi. I have tried using other bc at the inlet but all eventually diverge. I was wondering if you are having the same issues. Also, I am not sure if my control/thermodynamicProperties file is correct. I am simply trying to run this case inviscid and compressible.

I have attached my latest rhoSonic files. You will have to use the fluentMeshToFoam utility to generate the OpenFOAM mesh to run the simulation.

Any further advice will be greatly appreciated.

Thank you again for your help.

xisto February 12, 2010 06:22

I never used a density based solver in OpenFoam, just a Pressured based.
If you want to try with the rhoPisoFoam check the boundary conditions in this post (the 0 file).

http://www.cfd-online.com/Forums/ope...tml#post244986

Another thing it seems that you have a pressure realation very high resulting in Ma=2.9, in the other and the the velocity (internalField and intial value) is to low 30 m/s. This is why it crashes (imagine you crashing against a wall).

My advice is to increase the velocity in the internal field and at the inlet to 2.9 Ma.

Good Luck

CX

rbozinoski February 12, 2010 11:55

Carlos,

Yeah I think you are correct regarding the velocity initialization. I'll have to give that a try to see what happens. However, I am pretty sure that I will still get the same error I posted earlier regarding the total pressure and temperature bc's.

Thanks for pointing me to your other post. I think I will switch to the rhoPisoFoam solver and try and reproduce that subsonice case first and then the transonic case. I noticed that you posted your initialization files and was wondering if you would mind also posting the grid and any other files I would need to run this simulation. I just wanted to start from a working case and then build up to a transonic from there.

Thank you again for your help,

-RB

xisto February 12, 2010 12:24

My email is carlos_xisto@hotmail.com

Just send me a request and I will mail the files to you

Cheers

CX

shipman January 14, 2013 03:16

Dear Carlos,

Hi,
I am new user in openFoam

I try to run the cavitatingFoam for the throttle. For pressure at the inlet BC set as totalPressure so by changing the velocity i try to get new results but give following errors. COuld you help to me what does it mean and how can i correct it?

Thanks.

Phase-change corrected p max-min : 6.37897e+07 400
max(U) 14881.4
#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 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::Field<double> const&, Foam::Field<double> const&, Foam::Field<double> const&) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::GAMGSolver::scalingFactor(Foam::Field<double >&, Foam::lduMatrix const&, Foam::Field<double>&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#5 Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMa trix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#8
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/cavitatingFoam"
#9 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#10
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/cavitatingFoam"
Floating point exception (core dumped)

Ranjan April 5, 2014 04:13

Rocket Nozzle flow simulation in OpenFOAM
 
Dear Foamers

Can anyone suggest a solver I can use for simulating supersonic flow in a rocket nozzle?

Thanks

hg2lf April 5, 2014 12:29

rhoCentralFoam is OK
 
Quote:

Originally Posted by Ranjan (Post 483979)
Dear Foamers

Can anyone suggest a solver I can use for simulating supersonic flow in a rocket nozzle?

Thanks



you need to specify all variables except one at inlet (f.g. fixed values for temperature (static), and extrapolate all variables from outlet (zero gradient).
You can use totalPressure, total temperature, zeroGradient(U) for inlet of the nozzle, and specify static pressure and temperature.


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