27 #include "alphaContactAngleFvPatchScalarField.H" 48 void Foam::interfaceProperties::correctContactAngle
50 surfaceVectorField::GeometricBoundaryField& nHatb,
51 surfaceVectorField::GeometricBoundaryField& gradAlphaf
54 const fvMesh& mesh = alpha1_.
mesh();
55 const volScalarField::GeometricBoundaryField& abf = alpha1_.
boundaryField();
57 const fvBoundaryMesh& boundary = mesh.boundary();
61 if (isA<alphaContactAngleFvPatchScalarField>(abf[patchi]))
63 alphaContactAngleFvPatchScalarField& acap =
64 const_cast<alphaContactAngleFvPatchScalarField&
> 66 refCast<const alphaContactAngleFvPatchScalarField>
91 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
99 nHatp = a*nf +
b*nHatp;
100 nHatp /= (
mag(nHatp) + deltaN_.
value());
102 acap.gradient() = (nf & nHatp)*
mag(gradAlphaf[patchi]);
109 void Foam::interfaceProperties::calculateK()
111 const fvMesh& mesh = alpha1_.
mesh();
131 correctContactAngle(nHatfv.boundaryField(), gradAlphaf.boundaryField());
134 nHatf_ = nHatfv & Sf;
155 Foam::interfaceProperties::interfaceProperties
159 const IOdictionary&
dict 162 transportPropertiesDict_(dict),
167 alpha1.mesh().solverDict(alpha1.
name()).
lookup(
"cAlpha")
170 sigma_(
"sigma", dimensionSet(1, 0, -2, 0, 0), dict),
197 "interfaceProperties:K",
221 return pos(alpha1_ - 0.01)*
pos(0.99 - alpha1_);
227 alpha1_.
mesh().solverDict(alpha1_.
name()).
lookup(
"cAlpha") >> cAlpha_;
228 transportPropertiesDict_.
lookup(
"sigma") >> sigma_;
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &vf, const surfaceScalarField &faceFlux, Istream &schemeData)
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
static const scalar convertToRad
Conversion factor for degrees into radians.
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
Calculate the snGrad of the given volField.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
dimensioned< scalar > mag(const dimensioned< Type > &)
GeometricBoundaryField & boundaryField()
Return reference to GeometricBoundaryField.
word name(const complex &)
Return a string representation of a complex.
bool read()
Read transportProperties dictionary.
tmp< volScalarField > sigmaK() const
const dimensionSet dimArea(sqr(dimLength))
const Mesh & mesh() const
Return mesh.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Calculate the gradient of the given field.
fvsPatchField< vector > fvsPatchVectorField
const double e
Elementary charge.
stressControl lookup("compactNormalStress") >> compactNormalStress
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar det(const dimensionedSphericalTensor &dt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
dimensionedScalar cos(const dimensionedScalar &ds)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
dimensionedScalar acos(const dimensionedScalar &ds)
const word & name() const
Return name.
tmp< surfaceScalarField > surfaceTensionForce() const
GeometricField< vector, fvPatchField, volMesh > volVectorField
Calculate the divergence of the given field.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar pos(const dimensionedScalar &ds)
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A class for managing temporary objects.
const Type & value() const
Return const reference to value.