CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

rhoInf value, postProcess

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

LinkBack Thread Tools Display Modes
Old   October 7, 2018, 15:06
Default rhoInf value, postProcess
New Member
Join Date: Jul 2018
Posts: 9
Rep Power: 2
ms123 is on a distinguished road
Hello FOAMers,

I'm new in OF and I'm a little confused about the value of "rhoInf". I'm using the interDyMFoam solver (which means that my fluids are incompressible) and I want to calculate the forces and the moments on a patch of my simulation model. In the "system" file I've already copied the "forcesIncompressible" file. Now, in order to run
interDyMFOAM -postProcess -func forcesIncompressible
I have to define a "rhoInf" in the "forcesIncompressible" file. I have a two phase model and my transportPoperties file looks like this:
phases (water air);

water // oil ISOVG150

{ transportModel  Newtonian;

nu             nu  [0 2 -1 0 0 0 0] 2.280290891e-05;
rho            rho [1 -3 0 0 0 0 0] 811.3; }


{ transportModel Newtonian;

nu             nu    [0 2 -1 0 0 0 0] 213.5e-07 ;
rho            rho   [1 -3 0 0 0 0 0] 0.9859;   }

sigma          sigma [1 0 -2 0 0 0 0] 0.02843192;
I've read many discussions but nowhere was it clearly explained. I've tried to set as rhoInf the density of my oil, but the results aren't physically right.
Is there someone who could help me?
ms123 is offline   Reply With Quote

Old   October 8, 2018, 10:29
Super Moderator
Tobi's Avatar
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,152
Blog Entries: 6
Rep Power: 36
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi, as far as I know, the force calculation can only be used for single phase flows. You should be able to use the functionality for your case too but I am not sure if the result will be fine (if the object is in both fluids, I would expect that the result is wrong). However, the keyword rhoInf is used for incompressible calculations because the functionObject does not know the density. Thus, the keyword has to be used to tell the application which value has to be used for the calculation, cf.

     if (directForceDensity_)
         // Optional entry for fDName
         fDName_ = dict.lookupOrDefault<word>("fD", "fD");
         // Optional entries U and p
         pName_ = dict.lookupOrDefault<word>("p", "p");
         UName_ = dict.lookupOrDefault<word>("U", "U");
         rhoName_ = dict.lookupOrDefault<word>("rho", "rho");
         // Reference density needed for incompressible calculations
         if (rhoName_ == "rhoInf")
             dict.lookup("rhoInf") >> rhoRef_;
         // Reference pressure, 0 by default
         pRef_ = dict.lookupOrDefault<scalar>("pRef", 0.0);
As you already said:
I have to define a "rhoInf" in the "forcesIncompressible" file.
, you have to add the rhoInf keyword to the forcesIncompressible file. However,
I've tried to set as rhoInf the density of my oil, but the results aren't physically right.
tells me that you already did it with wrong results. So either you did something wrong or the lib cannot be used for your purpose.
Keep foaming,
Tobias Holzmann
Tobi 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
forceCoeffs and rhoInf dependency Horus OpenFOAM 3 August 9, 2018 03:55
rhoInf in dynamicMeshDict dictionary for wingMotion tutorial jiadongw OpenFOAM Running, Solving & CFD 5 July 2, 2018 21:23
[ddtExtended] Extended objectFunction for postProcess application Tobi OpenFOAM Community Contributions 2 January 21, 2018 14:25
postProcess functionality in openFOAM 4 bullmut OpenFOAM Post-Processing 23 July 21, 2017 09:11
postProcess Utility: icoFoam -noFunctionObjects Why?How? TeresaT OpenFOAM Post-Processing 7 November 14, 2016 17:10

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