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

calculating TKE budget in OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 9, 2021, 12:47
Default calculating TKE budget in OpenFOAM
  #1
New Member
 
OH
Join Date: Apr 2021
Posts: 2
Rep Power: 0
foamUser2020 is on a distinguished road
Hello everyone.

I hope you are having a great Spring.

I would like to calculate the TKE budget, but since I haven't calculate this in OF before, I am not aware of any functions which does that for me.
So I have searched for a while and found https://github.com/sidShinde/tkeBudget on github. I downloaded the code and used wmake. However, when I run it for my case, it does not write out anything in the case folder.

Here is the details:

After wmake, I will have "tkeBudget" folder in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/applications/utilities"

When I run any of the following commands:

- $ pisoFoam -postProcess -latestTime
- $ postProcess -latestTime


I get:

Create time

Create mesh for time = 8000

Time = 8000
Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LES
Selecting LES turbulence model dynamicKEqn
Selecting LES delta type cubeRootVol
dynamicKEqnCoeffs
{
filter simple;
Ce 1.048;
}

No MRF models present

No finite volume options present
tkeBudget tkeBudgetDict: storing fields:
Pik
Pk
Dk
Tk
Epik
Ck

executing the else statement

End



Also, if I run:

$ postProcess -func tkeBudget -latestTime


I get:

Create time

Create mesh for time = 8000

--> FOAM Warning :
From function static bool Foam::functionObjectList::readFunctionObject(const Foam::string&, Foam::dictionary&, Foam::HashSet<>&, const Foam::word&)
in file db/functionObjects/functionObjectList/functionObjectList.C at line 278
Cannot find functionObject file tkeBudget
Time = 8000

Reading fields:

Executing functionObjects

End




AND when I run:

$ postProcess -func tkeBudgetDict -latestTime

I get:

Create time

Create mesh for time = 8000


--> FOAM FATAL IO ERROR:
keyword type is undefined in dictionary "controlDict.functions.tkeBudgetDict.tkeBudgetDict "

file: controlDict.functions.tkeBudgetDict.tkeBudgetDict from line 22 to line 43.

From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
in file db/dictionary/dictionary.C at line 573.




I really would appreciate if anyone can guide me how to use this function, OR if there are other ways to calculate the TKE budget and plot it.


Thank you,
foamUser2020 is offline   Reply With Quote

Old   April 21, 2021, 05:56
Default
  #2
Senior Member
 
Andrea
Join Date: Feb 2012
Location: Leeds, UK
Posts: 179
Rep Power: 16
Andrea1984 is on a distinguished road
Hi,

I have hardcoded the calculations of some terms of the TKE budget in this solver: https://github.com/AndreaDesan/pimpleTKEBudgetFoam

It should be fairly easy to extend this to include all the terms in budget.

Hope this helps!
Andrea
Andrea1984 is offline   Reply With Quote

Old   May 14, 2021, 09:52
Default
  #3
New Member
 
OH
Join Date: Apr 2021
Posts: 2
Rep Power: 0
foamUser2020 is on a distinguished road
Quote:
Originally Posted by Andrea1984 View Post
Hi,

I have hardcoded the calculations of some terms of the TKE budget in this solver: https://github.com/AndreaDesan/pimpleTKEBudgetFoam

It should be fairly easy to extend this to include all the terms in budget.

Hope this helps!
Andrea
Thank you Andrea for your reply. I finished the related project with the same function I mentioned in my post. But I am eager to look at your code and use it for my future needs.

Thanks again.
foamUser2020 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
Calculating the TKE in a Pulsation free jet Falu CFX 2 March 19, 2021 21:52
OpenFOAM v3.0+ ?? SBusch OpenFOAM 22 December 26, 2016 15:24
OpenFOAM Training Jan-Apr 2017, Virtual, London, Houston, Berlin cfd.direct OpenFOAM Announcements from Other Sources 0 September 21, 2016 12:50
OpenFOAM Training: Programming CFD Course 12-13 and 19-20 April 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 14, 2016 11:19
[swak4Foam] Difference in calculating div(U*U) swak4FOAM vs. OpenFOAM codedFunctionObject polo OpenFOAM Community Contributions 7 October 1, 2013 11:22


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