|
[Sponsors] |
June 27, 2014, 09:27 |
Scalar Transport - multiphaseEulerFoam
|
#1 |
New Member
Dominik Schmidt
Join Date: Mar 2014
Posts: 11
Rep Power: 12 |
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(); ... Code:
//- Volumetric flux of the phase surfaceScalarField phiAlpha_; //- Volumetric flux for the phase autoPtr<surfaceScalarField> phiPtr_; 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) Thanks, Dominik Last edited by dschmidt; June 30, 2014 at 12:02. |
|
July 10, 2014, 12:41 |
|
#2 |
Senior Member
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21 |
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; Hope this helps, Kent |
|
July 11, 2014, 04:49 |
|
#3 |
New Member
Dominik Schmidt
Join Date: Mar 2014
Posts: 11
Rep Power: 12 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
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 07:20 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |