CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   twoPhaseEulerFoam & Source term (http://www.cfd-online.com/Forums/openfoam-programming-development/123331-twophaseeulerfoam-source-term.html)

Aurelien Thinat September 10, 2013 06:26

twoPhaseEulerFoam & Source term
 
Hello everyone,

I'm willing to include a mass source term in twoPhaseEulerFoam solver :

S_Mass = - rho1 * alpha1 / dT, with dT the time step.

It should extract the mass of the phase1 (dispersed phase) in a zone I define with a function :
F = 1 if I activate the source term,
0 elsewhere.

That's for the theory. I'm stuck with the OpenFOAM code now.

Since the equation is in volumic form, I wrote :

alphaEqn :
(
fvm::ddt(alpha1)
- fvc::ddt(alpha1)
- fvm::laplacian
(
alpha1f*ppMagf,
alpha1,
"laplacian(alpha1PpMag,alpha1)"
)
==
scalar(-1)*F*alpha1/runTime.deltaT().value
);

pEqn :
(
fvm::laplacian(Dp,p) == fvc::div(phiHByA) + F*alpha1/(runTime.deltaT().value)
);


Does it seems correct to you ?


Thank you.


All times are GMT -4. The time now is 03:29.