This function object samples near-patch volume fields. More...
Public Member Functions | |
TypeName ("nearWallFields") | |
Runtime type information. More... | |
nearWallFields (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false) | |
Construct for given objectRegistry and dictionary. More... | |
virtual | ~nearWallFields () |
Destructor. More... | |
virtual const word & | name () const |
Return name of the nearWallFields object. More... | |
virtual void | read (const dictionary &) |
Read the field min/max data. More... | |
virtual void | execute () |
Execute, currently does nothing. More... | |
virtual void | end () |
Execute at the final time-loop, currently does nothing. More... | |
virtual void | timeSet () |
Called when time was set at the end of the Time::operator++. More... | |
virtual void | write () |
Write. More... | |
virtual void | updateMesh (const mapPolyMesh &) |
Update for changes of mesh. More... | |
virtual void | movePoints (const polyMesh &) |
Update for changes of mesh. More... | |
Protected Member Functions | |
void | calcAddressing () |
Calculate addressing from cells back to patch faces. More... | |
template<class Type > | |
void | createFields (PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const |
template<class Type > | |
void | sampleBoundaryField (const interpolationCellPoint< Type > &interpolator, GeometricField< Type, fvPatchField, volMesh > &fld) const |
Override boundary fields with sampled values. More... | |
template<class Type > | |
void | sampleFields (PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const |
Protected Attributes | |
word | name_ |
Name of this set of nearWallFields object. More... | |
const objectRegistry & | obr_ |
bool | active_ |
on/off switch More... | |
List< Tuple2< word, word > > | fieldSet_ |
Fields to process. More... | |
Switch | log_ |
Switch to send output to Info as well as to file. More... | |
labelHashSet | patchSet_ |
Patches to sample. More... | |
scalar | distance_ |
Distance away from wall. More... | |
HashTable< word > | fieldMap_ |
From original field to sampled result. More... | |
HashTable< word > | reverseFieldMap_ |
From resulting back to original field. More... | |
labelListList | cellToWalls_ |
From cell to seed patch faces. More... | |
List< List< point > > | cellToSamples_ |
From cell to tracked end point. More... | |
autoPtr< mapDistribute > | getPatchDataMapPtr_ |
Map from cell based data back to patch based data. More... | |
PtrList< volScalarField > | vsf_ |
PtrList< volVectorField > | vvf_ |
PtrList< volSphericalTensorField > | vSpheretf_ |
PtrList< volSymmTensorField > | vSymmtf_ |
PtrList< volTensorField > | vtf_ |
Private Member Functions | |
nearWallFields (const nearWallFields &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const nearWallFields &) |
Disallow default bitwise assignment. More... | |
This function object samples near-patch volume fields.
This functionObject can either be used
Example of function object specification:
nearWallFields1 { type nearWallFields; functionObjectLibs ("libfieldFunctionObjects.so"); ... fields ((p pNear)(U UNear)); patches (movingWall); distance 0.13; }
Function object usage
Property | Description | Required | Default value |
---|---|---|---|
type | type name: nearWallFields | yes | |
fields | list of fields with corresponding output field names | yes | |
patches | list of patches to sample | yes | |
distance | distance from patch to sample | yes | |
log | Log to standard output | no | yes |
Definition at line 125 of file nearWallFields.H.
|
private |
Disallow default bitwise copy construct.
nearWallFields | ( | const word & | name, |
const objectRegistry & | obr, | ||
const dictionary & | dict, | ||
const bool | loadFromFiles = false |
||
) |
Construct for given objectRegistry and dictionary.
Allow the possibility to load fields from files
Definition at line 225 of file nearWallFields.C.
References dict, Foam::endl(), Foam::read(), and WarningInFunction.
|
virtual |
Destructor.
Definition at line 255 of file nearWallFields.C.
References Foam::endl(), and Foam::Info.
|
protected |
Calculate addressing from cells back to patch faces.
Definition at line 42 of file nearWallFields.C.
References nearWallFields::cellToSamples_, nearWallFields::cellToWalls_, nearWallFields::distance_, nearWallFields::end(), Foam::endl(), polyMesh::FACE_DIAG_TRIS, polyPatch::faceCellCentres(), mappedPatchBase::facePoint(), forAll, forAllConstIter(), nearWallFields::getPatchDataMapPtr_, PointIndexHit< Point >::hit(), PointIndexHit< Point >::hitPoint(), Foam::Info, mesh, OFstream::name(), fvPatch::nf(), nearWallFields::obr_, fvPatch::patch(), nearWallFields::patchSet_, List::setSize(), globalIndex::size(), fvPatch::start(), globalIndex::toGlobal(), tp(), and OBJstream::write().
|
protected |
Definition at line 32 of file nearWallFieldsTemplates.C.
References Foam::endl(), fld(), forAllConstIter(), Foam::Info, IOobject::readOpt(), IOobject::rename(), WarningInFunction, and IOobject::writeOpt().
|
protected |
Override boundary fields with sampled values.
Definition at line 78 of file nearWallFieldsTemplates.C.
References fld(), forAll, forAllConstIter(), and interpolationCellPoint< Type >::interpolate().
|
protected |
|
private |
Disallow default bitwise assignment.
TypeName | ( | "nearWallFields" | ) |
Runtime type information.
|
inlinevirtual |
Return name of the nearWallFields object.
Definition at line 241 of file nearWallFields.H.
References nearWallFields::name_.
|
virtual |
Read the field min/max data.
Definition at line 266 of file nearWallFields.C.
References polyMesh::boundaryMesh(), dict, Foam::endl(), forAll, Foam::Info, dictionary::lookup(), mesh, polyBoundaryMesh::patchSet(), Foam::readScalar(), and Foam::type().
|
virtual |
Execute, currently does nothing.
Definition at line 316 of file nearWallFields.C.
References Foam::endl(), Foam::Info, Foam::nl, and Foam::type().
|
virtual |
Execute at the final time-loop, currently does nothing.
Definition at line 362 of file nearWallFields.C.
Referenced by nearWallFields::calcAddressing().
|
virtual |
Called when time was set at the end of the Time::operator++.
Definition at line 368 of file nearWallFields.C.
|
virtual |
Write.
Definition at line 374 of file nearWallFields.C.
References Foam::endl(), forAll, and Foam::Info.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 262 of file nearWallFields.H.
|
inlinevirtual |
Update for changes of mesh.
Definition at line 266 of file nearWallFields.H.
|
protected |
Name of this set of nearWallFields object.
Definition at line 132 of file nearWallFields.H.
Referenced by nearWallFields::name().
|
protected |
Definition at line 134 of file nearWallFields.H.
Referenced by nearWallFields::calcAddressing().
|
protected |
on/off switch
Definition at line 137 of file nearWallFields.H.
Fields to process.
Definition at line 142 of file nearWallFields.H.
|
protected |
Switch to send output to Info as well as to file.
Definition at line 145 of file nearWallFields.H.
|
protected |
Patches to sample.
Definition at line 148 of file nearWallFields.H.
Referenced by nearWallFields::calcAddressing().
|
protected |
Distance away from wall.
Definition at line 151 of file nearWallFields.H.
Referenced by nearWallFields::calcAddressing().
From original field to sampled result.
Definition at line 154 of file nearWallFields.H.
From resulting back to original field.
Definition at line 157 of file nearWallFields.H.
|
protected |
From cell to seed patch faces.
Definition at line 163 of file nearWallFields.H.
Referenced by nearWallFields::calcAddressing().
From cell to tracked end point.
Definition at line 166 of file nearWallFields.H.
Referenced by nearWallFields::calcAddressing().
|
protected |
Map from cell based data back to patch based data.
Definition at line 169 of file nearWallFields.H.
Referenced by nearWallFields::calcAddressing().
|
protected |
Definition at line 174 of file nearWallFields.H.
|
protected |
Definition at line 175 of file nearWallFields.H.
|
protected |
Definition at line 176 of file nearWallFields.H.
|
protected |
Definition at line 177 of file nearWallFields.H.
|
protected |
Definition at line 178 of file nearWallFields.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.