27 #include "alphaContactAngleFvPatchScalarField.H" 29 #include "surfaceInterpolate.H" 50 void Foam::interfaceProperties::correctContactAngle
56 const fvMesh& mesh = alpha1_.mesh();
60 const fvBoundaryMesh& boundary = mesh.boundary();
64 if (isA<alphaContactAngleFvPatchScalarField>(a1bf[patchi]))
66 alphaContactAngleFvPatchScalarField& a1cap =
67 refCast<alphaContactAngleFvPatchScalarField>
91 b2[facei] =
cos(
acos(a12[facei]) - theta[facei]);
99 nHatp = a*nf +
b*nHatp;
100 nHatp /= (
mag(nHatp) + deltaN_.
value());
102 a1cap.gradient() = (nf & nHatp)*
mag(gradAlphaf[patchi]);
110 void Foam::interfaceProperties::calculateK()
112 const fvMesh& mesh = alpha1_.mesh();
135 nHatf_ = nHatfv & Sf;
164 phasePropertiesDict_(dict),
183 alpha1_.time().timeName(),
194 "interfaceProperties:K",
195 alpha1_.time().timeName(),
219 return sigmaPtr_->sigma()*K_;
233 return pos0(alpha1_ - 0.01)*
pos0(0.99 - alpha1_);
240 const fvMesh& mesh = alpha1_.mesh();
267 const scalar nSf(
mag(n[own[facei]] & Sf[facei]));
268 A[own[facei]] += nSf*(ialphaf[facei] - ialpha[own[facei]]);
269 sumnSf[own[facei]] += nSf;
272 const scalar nSf(
mag(n[nei[facei]] & Sf[facei]));
273 A[nei[facei]] += nSf*(ialphaf[facei] - ialpha[nei[facei]]);
274 sumnSf[nei[facei]] += nSf;
285 const scalar nSf(
mag(n[own[facei]] & Sf[facei]));
286 A[own[facei]] += nSf*(palphaf[facei] - ialpha[own[facei]]);
287 sumnSf[own[facei]] += nSf;
294 if (sumnSf[i] > small)
296 a[i] = 2*
mag(a[i])/sumnSf[i];
316 sigmaPtr_->readDict(phasePropertiesDict_);
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 surfaceVectorField & Sf() const
Return cell face area vectors.
const dimensionSet dimArea
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
void correctContactAngle(const volScalarField &alpha1, const volScalarField &alpha2, const volVectorField::Boundary &Ubf, const dimensionedScalar &deltaN, surfaceVectorField::Boundary &nHatbf)
Correct the contact angle for the two volume fraction fields.
T & ref() const
Return non-const reference or generate a fatal error.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
Unit conversion functions.
static tmp< GeometricField< vector, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< vector >> &)
Return a temporary field constructed from name,.
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 phaseProperties dictionary.
Calculate the snGrad of the given volField.
GeometricBoundaryField< vector, fvsPatchField, surfaceMesh > Boundary
Type of the boundary field.
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...
const labelUList & neighbour() const
Internal face neighbour.
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)
tmp< volScalarField::Internal > fraction() const
Interface fraction in a cell.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Calculate the divergence of the given field.
dimensionedScalar pos0(const dimensionedScalar &ds)
const Mesh & mesh() const
Return mesh.
defineTypeNameAndDebug(combustionModel, 0)
tmp< volScalarField > sigmaK() const
const Field< Type > & field() 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.
const labelUList & owner() const
Internal face owner.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
interfaceProperties(volScalarField &alpha1, volScalarField &alpha2, const volVectorField &U, const IOdictionary &)
Construct from volume fraction field gamma and IOdictionary.
tmp< volVectorField > n() const
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...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > snGrad(const GeometricField< Type, fvPatchField, volMesh > &vf, const word &name)
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.