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

MRFSimpleFoam implementation questions

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By chegdan

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2013, 06:51
Question MRFSimpleFoam implementation questions
  #1
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 17
Horus is on a distinguished road
Hello,

I''m digging into the MRF implementation of MRFSimpleFoam.
For understanding the mathematics I've found [1] and [2].

The MRFSimpleFoam source code [3]. The rhs of the momentum equation is added a sources term for coriolis forces.
pEqn.H calls mrfZones.relativeFlux(phi); which "makes the given absolute mass/vol flux relative within the MRF region". So we are working with relative velocity, correct?

In MRFZone.C [4] Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn) is called. It adds the source term Usource[celli] -= V[celli]*(Omega ^ U[celli]); to every cell within the MRF zone.

U is relative velocity, V is the cell volume, Omega the rotating axis/frequency, ^ the cross product.

- If we're using relative velocity, doesn't the coriolis term needs to be 2 * omega ^ Urel ?
- Where is the centripetal force term omega ^ omega ^ r? Is is contained in fvm::laplacian(rAU, p) in pEqn?
- Why the cell volume? The compressible addCoriolis function uses -V * rho which is mass...

Thanks for any clarifications!

Florian

[1] http://openfoamwiki.net/index.php/Se...RF_development
[2] http://openfoamwiki.net/index.php/Si...ry_MRF_Library
[3] http://foam.sourceforge.net/docs/cpp...e79dad982.html
[4] http://foam.sourceforge.net/docs/cpp/a03948_source.html
Horus is offline   Reply With Quote

Old   February 22, 2013, 04:42
Default
  #2
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 17
Horus is on a distinguished road
Dare to bump that...
Horus is offline   Reply With Quote

Old   February 22, 2013, 17:25
Default
  #3
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Florian,

Glad you asked this question, it made me look at it MRF solvers a little more closely.

Quote:
- If we're using relative velocity, doesn't the coriolis term needs to be 2 * omega ^ Urel ?
The velocity in MRFSimpleFOAM is in absolute velocity, therefore the Coriolis acceleration is correctly formulated and rolled into a single term with centripetal force.

Quote:
- Where is the centripetal force term omega ^ omega ^ r? Is is contained in fvm::laplacian(rAU, p) in pEqn?
For absolute velocity, the centripetal force and coriolis force collapse into the single form

V_{cell}(\vec{\omega}\times\vec{U})

Quote:
Why the cell volume? The compressible addCoriolis function uses -V * rho which is mass..
The incompressible formulation of the momentum transport equation has already been divided by rho. Hence why we use nu ( mu divide by rho) and density normalized pressure (in terms of pressure divided by rho...check the units of pressure in simpleFoam cases). Therefore the multiplication of the source term by cell volume is necessary to get the units of force.
Horus and kiddmax like this.

Last edited by chegdan; February 22, 2013 at 17:44. Reason: added more information
chegdan is offline   Reply With Quote

Old   February 25, 2013, 09:09
Default
  #4
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 17
Horus is on a distinguished road
Quote:
Originally Posted by chegdan View Post
Florian,
The velocity in MRFSimpleFOAM is in absolute velocity, therefore the Coriolis acceleration is correctly formulated and rolled into a single term with centripetal force.

For absolute velocity, the centripetal force and coriolis force collapse into the single form

V_{cell}(\vec{\omega}\times\vec{U})
Thanks for your reply!

The equation used is Eqn. 6 at http://openfoamwiki.net/index.php/Se...RF_development . Correct?

There is the expression

\nabla \cdot (\vec u_R \otimes \vec u_I)

The dyadic product of relative and absolute velocity. I still don't really understand where this expression has gone in the source code?

Thanks!

Florian
Horus is offline   Reply With Quote

Old   February 25, 2013, 11:37
Default
  #5
Senior Member
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 621
Rep Power: 0
chegdan will become famous soon enoughchegdan will become famous soon enough
Florian,

Glancing at other CFD packages documentation and the formulation for MRF solvers, I do see this term as well and seems that it would make sense that the advection term

\nabla\cdot(\vec{U_R}\vec{U}),

should in fact be in there somewhere. If the absolute velocity is the variable of interest, then U_R is related to phi and coupled explicitly through some phi adjustment.

If you look further in the MRFSimpleFoam, you will see the pEqn.H. In that file there is a method that is called that adjusts the flux for this:

Code:
mrfZones.relativeFlux(phi)
If you look into the files located in

Code:
$FOAM_SRC/finiteVolume/cfdTools/general/MRF
You will see the
Code:
relativeFlux()
method definition. Good luck and i hope this helps!
chegdan is offline   Reply With Quote

Old   December 19, 2013, 10:07
Default
  #6
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 342
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I have one question regarding the unsteady term of Eq. 6 in [1]. There, the relative velocity appears in the time derivative.

Am I correct, that OpenFOAM computes the absolute velocity in all zones?

If that is the case: why is the relative velocity in the unsteady term?

Maybe one of you can elaborate.


Cheers,

[1] http://openfoamwiki.net/index.php/Se...RF_development
GerhardHolzinger is offline   Reply With Quote

Old   March 14, 2014, 05:58
Default
  #7
New Member
 
Join Date: Oct 2011
Posts: 27
Rep Power: 15
antoniofct is on a distinguished road
Hi guys.
I have a question regarding MRF.

I have printed the output of UEqn.source() (meaning Usource[celli] -= V[celli]*(Omega ^ U[celli]) ) before and after adding coriolis term ( mrfzones.addCoriolis(rho, UEqn) ), and it prints the same. Why isnt the UEqn being updated??

Thanks
antoniofct is offline   Reply With Quote

Old   March 15, 2014, 10:59
Default
  #8
Member
 
Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 15
Ruli is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
Am I correct, that OpenFOAM computes the absolute velocity in all zones?
Yep, that`s true

Quote:
Originally Posted by GerhardHolzinger View Post
If that is the case: why is the relative velocity in the unsteady term?
Looking at http://openfoamwiki.net/index.php/Se...RF_development the temporal term of the 'original' NS equation is transformed into its relative formulation, which leads to U_rel in unsteady term. This term is not affected by the further simplifications. I guess it is treated explicitely.

Best regards
Julian
__________________
πάντα ῥεῖ - Heraclitus
Ruli 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
Wall functions - questions about implementation AlmostSurelyRob OpenFOAM Programming & Development 44 May 6, 2020 11:11
MRFSimpleFoam Tutorial bastil OpenFOAM Running, Solving & CFD 48 August 1, 2012 11:00
GGI implementation in MRFSimpleFoam amgode OpenFOAM Running, Solving & CFD 8 August 5, 2011 07:03
about MRFSimpleFoam and ggi wllmk1 OpenFOAM Running, Solving & CFD 0 February 5, 2011 05:52
Implementation issues of fvSchemes / laplacianScheme, in particular gaussLaplacianSch thomek OpenFOAM Programming & Development 0 October 18, 2010 06:10


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