# MRFSimpleFoam implementation questions

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

 February 15, 2013, 06:51 MRFSimpleFoam implementation questions #1 Member   Florian Join Date: Nov 2009 Posts: 59 Rep Power: 8 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

 February 22, 2013, 04:42 #2 Member   Florian Join Date: Nov 2009 Posts: 59 Rep Power: 8 Dare to bump that...

February 22, 2013, 17:25
#3
Senior Member

Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 584
Rep Power: 20
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

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.
__________________
Dan

February 25, 2013, 09:09
#4
Member

Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 8
Quote:
 Originally Posted by chegdan 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

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

There is the expression

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

 February 25, 2013, 11:37 #5 Senior Member     Daniel P. Combest Join Date: Mar 2009 Location: St. Louis, USA Posts: 584 Rep Power: 20 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 , 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! __________________ Dan Find me on twitter @dancombest and LinkedIn

 December 19, 2013, 10:07 #6 Senior Member   Gerhard Holzinger Join Date: Feb 2012 Location: Austria Posts: 195 Rep Power: 17 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

 March 14, 2014, 05:58 #7 New Member   Join Date: Oct 2011 Posts: 27 Rep Power: 7 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

March 15, 2014, 10:59
#8
Member

Julian Langowski
Join Date: May 2011
Location: Bremen, Germany
Posts: 91
Rep Power: 7
Quote:
 Originally Posted by GerhardHolzinger Am I correct, that OpenFOAM computes the absolute velocity in all zones?
Yep, that`s true

Quote:
 Originally Posted by GerhardHolzinger 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

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post AlmostSurelyRob OpenFOAM Programming & Development 33 April 8, 2014 02:42 bastil OpenFOAM Running, Solving & CFD 48 August 1, 2012 10:00 amgode OpenFOAM Running, Solving & CFD 8 August 5, 2011 06:03 wllmk1 OpenFOAM Running, Solving & CFD 0 February 5, 2011 05:52 thomek OpenFOAM Programming & Development 0 October 18, 2010 05:10

All times are GMT -4. The time now is 08:14.