27 #include "alphaContactAngleFvPatchScalarField.H" 29 #include "surfaceInterpolate.H" 48 void Foam::interfaceProperties::correctContactAngle
50 surfaceVectorField::Boundary& nHatb,
51 const surfaceVectorField::Boundary& gradAlphaf
54 const fvMesh& mesh = alpha1_.
mesh();
55 const volScalarField::Boundary& 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.boundaryFieldRef(), gradAlphaf.boundaryField());
134 nHatf_ = nHatfv & Sf;
155 Foam::interfaceProperties::interfaceProperties
162 transportPropertiesDict_(dict),
198 "interfaceProperties:K",
215 return sigmaPtr_->sigma()*K_;
229 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
241 alpha1_.
mesh().solverDict(alpha1_.
name()).
lookup(
"cAlpha") >> cAlpha_;
242 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 word & name() const
Return name.
const double e
Elementary charge.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
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
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
stressControl lookup("compactNormalStress") >> compactNormalStress
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)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
static const scalar convertToRad
Conversion factor for degrees into radians.
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)
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.
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))