27 #include "alphaContactAngleFvPatchScalarField.H" 29 #include "surfaceInterpolate.H" 42 void Foam::interfaceProperties::correctContactAngle
44 surfaceVectorField::Boundary& nHatb,
45 const surfaceVectorField::Boundary& gradAlphaf
48 const fvMesh& mesh = alpha1_.
mesh();
52 const fvBoundaryMesh& boundary = mesh.boundary();
56 if (isA<alphaContactAngleFvPatchScalarField>(a1bf[patchi]))
58 alphaContactAngleFvPatchScalarField& a1cap =
59 refCast<alphaContactAngleFvPatchScalarField>
83 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
91 nHatp = a*nf +
b*nHatp;
92 nHatp /= (
mag(nHatp) + deltaN_.
value());
94 a1cap.gradient() = (nf & nHatp)*
mag(gradAlphaf[patchi]);
102 void Foam::interfaceProperties::calculateK()
104 const fvMesh& mesh = alpha1_.
mesh();
124 correctContactAngle(nHatfv.boundaryFieldRef(), gradAlphaf.boundaryField());
127 nHatf_ = nHatfv & Sf;
156 transportPropertiesDict_(dict),
186 "interfaceProperties:K",
203 return sigmaPtr_->sigma()*K_;
217 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
229 sigmaPtr_->readDict(transportPropertiesDict_);
fvsPatchField< vector > fvsPatchVectorField
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh >> grad(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
dimensionedScalar acos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
const dimensionSet dimArea
const Boundary & boundaryField() const
Return const-reference to the boundary field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Unit conversion functions.
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
const dimensionedScalar b
Wien displacement law constant: default SI units: [m K].
static autoPtr< surfaceTensionModel > New(const dictionary &dict, const fvMesh &mesh)
bool read()
Read transportProperties dictionary.
Calculate the snGrad of the given volField.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
const dimensionSet dimless
dimensionedScalar det(const dimensionedSphericalTensor &dt)
GeometricField< vector, fvPatchField, volMesh > volVectorField
tmp< volScalarField > nearInterface() const
Indicator of the proximity of the interface.
tmp< surfaceScalarField > surfaceTensionForce() const
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
const dimensionSet dimLength
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
dimensionedScalar cos(const dimensionedScalar &ds)
Calculate the gradient of the given field.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const Type & value() const
Return const reference to value.
dimensioned< Type > average(const DimensionedField< Type, GeoMesh > &df)
Calculate the divergence of the given field.
dimensionedScalar pos0(const dimensionedScalar &ds)
const Mesh & mesh() const
Return mesh.
tmp< volScalarField > sigmaK() const
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const Time & time() const
Return time.
interfaceProperties(volScalarField &alpha1, volScalarField &alpha2, const volVectorField &U, const IOdictionary &)
Construct from volume fraction field gamma and IOdictionary.
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
const doubleScalar e
Elementary charge.
A class for managing temporary objects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)