CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Scalar Transport - multiphaseEulerFoam

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

LinkBack Thread Tools Display Modes
Old   June 27, 2014, 08:27
Default Scalar Transport - multiphaseEulerFoam
New Member
Dominik Schmidt
Join Date: Mar 2014
Posts: 11
Rep Power: 5
dschmidt is on a distinguished road
Dear Foamers,

I'm trying to implement a passive scalar transport into multiphaseEulerFoam (2.2.x).
The scalar is only transported by one of the phases, so I need to access the corresponding phi.

I got a little confused by phases.phiAlpha(), which is used in the UEqns.H and is calculated within the multiphaseSystem
and phases.phi(), which is used for calculating the overall phi (Peqn.H) and is calculated as:

 phase.phi() =
                  + rAlphaAUfs[phasei]*mSfGradp/phase.rho();
Both seem to be described in the phaseModel.H, but that didn't help me either

        //- Volumetric flux of the phase
        surfaceScalarField phiAlpha_;

        //- Volumetric flux for the phase
        autoPtr<surfaceScalarField> phiPtr_;
My scalar transport equation with the two variations looks like this:

 fvm::ddt(alpha, Tracer)     
+ fvm::div(fvc::interpolate(alpha)*phase.phi(),Tracer)
 //+ fvm::div(phase.phiAlpha(), Tracer)  
 - fvm::laplacian(fvc::interpolate(alpha)*DTotal, Tracer)
I would be glad if anyone could clarify this for me.


Last edited by dschmidt; June 30, 2014 at 11:02.
dschmidt is offline   Reply With Quote

Old   July 10, 2014, 11:41
Senior Member
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 218
Rep Power: 14
kwardle is on a distinguished road
If the name of the phase you are trying to access the phi for is "Tracer", then you need to define a few things to reference the correct phase.

const phaseModel* tracerPhase = fluid.phases().lookup("Tracer");
const phaseModel& phaseT = *tracerPhase;
then when you include phaseT.phi() in your transport equation, it will be the phi for the phase named Tracer.

Hope this helps,
kwardle is offline   Reply With Quote

Old   July 11, 2014, 03:49
New Member
Dominik Schmidt
Join Date: Mar 2014
Posts: 11
Rep Power: 5
dschmidt is on a distinguished road
Thanks for the advice Kent.

As the phase.phi() is the peqn result I also went with that instead of phiAlpha, but my current implementation isn't as neat as yours

I loop over the phases as in UEqn.H and solve the tracer transport equation only for the "tracer transport phase" defined in a tracerProperies dict.

The results look promising, but to keep the Tracer "bounded" to its transport phase I needed to use upwind div scheme for the tracer equation.
dschmidt 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
problems concerning mass conservativity in bubbleFoam with custom scalar transport cutter OpenFOAM Programming & Development 3 February 10, 2015 05:25
Diverging solution in transonicMRFDyMFoam tsalter OpenFOAM Running, Solving & CFD 30 July 7, 2014 06:20
compressible flow in turbocharger riesotto OpenFOAM 50 May 26, 2014 01:47
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 11 April 22, 2014 12:32
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 02:27

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