styleworker |
November 6, 2013 05:50 |
Read out value of keyword in boundaryField
Hello foamers,
I've added a new boundary condition (modified constantAlphaContactAngle) for calculating a temperature dependent contact angle. This BC writes out the current contact angle in the write function via:
Code:
os.writeKeyword("theta0") << calcMic(0) << token::END_STATEMENT << nl;
When correcting the the contact angle in interfaceProperties.C, the boundary alpha boundary conditions can be read via:
Code:
const volScalarField::GeometricBoundaryField& abf = alpha1_.boundaryField();
const fvBoundaryMesh& boundary = mesh.boundary();
forAll(boundary, patchi)
{
if (isA<alphaContactAngleFvPatchScalarField>(abf[patchi]))
{
alphaContactAngleFvPatchScalarField& acap =
const_cast<alphaContactAngleFvPatchScalarField&>
(
refCast<const alphaContactAngleFvPatchScalarField>
(
abf[patchi]
)
);
fvsPatchVectorField& nHatp = nHatfv.boundaryField()[patchi];
const scalarField theta
(
convertToRad*acap.theta(U_.boundaryField()[patchi], nHatp)
);
Info << "######## acap ======" << acap << endl;
}
}
The function alphaContactAngleFvPatchScalarField acap contains the entry theta0 with the corresponding value.
My Question: How can I get access to the value of the keyword theta0?
thank you!
|