CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Smagorinsky LES: output and average k value

Register Blogs Community New Posts Updated Threads Search

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2013, 10:16
Default Smagorinsky LES: output and average k value
  #1
New Member
 
Fabio Pierella
Join Date: Aug 2013
Location: Trondheim
Posts: 6
Blog Entries: 1
Rep Power: 13
pierellozzo is on a distinguished road
Dear Foamers,

I am simulating a wind turbine in a wind tunnel, and I am performing a LES simulation using the Smagorinsky model and the pisoFoam solver.

I am also averaging the velocity, pressure and sub-grid scale kinetic energy ( p U k) by the use of the fieldAverage library.

While everything works fine for p and U, I cannot average the k and I get the following error:

Code:
--> FOAM FATAL ERROR: 
Requested field k does not exist in the database


    From function Foam::fieldAverage::initialize()
    in file fieldAverage/fieldAverage/fieldAverage.C at line 104.

FOAM exiting
If I run the simulation without averaging the k, everything runs fine, but I do not get any k file inside the time folders.

If I switch LES model to oneEqEddy f.ex., then everything runs smooth, I get all the averages including k and the k is written in the output time folders.

My question is: is there a way to force OF to write and average the k value when using the Smagorinsky model?

I have tried to use the swak4foam utility but did not get any luck.

Thanks in advance for your help!
Fabio
pierellozzo is offline   Reply With Quote

Old   August 21, 2013, 11:39
Default
  #2
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
Smagorinksy model does not use/write field k.
kwardle is offline   Reply With Quote

Old   August 21, 2013, 12:20
Default
  #3
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
Guess maybe I could be a little more helpful. The Smagorinsky is a zero-equation model so there is no additional transport eqn for k. You can compute this but it depends if you are looking for the resolved TKE or just the sub-grid TKE. Take a look here:
http://www.cfd-online.com/Forums/cfx...tml#post334843

From that post (which is just a copy-paste from Pope, 2000) the total TKE is the sum of the resolved part:

k_res = 1/2 * avg(U) * avg(U)

and the SGS part

k_sgs = 1/2 * tau_ii_R = 1/2 * avg(U^2) * [avg(U) * avg(U)]

I think this is correct anyway. Hope this helps.
-Kent
kwardle is offline   Reply With Quote

Old   August 21, 2013, 20:14
Default
  #4
New Member
 
Fabio Pierella
Join Date: Aug 2013
Location: Trondheim
Posts: 6
Blog Entries: 1
Rep Power: 13
pierellozzo is on a distinguished road
Hello Kent,

thanks for your help, your solution is good enough for my case.
I can use swak4foam to output k at runtime according to the equations.

Anyway I'd like to know, out of curiosity/future need, one more thing.
From Smagorinsky.C,line 115, looks to me that k is actually calculated as:
Code:
  //- Return SGS kinetic energy
  //  calculated from the given velocity gradient

  tmp<volScalarField> k(const tmp<volTensorField>& gradU) const

      {
       return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));
       }

       //- Return SGS kinetic energy

       virtual tmp<volScalarField> k() const
       {
        return k(fvc::grad(U()));
       }
Therefore, I am wondering if there is a way that k can be "routed" to be an output of the calculations and not only an internally referenced value.

Fabio
pierellozzo is offline   Reply With Quote

Old   August 22, 2013, 07:33
Default
  #5
New Member
 
Fabio Pierella
Join Date: Aug 2013
Location: Trondheim
Posts: 6
Blog Entries: 1
Rep Power: 13
pierellozzo is on a distinguished road
I have been thinking over your answer, and I think that I cannot calculate the subgrid scale energy in that way, since it is impossible to calculate the average of the squared velocity field:

0.5*avg(U^2)

which is also one of the reasons why we need subgrid scale modeling, if I am not wrong?

Fabio
pierellozzo is offline   Reply With Quote

Old   August 24, 2013, 11:47
Default
  #6
New Member
 
Fabio Pierella
Join Date: Aug 2013
Location: Trondheim
Posts: 6
Blog Entries: 1
Rep Power: 13
pierellozzo is on a distinguished road
Any help with this issue would be greatly appreciated

Fabio
pierellozzo is offline   Reply With Quote

Old   August 26, 2013, 17:35
Question
  #7
Senior Member
 
Join Date: Nov 2012
Posts: 171
Rep Power: 14
hz283 is on a distinguished road
Hello,

About obtaining the k_sgs, why not directly use the following?

turbulence->k();



Quote:
Originally Posted by kwardle View Post
Guess maybe I could be a little more helpful. The Smagorinsky is a zero-equation model so there is no additional transport eqn for k. You can compute this but it depends if you are looking for the resolved TKE or just the sub-grid TKE. Take a look here:
http://www.cfd-online.com/Forums/cfx...tml#post334843

From that post (which is just a copy-paste from Pope, 2000) the total TKE is the sum of the resolved part:

k_res = 1/2 * avg(U) * avg(U)

and the SGS part

k_sgs = 1/2 * tau_ii_R = 1/2 * avg(U^2) * [avg(U) * avg(U)]

I think this is correct anyway. Hope this helps.
-Kent
hz283 is offline   Reply With Quote

Old   November 28, 2013, 05:38
Default mistake
  #8
New Member
 
Giulio S
Join Date: Oct 2013
Location: Italy
Posts: 4
Rep Power: 13
GiulioS is on a distinguished road
I would like to report a mistake:

k_sgs== 1/2 * tau_ii_R = 1/2 * filtered(U U) - [filtered(U) * filtered(U)]
But you don't know the filtered(U U) so perhaps you have to use:
return (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)))
which is very similar to the rate of transfer energy yo the residual motion:
Pr=2*nuSgs* filtered(Sij) * filtered (Sij)
But I attend any suggestion
Best Regard
Giulio


Quote:
Originally Posted by kwardle View Post
Guess maybe I could be a little more helpful. The Smagorinsky is a zero-equation model so there is no additional transport eqn for k. You can compute this but it depends if you are looking for the resolved TKE or just the sub-grid TKE. Take a look here:
http://www.cfd-online.com/Forums/cfx...tml#post334843

From that post (which is just a copy-paste from Pope, 2000) the total TKE is the sum of the resolved part:

k_res = 1/2 * avg(U) * avg(U)

and the SGS part

k_sgs = 1/2 * tau_ii_R = 1/2 * avg(U^2) * [avg(U) * avg(U)]

I think this is correct anyway. Hope this helps.
-Kent
GiulioS is offline   Reply With Quote

Old   March 8, 2014, 09:41
Default
  #9
New Member
 
Zhong, Hong Min
Join Date: Oct 2012
Location: UESTC, Chengdu in China
Posts: 8
Rep Power: 14
iamacloud is on a distinguished road
Dear OFers, for kinetic energy K in LES, my understanding is (maybe not correct),
1. Note that if u = Filtered(u) + uprime, then resolved velocity vector Filtered(u) is not usually equal to Filter(Filter(u)), while Filtered(uprime) isn't equal to zero, where u is turbulence instantaneous velocity field, or u = u(x, t). However, <uprime> maybe is equal to zero under the isotropic assumptions, <.> denotes Reynolds averaging or time averaging.
2. According to Giulio and Pope, kinetic energy K_total = k_res + k_sgs, where k_res is the resolved kinetic energy and k_sgs the subgrid kinetic energy. Firstly, for k_sgs, if Smagorinsky model, then k_sgs = (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU))), note that it is obtained by the resolved velocity field Filtered(u) (=U). So k_sgs can be got easily. Secondly, k_res = 0.5*Filtered(u)_i*Filtered(u)_i = 0.5U_i*U_i, note also that it is instantaneous or is at current timestep, obviously,we can get it. However, most of the cases, we hope to get <K_total> because we simply concern a equilibrium flow rather than a evolutive flow. If really so, we can ignore <k_sgs> and the reason is that the scale of the subgrid energy vortex (k_sgs) is much smaller than the resolved vortex scale (k_res) based on the Kolmogorov energy cascade.
In brief, for OFers we can get <K-total> = <k_res> by the "UprimeMean" in the on-the-fly-processing founction "fieldAverage" specified in controlDict file.

if any wrong , don't hesitate to correct me please

Last edited by iamacloud; March 19, 2014 at 11:20.
iamacloud is offline   Reply With Quote

Old   June 16, 2014, 05:28
Default
  #10
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
Quote:
Originally Posted by iamacloud View Post
However, most of the cases, we hope to get <K_total> because we simply concern a equilibrium flow rather than a evolutive flow. If really so, we can ignore <k_sgs> and the reason is that the scale of the subgrid energy vortex (k_sgs) is much smaller than the resolved vortex scale (k_res) based on the Kolmogorov energy cascade.
In brief, for OFers we can get <K-total> = <k_res> by the "UprimeMean" in the on-the-fly-processing founction "fieldAverage" specified in controlDict file.

if any wrong , don't hesitate to correct me please
I dont agree with that, The SGS are indeed much smaller than the GS, but not that small that we can ignore it in a classic LES, where ~ 80% of the total kinetic energy should be resolved. That means, that 20% remains in the SGS part which cannot be ignored!

Especially around y+=11 the sgs energy rises, in my case to nearly 50% of the resolved kinetic energy.

Just my thoughts. Any suggestions?
HanSolo123 is offline   Reply With Quote

Old   December 23, 2014, 19:57
Default
  #11
Member
 
Join Date: Feb 2014
Posts: 63
Rep Power: 12
Uyan is on a distinguished road
Hi All,

I am also in this problem of calculating Ksgs and Kres. But i am unable to get K field as an output from Smagorinsky Model. Could anyone help me out there??

I agree with HanSolo.

I think that instantaneous Ktotal = 1/2(u^2 v^2 w^2) , and Ksgs is calculated from the LES model. Kres = Ktotal - Ksgs.

Last edited by Uyan; January 13, 2015 at 16:01.
Uyan is offline   Reply With Quote

Old   December 25, 2014, 10:12
Default
  #12
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
Quote:
Originally Posted by Uyan View Post
Hi All,

I am also in this problem of calculating Ksgs and Kres. But i am unable to get K field as an output from Smagorinsky Model. Could anyone help me out there??
You have to modify your solver to get k_sgs. k_sgs is just calculated temporarily inside the Smagorinsky model and then disappears after each timestep because the closure problem was solved.

To do so, create a new field in createFields.H, for example:

Code:
volScalarField ksgs_
(
    IOobject
    (
        "ksgs",
        runTime.timeName(),
        mesh,
        IOobject::NO_READ,
        IOobject::AUTO_WRITE
    ),
    mesh,
    dimensionedScalar("ksgs", dimVelocity*dimVelocity, 0.0)
);
Then in your solver, for example pimpleFoam, you have to write out the modeled k (=k_sgs) before the runtime-command. So in pimpleFoam.C it should be:

Code:
while (runTime.run())
    {
        #include "readTimeControls.H"
        #include "CourantNo.H"
        #include "setDeltaT.H"

        runTime++;

        Info<< "Time = " << runTime.timeName() << nl << endl;

        // --- Pressure-velocity PIMPLE corrector loop
        while (pimple.loop())
        {
            #include "UEqn.H"

            // --- Pressure corrector loop
            while (pimple.correct())
            {
                #include "pEqn.H"
            }

            if (pimple.turbCorr())
            {
                turbulence->correct();
            }
        }

        ksgs_ = turbulence->k();
        runTime.write();

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }
This way, the solver creates a new field called ksgs each time step, which contains the subgridscale energy from your turbulence model. (I've just worked with pimpleFoam+Smagorinsky/oneEq so not sure about other combinations).
With that new field, you can and of course have to average to get proper results. So in your /systems/controlDict inside the functions>fieldAverage use
Code:
ksgs
            {
            mean      on;
            prime2Mean  off;
            base        time;
          }
This will average your subgridscale energy. For easy postprocessing and if you do the channelflow, I recommend you to modify the postChannel utility, so it will output your k_sgs over y (wallnormal distance).

I got very good results with this procedure. Dont forget to rename your utilities!
HanSolo123 is offline   Reply With Quote

Old   April 2, 2016, 01:13
Default
  #13
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Thank you for clarify this issue with the code manner. Thank you, Hans!

Now I want to know that in LES, the resolved kinetic energy should be a larger part in total kinetic energy (say 80%). That means,

Kres/(Kres+ksgs)>80%

Then, this criteria should be satisfied in all of the computational domain, right? Did you have some examples of the result you have plotted about the ratio of the resolved and SGS part of the turbulent kinetic energy? Could you past some figures or do you have the related papers?

Do you get the result along a line of domain, or over the entire domain?

Thanks!

Best,
Xu
wenxu is offline   Reply With Quote

Old   April 2, 2016, 14:26
Default
  #14
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
Hi Xu,

you can find the results of my LES Simulations with pimpleFoam and Smagorinsky-Model attached in this post.

The black line shows the DNS Results from [1]. Red line belongs to a coarse mesh, green medium and blue finest mesh I have used.

All three meshes have a yPlus of 1 at first cell. Other mesh statistics:
  • coarse: xPlus = 40, zPlus = 26
  • medium: xPlus = 31, zPlus = 19
  • fine: xPlus = 26, zPlus = 15
In the figure you can see at yPlus = 11, that kPlus_sgs is about 2 and kPlus_total is about 4. So kPlus_sgs is about 50% what I mentioned in my post from June 16, 2014 03:28.

In total, the three different meshes resolved:
  • coarse: 86%
  • medium: 88%
  • fine: 90%
of total kinetic energy (k_gs/k_tot). [k_gs = grid scale = resolved part].

I have done the average for 200 flow-throughs with Co_max = 0.3 after having a well-suited initial solution (took me 350 flow-throughs with Co = 0.5 with the initial solution from the tutorial. I was not using the perturbU-utility you can find on this forum - I didnt feel confident with that).

For post-processing I have used the postChannel-utility, that does an average over the x- and z-directions of the domain (if I remember correctly). Then you have the results over a line in wall-normal direction y.

These are parts of my master thesis I have finished 2 years ago.

Greetings.

-----------

[1] Iwamoto, K.: Database of Fully Developed Channel Flow. THTLAB Internal
Report, No. ILR-0201. THTLAB, Dept. of Mech. Eng., University Tokyo, 2002
Attached Images
File Type: png LES_k_Smagorinsky.png (63.8 KB, 253 views)
Baka BOi likes this.
HanSolo123 is offline   Reply With Quote

Old   April 2, 2016, 22:55
Default
  #15
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Many thanks for your detailed reply, Hans.

I do not know if I understand it correctly. Let me rephrase your results. For resolved kinetic energy Kgs, we calculate it as follows,
Kgs = 0.5*(<U>^2 + <V>^2 + <W>^2)

For unresolved kinetic energy (SGS) part, we calculated it with the LES SGS model, e.g. Smagorinsky used here,

Ksgs = (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));

I do not know whether it is an error in this attached figure. The DNS should calculate ALL of the energy, so, ksgs_DNS should be equal to ZERO. Rather than equal to Kg or Ktotal.

Then, if we want to know how much the kinetic energy is solved with our specific discretization scheme and mesh resolution, we can calculate the turbulence resolution as follows,

M = Kgs/(Kgs+ Ksgs)

For LES, M should be larger than 80% (Pope, NJP).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

But the confusing thing is, the above criteria is applied for EVERY cell, that means in EVERY cell, the resolved kinetic energy should be larger than 80%. But in your case, if I understand it correctly, you sample the data in the y+ direction, when in the other directions (x+, z+), you do average on them. In this case, how can you ensure the results you got can be applied for all the computation domain in your simulation? I mean, if you use the stretched mesh in the flow direction, then in the downstream, the mesh is coarse, even if you get the 90% resolved TKE in the upstream in the spanwise direction, then the results should not be convincing. Because in the downstream of the spanwise direction, there may be only 60% TKE is resolved where the mesh is coarse. Thus, my suggestion is to extract the data from the x-y plane in the flow direction, in this case, we can get the result with all levels of mesh resolution. My result is attached.

Many thanks for your kind reply. I am looking forward to hear from you for your suggestions.

Best regards,
Xu
Attached Images
File Type: png turbulence resolution.png (30.9 KB, 145 views)
Baka BOi likes this.
wenxu is offline   Reply With Quote

Old   April 2, 2016, 23:00
Default
  #16
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
Also do you plot the figure with gnuplot? What the size of these figures (0.3, 1) and how can you replace the number 5 with the character "Kg+". Could you share your plot code? Or could you describe it how to get it? Thank you!

Now I am not familiar which size is good to write the research paper. The figure should be located in one column.

Xu
wenxu is offline   Reply With Quote

Old   April 8, 2016, 14:45
Default
  #17
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
Quote:
Originally Posted by wenxu View Post
Many thanks for your detailed reply, Hans.

I do not know if I understand it correctly. Let me rephrase your results. For resolved kinetic energy Kgs, we calculate it as follows,
Kgs = 0.5*(<U>^2 + <V>^2 + <W>^2)

For unresolved kinetic energy (SGS) part, we calculated it with the LES SGS model, e.g. Smagorinsky used here,

Ksgs = (2.0*ck_/ce_)*sqr(delta())*magSqr(dev(symm(gradU)));

I do not know whether it is an error in this attached figure. The DNS should calculate ALL of the energy, so, ksgs_DNS should be equal to ZERO. Rather than equal to Kg or Ktotal.

Then, if we want to know how much the kinetic energy is solved with our specific discretization scheme and mesh resolution, we can calculate the turbulence resolution as follows,

M = Kgs/(Kgs+ Ksgs)

For LES, M should be larger than 80% (Pope, NJP).

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~

But the confusing thing is, the above criteria is applied for EVERY cell, that means in EVERY cell, the resolved kinetic energy should be larger than 80%. But in your case, if I understand it correctly, you sample the data in the y+ direction, when in the other directions (x+, z+), you do average on them. In this case, how can you ensure the results you got can be applied for all the computation domain in your simulation? I mean, if you use the stretched mesh in the flow direction, then in the downstream, the mesh is coarse, even if you get the 90% resolved TKE in the upstream in the spanwise direction, then the results should not be convincing. Because in the downstream of the spanwise direction, there may be only 60% TKE is resolved where the mesh is coarse. Thus, my suggestion is to extract the data from the x-y plane in the flow direction, in this case, we can get the result with all levels of mesh resolution. My result is attached.

Many thanks for your kind reply. I am looking forward to hear from you for your suggestions.

Best regards,
Xu

Hi Xu,

sorry for late reply. I fear that I cant answer your questions to your satisfaction - too much time has past since I have put all my effort in this topic.

First of all you are right. The DNS plots in the figues with k_gs and k_sgs are not correct if you just look at this picture. But I have mentioned in the text in my thesis that I plot the DNS data there to give the reader the chance to see the rate of k_gs and k_sgs compared to the DNS data on the first sight.

The sencond part of your question is difficult for me to answer. We have to seperate time-averaging and area-averaging.
Quote:
In this case, how can you ensure the results you got can be applied for all the computation domain in your simulation?
I think it is possible because of the boundary conditions of the channel flow. The sides of the computation domain are cyclic. If you have a good initial solution and if you time-average the flow in the whole domain for enough flow throughs, there is just a wallnormal (y) dependency of the flow profile.

As the following step, in my opinion it is allowed to do an area-average in x- and z-direction with the postChannel utility to get the data that is shown in the picture i attached because there should be no dependency in those directions of the flow.

I think the postChannel utility does exactly this, an average in x- and z-direction, but I am not 100% sure.
In postChannel.C it is said:
Code:
        // Average fields over channel down to a line
#       include "collapse.H"
so the answer should be in collapse.H.


If you dont do the area-average and just get the results over a line in y-direction e.g. in paraFoam at an arbitrary x- and z- position, and plot this non-average energies over y, there should be just a very very small difference to the averaged-results (if you have a well suited flow development and enough flow-throughs for time-average)

If it is the case - in my opinion - it can be said that the results can be applied to the whole domain.


