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

Averaging a field created by a functionObject

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By agustinvo
  • 1 Post By me3840

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 20, 2017, 13:21
Default Averaging a field created by a functionObject
  #1
Senior Member
 
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25
me3840 is on a distinguished road
Hello all,

I'm working on some LES and as most know I'd like to get the ratio of TKE from the resolved velocity field to the total TKE.

Right now there exists a functionObject for generating the TKE for the SGS at any instant in time (I believe) through the turbulenceFields functionObject.

However to get the ratio, I would need the average SGS TKE. Since this field is only written to disk every so often and not stored by the solver during iteration, it's not so easy to get an average without massive storage requirements.

It appears others have modified the solver to compute it at runtime, seen here:
Smagorinsky LES: output and average k value

However this post is a bit old and I was just wondering if this is still a viable method. Is there a newer functionObject which will allow the storage of any field in memory at runtime, or must the solver be modified to allow this?
me3840 is offline   Reply With Quote

Old   December 21, 2017, 02:22
Default
  #2
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
Hello

taking a look onto your problem, I suggest you three things:
  1. Modify the solver, where you call kSgs and you define your TKE
  2. Use swak4Foam, and add the functionObject expressionField
  3. Modify the turbulenceFields functionObject, so you call kSgs from your turbulence model, and TKE, and you write the expression you're looking for
About the massive storage, you can select to have an output of these turbulence fields each outputTime, and not each timeStep.
Tobi likes this.
agustinvo is offline   Reply With Quote

Old   October 3, 2018, 12:58
Default
  #3
Senior Member
 
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25
me3840 is on a distinguished road
Just to follow up, I figured this out. No modifications to the solver or use of swak4Foam is needed.


You just have to add the functionObject you want to your control dictionary before the fieldAverage. Then fieldAverage will pick it up without issue.
Tobi likes this.
me3840 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
problems after decomposing for running alessio.nz OpenFOAM 7 March 5, 2021 05:49
[General] How to create an additional vector with {Field 4, Field 5, Field 6} Bombacar ParaView 1 August 15, 2015 19:05
Averaging a field in parallel during the simulation saba_saeb OpenFOAM Running, Solving & CFD 4 July 23, 2013 13:13
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48


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