CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   gammaEqn.H in the interPhaseChangeFoam solver (https://www.cfd-online.com/Forums/openfoam/65885-gammaeqn-h-interphasechangefoam-solver.html)

 isabel June 29, 2009 13:33

gammaEqn.H in the interPhaseChangeFoam solver

In gammaEqn.H in the interPhaseChangeFoam we can see this line:

MULES::implicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0);

I know that:
gamma: is the actual value of gamma to be solved
phi: is the normal convective flux
phiGamma: U*gamma + gamma*(1-gamma)*U
1, 0 : max and min gamma values

But I don't unserstand what Sp and Su are. I think that Sp is a source term to solve the equation:

d(gamma)/dt + div(phigamma) = Sp

Am I all right?

What is Su term?

 sandy July 7, 2009 05:01

Quote:
 Originally Posted by isabel (Post 220858) In gammaEqn.H in the interPhaseChangeFoam we can see this line: MULES::implicitSolve(oneField(), gamma, phi, phiGamma, Sp, Su, 1, 0); I know that: gamma: is the actual value of gamma to be solved phi: is the normal convective flux phiGamma: U*gamma + gamma*(1-gamma)*U 1, 0 : max and min gamma values But I don't unserstand what Sp and Su are. I think that Sp is a source term to solve the equation: d(gamma)/dt + div(phigamma) = Sp Am I all right? What is Su term?
=================================

In fact, to this equation,
Source term = vDotvAlphal * gamma + (1 - gamma) * vDotcAlphal = (vDotvAlphal - vDotcAlphal) * gamma + vDotcAlphal.

So, Sp = (vDotvAlphal - vDotcAlphal) * gamma , and it will be solved implicitly.
Su = vDotcAlphal, and it is an explicit term in this equation.

But, why Su also includes the term divU*gamma in gammaEqu.H ? If the MULES::implicitSolver was chose, this term should be deleted, right?

Because in MULESTemplates.C, phiPsi = phiGamma = phi*gamma + gamma*(1-gamma)*phi, the term div(phi*gamma) [=divU*gamma ??] has been actually included as follows:

---------------------------
fvScalarMatrix psiConvectionDiffusion
(
fvm::ddt(rho, psi)
+ fv::gaussConvectionScheme<scalar>(mesh, phi, UDs).fvmDiv(phi, psi)
- fvm::Sp(Sp, psi)
- Su
);

surfaceScalarField phiBD = psiConvectionDiffusion.flux();
surfaceScalarField& phiCorr = phiPsi;
phiCorr -= phiBD;

.......
.......

solve
(
psiConvectionDiffusion + fvc::div(lambda*phiCorr),
MULEScontrols.lookup("solver")
);
--------------------------------

Am I right?

Thanks.

 isabel July 7, 2009 13:41

http://www.cfd-online.com/Forums/ope...tml#post221814

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