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 |
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 |
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?
|
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.
|
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 |
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. |
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 |
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.
|
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 |
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.
|
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 |
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 |
Hello everybody,
can anyone t
Hello everybody,
can anyone tell me, if there are implemented any wall-models for LES in OpenFOAM? I´ve inspected the LES models and the way I see it there is no use of any wall model. Is that right? I´ve also detected a class named "nuSgsWallFunction". Does it encapsulate the functionality of a wall modell? If so, is it used anywhere? Greetings Rolando |
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.) |
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 |
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. |
Actually I´d like to try some
Actually I´d 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 I´ll try "simple" wall modelling for such cases too, but I´m not expecting good results. So I also bear in mind applying DES for that cases. As I´ve 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? I´m interested in your implementation of the pres-grad-sens wall function. It be nice if you sent me a copy of that. |
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. |
Thanks for the information.
Thanks for the information.
|
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 |
Yes currently the sgs viscosit
Yes currently the sgs viscosity is isotropic. Most anisotropic models generate stresses directly rather than an anisotropic viscosity and this would typically be implemented as a correction on a simpler model which can be implemented implicitly in the momentum equation like the one currently implemented. Take a look at the implementation of the LRR or LaunderGibson RANS models and you will see what I mean.
> Maybe by deriving the wall function of > "fixedValueFvPatchVectorField"? No, it's not that simple. If you want to use an anisotropic sgs viscosity model you will have to use an tensorial-viscosity form of the laplacian in the momentum equation or use the correction approach I suggested above. |
Thanks Henry,
my actual probl
Thanks Henry,
my actual problem is to implement a LES wall function which should calculate the wall stresses not only depending on the gradient but also on other information (which is equivalent to an anisotropic wall viscosity). Following your suggestion I´ll implement it in the LESmodel itself. Rolando |
Hello,
I´ve been using OpenFO
Hello,
I´ve been using OpenFOAM for a short time. I wanted to do some primitive LES calculations of a repeated channel geometry. I used wall functions at the walls, to save mesh resolution. As SGS-model I used the Smagorinsky model. As starting solution I used a mean velocity field, which I randomly disturbed. I solved the problem by using channelOodles. The solution procedure seems to work well, but the results are not as I expected them. The velocity of the wall nearest cells seem to fit the wall function. But the velocity profile in the inner field seems to be "too laminar". May it be the cause, that my disturbation routine doesn´t create divergence free fields? (I hoped that the solution procedure smoothes this deficiency). Ralph |
Your initialisation is fine, t
Your initialisation is fine, the solution procedure will fix any errors in the initial fields.
What Re are you running? What Courant-number? What discretisations schemes? How fine is your mesh? Is it graded appropriately? What coefficient are you using for the Smagorinsky model and does it suit the Re you are running with? |
In my experience, random pertu
In my experience, random perturbations will seldom cause transition to turbulence of an LES flow. As you mentioned, the perturbations aren't divergence free and will be swiftly damped out by continuity enforcement.
Aside from this though, you shouldn't really be using wall function to simulate a channel flow. Your near-wall cell's y+ should be below ~20 otherwise your results might be wildly inaccurate and you risk desturbing the near-wall turbulence generation cycle (that accounts for nearly all the turbulence production in a periodic channel flow). LES wall functions in Foam are in fact intended for use solely with the DES approach, which is formulated for seperated flows. So structured perturbations + smaller y+. |
Thanks Henry, thanks Eugene,
Thanks Henry, thanks Eugene,
I just looked at my settings and the results of the calculation. Henry: -Re = 40000 -Co = about 0.8 -I use the same discretisation schemes as in the channelOodles tutorial, except the ddtScheme. I use the CrankNicholson ddtScheme. -I use a uniform mesh. As I use a wall function, I didn´t grade it. -The cell size is chosen in a way to provide a (time averaged) y+ of 19.5 -The Smagorinsky coefficients are chosen as ce=1.65 and ck=0.07 (which should result in a Smagorinsky constant of Cs=0.12). -I´m not quite sure if the coefficients fit the Re-number. How do they depend on Re? (I chose Cs=0.12, because I´ve seen it in a publication). Did I choose wrong values? Eugene: I chose a wall function, as I wanted to reproduce a result I´ve found in a publication. My y+ are 19.5 (time averaged). Is there a way in OpenFOAM to create structured, divergence free perturbations of an initial field? Ralph |
Hello,
could anybody give me
Hello,
could anybody give me a hint, if there is a lack in the parameter configuration I´ve chosen. See above (Wednesday, June 22, 2005 - 05:26 am). As I use a wall function, I don´t use "vanDriest Delta" but "cubeRootVol Delta" instead. Is that the right way? Ralph |
Your operating parameters are
Your operating parameters are fine but Eugene may be right that with this near-wall resolution you will not be able to simulate any sensible turbulence genration process there and it dominates the rest of the flow. When you say you want to reproduce published results for this case are you using the same setup? Same mesh? Most importantly same type of LES wall-function?
The way we produce good initial turbulent flow-fields is by mapping from previous solutions. |
Thanks Henry,
I´m glad to hea
Thanks Henry,
I´m glad to hear it´s not the simulation parameters that are the problem. I use the same mesh and the same setup as published. The wall function I use, is not the same, but I think it´s quite similar. What I´m actually doing is to variate the mesh resolution and check the influence on the solution. As I do not have a good previous solution, would it be possible to calculate the solution in a NON-periodic channel with a turbulent inlet boundary condition and map that solution on the periodic channel? Is it correct, that I do NOT use a vanDriest damping for the Smagorinsky model in conjunction with a wall function? Ralph |
You could use a NON-periodic c
You could use a NON-periodic channel with a turbulent inlet boundary condition to obtain a starting solution.
Wall-functions are already a near-wall model and it would be inconsistent to use them with vanDriest damping unless they were designed to be used in this way. If you want to reproduce published results it is very important you use the same wall-function because you will find your results will be totally dictated by it as the effect of the near-wall region creates the turbulence in flow. |
Thanks a lot Henry
Thanks a lot Henry
|
P.S. Channel-flow takes a ver
P.S. Channel-flow takes a very long time to evolve, many thousands of time-steps, how many have you done so far?
|
I´ve done 10000 - 20000 timest
I´ve done 10000 - 20000 timesteps in the different attempts.
But there seemed to be reached a steady state much earlier. |
Here is a channelflow perturba
Here is a channelflow perturbation code. It was used to study the instability of sinusoidal low speed streaks to shear and the subsequent transition to turbulence. As such, it is a "natural" turbulence initiator in that it mimics some of the mechanics of the near-wall turbulence cycle.
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif perturbU.tgz |
I think that is what I was loo
I think that is what I was looking for all the time.
Thanks a lot Eugene for publishing it. Ralph |
Does anyone know, if there is
Does anyone know, if there is a Re number dependency of the VanDriest coeffiecients Aplus and Cdelta (used in turbulenceProperties/vanDriestCoeffs)?
Ralph |
Probably. Both are known to be
Probably. Both are known to be somewhat variable and Aplus at is calibrated for a fully developed boundary layer. Sorry I don't have more information to hand.
|
Thanks Eugene,
I´ll take the
Thanks Eugene,
I´ll take the channelOodles parameters and leave them unchanged. By the way, what does "maxDeltaRatio" stand for? Ralph |
maxDeltaRatio is the maximum c
maxDeltaRatio is the maximum cell to cell-neighbour ratio of delta, the SGS length scale. It is used when you choose "smooth" for your method of determining delta size.
Typically you would use a combination of vanDriest, smooth and cubeRootVol. cubeRootVol is the base length scale based on the cube root of the cell volume. "smooth" will smear this distribution so all neighbouring values are within maxDeltaRatio of each other and vanDriest will override "smooth" near the walls with its damped viscous length scales. |
Thanks for the explanation Eug
Thanks for the explanation Eugene.
I got it :-) |
All times are GMT -4. The time now is 10:01. |