Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nearWallFields Class Reference

This function object samples near-patch volume fields. More...

Inheritance diagram for nearWallFields:
Inheritance graph
[legend]
Collaboration diagram for nearWallFields:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("nearWallFields")
 Runtime type information. More...
 
 nearWallFields (const word &name, const Time &runTime, const dictionary &dict)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~nearWallFields ()
 Destructor. More...
 
virtual bool read (const dictionary &)
 Read the controls. More...
 
virtual bool execute ()
 Calculate the near-wall fields. More...
 
virtual bool write ()
 Write the near-wall fields. More...
 
- Public Member Functions inherited from fvMeshFunctionObject
 TypeName ("fvMeshFunctionObject")
 Runtime type information. More...
 
 fvMeshFunctionObject (const word &name, const Time &runTime, const dictionary &dict)
 Construct from Time and dictionary. More...
 
virtual ~fvMeshFunctionObject ()
 Destructor. More...
 
- Public Member Functions inherited from regionFunctionObject
 TypeName ("regionFunctionObject")
 Runtime type information. More...
 
 regionFunctionObject (const word &name, const Time &runTime, const dictionary &dict)
 Construct from Time and dictionary. More...
 
 regionFunctionObject (const word &name, const objectRegistry &obr, const dictionary &dict)
 Construct from the region objectRegistry and dictionary. More...
 
virtual ~regionFunctionObject ()
 Destructor. More...
 
- Public Member Functions inherited from functionObject
virtual const wordtype () const =0
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, functionObject, dictionary,(const word &name, const Time &runTime, const dictionary &dict),(name, runTime, dict))
 
 functionObject (const word &name)
 Construct from components. More...
 
autoPtr< functionObjectclone () const
 Return clone. More...
 
virtual ~functionObject ()
 Destructor. More...
 
const wordname () const
 Return the name of this functionObject. More...
 
virtual bool end ()
 Called when Time::run() determines that the time-loop exits. More...
 
virtual bool adjustTimeStep ()
 Called at the end of Time::adjustDeltaT() if adjustTime is true. More...
 
virtual void updateMesh (const mapPolyMesh &mpm)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &mesh)
 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 Member Functions inherited from regionFunctionObject
template<class ObjectType >
bool foundObject (const word &fieldName) const
 Find field in the objectRegistry. More...
 
template<class ObjectType >
const ObjectType & lookupObject (const word &fieldName) const
 Lookup field from the objectRegistry. More...
 
