42 fieldCoordinateSystemTransform,
51Foam::functionObjects::fieldCoordinateSystemTransform::
52fieldCoordinateSystemTransform
69 <<
" Applying " << (csysPtr_->uniform() ?
"" :
"non-")
70 <<
"uniform transformation from global Cartesian to local "
71 << *csysPtr_ <<
nl <<
endl;
78Foam::functionObjects::fieldCoordinateSystemTransform::transformFieldName
88Foam::functionObjects::fieldCoordinateSystemTransform::srotTensor()
const
92 if (!rotTensorSurface_)
94 tensorField rotations(csysPtr_->R(mesh_.faceCentres()));
96 rotTensorSurface_.emplace
101 mesh_.objectRegistry::instance(),
102 mesh_.objectRegistry::db(),
113 auto& rot = *rotTensorSurface_;
116 BoundaryType& bf =
const_cast<BoundaryType&
>(rot.boundaryField());
120 bf[patchi] = csysPtr_->R(bf[patchi].
patch().
patch().faceCentres());
124 return *rotTensorSurface_;
129Foam::functionObjects::fieldCoordinateSystemTransform::vrotTensor()
const
133 if (!rotTensorVolume_)
135 tensorField rotations(csysPtr_->R(mesh_.cellCentres()));
137 rotTensorVolume_.emplace
142 mesh_.objectRegistry::instance(),
143 mesh_.objectRegistry::db(),
154 auto& rot = *rotTensorVolume_;
157 BoundaryType& bf =
const_cast<BoundaryType&
>(rot.boundaryField());
161 bf[patchi] = csysPtr_->R(bf[patchi].
patch().
patch().faceCentres());
165 return *rotTensorVolume_;
169bool Foam::functionObjects::fieldCoordinateSystemTransform::read
174 if (fvMeshFunctionObject::read(
dict))
176 fieldSet_.read(
dict);
184bool Foam::functionObjects::fieldCoordinateSystemTransform::execute()
186 fieldSet_.updateSelection();
188 for (
const word& fieldName : fieldSet_.selectionNames())
198 rotTensorSurface_.clear();
199 rotTensorVolume_.clear();
205bool Foam::functionObjects::fieldCoordinateSystemTransform::write()
207 for (
const word& fieldName : fieldSet_.selectionNames())
209 writeObject(transformFieldName(fieldName));
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
GeometricBoundaryField< tensor, fvsPatchField, surfaceMesh > Boundary
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
static word scopedName(const std::string &scope, const word &name)
Create scope:name or scope_name string.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Base class for coordinate system specification, the default coordinate system type is cartesian .
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const std::string patch
OpenFOAM patch number as a std::string.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
const dimensionSet dimless
Dimensionless.
bool read(const char *buf, int32_t &val)
Same as readInt32.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
messageStream Info
Information stream (stdout output on master, null elsewhere).
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricField< tensor, fvPatchField, volMesh > volTensorField
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.