CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Turbulent compressible and subsonic gas flow (https://www.cfd-online.com/Forums/openfoam-solving/60587-turbulent-compressible-subsonic-gas-flow.html)

Rasmus Gjesing (Gjesing) December 15, 2004 10:47

I have a simple question for
 
I have a simple question for the board.

Which solver applies best for a turbulent, compressible and subsonic (0.4<M<1.0) flow?

I have tried setting up a calculation using sonicTurbFoam, inspired by the prism-tutorial, but when I go down in Machs, I find it hard to make succesful calculations.

Thanks in advance.

Eugene de Villiers (Eugene) December 16, 2004 06:08

coodles the compressible LES
 
coodles the compressible LES solver works very well for unsteady 3D flows at all kinds of Mach numbers.

Rasmus Gjesing (Gjesing) December 16, 2004 07:51

coodles, is that a new solver
 
coodles, is that a new solver included in the new openFoam-version? I am currently using foam2.3 from the old days.

Thanks for the help!

Eugene de Villiers (Eugene) December 16, 2004 09:04

Yes.
 
Yes.

Rasmus Gjesing (Gjesing) December 16, 2004 11:35

I have now succesfully update
 
I have now succesfully updated my computers to OpenFOAM-1.0.

I have found the coodles-solver, but I cannot find the configuration files for FoamX.

Would it be possible to get the FoamX configuration-files for coodles from you guys, in case you have them?

Thanks again for all your help!

Mattijs Janssens (Mattijs) December 16, 2004 11:42

Guess that one hasn't been do
 
Guess that one hasn't been done yet. Probably it takes the same setup (apart from boundary conditions) as oodles. Have a look at the oodles tutorial.

Mattijs

Joern Beilke (Beilke) December 20, 2004 13:34

But what should I do, if I on
 
But what should I do, if I only want a normal turbulence model together with an incompressible flow (Ma < 0.5) (like starcd with ideal gas)?

Mattijs Janssens (Mattijs) December 20, 2004 13:45

turbFoam = incompressible + t
 
turbFoam = incompressible + turbulence model.

Mattijs

Joern Beilke (Beilke) December 20, 2004 15:11

Sorry, I mean compressible wi
 
Sorry, I mean compressible with standard KEpsilon ;-)

Henry Weller (Henry) December 21, 2004 17:36

We have not written a basic c
 
We have not written a basic compressible turbulent flow solver because it has not been needed although this functinality does form the basis of all the combustion codes. If you take XiFoam for example and strip out all the combustion modelling you will end up with a basic compressible turbulent flow solver which should suit your needs. If you would like OpenCFD write one for you let us know and we can discuss a small contract to cover this application development and associated documentation and FoamX preprocessor support.

sinclair March 16, 2005 20:01

I am using rhoTurbFoam for an
 
I am using rhoTurbFoam for an exhaust manifold simulation on a high quality hex mesh. It appears to be running fine with Co<=0.3. Initialisation is from a reasonably converged simpleFoam simulation (with no problems of turbulence bounding). I've made some modifications to achieve an adaptive number of piso and non-orthogonal corrections at each timestep (I can share these modifications if people are interested).

I have some problems though that people may have some experience with:

1) After quite some time of steady timestep advancement, the enthalpy correction blows up and gives the following error...

BICCG: Solving for h, Initial residual = 0.00719075, Final residual = 2.63587e-05, No Iterations 1

--> FOAM FATAL ERROR : Maximum number of iterations exceeded

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/dm2/henry/OpenFOAM/OpenFOAM-1.1/src/thermophysicalModels/specie/lnInclude/ specieThermoI.H at line: 83.

Although, it appears that the enthalpy equation has converged (shown above). The error is caused when it is exceeding the 100 iterations to obtain a temperature value. This problem persists even when turbulence is switched off.

2) Like with enthalpy, sometimes the k and epsilon fields need to be bounded after some time of well behaved timesteps (~1000 timesteps).

bounding epsilon, min: -5.3484e+07 max: 5.80694e+10 average: 3.62477e+06

I am using the Gamma2 scheme for k and epsilon convection with a value of 1. Does anyone have any tips with this?

Thanks for the help!

hjasak March 17, 2005 03:11

Not sure about 1 but I can tel
 
Not sure about 1 but I can tell you about 2.

The problem with bounding means that your setup of differencing schemes may be problematic. The convection differencing is OK, even a bit too conservative - you should not need to use the factor greater than about 0.5.

The problem may be in the laplacian - could you please try to run checkMesh and tell me what the non-orthogonality angles are. If they are big-ish, try the laplacian scheme like this (for k and epsilon, and maybe for the enthalpy as well)

