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

MPPICInterFoam how to update alpha1 and alpha2 from updated alphac?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 27, 2022, 05:57
Default MPPICInterFoam how to update alpha1 and alpha2 from updated alphac?
  #1
Member
 
Huan Zhang
Join Date: Nov 2020
Posts: 55
Rep Power: 5
Jasper Z is on a distinguished road
Dear all, I am looking at the creatFields.H in MPPICInterFoam, a part of the codes are shown below:
Code:
volScalarField alphac
(
    IOobject
    (
        "alphac",
        runTime.timeName(),
        mesh,
        IOobject::READ_IF_PRESENT,
        IOobject::AUTO_WRITE
    ),
    mesh,
    dimensionedScalar(dimless, Zero),
    zeroGradientFvPatchScalarField::typeName
);
alphac.oldTime();

volScalarField alphacRho(alphac*rho);
alphacRho.oldTime();

Info<< "Constructing kinematicCloud " << endl;
basicKinematicMPPICCloud kinematicCloud
(
    "kinematicCloud",
    rho,
    U,
    mu,
    g
);

// Particle fraction upper limit
scalar alphacMin
(
    1.0
  - (
        kinematicCloud.particleProperties().subDict("constantProperties")
       .get<scalar>("alphaMax")
    )
);

// Update alphac from the particle locations
alphac = max(1.0 - kinematicCloud.theta(), alphacMin);
alphac.correctBoundaryConditions();
At the bottom of code, we can see that the updated alphac=1-theta, but I am wondering how to get the updated alpha1 and alpha2 from alphac? I don't know where the code is...

Thanks for your help,
Jasper
Jasper Z is offline   Reply With Quote

Old   April 28, 2022, 04:27
Red face
  #2
Member
 
Huan Zhang
Join Date: Nov 2020
Posts: 55
Rep Power: 5
Jasper Z is on a distinguished road
After looking at the alphaEqn.H, alpha1 can be calculated via the following codes:
Code:
else
        {
            alphaPhi10 = talphaPhi1Un;

            MULES::explicitSolve
            (
                alphac,
                alpha1,
                phiCN,
                alphaPhi10,
                Sp,
                (Su + divU*min(alpha1(), scalar(1)))(),
                oneField(),
                zeroField()
            );
        }

        alpha2 = 1.0 - alpha1;

        mixture.correct();
    }
But why alpha2 = 1.0 - alpha1? shouldn't it be alphac-alpha1? Please give me a hint if anyone knows that
Jasper Z 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
Formulation in compressibleInterFoam scttmllr OpenFOAM Running, Solving & CFD 72 June 26, 2023 07:42


All times are GMT -4. The time now is 18:15.