Public Member Functions | Private Member Functions | Private Attributes
patchCorrectedInterpolation Class Reference

Interpolation of cell-based displacements to the points with additional correction for interpolation inconsistency on patches. More...

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

Public Member Functions

 TypeName ("patchCorrected")
 Runtime type information. More...
 
 patchCorrectedInterpolation (const fvMesh &mesh, Istream &entry)
 Construct from an fvMesh and an Istream. More...
 
virtual ~patchCorrectedInterpolation ()
 Destructor. More...
 
virtual void interpolate (const volScalarField &, pointScalarField &) const
 Interpolate the given scalar cell displacement. More...
 
virtual void interpolate (const volVectorField &, pointVectorField &) const
 Interpolate the given vector cell displacement. More...
 
- Public Member Functions inherited from motionInterpolation
 TypeName ("motionInterpolation")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, motionInterpolation, Istream,(const fvMesh &mesh, Istream &entry),(mesh, entry))
 
 motionInterpolation (const fvMesh &mesh)
 Construct from an fvMesh. More...
 
 motionInterpolation (const fvMesh &mesh, Istream &entry)
 Construct from an fvMesh and an Istream. More...
 
virtual ~motionInterpolation ()
 Destructor. More...
 
const fvMeshmesh () const
 Return const-refernce to the mesh. More...
 

Private Member Functions

labelListList getPatchGroups (Istream &entry) const
 Get patch groups from the input stream. More...
 
template<class Type >
void interpolateType (const GeometricField< Type, fvPatchField, volMesh > &, GeometricField< Type, pointPatchField, pointMesh > &) const
 Interpolate the given cell displacement. More...
 
template<class Type >
void interpolateDataFromPatchGroups (GeometricField< Type, pointPatchField, pointMesh > &) const
 Interpolate patch data by inverse distance weighting. More...
 
template<class Type >
void propagateDataFromPatchGroup (const label, pointScalarField &, GeometricField< Type, pointPatchField, pointMesh > &) const
 Propagate data from a number of patches into the field. More...
 

Private Attributes

const labelListList patchGroups_
 Patch groups from which to propagate the displacement. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from motionInterpolation
static autoPtr< motionInterpolationNew (const fvMesh &mesh)
 Select default. More...
 
static autoPtr< motionInterpolationNew (const fvMesh &mesh, Istream &entry)
 Select from stream. More...
 

Detailed Description

Interpolation of cell-based displacements to the points with additional correction for interpolation inconsistency on patches.

The default interpolation method interpolates from the cells to all points except those on boundaries with value boundary conditions. The discrepancy across the boundary cell can cause shearing and inversion if the cells are of very high aspect ratio.

This method applies the default interpolation to *all* points, including those on value boundaries. The difference between the interpolated value on the boundary and the desired boundary condition is then propagated into the mesh with a wave. Contributions from different patches are inverse-distance weighted, and the result is added to the default interpolation. The result of this is that thin boundary cells are maintained much more accurately for non-uniform patch displacements.

The user must specify the patch groups from which to propagate the motion. Ideally, these groups will be opposing; i.e. one group with the aerofoil, and one with the far field:

    interpolation patchCorrected
    (
        (aerofoilUpper aerofoilLower)
        (farField)
    );
Source files

Definition at line 74 of file patchCorrectedInterpolation.H.

Constructor & Destructor Documentation

◆ patchCorrectedInterpolation()

patchCorrectedInterpolation ( const fvMesh mesh,
Istream entry 
)

Construct from an fvMesh and an Istream.

Definition at line 83 of file patchCorrectedInterpolation.C.

◆ ~patchCorrectedInterpolation()

Destructor.

Definition at line 95 of file patchCorrectedInterpolation.C.

Member Function Documentation

◆ getPatchGroups()

Foam::labelListList getPatchGroups ( Istream entry) const
private

Get patch groups from the input stream.

Definition at line 47 of file patchCorrectedInterpolation.C.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, mesh, List::resize(), and List::size().

Here is the call graph for this function:

◆ interpolateType()

void interpolateType ( const GeometricField< Type, fvPatchField, volMesh > &  cellDisplacement,
GeometricField< Type, pointPatchField, pointMesh > &  pointDisplacement 
) const
private

Interpolate the given cell displacement.

Definition at line 36 of file patchCorrectedInterpolationTemplates.C.

References GeometricField::boundaryField(), GeometricField::correctBoundaryConditions(), GeometricField::internalField(), mesh, Foam::compressible::New(), and timeName.

Here is the call graph for this function:

◆ interpolateDataFromPatchGroups()

void interpolateDataFromPatchGroups ( GeometricField< Type, pointPatchField, pointMesh > &  data) const
private

Interpolate patch data by inverse distance weighting.

Definition at line 92 of file patchCorrectedInterpolationTemplates.C.

References Foam::dimless, forAll, GeometricField::internalField(), Foam::max(), mesh, Foam::sqr(), and timeName.

Here is the call graph for this function:

◆ propagateDataFromPatchGroup()

void propagateDataFromPatchGroup ( const label  patchGroupI,
pointScalarField distance,
GeometricField< Type, pointPatchField, pointMesh > &  data 
) const
private

◆ TypeName()

TypeName ( "patchCorrected"  )

Runtime type information.

◆ interpolate() [1/2]

void interpolate ( const volScalarField cellDisplacement,
pointScalarField pointDisplacement 
) const
virtual

Interpolate the given scalar cell displacement.

Reimplemented from motionInterpolation.

Definition at line 102 of file patchCorrectedInterpolation.C.

◆ interpolate() [2/2]

void interpolate ( const volVectorField cellDisplacement,
pointVectorField pointDisplacement 
) const
virtual

Interpolate the given vector cell displacement.

Reimplemented from motionInterpolation.

Definition at line 112 of file patchCorrectedInterpolation.C.

Field Documentation

◆ patchGroups_

const labelListList patchGroups_
private

Patch groups from which to propagate the displacement.

Definition at line 81 of file patchCorrectedInterpolation.H.


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