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

Relation between k and UPrime2Mean etc in LES

Register Blogs Community New Posts Updated Threads Search

Like Tree26Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 30, 2013, 20:54
Default
  #41
New Member
 
Rajesh Kumar
Join Date: Apr 2009
Posts: 25
Rep Power: 17
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, 14:35
Default
  #42
New Member
 
Juan Manuel Mompó Laborda
Join Date: Nov 2009
Location: Valencia (Spain)
Posts: 10
Rep Power: 17
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, 07: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: 13
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, 19:24
Default
  #44
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
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, 19:28
Default
  #45
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
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, 19:31
Default
  #46
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
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

Old   August 10, 2018, 04:52
Default
  #47
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12
zhangyan is on a distinguished road
Quote:
Originally Posted by buct11019 View Post
Nice to meet you , Tarak.
Now I have the same question of you had last year. I am confusing about how to set the k. I had done some work in backward step simulation with oneeqEddy and dynamicOneeqEddy model at the same grid and the same condition. I set k as 1*10-5 in both simulaiton, but the dynamicOneeqEddy model diverge after about 15s, but can go on to compute.Would you please give me some suggestion on it?
Hi
I also want to know how to set the inlet k in kEqn SGS model.
Can anyone give me a hint?
__________________
https://openfoam.top
zhangyan is offline   Reply With Quote

Old   August 10, 2018, 06:21
Default
  #48
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by zhangyan View Post
Hi
I also want to know how to set the inlet k in kEqn SGS model.
Can anyone give me a hint?

Good question, Not much said in the literature.
syavash is offline   Reply With Quote

Old   August 10, 2018, 06:24
Default
  #49
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 12
zhangyan is on a distinguished road
Quote:
Originally Posted by syavash View Post
Good question, Not much said in the literature.
A reference: Reg. LES in OpenFOAM
__________________
https://openfoam.top
zhangyan is offline   Reply With Quote

Old   August 10, 2018, 14:10
Default
  #50
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by zhangyan View Post

Thanks, but not very helpful. It has spoken of a experimental data prior to simulation which has to be filtered out. Not in every simulation an experimental data would be available.
syavash 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
Problems sampling UPrime2Mean leonardo.morita OpenFOAM Post-Processing 5 May 10, 2012 05: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 13:19.