timeVaryingMappedFvPatchField< Type > Class Template Reference

Patch field mapper which interpolates the values from a set of supplied points in space and time. More...

Inheritance diagram for timeVaryingMappedFvPatchField< Type >:
Collaboration diagram for timeVaryingMappedFvPatchField< Type >:

Public Member Functions

 timeVaryingMappedFvPatchField (const fvPatch &, const DimensionedField< Type, volMesh > &, const dictionary &)
 Construct from patch, internal field and dictionary. More...
 
 timeVaryingMappedFvPatchField (const timeVaryingMappedFvPatchField< Type > &)
 Copy constructor. More...
 
const Timetime () const
 
void map (const timeVaryingMappedFvPatchField< Type > &, const fieldMapper &)
 Map the given timeVaryingMappedFvPatchField. More...
 
void reset (const timeVaryingMappedFvPatchField &)
 Reset the fvPatchField to the given fvPatchField. More...
 
tmp< Field< Type > > map ()
 Return the current mapped patch field. More...
 
void write (Ostream &) const
 Write. More...
 

Detailed Description

template<class Type>
class Foam::timeVaryingMappedFvPatchField< Type >

Patch field mapper which interpolates the values from a set of supplied points in space and time.

By default the data files should be provide in constant/boundaryData/<patch name>/ directory:

  • points : pointField of locations
  • <time>/<field> : field of values at time <time>

Alternatively the names and locations of the points and field files may be specified explicitly via the optional dictionary entries:

  • dataDir <optional top-level directory of the points and field data>;
  • points <optional path including name of points file relative to dataDir>;
  • sample <optional name of the sub-directory in the time directories containing the fields>; This is particularly useful when mapping data from another case for which the sample functionObject is used to obtain the patch field data for mapping.

The default mode of operation (mapMethod planarInterpolation) is to project the points onto a plane (constructed from the first three points) and construct a 2D triangulation and finds for the face centres the triangle it is in and the weights to the 3 vertices.

The optional mapMethod nearest will avoid all projection and triangulation and just use the value at the nearest vertex.

Values are interpolated linearly between times.

Usage
Property Description Required Default value
setAverage Switch to activate setting of average value no false
perturb Perturb points for regular geometries no 1e-5
fieldTable Alternative field name to sample no this field name
mapMethod Type of mapping no planarInterpolation
offset Offset to mapped values no Zero
dataDir Top-level directory of the points and field data no constant/boundaryData/<patch name>
points Path including name of points file relative to dataDir no points
sample Name of the sub-directory in the time directories containing the fields no ""
See also
Foam::timeVaryingMappedFixedValueFvPatchField Foam::Function1s
Source files

Definition at line 149 of file timeVaryingMappedFvPatchField.H.

Constructor & Destructor Documentation

◆ timeVaryingMappedFvPatchField() [1/2]

timeVaryingMappedFvPatchField ( const fvPatch p,
const DimensionedField< Type, volMesh > &  iF,
const dictionary dict 
)

Construct from patch, internal field and dictionary.

Definition at line 267 of file timeVaryingMappedFvPatchField.C.

References dict, DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimTime, Foam::exit(), string::expand(), Foam::FatalIOError, FatalIOErrorInFunction, and Function1< Type >::New().

Here is the call graph for this function:

◆ timeVaryingMappedFvPatchField() [2/2]

Copy constructor.

Definition at line 331 of file timeVaryingMappedFvPatchField.C.

Member Function Documentation

◆ time()

const Time& time ( ) const
inline

Definition at line 239 of file timeVaryingMappedFvPatchField.H.

References fvPatch::boundaryMesh(), fvBoundaryMesh::mesh(), and fvMesh::time().

Here is the call graph for this function:

◆ map() [1/2]

void map ( const timeVaryingMappedFvPatchField< Type > &  tiptf,
const fieldMapper mapper 
)

◆ reset()

void reset ( const timeVaryingMappedFvPatchField< Type > &  )

Reset the fvPatchField to the given fvPatchField.

Used for mesh to mesh mapping

Definition at line 378 of file timeVaryingMappedFvPatchField.C.

◆ map() [2/2]

Foam::tmp< Foam::Field< Type > > map

Return the current mapped patch field.

Definition at line 394 of file timeVaryingMappedFvPatchField.C.

References Foam::endl(), fld(), Foam::gAverage(), Foam::gMax(), Foam::gMin(), Foam::gSum(), Foam::mag(), OSstream::name(), fileName::name(), Foam::nl, Foam::offset(), Foam::Pout, tmp< T >::ref(), and s().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write.

Definition at line 494 of file timeVaryingMappedFvPatchField.C.

References Foam::e, IOstream::name(), fileName::null, Foam::writeEntry(), and Foam::writeEntryIfDifferent().

Here is the call graph for this function:

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