CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Add source term in alphaEqn.H of interFoam (

tayo November 28, 2012 11:41

Add source term in alphaEqn.H of interFoam
Hello all,

Just a quick one. I added a source term (Sp) to alphaEqn.H in interFoam. I tried following example in interPhaseChangeFoam but compiling it gives me error in MULES that "5 arguments are expected, 6 provided" (Sp is the addition). How do I properly include this Sp source term in the alpha eqn? Or is there an alternative way to do this? Thanks

surfaceScalarField phiAlpha
+ fvc::flux
-fvc::flux(-phir, scalar(1) - alpha1, alpharScheme),

volScalarField Sp
source term

MULES::explicitSolve(alpha1, phi, phiAlpha, Sp, 1, 0);

Mahdi2010 October 23, 2013 03:40

If you wanna add any source term to the alpha equation using the MULE
solver, you need to take care of the MULE functions in MULE.H.
There are two ways that MULE works, implicit or explicit. whether your source term is defined explicitly or implicitly, you should have Su and Sp as the source term.
in your code you call the MULE explicitly but you define 1 source term. the error says that
either change the function call to implicit solve or define a new source term called Su.
By the way, what your source term looks like?

All times are GMT -4. The time now is 20:27.