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

Scalar Transport - multiphaseEulerFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 27, 2014, 08:27
Default Scalar Transport - multiphaseEulerFoam
  #1
New Member
 
Dominik Schmidt
Join Date: Mar 2014
Posts: 11
Rep Power: 12
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:

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

Code:
        //- 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:

Code:
 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.


Thanks,
Dominik

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

Old   July 10, 2014, 11:41
Default
  #2
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
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.

Code:
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,
Kent
kwardle is offline   Reply With Quote

Old   July 11, 2014, 03:49
Default
  #3
New Member
 
Dominik Schmidt
Join Date: Mar 2014
Posts: 11
Rep Power: 12
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

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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
problems concerning mass conservativity in bubbleFoam with custom scalar transport cutter OpenFOAM Programming & Development 3 February 10, 2015 04: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
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27


All times are GMT -4. The time now is 05:21.