CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Programming & Development

Read in "Mean" values during runTime

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

LinkBack Thread Tools Display Modes
Old   July 8, 2015, 10:38
Default Read in "Mean" values during runTime
New Member
Christoph Wenzel
Join Date: May 2014
Location: Germany
Posts: 15
Rep Power: 3
ChrisWe is on a distinguished road

i want to calculate the Dissipation in OpenFOAM in my LES (pimpleFoam). Therefore I have to calculate <du'_i/dx_j * du'_i/dx_j>.
This value has to be averaged during runtime and so my solver needs the actual UPrime2Mean values of every time step.

In OpenFOAM-2.2.0 it is very easy to read in the averaged velocity fields. You only have to add the following code into your createFields.H of your solver:
 volVectorField UM
     dimensionedVector("UM",dimLength/dimTime, vector::zero)
When you compare UMean and UM, they are exactly the same (maybe deltaT shifted) and you can use UM in your solver.

When you do exactly the same in OpenFOAM-2.2.2 or OpenFOAM-2.3.0, UM will not be filled with the UMean values and UM will not be written in your timefolder.
OpenFOAM brings the following warning:

--> FOAM Warning : 
    From function GeometricField<Type, PatchField, GeoMesh>::readIfPresent()
    in file /home/iagwenze/opt/OpenFOAM/of230/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricField.C at line 108
    read option IOobject::MUST_READ or MUST_READ_IF_MODIFIED suggests that a read constructor for field UMean would be more appropriate.
Is there anybody who knows, why the presented code is not working anymore in OpenFOAM-2.2.2 or OpenFOAM-2.3.0?
Is there another possibility to read in Mean values to your solver?


Last edited by ChrisWe; July 10, 2015 at 04:48.
ChrisWe is offline   Reply With Quote


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
Read gradient values of constantAlphaContactAngle styleworker OpenFOAM Programming & Development 0 November 25, 2013 09:26
How to setup a simple OpenFOAM cluster? TommiPLaiho OpenFOAM Installation 3 October 27, 2013 16:15
Numerical errors in nested domain with pre-calculated boundary values Arnoldinho OpenFOAM Running, Solving & CFD 3 April 4, 2012 10:31
999999 (../../src/mpsystem.c@1123):mpt_read: failed:errno = 11 UDS_rambler FLUENT 2 November 22, 2011 10:46
read a file .txt with nurecial values of time and acceleration sicfred Fluent UDF and Scheme Programming 0 November 21, 2011 08:02

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