CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   a problem of nozzle simulation (http://www.cfd-online.com/Forums/openfoam/82417-problem-nozzle-simulation.html)

xck1986 November 25, 2010 13:16

a problem of nozzle simulation
 
1 Attachment(s)
Dear OF Users

I want to simulate a laval nozzle wit OF.
I have already simulate this case in StarCCM+, and it works well. But when we swith to openFoam, it always stop up to a certain iteration.

I have create the Mesh using HyperMesh, then save it as StarCD format, and convert it into OpenFOAM.

The solver we have chosen now is sonicFoam.

The setting of the boundary condition is in Folder 0 in the attached files.
For the boundary condition we have set a pressure boundary condition, the absolute pressure in inlet is 2bar and outlet is 1bar. Other setting is all in the Folder 0.

I think it is a problem of setting the boundary condition. Because when we decrease the initial velocity, e.g. from -100m/s to -10m/s (the fluid flow in -Z direction,so the velocity is negativ), and also decrease the inlet pressure e.g. from 2bar to 1.1bar, it can finish all the iteration.

Here I have copy here two folder:
1: Nozzlesimulation_stop_with_error: in this case we have set the pressure in inlet is 2bar, outlet is 1bar and initial velocity is -100m/s, but it always stop up to a certain iteration.

2: Nozzlesimulation_no_error: in this case we have decrease the the initial velocity from -100m/s to -10m/s, and also decrease the inlet pressure from 2bar to 1.1bar,so it can run the simulation up to the last iteration.

Because the mesh is too large, so in the folder constant I have not copy the file polyMesh.

I don't konw where exactly the problem is. I am so appreciate that if anyone can help me.
Thanks a lot for you help.


Chenkai


The error is
--> FOAM FATAL ERROR:
Maximum number of iterations exceeded
From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const
in file /home/armin/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) in "/home/armin/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/armin/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::ePsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::eConstThermo<Foam:: perfectGas> > > > >::calculate() in "/home/armin/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libbasicThermophysicalModels.so"
#3 Foam::ePsiThermo<Foam::pureMixture<Foam::constTran sport<Foam::specieThermo<Foam::eConstThermo<Foam:: perfectGas> > > > >::correct() in "/home/armin/OpenFOAM/OpenFOAM-1.7.1/lib/linuxGccDPOpt/libbasicThermophysicalModels.so"
#4
in "/home/armin/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/sonicFoam"
#5 __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#6
in "/home/armin/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linuxGccDPOpt/sonicFoam"
Aborted

nakul November 26, 2010 01:55

Hi

The problem is definitely with your BC. For pressure try "zeroGradient" at the oultet. If however outlet pressure specification is really crucial to your test case, try wave transmissive. I would however recommend zeroGradient only.

Similarly you may specify zeroGradient at outlet for T and U also, if you are sure that supersonic flow will be established in the nozzle for your pressure ratio. Otherwise you may try "inletOutlet" for U.

One more advice try simulating with rhoCentralFOAM, because in my opinion it gives better results.

-Nakul

xck1986 November 26, 2010 06:05

2 Attachment(s)
Quote:

Originally Posted by nakul (Post 284850)
Hi

The problem is definitely with your BC. For pressure try "zeroGradient" at the oultet. If however outlet pressure specification is really crucial to your test case, try wave transmissive. I would however recommend zeroGradient only.

Similarly you may specify zeroGradient at outlet for T and U also, if you are sure that supersonic flow will be established in the nozzle for your pressure ratio. Otherwise you may try "inletOutlet" for U.

One more advice try simulating with rhoCentralFOAM, because in my opinion it gives better results.

-Nakul



Hallo Nakul,

Thanks a lot for you help.
I have use you suggestion to set the outlet presuure as zeroGradient and also for the T and U.
It works better than before and it can finish more timestep, but still stop at one timestep with the same error.

--> FOAM FATAL ERROR:
Maximum number of iterations exceeded
From function specieThermo<thermo>::T(scalar f, scalar T0, scalar (specieThermo<thermo>::*F)(const scalar) const, scalar (specieThermo<thermo>::*dFdT)(const scalar) const) const
in file /home/armin/OpenFOAM/OpenFOAM-1.7.1/src/thermophysicalModels/specie/lnInclude/specieThermoI.H at line 67.
FOAM aborting

I have copy here the results and parameters from another software StarCCM+. Could you pleasure do me more favour?
Thanks again!!!

