70#ifndef Foam_FA_regionFaIBM_H
71#define Foam_FA_regionFaIBM_H
251 #include "regionFaIBM.txx"
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Finite area mesh (used for 2-D non-Euclidian finite area method) defined using a patch of faces on a ...
A class for handling file names.
Class containing processor-to-processor mapping information.
labelField faceTypes_
Face types indicator field.
solveType
Solve type for stencil weights.
septernion transformOld_
Last transformation.
scalarListList weights_
Interpolation weights.
bool correct(const areaVectorField &Us, areaVectorField &Ustar)
Correct the regionFaIBM model.
vector setVelocityFromSurface(const pointIndexHit &hit) const
Retrieve the velocity at a point on the moving surface.
triSurfaceMesh surface_
regionFaIBM surface described by a triSurfaceMesh
septernion invTransformDelta_
Transformation to go to state at last step.
scalarList h_
Distance weights used when calculating uStar.
virtual ~regionFaIBM()=default
Destructor.
scalar deltaT_
Integration time step.
treeDataPrimitivePatch< uindirectPrimitivePatch > treeType
labelField forcingFaceIDs_
Forcing faces.
labelField insideFaceIDs_
Inside faces.
solveType solveType_
Solve type.
regionFaIBM(const Time &runTime, const faMesh &aMesh, const dictionary &dict)
Construct from Time and dictionary.
void addToMask(areaScalarField &mask) const
Add to mask; Sets a value of 1 for participating faces.
autoPtr< mapDistribute > mapPtr_
Parallel map to apply the regionFaIBM stencil.
autoPtr< indexedOctree< treeType > > treePtr_
Octree for face search.
void setFaceTypes()
Set the face types indicator field and derived info.
static const Enum< solveType > solveTypeNames
Selection names for solveType.
TypeName("IBM")
Runtime type information.
autoPtr< solidBodyMotionFunction > SBMFPtr_
Surface motion as a function of time.
labelListList stencil_
Interpolation stencil.
const pointField points0_
Reference points for surface motion.
scalar rFactor_
Stencil radius factor.
const faMesh & aMesh_
Reference to the finite area mesh.
void setStencilWeights(const pointField &mirrorPoints)
Set the regionFaIBM stencil weights.
void updateMesh()
Update mesh.
scalar updateTimeOld_
Time at last update.
void zeroFilter(Type &fld) const
Apply the zero filter to an area field.
bool moveBody()
Move the immersed boundary.
void setStencilAddressing(const pointField &forcingFaceCentres, const scalarField &forcingFaceAreas, pointField &mirrorPoints)
Set the regionFaIBM stencil addressing.
static void dumpStencil(const fileName &fname, const mapDistribute &mapDist, const labelListList &stencil, const pointField ¢res)
Dump the stencil to file.
Septernion class used to perform translations and rotations in 3D space.
Encapsulation of data needed to search on PrimitivePatches.
IOoject and searching on triSurface.
List< scalarList > scalarListList
List of scalarList.
List< labelList > labelListList
List of labelList.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
GeometricField< vector, faPatchField, areaMesh > areaVectorField
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
Field< label > labelField
Specialisation of Field<T> for label.
vectorField pointField
pointField is a vectorField.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
List< scalar > scalarList
List of scalar.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.