50 if (curTimeIndex <
runTime.timeIndex())
52 curTimeIndex =
runTime.timeIndex();
94 "reconstructionScheme",
101 reconstructionSchemesCoeffs_(
dict),
113 dict.getOrDefault(
"writeFields",false)
128 dict.getOrDefault(
"writeFields",false)
135 interfaceCell_(alpha1_.
mesh().nCells(), false),
152 bitSet interfaceCellAddressing(
mesh.nCells());
154 forAll(interfaceCell_, celli)
156 if (interfaceCell_[celli])
158 if (
mag(normal_[celli]) != 0)
160 interfaceCellAddressing.set(celli);
161 vector n = -normal_[celli]/
mag(normal_[celli]);
163 scalar cutVal = (centre_[celli] -
mesh.C()[celli]) &
n;
164 cellCut.calcSubCell(celli, cutVal,
n);
173 dynPts.
append(cellCut.facePoints());
179 labelList meshCells(interfaceCellAddressing.sortedToc());
183 faceList faces(std::move(dynFaces));
185 return interface(std::move(
pts), std::move(faces), std::move(meshCells));
const volScalarField & alpha1
const Mesh & mesh() const noexcept
Return const reference to mesh.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
const objectRegistry & db() const noexcept
Return the local objectRegistry.
static word group(const word &name)
Return group (extension part of name).
static word groupName(StringType base, const word &group)
Create dot-delimited name.group string.
const T & first() const noexcept
Access the first element.
const T & second() const noexcept
Access the second element.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
void size(const label n)
Older name for setAddressableSize.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
labelList sortedToc() const
The indices of the on bits as a sorted labelList.
void set(const bitSet &bitset)
Set specified bits from another bitset.
Class for cutting a cell, cellI, of an fvMesh, mesh_, at its intersection with an surface defined by ...
label calcSubCell(const label celli, const scalar cutValue, const vector &normal)
Sets internal values and returns face status.
const DynamicList< point > & facePoints()
Returns the points of the cutting PLICface.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
A face is a list of labels corresponding to mesh vertices.
Mesh data needed to do the Finite Volume discretisation.
Original code supplied by Henning Scheufler, DLR (2019).
boolList interfaceCell_
Is interface cell?
volVectorField normal_
Interface area normals.
Pair< label > timeIndexAndIter_
Store timeindex/iteration to avoid multiple reconstruction.
const surfaceScalarField & phi_
Reference to the face fluxes.
const volVectorField & U_
Reference to the velocity field.
bool alreadyReconstructed(bool forceUpdate=true) const
Is the interface already up-to-date?
DynamicField< label > interfaceLabels_
List of cell labels that have an interface.
interface surface()
Generated interface surface points/faces.
reconstructionSchemes(const reconstructionSchemes &)=delete
No copy construct.
volScalarField & alpha1_
Reference to the VoF Field.
volVectorField centre_
Interface centres.
virtual void reconstruct(bool forceUpdate=true)=0
Reconstruct the interface.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
Different types of constants.
GeometricField< vector, fvPatchField, volMesh > volVectorField
List< label > labelList
A List of labels.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
List< face > faceList
List of faces.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
static constexpr const zero Zero
Global zero (0).
vectorField pointField
pointField is a vectorField.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
interfaceProperties interface(alpha1, U, thermo->transportPropertiesDict())
#define forAll(list, i)
Loop across all elements in list.