Chenkai

nakul November 26, 2010 07:45

Sorry, I can't help you here becuase I have never worked on StarCMM and I also don't have that software.

However I will help you with your problems in OpenFOAM.

You may try wave transmissive for p and inletOutlet for U at the outlet and telll me what results you get.

xck1986 November 26, 2010 10:02

4 Attachment(s)
Quote:

Originally Posted by nakul (Post 284889)
Sorry, I can't help you here becuase I have never worked on StarCMM and I also don't have that software.

However I will help you with your problems in OpenFOAM.

You may try wave transmissive for p and inletOutlet for U at the outlet and telll me what results you get.


hallo Nakul,
Thanks a lot for your help.
I have set the Outlet of P and U like you tell me.
1. zeroGradient for P and U
2. transmissive for p and inletOutlet for U
But it still stop up to a timestep, here I past the residuals files of the two case. It likes like very strange, and at time step 0.0001 the result is divergent.
Thanks a lot for your time!

nakul November 29, 2010 01:00

Hi,
I went through the attached case files that you sent. I think you may try doing the following

1) Reduce your maxCo =0.5.
2) Run "checkMesh" command and see if your mesh is satisfactory. Since you didn't upload your blockMeshDict, so I wasn't able to do this.
3) Don't specify fixedValue at outlet for any of the parameters. Change BC of k, epsilon and T also at outlet to inletOutlet/zeroGradient. They can have their BC similar to U.
Try these things along with p as transmissive/zeroGradient and tell me if you face any other problems.

xck1986 November 29, 2010 11:43

Quote:

Originally Posted by nakul (Post 285148)
Hi,
I went through the attached case files that you sent. I think you may try doing the following

1) Reduce your maxCo =0.5.
2) Run "checkMesh" command and see if your mesh is satisfactory. Since you didn't upload your blockMeshDict, so I wasn't able to do this.
3) Don't specify fixedValue at outlet for any of the parameters. Change BC of k, epsilon and T also at outlet to inletOutlet/zeroGradient. They can have their BC similar to U.
Try these things along with p as transmissive/zeroGradient and tell me if you face any other problems.


Hi Nakul,
Thank you very much for your suggestion.
It works very well this time, when I follow your instruction. I have set all the outlet boundarycondition as zerogradient.
But this time I have use the solver rhoPisoFoam instead of sonicFoam. Because with sonicFoam I always have the same error, I think it is the resaon that with sonicFoam, even if I set the maxCo=0.8, the Co is still very lager during the calculation.
So I change the solver and it works with rhoPisoFoam

And I still have a question: When do we need to set the boundary condition of Pressure as Transmissive?
Thanks a lot again!!!

nakul November 30, 2010 00:43

Hi

You use transmissive for pressure when you want to avoid reflection of pressure waves back into your domain and want them to be transmitted smoothly out of the domain through the outlet.

Read this:
http://openfoamwiki.net/index.php/Ho...dary_condition

atareen64 February 2, 2011 12:10

Thank you!
 
Thank you so much for this post. It's helping me with my case :D

upal_arif May 24, 2012 01:39

Hi,

I am looking for a freelancer to simulate supersonic flow through C-D nozzle by fluent 6.2.16

Please contact upal_arif@yahoo.com


Quote:

Originally Posted by nakul (Post 284850)
Hi

The problem is definitely with your BC. For pressure try "zeroGradient" at the oultet. If however outlet pressure specification is really crucial to your test case, try wave transmissive. I would however recommend zeroGradient only.

Similarly you may specify zeroGradient at outlet for T and U also, if you are sure that supersonic flow will be established in the nozzle for your pressure ratio. Otherwise you may try "inletOutlet" for U.

One more advice try simulating with rhoCentralFOAM, because in my opinion it gives better results.

-Nakul


nakul May 25, 2012 01:38

Hi Arif,

Please provide some more details regarding your problem with supersonic C-D Nozzle

vwibaut November 27, 2012 09:22

waveTransmissive
 
Hi Nakul and other foamers,

I would kike to simulate the flow in a nozzle, specially the case supersonic in all the divergent and the case supersonic with a shock in the divergent. As a shock is possible I use waveTransmissive for the outlet pressure.
My questions concerns linf: when I put a big linf I have a flow wich seems to be good except that my outlet pressure isn't the value I give in waveTransmissive.
when I put a small linf, stall appears. How do I choose linf?

Thanks for your help :)


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