CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Is MULES the right choice for modified transport equation? (https://www.cfd-online.com/Forums/openfoam-programming-development/218558-mules-right-choice-modified-transport-equation.html)

elsebaer June 25, 2019 05:05

Is MULES the right choice for modified transport equation?
 
Hi everybody,
I want to solve the following modified transport equation for the calculation of sensitivities:

\frac{\partial}{\partial t} (\delta \alpha) + \nabla \cdot (\vec{u} \ \delta \alpha) + \nabla \cdot (\delta \vec{u} \ \alpha)

Within interFoam, I implemented the the following code right after solving alphaEqn.H (along with initial fields dAlpha and dU, calculation of dPhi and other modifications):

Code:

{
    word dAlphaScheme("div(phi,dAlpha)");
    word dPhiScheme("div(dPhi,alpha)");
   
    #include "alphaSuSp.H"
   
    surfaceScalarField dAlphaPhi
    (
    fvc::flux(phi, dAlpha, dAlphaScheme)
    + fvc::flux(dPhi, alpha1, dPhiScheme)
    );
   
    MULES::explicitSolve
    (
    geometricOneField(),
    dAlpha,
    dAlphaPhi,
    Sp,
    Su
    );
}

It works, but I'm not sure if MULES::explicitSolve is the right way to solve this equation. After a few time steps the solution smears heavily. What would you recommend?





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