CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   MRFSimpleFoam implementation questions (http://www.cfd-online.com/Forums/openfoam/113227-mrfsimplefoam-implementation-questions.html)

Horus February 15, 2013 06:51

MRFSimpleFoam implementation questions
 
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 February 22, 2013 04:42

Dare to bump that...

chegdan February 22, 2013 17:25

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 February 25, 2013 09:09

Quote:

Originally Posted by chegdan (Post 409602)
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

chegdan February 25, 2013 11:37

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!

GerhardHolzinger December 19, 2013 10:07

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

antoniofct March 14, 2014 05:58

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

Ruli March 15, 2014 10:59

Quote:

Originally Posted by GerhardHolzinger (Post 467056)
Am I correct, that OpenFOAM computes the absolute velocity in all zones?

Yep, that`s true ;)

Quote:

Originally Posted by GerhardHolzinger (Post 467056)
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


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