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/)
-   -   Why do we need pCorrTypes in interFoam? (https://www.cfd-online.com/Forums/openfoam-programming-development/221073-why-do-we-need-pcorrtypes-interfoam.html)

goguler October 3, 2019 03:55

Why do we need pCorrTypes in interFoam?
 
Dear All,

I have been working on an interFoam based solver nowadays. I cannot understand why do we need pCorrTypes in interFoam. Because, we do not have pCorrTypes for example in pimpleDyMFoam.

Let me write the details.

In interFoam pcorr is defined in correctPhi.H as

Code:

volScalarField pcorr
    (
        IOobject
        (
            "pcorr",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        mesh,
        dimensionedScalar("pcorr", pd.dimensions(), 0),
        pcorrTypes
    );

Before that we have declaration of pCorrTypes as follows:

Code:

wordList pcorrTypes
    (
        pd.boundaryField().size(),
        zeroGradientFvPatchScalarField::typeName
    );

    forAll (pd.boundaryField(), i)
    {
        if (pd.boundaryField()[i].fixesValue())
        {
            pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
        }
    }

However, in pimpleDyMFoam pcorr is declared as follows:

Code:

volScalarField pcorr("pcorr", p);
pcorr *= 0;

I cannot get the idea why we cannot define pcorr in the same way with pimpleDyMFoam in interFoam.

It might be related to definition of pressure in interFoam vs pimpleDyMFoam. In the first one it is pd and in the second one it is p.

I would be happy to read your comments.


All times are GMT -4. The time now is 22:59.