template<class ObjectType >
bool store (word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
 Store the given field in the objectRegistry under the given name. More...
 
bool writeObject (const word &fieldName)
 Write field if present in objectRegistry. More...
 
bool clearObject (const word &fieldName)
 Clear field from the objectRegistry if present. More...
 

Protected Attributes

List< Tuple2< word, word > > fieldSet_
 Fields to process. More...
 
labelHashSet patchSet_
 Patches to sample. More...
 
scalar distance_
 Distance away from wall. More...
 
HashTable< wordfieldMap_
 From original field to sampled result. More...
 
HashTable< wordreverseFieldMap_
 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< mapDistributegetPatchDataMapPtr_
 Map from cell based data back to patch based data. More...
 
PtrList< volScalarFieldvsf_
 
PtrList< volVectorFieldvvf_
 
PtrList< volSphericalTensorFieldvSpheretf_
 
PtrList< volSymmTensorFieldvSymmtf_
 
PtrList< volTensorFieldvtf_
 
- Protected Attributes inherited from fvMeshFunctionObject
const fvMeshmesh_
 Reference to the fvMesh. More...
 
- Protected Attributes inherited from regionFunctionObject
const Timetime_
 Reference to the Time. More...
 
const objectRegistryobr_
 Reference to the region objectRegistry. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from functionObject
static autoPtr< functionObjectNew (const word &name, const Time &, const dictionary &)
 Select from dictionary, based on its "type" entry. More...
 
- Public Attributes inherited from functionObject
Switch log
 Switch write log to Info. More...
 
- Static Public Attributes inherited from functionObject
static int debug
 
static bool postProcess
 Global post-processing mode switch. More...
 

Detailed Description

This function object samples near-patch volume fields.

Fields are stored

This functionObject can either be used

Example of function object specification:

nearWallFields1
{
    type        nearWallFields;
    libs ("libfieldFunctionObjects.so");
    ...
    fields      ((p pNear)(U UNear));
    patches     (movingWall);
    distance    0.13;
}
Usage
Property Description Required Default value
type type name: nearWallFields yes
fields list of fields with correspoding output field names yes
patches list of patches to sample yes
distance distance from patch to sample yes
See also
Foam::functionObjects::fvMeshFunctionObject
Source files

Definition at line 114 of file nearWallFields.H.

Constructor & Destructor Documentation

nearWallFields ( const word name,
const Time runTime,
const dictionary dict 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 222 of file nearWallFields.C.

References Foam::read().

Here is the call graph for this function:

~nearWallFields ( )
virtual

Destructor.

Definition at line 237 of file nearWallFields.C.

References DebugInFunction, and Foam::endl().

Here is the call graph for this function:

Member Function Documentation

void calcAddressing ( )
protected
void createFields ( PtrList< GeometricField< Type, fvPatchField, volMesh >> &  sflds) const
protected
void sampleBoundaryField ( const interpolationCellPoint< Type > &  interpolator,
GeometricField< Type, fvPatchField, volMesh > &  fld 
) const
protected

Override boundary fields with sampled values.

Definition at line 76 of file nearWallFieldsTemplates.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), forAll, forAllConstIter(), interpolationCellPoint< Type >::interpolate(), patchi, nearWallFields::sampleFields(), and List< Type >::size().

Referenced by nearWallFields::createFields().

Here is the call graph for this function:

Here is the caller graph for this function:

void sampleFields ( PtrList< GeometricField< Type, fvPatchField, volMesh >> &  sflds) const
protected

Definition at line 126 of file nearWallFieldsTemplates.C.

References fld(), and forAll.

Referenced by nearWallFields::sampleBoundaryField().

Here is the call graph for this function:

Here is the caller graph for this function:

TypeName ( "nearWallFields"  )

Runtime type information.

bool read ( const dictionary dict)
virtual

Read the controls.

Reimplemented from regionFunctionObject.

Definition at line 245 of file nearWallFields.C.

References Foam::endl(), forAll, Log, dictionary::lookup(), Foam::name(), regionFunctionObject::read(), Foam::readScalar(), and Foam::type().

Here is the call graph for this function:

bool execute ( )
virtual

Calculate the near-wall fields.

Implements functionObject.

Definition at line 289 of file nearWallFields.C.

References DebugInFunction, Foam::endl(), Log, Foam::name(), Foam::nl, and Foam::type().

Here is the call graph for this function:

bool write ( )
virtual

Write the near-wall fields.

Implements functionObject.

Definition at line 330 of file nearWallFields.C.

References DebugInFunction, Foam::endl(), forAll, and Log.

Here is the call graph for this function:

Member Data Documentation

List<Tuple2<word, word> > fieldSet_
protected

Fields to process.

Definition at line 125 of file nearWallFields.H.

labelHashSet patchSet_
protected

Patches to sample.

Definition at line 128 of file nearWallFields.H.

scalar distance_
protected

Distance away from wall.

Definition at line 131 of file nearWallFields.H.

HashTable<word> fieldMap_
protected

From original field to sampled result.

Definition at line 134 of file nearWallFields.H.

HashTable<word> reverseFieldMap_
protected

From resulting back to original field.

Definition at line 137 of file nearWallFields.H.

labelListList cellToWalls_
protected

From cell to seed patch faces.

Definition at line 143 of file nearWallFields.H.

List<List<point> > cellToSamples_
protected

From cell to tracked end point.

Definition at line 146 of file nearWallFields.H.

autoPtr<mapDistribute> getPatchDataMapPtr_
protected

Map from cell based data back to patch based data.

Definition at line 149 of file nearWallFields.H.

PtrList<volScalarField> vsf_
protected

Definition at line 154 of file nearWallFields.H.

PtrList<volVectorField> vvf_
protected

Definition at line 155 of file nearWallFields.H.

PtrList<volSphericalTensorField> vSpheretf_
protected

Definition at line 156 of file nearWallFields.H.

PtrList<volSymmTensorField> vSymmtf_
protected

Definition at line 157 of file nearWallFields.H.

PtrList<volTensorField> vtf_
protected

Definition at line 158 of file nearWallFields.H.


The documentation for this class was generated from the following files: