CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

Relation between k and UPrime2Mean etc in LES

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree8Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 30, 2013, 19:54
Default
  #41
New Member
 
Rajesh Kumar
Join Date: Apr 2009
Posts: 23
Rep Power: 8
rajeshkunwar is on a distinguished road
Hi Pooyan,

Can you please post the code, which you added in createField.H and pisoFoam.C
rajeshkunwar is offline   Reply With Quote

Old   June 19, 2013, 13:35
Default
  #42
New Member
 
Juan Manuel Mompů Laborda
Join Date: Nov 2009
Location: Valencia (Spain)
Posts: 10
Rep Power: 7
juanma is on a distinguished road
Quote:
Originally Posted by sam1364 View Post
I also want to calculate U*U and get the average of this field over time. U is given by OpenFoam. I just need to add some lines to calculate U*U. if U=[1 2 3;4 5 6], by U*U, I mean the result is [1 4 9;16 25 36]. I do not know how openfoam writes U field so that I can write a "for loop" to calculate U*U. do you have any suggestions?

I guess you did already get the U≤ field... in any case here is my solution... inside createFields:

volSymmTensorField U2 = sqr(U);


Hope it helps,
Juanma
juanma is offline   Reply With Quote

Old   October 19, 2013, 06:26
Default How to make new solver to get Subgrid scale stress for LES
  #43
New Member
 
ThienMa
Join Date: Sep 2013
Posts: 8
Rep Power: 3
luuhoangthien is on a distinguished road
Dear Foamer,

I Have read and do step by step with this guide, and read carefully this topic, but went I do it have some problem,

I used dynOneEqEddy for my simulation

Any one can help me



Quote:
Originally Posted by morard View Post
Hi,

first, just copy original pisoFoam and change name to, as you said, pisoFoam2 (but, my suggestion is to choose something other like pisoRFoam, because after some tome you will have pisoFoam2, pisoFoam3,... and you will definitely forget what did you change in each of those..). So, you have to change pisoFoam.C to pisoFoam2.C. Than, open Make folder and inside files, you also have to change:

pisoFoam2.C

EXE = $(FOAM_APPBIN)/pisoFoam2

Then navigate your terminal to pisoFoam2 folder and execute:

wclean
wmake

now you have your own solver pisoFoam2. Now do the changes mentioned by Gregor and me.

If you take a look into createFields.H, you will see how pointer is created. At the end of the file it is written:

autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);

so, you'll have to put inside pisoFoam2.C

R_ = turbulence->R();

Put this inside while loop. Between the lines: turbulence->correct(); and runTime.write(); might be a good position. So, at the end you'll have:

turbulence->correct();

R_ = turbulence->R();

runTime.write();

This should wor.

Check this page:
http://openfoamwiki.net/index.php/Ho...ure_to_icoFoam

There you can find a lot of useful things.
luuhoangthien is offline   Reply With Quote

Old   August 10, 2015, 18:24
Default
  #44
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 241
Rep Power: 8
syavash is on a distinguished road
Quote:
Originally Posted by morard View Post
Ufff, sorry, my mistake. It's LES about (from the first post).
So, it's definitely:

yourTurbulenceModel->B() (for LES)

Dear morard,

I know this post is old but I have a relevant question. I am using a LES model but I cannot find where B() is calculated from k in the source code. Should I add some lines to calculate B()?!

Regards,
Syavash
syavash is offline   Reply With Quote

Old   August 10, 2015, 18:28
Default
  #45
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 241
Rep Power: 8
syavash is on a distinguished road
Quote:
Originally Posted by luuhoangthien View Post
Dear Foamer,

I Have read and do step by step with this guide, and read carefully this topic, but went I do it have some problem,

I used dynOneEqEddy for my simulation

Any one can help me
Hi ThienMa,

Could you find a way to solve your problem?! My case is similar to you, I also need to calculate total Reynolds stress in my LES simulation but cannot find calculation of B() in the source code of LES model.

Thanks,
Syavash
syavash is offline   Reply With Quote

Old   August 10, 2015, 18:31
Default
  #46
Senior Member
 
Syavash
Join Date: Apr 2010
Location: Tehran, Karaj
Posts: 241
Rep Power: 8
syavash is on a distinguished road
Quote:
Originally Posted by eugene View Post
You guys are making a mistake. Calling "R()" for an SGS model will not return the total Reynolds stress. It will just return the SGS stress. The only reason it is called "R()" is for compatibility with the RANS model nomenclature.

UPrime2Mean is calculated as:

UPrime2Mean_new = alpha*UPrime2Mean_old + (1-alpha) * sqr(U) - sqr(Umean);

with alpha = (Time - dTime) / Time

If you work it out, this is identical to the definition for Reynolds stress when averaged over a long time (<UU>-<U><U>).

To get the full stresses (resolved + SGS) you thus need UPrime2Mean + RMean. Unfortunately, you will still have to modify a solver to create RMean since the R field is not available by default as noted below.
Dear Eugen,

I am struggling to modify my solver to account for total Reynolds stress as you suggested, but I cannot find where in the source code B() (SGS stress) is calculated?!
Should I manually add some lines to the source code of LES model?!

Thanks,
Syavash
syavash is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems sampling UPrime2Mean leonardo.morita OpenFOAM Post-Processing 5 May 10, 2012 04:36
Bug in Dynamic 1Eq Eddy Viscosity LES Model Incompressible flow harishg OpenFOAM Bugs 5 December 2, 2008 19:18


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