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

rhoInf in dynamicMeshDict dictionary for wingMotion tutorial

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

Like Tree2Likes
  • 1 Post By tomf
  • 1 Post By tomf

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2018, 04:58
Red face rhoInf in dynamicMeshDict dictionary for wingMotion tutorial
  #1
Member
 
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8
jiadongw is on a distinguished road
Hi Foamers,
I’m working on the wingMotion tutorial using pimpleDyMFoam. I want to change the fluid from air to water. So I modified the nu (10e-6 for water) in transportProperties dictionary and rhoInf in dynamicMeshDict dictionary. I assume that the rhoInf means fluid density, so I put it to 1000 for water.

But the case blow up within several time step. I found the Linear Acceleration of wing become very huge when the rhoInf is set to 1000. After I set the rhoInf to 1 everything is okay.

I seem to see some threads that say the incompressible flow solver solve for kinematic pressure, namely p/rho.

So my question is that what does rhoInf in dynamicMeshDict dictionary means? Fluid density or something else? How should I set this value if I want to the fluid is water?

Any suggestions are appreciated.
Thank you.
jiadongw is offline   Reply With Quote

Old   June 26, 2018, 23:59
Default
  #2
Member
 
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8
jiadongw is on a distinguished road
Any ideas?
jiadongw is offline   Reply With Quote

Old   June 30, 2018, 16:45
Default
  #3
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi,

I would guess that if you do not modify the velocity, your forces acting on the wing will also increase by about a factor of 1000. The change in viscosity will probably only make this worse, as the Reynolds Reynolds number would increase: inertial effects become more dominant.

You may need to adapt the mass of the solid object as well, or decrease the velocity significantly.

Hope this helps,
Tom
jiadongw likes this.
tomf is offline   Reply With Quote

Old   July 1, 2018, 20:46
Default
  #4
Member
 
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8
jiadongw is on a distinguished road
Hi Tom,

Thanks for your reply. You are definitely correct. In fact, I have decrease the velocity to a large extent (to 3m/s), but it seems do not work. When I increase mass of wing significantly, the case can run smoothly.

I’m still confused about the rhoInf in dynamicMeshDict dictionary.

If I want to simulate a hydrofoil in water, does I have to modify the rhoInf to 1000?

Because I find several tutorials using interDyMFoam still employ the rhoInf of 1 for water fluid. For example, tutorials / multiphase / interDyMFoam / RAS / DTCHull / constant / dynamicMeshDict.sixDoF and tutorials / incompressible / pimpleDyMFoam / propeller / system / forces.

Is there any difference for them?

Jiadong
jiadongw is offline   Reply With Quote

Old   July 2, 2018, 17:10
Default
  #5
Senior Member
 
Tom Fahner
Join Date: Mar 2009
Location: Breda, Netherlands
Posts: 634
Rep Power: 32
tomf will become famous soon enoughtomf will become famous soon enough
Send a message via MSN to tomf Send a message via Skype™ to tomf
Hi Jiadong,

There are quite some differences yes. First of all, the propeller case only uses rhoInf to determine the forces on the propeller. In fact I would think that it needs to be 1000 in that tutorial indeed. As the motion is driving the flow and not vice versa it has nothing to do with your issue.

for the interDyMFoam solver I guess the actual density rho (as alpha1*rho1+alpha2*rho2) is used in the multiphase sense to get the correct result for the forces that drive the motion. So it is diiferent from you pimpleDyMFoam where there is not direct reference to the fluid density.

So in you case I would guess that rhoInf should be 1000 in the dynamicMeshDict yes. The pimpleDyMFoam propeller tutorial is confusing to say the least. You may want to file a bug report. Or one could say that the forces reported are kN instead of N, but that would require a comment in the forces file I guess.

Hope this helps,
Tom
jiadongw likes this.
tomf is offline   Reply With Quote

Old   July 2, 2018, 21:23
Default
  #6
Member
 
Jiadong Wang
Join Date: Mar 2018
Location: Australia
Posts: 32
Rep Power: 8
jiadongw is on a distinguished road
Thanks, Tom

It's really helpful for me.

I guess I need to figure out some ways to stabilize the acceleration with rhoInf of 1000 for my case.

Thank you so much.

Jiadong
jiadongw is offline   Reply With Quote

Old   March 13, 2021, 16:02
Default Mass property
  #7
Member
 
Deutschland
Join Date: Sep 2020
Posts: 69
Rep Power: 5
vava10 is on a distinguished road
Hey,

I have a ship of 77 kg. I try to find the mass properties using the surfaceInertia tool. In this I used "surfaceInertia -denisty 369.54" so that when this command works I get mass same as 77kg

From this thread rhoInf should be 1000 since it is water. But in the DTCHull simulation rhoInf is 1

I am really confused about rhoInf. I checked rhoInf in https://www.openfoam.com/documentati...8H_source.html and it says

Reference density required by the forces object for
// incompressible calculations, required if rho == rhoInf

?


Thanks in advance
vava10 is offline   Reply With Quote

Old   March 14, 2021, 11:46
Default
  #8
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Did you have a look at this:


https://www.openfoam.com/documentati...8C_source.html


The normal force is calculated as follows:


Code:

 
             vectorField fN
 
             (
 
                 rho(p)*Sfb[patchi]*(p.boundaryField()[patchi] - pRef)
 
             );
the function rho(p) is computed as follows:




Code:

 Foam::scalar Foam::functionObjects::forces::rho(const volScalarField& p) const
 
 {
 
     if (p.dimensions() == dimPressure)
 
     {
 
         return 1.0;
 
     }
 
  
 
     if (rhoName_ != "rhoInf")
 
     {
 
         FatalErrorInFunction
 
             << "Dynamic pressure is expected but kinematic is provided."
 
             << exit(FatalError);
 
     }
 
  
 
     return rhoRef_;
 
 }
and



Code:

if (rhoName_ == "rhoInf")
 
         {
 
             rhoRef_ = dict.get<scalar>("rhoInf");
 
             Info<< "    Freestream density (rhoInf) set to " << rhoRef_ << endl;
 
         }
So for solvers where the pressure has the dimension of pressure (for incompressible flows the dimension of the pressure is the pressure/density) like interFoam


rhoInf should not be considered at all. So basically rho(p) would always return 1 regardless what value rhoInf has.



To test this you could apply different rhoInf values to your simulation and see if the motion of the ship changes




Best


Michael
mAlletto is offline   Reply With Quote

Reply

Tags
dynamicmeshdict, sixdofsolver, wingmotion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with 3D Bifurcating Artery tutorial - no wall shear seen 9aul FLUENT 0 January 15, 2018 18:20
I can't understand the moving function of "libfvMotionSolver.so" in dynamicMeshDict Jung hoo OpenFOAM Programming & Development 0 July 13, 2016 03:36
Problem on Fluent Tutorial: Horizontal Film Boilig Feng FLUENT 2 April 13, 2013 05:34
[Virtualization] OpenFOAM oriented tutorial on using VMware Player - support thread wyldckat OpenFOAM Installation 2 July 11, 2012 16:01
FoamX error aachenBomb case Ervin Adorean (Adorean) OpenFOAM Pre-Processing 13 March 7, 2005 03:50


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