Calculates the face fluxes. More...
Public Member Functions | |
cutFaceAdvect (const fvMesh &mesh, const volScalarField &alpha1) | |
Construct from fvMesh and a scalarField. More... | |
label | calcSubFace (const label faceI, const vector &normal, const vector &base) |
Calculates cut centre and cut area (plicReconstruction) More... | |
label | calcSubFace (const face &f, const pointField &points, const scalarField &val, const scalar cutValue) |
Calculates cut centre and cut area (iso reconstruction) More... | |
label | calcSubFace (const label faceI, const label sign, const scalar cutValue) |
Calculates cut centre and cut area (iso reconstruction) More... | |
scalar | timeIntegratedFaceFlux (const label faceI, const vector &x0, const vector &n0, const scalar Un0, const scalar dt, const scalar phi, const scalar magSf) |
Calculate time integrated flux for a face. More... | |
scalar | timeIntegratedFaceFlux (const label faceI, const scalarField ×, const scalar Un0, const scalar dt, const scalar phi, const scalar magSf) |
Calculate time integrated flux for a face. More... | |
scalar | timeIntegratedArea (const label faceI, const scalar dt, const scalar magSf, const scalar Un0) |
Calculate time integrated area for a face. More... | |
scalar | timeIntegratedArea (const pointField &fPts, const scalarField &pTimes, const scalar dt, const scalar magSf, const scalar Un0) |
Calculate time integrated area for a face. More... | |
void | quadAreaCoeffs (const DynamicPointList &pf0, const DynamicPointList &pf1, scalar &quadArea, scalar &intQuadArea) const |
For face with vertices p calculate its area and integrated area. More... | |
void | cutPoints (const label faceI, const scalar f0, DynamicList< point > &cutPoints) |
Get cutPoints of face. More... | |
void | cutPoints (const pointField &pts, const scalarField &f, const scalar f0, DynamicList< point > &cutPoints) |
Get cutPoints of face. More... | |
const point & | subFaceCentre () const |
Returns centre of cutted face. More... | |
const vector & | subFaceArea () const |
Returns area vector of cutted face. More... | |
const DynamicList< point > & | subFacePoints () const |
Returns the cut edge of the cutted face. More... | |
const DynamicList< point > & | surfacePoints () const |
Returns point of the cutted face in sorted order. More... | |
void | clearStorage () |
Resets internal variables. More... | |
Public Member Functions inherited from cutFace | |
cutFace (const fvMesh &mesh) | |
Construct from fvMesh. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from cutFace | |
static int | debug = 0 |
Protected Member Functions inherited from cutFace | |
void | calcSubFace (const label faceI, const scalarList &pointStatus, label firstFullySubmergedPoint, DynamicList< point > &subFacePoints, DynamicList< point > &surfacePoints, label &faceStatus, vector &subFaceCentre, vector &subFaceArea) |
void | calcSubFace (const label faceI, const scalarList &pointStatus, const scalarList &weights, label firstFullySubmergedPoint, DynamicList< point > &subFacePoints, DynamicList< point > &surfacePoints, label &faceStatus, vector &subFaceCentre, vector &subFaceArea) |
void | calcSubFaceCentreAndArea (DynamicList< point > &subFacePoints, vector &subFaceCentre, vector &subFaceArea) |
Calculates centre and normal of the face. More... | |
void | calcSubFace (const face &f, const pointField &points, const scalarList &pointStatus, label firstFullySubmergedPoint, DynamicList< point > &subFacePoints, DynamicList< point > &surfacePoints, label &faceStatus, vector &subFaceCentre, vector &subFaceArea) |
Calculates the face fluxes.
Roenby, J., Bredmose, H. and Jasak, H. (2016). A computational method for sharp interface advection Royal Society Open Science, 3 doi 10.1098/rsos.160405
Original code supplied by Johan Roenby, DHI (2016)
Definition at line 66 of file cutFaceAdvect.H.
cutFaceAdvect | ( | const fvMesh & | mesh, |
const volScalarField & | alpha1 | ||
) |
Construct from fvMesh and a scalarField.
Length of scalarField should equal number of mesh points
Definition at line 36 of file cutFaceAdvect.C.
Calculates cut centre and cut area (plicReconstruction)
Definition at line 60 of file cutFaceAdvect.C.
References f(), forAll, Foam::mag(), and Foam::Zero.
Foam::label calcSubFace | ( | const face & | f, |
const pointField & | points, | ||
const scalarField & | val, | ||
const scalar | cutValue | ||
) |
Calculates cut centre and cut area (iso reconstruction)
Definition at line 124 of file cutFaceAdvect.C.
References f(), forAll, Foam::mag(), points, and Foam::Zero.
Foam::label calcSubFace | ( | const label | faceI, |
const label | sign, | ||
const scalar | cutValue | ||
) |
Calculates cut centre and cut area (iso reconstruction)
Definition at line 578 of file cutFaceAdvect.C.
References cutFace::calcSubFace(), f(), forAll, Foam::mag(), Foam::sign(), and Foam::Zero.
Foam::scalar timeIntegratedFaceFlux | ( | const label | faceI, |
const vector & | x0, | ||
const vector & | n0, | ||
const scalar | Un0, | ||
const scalar | dt, | ||
const scalar | phi, | ||
const scalar | magSf | ||
) |
Calculate time integrated flux for a face.
Definition at line 188 of file cutFaceAdvect.C.
References Foam::fieldTypes::area, Foam::expressions::patchExpr::debug, Foam::constant::electromagnetic::e, Foam::endl(), f(), forAll, Foam::mag(), nPoints, phi, Foam::constant::mathematical::pi(), Foam::sign(), and WarningInFunction.
Foam::scalar timeIntegratedFaceFlux | ( | const label | faceI, |
const scalarField & | times, | ||
const scalar | Un0, | ||
const scalar | dt, | ||
const scalar | phi, | ||
const scalar | magSf | ||
) |
Calculate time integrated flux for a face.
Definition at line 336 of file cutFaceAdvect.C.
References forAll, nPoints, phi, Foam::constant::mathematical::pi(), and Foam::sign().
Foam::scalar timeIntegratedArea | ( | const label | faceI, |
const scalar | dt, | ||
const scalar | magSf, | ||
const scalar | Un0 | ||
) |
Calculate time integrated area for a face.
Definition at line 641 of file cutFaceAdvect.C.
References Foam::constant::atomic::alpha, beta(), Foam::constant::electromagnetic::e, Foam::mag(), Foam::max(), Foam::pos0(), Foam::sign(), and Foam::sortedOrder().
Foam::scalar timeIntegratedArea | ( | const pointField & | fPts, |
const scalarField & | pTimes, | ||
const scalar | dt, | ||
const scalar | magSf, | ||
const scalar | Un0 | ||
) |
Calculate time integrated area for a face.
Definition at line 383 of file cutFaceAdvect.C.
References Foam::constant::atomic::alpha, beta(), Foam::constant::electromagnetic::e, Foam::identity(), Foam::mag(), Foam::max(), Foam::pos0(), Foam::sign(), and Foam::sortedOrder().
void quadAreaCoeffs | ( | const DynamicPointList & | pf0, |
const DynamicPointList & | pf1, | ||
scalar & | quadArea, | ||
scalar & | intQuadArea | ||
) | const |
For face with vertices p calculate its area and integrated area.
between isocutting lines with isovalues f0 and f1 given vertex values f
Definition at line 781 of file cutFaceAdvect.C.
References A, Foam::constant::atomic::alpha, B, beta(), C, D, Foam::endl(), Foam::mag(), WarningInFunction, and Foam::Zero.
void cutPoints | ( | const label | faceI, |
const scalar | f0, | ||
DynamicList< point > & | cutPoints | ||
) |
Get cutPoints of face.
Definition at line 883 of file cutFaceAdvect.C.
References DynamicList< T, SizeMin >::append(), Foam::endl(), f(), forAll, Foam::mag(), nPoints, Foam::constant::mathematical::pi(), s, and WarningInFunction.
void cutPoints | ( | const pointField & | pts, |
const scalarField & | f, | ||
const scalar | f0, | ||
DynamicList< point > & | cutPoints | ||
) |
Get cutPoints of face.
Definition at line 938 of file cutFaceAdvect.C.
References DynamicList< T, SizeMin >::append(), Foam::endl(), f(), forAll, Foam::mag(), nPoints, Foam::constant::mathematical::pi(), s, and WarningInFunction.
const Foam::point & subFaceCentre | ( | ) | const |
Returns centre of cutted face.
Definition at line 987 of file cutFaceAdvect.C.
const Foam::vector & subFaceArea | ( | ) | const |
Returns area vector of cutted face.
Definition at line 993 of file cutFaceAdvect.C.
const Foam::DynamicList< Foam::point > & subFacePoints | ( | ) | const |
Returns the cut edge of the cutted face.
Definition at line 999 of file cutFaceAdvect.C.
const Foam::DynamicList< Foam::point > & surfacePoints | ( | ) | const |
Returns point of the cutted face in sorted order.
Definition at line 1005 of file cutFaceAdvect.C.
void clearStorage | ( | ) |