laplacian(thingy,thingy) Gauss linear limited 0.5;

This is interesting, please keep me posted (you can fiddle the last number, 0.7 or 1 should work as well),

Hrv

sinclair March 17, 2005 07:56

Hi Hrvoje, I am currently r
 
Hi Hrvoje,

I am currently running a kEpsilon case with the changes to the laplacian scheme you suggest (k, epsilon and enthalpy). Will let you know of the result.

As for the checkMesh non-orthogonality angles, some key measures are...

Mesh non-orthogonality Max: 52.5196 average: 11.7172
Non-orthogonality check OK.

Max skewness = 27.6894 percent. Face skewness OK.

Minumum edge length = 0.000309256. Maximum edge length = 0.00480689.

All angles in faces are convex or less than 10 degrees concave.

Number of cells by type:
hexahedra: 169024
Mesh OK.
...etc...

sinclair March 18, 2005 01:49

Hrvoje, I have tried differ
 
Hrvoje,

I have tried different variants of limited (0.333, 0.5, 0.7), corrected and uncorrected on the k, epsilon and enthalpy Laplacians. Bounding on both k and epsilon still occurs at various stages, then crashes due to enthalpy (temperature) exceeding maximum number of iterations.

hjasak March 18, 2005 02:41

Hmm, I was afraid of that when
 
Hmm, I was afraid of that when I saw the max non-orthogonality angle - this really is a good mesh.

Sorry to waste your time, but I've got a couple more ideas to try:
- if you are using partial convergence in the solver, try converging all the way
- the final thing I do in such cases is to switch the convection discretisation to upwind. If there are still problems with bounding k and epsilon, this would indicate serious problems with the solver (or a nasty bug).

If all that fails (this is now pretty conservative discretisation and foam is certainly able of doing better) and the geometry is not confidential (and below a million cells), I'd like to have a look at it.

Sorry for the trouble, I am running out of easy ideas. Please let me know.

Regards,

Hrv

henry March 18, 2005 03:40

Jarrod, There may be some i
 
Jarrod,

There may be some issues with the JANAF thermodynamics/heat-transfer due to some developments I made to the thermo library to handle complex boundary conditions. I am not sure if these problems might relate to your case failing but you could try using constant coefficient termodynamics and/or adiabatic walls.

panara April 21, 2005 07:11

I have the same problems as Ja
 
I have the same problems as Jarrod,

I am trying to simulate a channel flow with constant wall heat flux.

I cannot use adiabatic walls so what should I do?

Should I use another solver?

Daniele

henry April 21, 2005 07:15

Constant wall heat flux is eqi
 
Constant wall heat flux is eqivalent to a fixed gradient boundary condition on energy/temperature.

panara April 21, 2005 07:19

Yes, I am using fixed gradient
 
Yes, I am using fixed gradient boundary condition on temperature and I get the same error message as Jarrod.

It is related to the boundary condition I am giving or something else?

henry April 21, 2005 07:26

What OpenFOAM version are you
 
What OpenFOAM version are you running?
What solver?
What thermodynamics package?
Have you tried changing the gradient?
Does it run if the gradient is small enough?
Have you tried changing the sign of the gradient?

panara April 21, 2005 07:32

>What OpenFOAM version are you
 
>What OpenFOAM version are you running?

1.1

>What solver?

rhoTurbFoam

>What thermodynamics package?

// Thermophysical model
thermoType hThermo<puremixture<consttransport<speciethermo<hc onstthermo<perfectgas>>>>>;

mixture air 1 28.9 1300 2.544e+06 1.84e-05 0.7;

>Have you tried changing the gradient?
>Does it run if the gradient is small enough?
>Have you tried changing the sign of the >gradient?

No I didn't try.
I will, and I'll let you know,

Thanks,

Daniele

henry April 21, 2005 07:35

I have checked the thermo libr
 
I have checked the thermo library and the error in the thermodynamics only related to certain combustion thermo packages not the basic ones used by rhoTurbFoam.

Another useful check would be if you were to run with an isothermal wall and increase it's temperature and see what happens.

panara May 19, 2005 05:40

Dear all, I am using rhoTur
 
Dear all,

I am using rhoTurbFoam (URANS) for simulating a heated air pipe flow with high amplitude pulsation of the flowrate.

Im using the following BC

Inlet: prescribed pulsating velocity, gradient of p = 0, temperature inlet constant.

Outlet: gradient of velocity = 0, gradiet p = 0, gradient T = 0

