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/)
-   -   LES (http://www.cfd-online.com/Forums/openfoam-solving/58043-les.html)

Luiz Eduardo Bittencourt Sampaio February 9, 2004 07:21

Hi, I am not getting converg
 
Hi,
I am not getting convergence on my LES (oodles) case.
The Courant number starts at at a value lower then one, but as iterations is advanced, it increases and my simulation blows.
Is there a way to automatically adjust the time steps during simulation, in order to keep this number lower then one?
Or how do you deal with that?
Best Regards,
Luiz

Luiz Eduardo Bittencourt Sampaio February 9, 2004 08:42

Also, I am trying to change
 
Also,
I am trying to change the LES model (from 1eq to dynamicSmag) and I need to get rid of k (since I am not solving for it). How do I do that? I tried to edit the dictionary (to change the model), close the case, reopen it, regenerate the mesh, read field and mesh, but k is still there (in the fields).
The effect of k being there is that when I run Foam I get messages like:


--> FOAM FATAL IO ERROR : keyword ce is undefined in dictionary "/home/luizebs/foam/foam2.2/tutorials/oodles/flatplate/constant/turbulenceProperties::isoDynSmagorinskyCoeffs"

file: /home/luizebs/foam/foam2.2/tutorials/oodles/flatplate/constant/turbulenceProperties::isoDynSmagorinskyCoeffs from line 77 to line 77.

Function: dictionary::lookupEntry(const word& keyword) const
in file: db/dictionary/dictionary.C at line: 135.

FOAM exiting


Thank you for your help,
Luiz

Henry Weller (Henry) February 9, 2004 12:32

What discretisation scheme ar
 
What discretisation scheme are you using for U? If you use central-differencing as we do which is implemented implicitly you will be limited to a Co of 0.5. Does you case run OK if your Co is sufficiently small?

Henry Weller (Henry) February 9, 2004 12:41

There is no correlation betwe
 
There is no correlation between the presence of fields in time directories an the contents of the control dictionaries. The dynamicSmag model probably writes out k purely for post-processing purposes but you can delete it if you are not interested. The reason cs is not written out by FoamX is probably that after an update of the models which was done a while ago the configuration for this model wan't updated. Simply put the cs coefficient in /home/luizebs/foam/foam2.2/tutorials/oodles/flatplate/constant/turbulenceProperties::isoDynSmagorinskyCoeffs and all should be well.

luiz eduardo bittencourt Sampaio February 9, 2004 13:06

Thank you, I realized I was
 
Thank you,
I realized I was using the default discretization scheme and then I changed to skew symm which is more appropriate to LES, I think.
The problem with central discr. is that altough my inicial values of Co was very low (I tried even 0.001 and lesser), it eventually gets to 0.5 and up, and iterations diverge. That is why I was wondering if there was such a thing as an automatic adjust of deltat.
Until now, my simulations with skew scheme are doing well (almost 8000 seconds of execution time, and the Co is below 0.35)

Thank you ffor your help,
luiz

Henry Weller (Henry) February 9, 2004 13:12

It sounds like there is somet
 
It sounds like there is something wrong with the rest of your setup and automatically adjusting the time-step down would not solve it you will simply end up with the case running at a smaller and smaller timestep. How good is the mesh? If it is bad you will need to consider how many non-orthogonal correctors to use. If it is really bad you may need to limit the non-orthogonal correction in the laplacians.

The default (linear) scheme should be fine unless you mesh is very bad and then you might find skewLinear unstable.

luiz eduardo bittencourt sampaio February 13, 2004 06:44

I think the quality of my mes
 
I think the quality of my mesh is fine, at least in terms of edge angles, transition, etc. It may be not sufficiently refined, as it is my first LES case, and I dont have any idea what are the mesh requirements for LES. Does any one know how to estimate the best grid spacing for bounded LES flows?
I am using very small steps (2x10-5), to get a Co lower then 0.5. Actually it is now 0.27, but every iteration, it gets a little bit higher and higher. I think it would take to long to get a steady state...
And eventually this increase in Co may lead to overblown.
Do you think this is happening due to the coarseness of my mesh. (well, I am not so sure it is coarse, unless I knew what should be a frequency in the inertial range of spectrum)
Thanks for helping me.
Luiz

Henry Weller (Henry) February 13, 2004 06:51

It is not clear why your Co i
 
It is not clear why your Co is increasing continuously. It could be because your choices of discretisation schemes are inappropriate for your mesh-quality or perhaps the boundary-conditions are not specified consistently. You will have to play around with the case and get a feel for running LES which can be tricky to get the best result. LES does indeed require a small timestep because good temporal and spacial resolution is required.

luiz eduardo bittencourt sampaio February 26, 2004 12:59

Is there any utility for gene
 
Is there any utility for generating components of Umean so as to be able to plot xy graphs of mean Ux versus y?
I know there is a Ucomponent utility, but I think it computes components based on instantaneous velocities (for each time directory).
Thanks,
Luiz

Henry Weller (Henry) February 26, 2004 13:01

This is very easy, all you ha
 
This is very easy, all you have to do is copy the Ucomponents utility and change "U" to "Umean" and compile it under a different name.

luiz May 4, 2004 13:54

Dear Sirs, Why do you always
 
Dear Sirs,
Why do you always set (in the tutorials) zeroGradient for the boundary conditions for k on walls? Shouldn't it be fixed value = 0?
Thank you,
Luiz

Admin (Admin) November 4, 2004 08:07

Zero gradient is a valid boun
 
Zero gradient is a valid boundary condition if y+ is larger than around 20. If you look at the SGS turb energy distribution there is a peak around at around this distance from the wall. If you are closer to the wall than this, you want to use a fixedValue k=0 boundary condition. If you are further away a zeroGradient condition will produce a more accurate boundary condition. The default is set to zeroGradient because it is better to use this at y+< 20 than it is to use k=0 at larger displacements.

Eugene

rolando April 26, 2005 13:41

Hello everybody, can anyone t
 
Hello everybody,
can anyone tell me, if there are implemented any wall-models for LES in OpenFOAM?
Ive inspected the LES models and the way I see it there is no use of any wall model. Is that right?
Ive also detected a class named "nuSgsWallFunction". Does it encapsulate the functionality of a wall modell? If so, is it used anywhere?

Greetings
Rolando

eugene April 26, 2005 17:14

If by "wall model" you mean wa
 
If by "wall model" you mean wall functions, then yes there is a "continuous" (laminar + buffer + log region) wall function implemented for all LES models via the boundary conditions of the SGS viscosity field "nuSgs". To apply these wall functions, simply select the nuSgs boundary condition type as "nuSgsWallFunction" in FoamX for the boundary you wish to apply the wall functions too.

Since all the LES models in foam use the nuSgs field to calculate SGS stresses, the wall function is compatible with all the current models. (It will even work with the differential stress transport models, but will do so at reduced accuracy.)

rolando April 27, 2005 07:27

Thanks a lot Eugene, that was
 
Thanks a lot Eugene,
that was exactly what I meant.
By the way I got the implementation of the boundary handling (at least I think so http://www.cfd-online.com/OpenFOAM_D...part/happy.gif).
Implementing other wall models should be straight forward (deriving a model class of fvPatchField). Am I right?

Regards
Rolando

eugene April 27, 2005 08:19

Thats the general idea. I a
 
Thats the general idea.

I am quite interested in LES wall treatments (was part of my thesis), so I would be glad to lend a hand with implementation. What kind of wall treatments were you planning on building? The current LES wall function in foam is robust, but fairly primitive so improving this would be beneficial to everyone using the code.

Btw, I built a pressure-gradient-sensitive wall function a while back, but it didnt work very well for LES, so never got bolted into the release code. Let me know if you would like a copy of this.

rolando April 27, 2005 09:30

Actually Id like to try some
 
Actually Id like to try some "standard" wall treatments as e.g. the one of "Werner & Wengle". Just to reproduce some published cases.

My far goal is to analyze separated flows at high Reynolds numbers (separation and stall on an airfoil). Of course Ill try "simple" wall modelling for such cases too, but Im not expecting good results. So I also bear in mind applying DES for that cases. As Ive seen there is implemented the Spalart-Allmaras model in OpenFOAM. That may be a good choice. What is your experience about that? Would you agree?

Im interested in your implementation of the pres-grad-sens wall function. It be nice if you sent me a copy of that.

eugene April 27, 2005 10:55

The LES wall function in foam
 
The LES wall function in foam is more or less equivalent to the "Werner & Wengle" implementation in that it assumes an instantaneous correlation between the the velocity at the first off-the-wall grid point and the wall shear using an assumed velocity distribution. In this particular case, I used Spalding's continuous law of the wall so that the results wouldnt be rubbish for small y+ cells. To implement a power law, simply copy nuSgsWallFunction to some other appropriately named directory and replace Spalding's function with the power law.

If your y+s are going to be in the log region I doubt very much if you will see a substantial difference between these implementations though.

The Spalart-Allmaras model is the most widely validated DES model out there. I have found it performs quite well in a variety of flows, provided it is used in the correct regimes and circumstances (i.e. not in duct flows). Certainly, it would be my first choice for LES of an airfoil. Just remember, the S-A model is highly grid dependent, so be sure to read a few publications using it to get an idea of what kind of near-wall resolutions you will need. In my experience the wall functions produce surprisingly good results with the S-A model as well.

Hmm, I just had a look at my old p-sens wall function implementation and it is pretty rough. All the wall function code was bolted directly into the oneEqEddyVisc SGS model and it was done in pre-gpl version Foam2.1 (and wont compile in openFoam-1.1). Contact me by e-mail if you would still like a copy.

rolando April 27, 2005 11:28

Thanks for the information.
 
Thanks for the information.

rolando May 18, 2005 06:21

Hello, can anyone give me som
 
Hello,
can anyone give me some information about LES wall functions?
The result of applying a wall function is a "fixedValueFvPatchScalarField", which stores values for the sgs viscosity near the wall. I guess, that by multiplying it with the velocity gradient the wall shear stress is calculated during the solution process.
This implies a kind of isotropy of the sgs viscosity.
My actual question is: Is it possible to apply an anisotropic sgs near wall viscosity? Maybe by deriving the wall function of "fixedValueFvPatchVectorField"?

Rolando


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