CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Non linear Source Term, InterphaseChangeFoam, MULES

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 7, 2019, 11:38
Default Non linear Source Term, InterphaseChangeFoam, MULES
  #1
Member
 
Philipp
Join Date: Feb 2019
Posts: 35
Rep Power: 7
Phigo90 is on a distinguished road
Hallo everyone,


I am working on the InterCondensatingEvaporatingFoam, which uses the "alphaEqnSubCycle.H" and "alphaEqn.H" from the InterphaseChangeFoam.


The original solver is written like follows:


Code:
        fvScalarMatrix alpha1Eqn
        (
            fv::EulerDdtScheme<scalar>(mesh).fvmDdt(alpha1)
          + fv::gaussConvectionScheme<scalar>
            (
                mesh,
                phi,
                upwind<scalar>(mesh, phi)
            ).fvmDiv(phi, alpha1)
          - fvm::Sp(divU, alpha1)
         ==
            fvm::Sp(vDotvmcAlphal, alpha1)
            + vDotcAlphal
        );
In mathematical notation, this can be written as:


d(alpha)/dt+v*div(alpha)=(S_vap-S_con)*alpha+S_con


My frist question is about the RHS.
The expression can be rewritten as:
(S_vap-S_con)*alpha+S_con=S_vap*alpha+S_con(1-alpha).


However, I want to change the linear dependency on the right HS like:
S_vap*sqrt(alpha)+S_con(1-sqrt(alpha)).


Does anyone of you know, how it is possible to change the source Code to use a non linear source term? The source term will decrease the values of alpha, so I think this is the reason why it is treated in an implicit way.



The second question is about MULEs.


Original Code:
Code:
    volScalarField alpha10("alpha10", alpha1);

    for (int aCorr=0; aCorr<nAlphaCorr; aCorr++)
    {
        tmp<surfaceScalarField> talphaPhiCorr
        (
            fvc::flux
            (
                phi,
                alpha1,
                alphaScheme
            )
          + fvc::flux
            (
                -fvc::flux(-phir, alpha2, alpharScheme),
                alpha1,
                alpharScheme
            )
        );

        if (MULESCorr)
        {
            talphaPhiCorr.ref() -= talphaPhi();
            volScalarField alpha100("alpha100", alpha10);
            alpha10 = alpha1;

            MULES::correct
            (
                geometricOneField(),
                alpha1,
                talphaPhi(),
                talphaPhiCorr.ref(),
                vDotvmcAlphal,
                (
                    divU*(alpha10 - alpha100)
                  - vDotvmcAlphal*alpha10
                )(),
                1,
                0
            );

MULES is called after solving the equation mentioned above to guarantee boundedness. I think one problem is, that I do not completly understand what MULES is doing, but in my opinion it doesn't work. If I get for example a value for alpha=-1*e^-5 (which is lower than the physical limit of alpha, which is in the region of 0 to 1), the value after running MULES does not change.
Phigo90 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Source Term due to evaporation in energy transport equation styleworker OpenFOAM Programming & Development 3 September 7, 2022 04:09
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 09:06
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 04:04
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 22:53
[swak4Foam] funkySetFields compilation error tayo OpenFOAM Community Contributions 39 December 3, 2012 06:18


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