Wall: Twall = constant

I am comparing Low Reynolds and High Reynolds Turbulence models. I would like also to change the wall functions.

I have some questions:

1) rhoTurbFoam uses the turbulence models in src/turbulencemodels/compressible or incompressible ?
2) what is G in (compressible) wallDissipationI.H? is it the integrated contribution of epsilon in the near wall cell in the UMIST approach?
3) why the boundarySource of epsilon is multiplied by 1.0e+10?

Daniele

henry May 19, 2005 05:46

1) src/turbulencemodels/compre
 
1) src/turbulencemodels/compressible

2) G is the turbulent kinetic energy generation rate
(take a look at the sources in the k-equation)

3) In wall function approaches epsilon is usually fixed in the near-wall cell and multiplying the source by a large number and setting the central-coefficient to that number is a clunky but effective way of doing this.

panara May 20, 2005 03:32

Thanks for the usefull explana
 
Thanks for the usefull explanation,

I have another question, I am experiencing problem in convergence when the amplitude of the pulsating flow in the channel is high, and I have reverse flow...

the Co goes up and then I get the error message as Jarrod.

Can be due to the BCs I am using?
Schall I use inletOutlet and OutletInlet BC?
If yes can somebody explain me how this BC works?
In the manual it is written that using those BCs two value should be given, inletValue and value, what are they?

Daniele

henry May 20, 2005 04:01

Do you have outflow at the inl
 
Do you have outflow at the inlet or inflow at the outlet or both?

The inletOutlet BC simply changes the boundary condition for stability based on the direction of the flux, i.e. uses zero-gradient for outflow and the value specified to inflow.

outletInlet is the opposite which I created for pressure but it is unlikely to be appropriate in your case.

I do not know what inflow value you should specify, do you know what the inflow should be? If you want to limit the reverse flow try specifying a zero inlet value.

panara May 20, 2005 05:18

It is a pulsating channel, it
 
It is a pulsating channel, it means that I have both conditions, the inlet at some point becomes an outlet and the outlet an inlet.

I prescribe an oscillating value of velocity at the inlet and a fix value of pressure at the outlet.. I am not sure that this BCs are consistent..

Do you have any suggestions?

Daniele

henry May 20, 2005 05:32

You can use inletOutlet for th
 
You can use inletOutlet for the velocity and outletInlet for the pressure but you will have to adjust the inlet value of velocity according to the way in which you are driving the pulsations.

panara May 20, 2005 05:58

Do you think that the BCs I wa
 
Do you think that the BCs I was giving are badposed or refining the grid and using a smaller time step can help?

Since I have already an oscillatingFixedValue BC, can I derive an inletOutletOscillatingFixedValue BC?

Can you give me some hint on how to do that?
where is the src of the inletOutlet BC ?

Thanks for your time,

Daniele

henry May 20, 2005 06:07

Having boundary conditions tha
 
Having boundary conditions that change the bulk direction of the flow is likely to give problems and if you can think of ways to setup the case to avoid such complex and critical BCs it would be good idea.

You will find the implementation of the complex physical BCs in

OpenFOAM-1.1/src/OpenFOAM/fields/fvPatchFields/derivedFvPatchFields

mattos May 22, 2005 23:37

Hi Guys I'm looking for the
 
Hi Guys

I'm looking for the case root directory entry of rhoTurbFoam tutorials into foamX without success? Should I do something more to see the case root directory rhoTurbFoam tutorial dirs into the foamX trees? I guest that only if I can see this directory I should to edit and clone the case of rhoturbfoam class using foamX, is it?

Many tanks in advance

Wladimyr

mattos May 23, 2005 16:09

Hello Guys I have got the s
 
Hello Guys

I have got the same problem reported by Jarrod at MArch/17 - item 1. It means, the solver crashes with the following message:--> FOAM FATAL ERROR : Maximum number of iterations exceeded
Function: specieThermo<thermo>:...

How can I solve this problem?

The test case is a NACA profile discretized in 3D. The spanwise is 3 mts and the cord is 1 m. The BC in the root and tips plane is simmetry (empty). The Mach is 0.7 and the farfield is divide in two parts: I defined the front farfield faces as inlet and the back farfield faces as outlet. Which are the best BC for farfield boundaries in such type of test case?

And what means R in the fields? Is the Reynolds Stresses? Using the K-epsilon model, have I impose some value or it is calculated from the flowfield?

Could someone help me?


Many tanks in advance!

Wladimyr Mattos Dourado

henry May 23, 2005 16:12

Have you tried running incompr
 
Have you tried running incompressible?

