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/)
-   -   Read gradient values of constantAlphaContactAngle (https://www.cfd-online.com/Forums/openfoam-programming-development/126740-read-gradient-values-constantalphacontactangle.html)

styleworker November 25, 2013 08:26

Read gradient values of constantAlphaContactAngle
 
Hello foamers,

I want to read the values of the entry "gradient" of boundary patch. Let's say I define the BC as:

Code:

    symFluidLeft
    {
        type            constantAlphaContactAngle;
        theta0          45;
        limit          gradient;
        value          uniform 0;   
    }

I'm able to read the alpha field of the patch of type constantAlphaContactAngle. In order to do this:
Code:

const fvMesh& mesh = alpha1.mesh();
const volScalarField::GeometricBoundaryField& abf = alpha1.boundaryField();

const fvBoundaryMesh& boundary = mesh.boundary();

forAll(boundary, patchI)
{
    if(abf[patchI].type() == "constantAlphaContactAngle")
    {
        Info << "Alpha value of face 1 of patchI" << abf[patchI][0] << endl;
    }
}

But how can I read the gradient values of this patch, which are stored in the GeometricBoundaryField abf, too?


All times are GMT -4. The time now is 04:24.