Im sorry that I cant say anything to your attaced figure. I havent seen such a plot in my study.


3rd part:

Yes, I have used gnuplot to make my figures. I have made the size of all figures in a way that they fit well on a DIN A4 page. I am not familiar with scientifi papers either.

I configured it with:
Code:
set term tikz standalone color solid size 14.8cm,15cm font ',12'
set output 'kPlus.tex'
The code for the plots is just standard .
To replace a certain axis-number, just say:

Code:
set ytics add ('$k_{gs}^+$' 5)
It will replace at y-axis at position 5 the digit with '$k_{gs}^+'.
Note that it is LaTex code. gnuplot will generate a file 'kPlus.tex' as mentioned above. Then I needed to translate this with my latex editor and it gave me a pdf with the figure and the text.
calf.Z likes this.
HanSolo123 is offline   Reply With Quote

Old   April 8, 2016, 23:12
Default
  #18
Senior Member
 
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13
wenxu is on a distinguished road
First, thank you for your very kind and detailed reply. Really a nice guy. :>)

I do not have confusion with the time-averaging and area-averaging. :>)

I mean in the x direction (the flow direction), if you use the stretched mesh, then for a give x point, then you sample the data along the spanwise direction (y direction), you may get an unreal result. In other words, if the point x is in the upstream where you have refined your mesh, then you may get a very small SGS kinetic energy. However, the possible (also bad) thing is that in the downstream where you stretch your mesh (much coarse than that in the upstream), then the SGS kinetic energy can be very large, say below 80%. Then how can you justify your result if you only based your data in the upstream flow?

So, to resolve the potential problem, my suggestion is to sample the data over the domain OR only in the x-y plane. In this way, we have covered all possible mesh. The result is more believable.

But if the uniform mesh is used in you case, the problem I list above will not happen. Since the turbulence length scale in the upstream will be certainly much small than that in the downstream.

This paper is suggested to read: LES OF THE SYDNEY SWIRL FLAME SERIES: AN INITIAL INVESTIGATION OF THE FLUID DYNAMICS.

Many thanks for your kind reply. I really know it is hard to answer something if that has past a long time.

Have a nice day!

My best wishes,
Xu
wenxu is offline   Reply With Quote

Old   April 10, 2016, 04:42
Default
  #19
New Member
 
Hans Barósz
Join Date: May 2014
Posts: 22
Rep Power: 12
HanSolo123 is on a distinguished road
Ah ok, I think I got what you mean.

I have indeed used an uniform mesh in x- and z-direction. Just in wallnormal y-direction I have had configured a ratio.
The xPlus and zPlus values I have posted at April 2, 2016, 12:26 are constant for the whole mesh. For yPlus I had 1 at the first wall cell with increasing yPlus to the middle of the domain.

A very nice discussion :-)
wenxu likes this.
HanSolo123 is offline   Reply With Quote

Old   January 27, 2018, 08:06
Default
  #20
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by HanSolo123 View Post
You have to modify your solver to get k_sgs. k_sgs is just calculated temporarily inside the Smagorinsky model and then disappears after each timestep because the closure problem was solved.

To do so, create a new field in createFields.H, for example:

...

I got very good results with this procedure. Dont forget to rename your utilities!
Hans Barósz,

I can store only 'k'? How I can do this? I would like to be able to view the 'k' profile in an internal pipe flow ...
gu1 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
y+ and u+ values with low-Re RANS turbulence models: utility + testcase florian_krause OpenFOAM 114 August 23, 2023 06:37
[swak4Foam] outputTime in Swak function immortality OpenFOAM Community Contributions 20 October 6, 2022 13:08
Utilities: post average turbulence fields and create turbulence fields for LES Hanzo OpenFOAM Running, Solving & CFD 10 August 18, 2017 19:33
RNG diverged during the analysis the flow over a multi element airfoil, why? s.m OpenFOAM Running, Solving & CFD 0 August 5, 2013 09:39
average weighted area of volume fraction at output umar959 Main CFD Forum 0 January 20, 2012 03:47


All times are GMT -4. The time now is 01:56.