Yes R is the Reynolds stress and is not used unless you choose a Reynolds stress model.

mattos May 24, 2005 12:26

Hi Weller I initialy tried
 
Hi Weller

I initialy tried to run the compressible solver rhoturbfoam. The last message is results of this temptative. Just now I run the incompressible solver (turbfoam) and its work. Why your question about to try the incompressible? How solve that problem (crashing due thermophysical function)?

Second, I have the results of the incompresible solve. How can I transfer this field for the compressible case to use as initial conditions? The only way that I see now is copying the field files to the new comrpessible case first time directory. Have it another way to make this transfer using some foam tool ?

Really opem Foam is a nice CFD code. COngrutulations for you initiative and soo I hope to colaborate more actively to develop new features for foam.

Tank in advance for your help

Wladimyr

henry May 26, 2005 13:36

Running compressible is alway
 
Running compressible is alway more tricky than running incompressible: there is more to go wrong. You may find that starting from the incompressible solution helps your start-up problem and yes you can do this by copying the fields.

Are you running with the transonic option for the pressure? Given that your Ma is 0.7 you might find it helpful for stability.

You might also find it useful to start with a very small time step and crank it up as the solution progresses.

mattos May 27, 2005 15:07

Hi Weller Tank very much fo
 
Hi Weller

Tank very much for your help and advises. Your answer has grown some doubts in my mind such as: "How running with the transonic option for the pressure?". How is it turned on (or setup)?

I already try to begin the calculation with small time step. In fact, I use variable time set option and I impose Courant number between 0.15 and 0.3.

The copy of the incompressible solution field to compressible one is donne only using "cp" OS command directly, i.e., there are not a foam utility that do it, is it?

I already had success in the calculations of incompressible flow over this geometry (Airfoil). The air speed was set 10 m/s and the cord is 1 m long. I calculated using k-ep model and the boundary layer does not appear. The mesh is fine enough near the wall boundaries ( I hope!). Now I'm trying to guest what does not appear the boundary layer in such case!

Many tanks for your help!

Wladimyr

henry May 28, 2005 05:41

transonic is an option in the
 
transonic is an option in the PISO dictionary of fvSolution.

Why do you need an OpenFOAM utility reproducing the functionality of cp? If you like you could create an alias to change it's name or wrap it with a more complex alias or script if you would like to make it do more than the raw cp, it all depends on what you want from it.

What patch type have you given the airfoil?
What boundary conditions have you specified for p, U, k and epsilon?

mattos May 28, 2005 16:23

Hi Weller Tank vary much fo
 
Hi Weller

Tank vary much for your prompt answer.

Excuse for my stupid questions!

I have looked for some explicity transonic option in the PISO dictionary without success. And I nothing have found in the User's and Programmer's manual. Thus, is the fluxGradp switch that one for transonic flow? I haven't deep knowledge in the pressure corection methods such as PISO and SIMPLE. I come from the compressible density coupled methods schools!

About patch in the airfoil, it is defined as wall and the velocity is imposed equal to zero in the U field dictionary. All anothers are left with their default values.

Tank you very much again!

henry May 28, 2005 17:02

The option is transSonic, set
 
The option is transSonic, set it to yes:

transSonic yes;

You will also have to set the pressure solver type to BICCG rather than ICCG because the pressure matrix will become assymetric. You may also have to make some changed in fvSchemes but the code will tell you what entries are required.

mattos May 29, 2005 21:57

Hi Weller Tank very much fo
 
Hi Weller

Tank very much for your prompt answer and right advise. I had success in the airfoil simulations using your advise and correcting some mistakes in the boundary conditions definitions. I have two simmetry planes which I have defined in not right way as empty. Additionally, I have acquired experience in the incompressible test case about wall BC. The better way is initialise the calculation up some converge using wall after swap it for wall function BC. For transonic case, using rhoTurbFoam, I did sucess using adiabatic wall BC and late swaping to wall function BC after some convergence is achieved. In transonic case, I did use your sugesttion: switch on the transonic flag; However, the FoamX does not acept this variable and erases it in the solution dict. when we save the case in this GUI. The same problem happens in the solution dict. when we replaces BICCG in the rho and p solvers. How and where can us modify the sources such that this problem can be solved? I started the calculations of transonic flow with uniform distribution of the properties and Courant Num = 0.3 without problem! I did not need to begin with calculations from incompressible solution. Of coarse, I spent more time to find the final solution ;-|

You did commented something about fvSchemes needs be changed. Can you guide me where can I find the informations to do it?

Tank again and in advance for your help and advises!
Wladimyr


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