A surfaceWriter for outputting to a form usable for the timeVaryingMapped boundary condition. This reads the data from constant/boundaryData/<patch> directory. More...
Public Member Functions | |
TypeNameNoDebug ("boundaryData") | |
boundaryDataWriter () | |
boundaryDataWriter (const dictionary &options) | |
boundaryDataWriter (const meshedSurf &surf, const fileName &outputPath, bool parallel=Pstream::parRun(), const dictionary &options=dictionary()) | |
boundaryDataWriter (const pointField &points, const faceList &faces, const fileName &outputPath, bool parallel=Pstream::parRun(), const dictionary &options=dictionary()) | |
virtual | ~boundaryDataWriter ()=default |
virtual fileName | write () |
declareSurfaceWriterWriteMethod (label) | |
declareSurfaceWriterWriteMethod (scalar) | |
declareSurfaceWriterWriteMethod (vector) | |
declareSurfaceWriterWriteMethod (sphericalTensor) | |
declareSurfaceWriterWriteMethod (symmTensor) | |
declareSurfaceWriterWriteMethod (tensor) | |
template<class Type > | |
Foam::fileName | writeTemplate (const word &fieldName, const Field< Type > &localValues) |
![]() | |
TypeName ("surfaceWriter") | |
declareRunTimeSelectionTable (autoPtr, surfaceWriter, word,(),()) | |
declareRunTimeSelectionTable (autoPtr, surfaceWriter, wordDict,(const dictionary &writeOpts),(writeOpts)) | |
surfaceWriter () | |
surfaceWriter (const dictionary &options) | |
surfaceWriter (const meshedSurf &surf, bool parallel=Pstream::parRun(), const dictionary &options=dictionary()) | |
surfaceWriter (const pointField &points, const faceList &faces, bool parallel=Pstream::parRun(), const dictionary &options=dictionary()) | |
virtual | ~surfaceWriter () |
virtual bool | enabled () const |
virtual bool | separateGeometry () const |
virtual bool | usesFaceIds () const |
virtual bool | needsUpdate () const |
virtual bool | wroteData () const |
virtual bool | expire () |
virtual void | clear () |
virtual void | setSurface (const meshedSurf &surf, bool parallel) |
virtual void | setSurface (const pointField &points, const faceList &faces, bool parallel) |
virtual void | setSurface (const meshedSurf &surf) |
virtual void | setSurface (const pointField &points, const faceList &faces) |
bool | hasSurface () const |
bool | empty () const |
label | size () const |
label | nFields () const |
label | nFields (const label n) |
bool | isPointData () const |
bool | isPointData (const bool on) |
bool | useTimeDir () const |
bool | useTimeDir (const bool on) |
bool | verbose () const |
bool | verbose (const bool on) |
scalar | mergeDim () const |
scalar | mergeDim (const scalar dist) |
bool | hasTime () const |
const word & | timeName () const |
scalar | timeValue () const |
void | setTime (const instant &inst) |
void | setTime (scalar timeValue) |
void | setTime (scalar timeValue, const word &timeName) |
void | unsetTime () |
virtual void | beginTime (const Time &t) |
virtual void | beginTime (const instant &inst) |
virtual void | endTime () |
virtual void | open (const fileName &outputPath) |
virtual void | open (const pointField &points, const faceList &faces, const fileName &outputPath, bool parallel) |
virtual void | open (const meshedSurf &surf, const fileName &outputPath, bool parallel) |
virtual void | open (const pointField &points, const faceList &faces, const fileName &outputPath) |
virtual void | open (const meshedSurf &surf, const fileName &outputPath) |
virtual void | close () |
virtual fileName | write (const word &fieldName, const Field< label > &values)=0 |
Write field of label (per face or vertex) More... | |
virtual fileName | write (const word &fieldName, const Field< scalar > &values)=0 |
Write field of scalar (per face or vertex) More... | |
virtual fileName | write (const word &fieldName, const Field< vector > &values)=0 |
Write field of vector (per face or vertex) More... | |
virtual fileName | write (const word &fieldName, const Field< sphericalTensor > &values)=0 |
Write field of sphericalTensor (per face or vertex) More... | |
virtual fileName | write (const word &fieldName, const Field< symmTensor > &values)=0 |
Write field of symmTensor (per face or vertex) More... | |
virtual fileName | write (const word &fieldName, const Field< tensor > &values)=0 |
Write field of tensor (per face or vertex) More... | |
virtual InfoProxy< surfaceWriter > | info () const |
template<class Type > | |
Foam::tmp< Foam::Field< Type > > | mergeFieldTemplate (const Field< Type > &fld) const |
Additional Inherited Members | |
![]() | |
static bool | supportedType (const word &writeType) |
static autoPtr< surfaceWriter > | New (const word &writeType) |
static autoPtr< surfaceWriter > | New (const word &writeType, const dictionary &writeOptions) |
![]() | |
static scalar | defaultMergeDim = 1e-8 |
![]() | |
bool | checkOpen () const |
virtual bool | merge () const |
const meshedSurf & | surface () const |
template<class Type > | |
tmp< Field< Type > > | mergeFieldTemplate (const Field< Type > &fld) const |
tmp< Field< label > > | mergeField (const Field< label > &fld) const |
tmp< Field< scalar > > | mergeField (const Field< scalar > &fld) const |
tmp< Field< vector > > | mergeField (const Field< vector > &fld) const |
tmp< Field< sphericalTensor > > | mergeField (const Field< sphericalTensor > &fld) const |
tmp< Field< symmTensor > > | mergeField (const Field< symmTensor > &fld) const |
tmp< Field< tensor > > | mergeField (const Field< tensor > &fld) const |
template<class Type > | |
fileName | writeTemplate (const word &fieldName, const Field< Type > &localValues) |
![]() | |
std::reference_wrapper< const meshedSurf > | surf_ |
meshedSurfRef | surfComp_ |
bool | useComponents_ |
bool | upToDate_ |
bool | wroteGeom_ |
bool | parallel_ |
bool | useTimeDir_ |
bool | isPointData_ |
bool | verbose_ |
label | nFields_ |
scalar | mergeDim_ |
mergedSurf | merged_ |
instant | currTime_ |
fileName | outputPath_ |
![]() | |
static const meshedSurf::emptySurface | emptySurface_ |
A surfaceWriter for outputting to a form usable for the timeVaryingMapped boundary condition. This reads the data from constant/boundaryData/<patch> directory.
formatOptions { boundaryData { header false; format ascii; compression false; } }
Format options:
Property | Description | Required | Default |
---|---|---|---|
header | Generate files with FoamFile header | no | true |
format | ascii/binary | no | ascii |
compression | Use file compression | no | false |
fieldScale | output field scaling (dictionary) | no | empty |
Typical way of working:
surfaces { type surfaces; fields ( p ); surfaceFormat boundaryData; formatOptions { boundaryData { format binary; fieldScale { "p.*" 0.01; // [Pa] -> [mbar] } } } surfaces { outlet { type patch; patches (outlet); interpolate false; } } }
Note:
Output file locations
The rootdir
normally corresponds to something like postProcessing/<name>
where the geometry is written as:
rootdir `-- surfaceName `-- "points"
and field data:
rootdir `-- surfaceName |-- "points" `-- timeName `-- field
Definition at line 168 of file boundaryDataSurfaceWriter.H.
Definition at line 48 of file boundaryDataSurfaceWriter.C.
|
explicit |
Definition at line 58 of file boundaryDataSurfaceWriter.C.
boundaryDataWriter | ( | const meshedSurf & | surf, |
const fileName & | outputPath, | ||
bool | parallel = Pstream::parRun() , |
||
const dictionary & | options = dictionary() |
||
) |
Definition at line 74 of file boundaryDataSurfaceWriter.C.
boundaryDataWriter | ( | const pointField & | points, |
const faceList & | faces, | ||
const fileName & | outputPath, | ||
bool | parallel = Pstream::parRun() , |
||
const dictionary & | options = dictionary() |
||
) |
Definition at line 88 of file boundaryDataSurfaceWriter.C.
References points.
|
virtualdefault |
TypeNameNoDebug | ( | "boundaryData" | ) |
|
virtual |
Implements surfaceWriter.
Definition at line 155 of file boundaryDataSurfaceWriter.C.
References argList::envGlobalPath(), Foam::isDir(), UPstream::master(), Foam::mkDir(), Time::New(), IOobject::NO_READ, and IOobject::NO_WRITE.
declareSurfaceWriterWriteMethod | ( | label | ) |
declareSurfaceWriterWriteMethod | ( | scalar | ) |
declareSurfaceWriterWriteMethod | ( | vector | ) |
declareSurfaceWriterWriteMethod | ( | sphericalTensor | ) |
declareSurfaceWriterWriteMethod | ( | symmTensor | ) |
declareSurfaceWriterWriteMethod | ( | tensor | ) |
Foam::fileName writeTemplate | ( | const word & | fieldName, |
const Field< Type > & | localValues | ||
) |
Definition at line 202 of file boundaryDataSurfaceWriter.C.
References argList::envGlobalPath(), Foam::isDir(), UPstream::master(), Foam::mkDir(), Time::New(), IOobject::NO_READ, IOobject::NO_WRITE, fileName::path(), and timeName.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.