CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)

 openfoammaofnepo May 2, 2017 13:49

about mass transfer model in reactingTwoPhaseEulerFoam solver

Dear All,

Recently I am working on reactingTwoPhaseEulerFoam solver from OpenFOAM 3.0.1. I have to implement my own mass transfer model, and hence have to read a little bit about the mass transfer model in this solver. We all know that there is a source term in the RHS of the mass fraction governing equation:

Code:

`  Y1iEqn==*massTransfer[Y1[i].name()]+ fvOptions(alpha1, rho1, Y1[i])`
I know the meaning of the highlighted mass transfer term, for example, if we use Frossling model and spherical models, we will have the following lines of codes:

Code:

```Foam::tmp<Foam::volScalarField> Foam::massTransferModels::Frossling::K() const {     volScalarField Sh(scalar(2) + 0.552*sqrt(pair_.Re())*cbrt(Le_*pair_.Pr()));     return 6.0*pair_.dispersed()*Sh/sqr(pair_.dispersed().d()); }```
Code:

```Foam::tmp<Foam::volScalarField> Foam::massTransferModels::sphericalMassTransfer::K() const {     return 60.0*pair_.dispersed()/sqr(pair_.dispersed().d()); }```
My question is: how *massTransfer[Y1[i].name()] is calculated based on the modelled K?

best regards,
OFFO

 openfoammaofnepo May 3, 2017 10:53

In the massTransfer() function, we have the following several lines:

Code:

```              // Implicit transport through the phase               *eqns[name] +=                   phase.rho()*KD*Yf                 - fvm::Sp(phase.rho()*KD, eqns[name]->psi());                 // Sum the mass transfer rate               dmdtExplicit += dmdtSign*phase.rho()*KD*Yf;               dmdt -= dmdtSign*phase.rho()*KD*eqns[name]->psi();                 // Explicit transport out of the other phase             if (eqns.found(otherName))               {                   *eqns[otherName] -=                       otherPhase.rho()*KD*compositionModel.dY(member, Tf);               }```
So we can see that here dmdt is calculated. Here dmdt is related to the Yf which is the mass fraction at the phase interface. Anybody knows the references for this model?

 openfoammaofnepo May 5, 2017 10:20

Dear All,

About the BasePhaseSystem, it is widely used for the class template in the reactingTwoPhaseEulerFoam solver. For example, it is used for the heatTransferModel.H, and the piece of the code is as follows:

Code:

```/*---------------------------------------------------------------------------*\                     Class HeatTransferPhaseSystem Declaration \*---------------------------------------------------------------------------*/ template<class BasePhaseSystem> class HeatTransferPhaseSystem :     public BasePhaseSystem { protected:             // Protected typedefs                 typedef HashTable         <             autoPtr<BlendedInterfacialModel<heatTransferModel> >,             phasePairKey,             phasePairKey::hash         > heatTransferModelTable;```
But I am not sure where this "BasePhaseSystem" is from. I searched in the \src and \reactingTwoPhaseEulerFoam, but did not find any relevant results. Do you where where it is defined in the OpenFOAM? Anybody also has this problem and do you have any comment for this question?

 LG Liang June 27, 2019 04:26

Hi,

The BasePhaseSystem can be found in reactingTwoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystems.C

Say if the phaseSystem used is interfaceCompositionPhaseChangeTwoPhaseSystem, it can be seen in the code that

typedef
InterfaceCompositionPhaseChangePhaseSystem
<
PhaseTransferPhaseSystem
<
TwoResistanceHeatTransferPhaseSystem
<
MomentumTransferPhaseSystem<twoPhaseSystem>
>
>
>
interfaceCompositionPhaseChangeTwoPhaseSystem;

So the BasePhaseSystem of HeatTransferPhaseSystem would be MomentumTransferPhaseSystem<twoPhaseSystem>. By the way the code is from newer version though. Hope it helps.

Regards,
James

 All times are GMT -4. The time now is 23:41.