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();
49 const volScalarField::Boundary& abf = alpha1_.
boundaryField();
51 const fvBoundaryMesh& boundary = mesh.boundary();
55 if (isA<alphaContactAngleFvPatchScalarField>(abf[patchi]))
57 alphaContactAngleFvPatchScalarField& acap =
58 const_cast<alphaContactAngleFvPatchScalarField&
> 60 refCast<const alphaContactAngleFvPatchScalarField>
85 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
93 nHatp = a*nf +
b*nHatp;
94 nHatp /= (
mag(nHatp) + deltaN_.
value());
96 acap.gradient() = (nf & nHatp)*
mag(gradAlphaf[patchi]);
103 void Foam::interfaceProperties::calculateK()
105 const fvMesh& mesh = alpha1_.
mesh();
125 correctContactAngle(nHatfv.boundaryFieldRef(), gradAlphaf.boundaryField());
128 nHatf_ = nHatfv & Sf;
156 transportPropertiesDict_(dict),
185 "interfaceProperties:K",
202 return sigmaPtr_->sigma()*K_;
216 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
228 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 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
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.
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.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
dimensionedScalar cos(const dimensionedScalar &ds)
const dimensionedScalar & b
Wien displacement law constant: default SI units: [m K].
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
interfaceProperties(const volScalarField &alpha1, const volVectorField &U, const IOdictionary &)
Construct from volume fraction field gamma and IOdictionary.
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)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const Time & time() const
Return time.
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)
const dimensionSet dimArea(sqr(dimLength))