Reads CCM files as written by PROSTAR/STARCCM. More...
Classes | |
class | options |
Public Member Functions | |
reader (const fileName &file, const reader::options &opts) | |
~reader () | |
const reader::options & | option () const |
autoPtr< polyMesh > | mesh (const objectRegistry ®istry, const fileName &remappingDictName=fileName::null) |
bool | hasGeometry () |
bool | hasSolution () |
bool | remapMeshInfo (const objectRegistry ®istry, const fileName &remappingDictName=fileName::null) |
void | writeMesh (const polyMesh &mesh, IOstreamOption streamOpt=IOstreamOption(IOstreamOption::BINARY)) const |
void | writeAux (const objectRegistry ®istry) const |
bool | readGeometry (const scalar scaleFactor=1.0) |
void | printInfo () const |
void | clearGeom () |
const labelList & | origCellId () const |
const labelList & | origFaceId () const |
const interfaceDefinitions & | interfaceDefinitionsInfo () const |
const boundaryRegion & | boundaryTableInfo () const |
const cellTable & | cellTableInfo () const |
Map< word > | fluids () const |
Map< word > | solids () const |
const solutionTable & | solutions () |
const fieldTable & | fields () |
const fieldTable & | lagrangian () |
tmp< scalarField > | readField (const word &solutionName, const word &fieldName, const bool wallData=false) |
![]() | |
base () | |
~base () | |
bool | close () |
Static Public Member Functions | |
static void | warnDuplicates (const word &context, const wordList &lst) |
Additional Inherited Members | |
![]() | |
enum | fileHeader { HEADER_CEL, HEADER_VRT, HEADER_BND } |
enum | fileExt { CEL_FILE, VRT_FILE, BND_FILE, INP_FILE } |
enum | matlType { starcdFluidType = 1, starcdSolidType = 2, starcdBaffleType = 3, starcdShellType = 4, starcdLineType = 5, starcdPointType = 6 } |
enum | shapeType { starcdPoint = 1, starcdLine = 2, starcdShell = 3, starcdHex = 11, starcdPrism = 12, starcdTet = 13, starcdPyr = 14, starcdPoly = 255 } |
![]() | |
bool | assertNoError (const char *msg) const |
bool | assertNoError (const std::string &msg) const |
base (const base &)=delete | |
void | operator= (const base &)=delete |
![]() | |
STARCDCore ()=default | |
![]() | |
static bool | assertNoError (int err, const char *msg) |
static bool | assertNoError (int err, const std::string &msg) |
![]() | |
static bool | readHeader (IFstream &is, const enum fileHeader header) |
static void | writeHeader (Ostream &os, const enum fileHeader header) |
static fileName | starFileName (const fileName &baseName, const enum fileExt ext) |
static void | removeFiles (const fileName &baseName) |
static label | readPoints (IFstream &is, List< point > &points, List< label > &ids) |
static void | writePoints (Ostream &os, const UList< point > &points, const scalar scaleFactor=1.0) |
![]() | |
std::unique_ptr< ccmGlobalState > | globalState_ |
![]() | |
static const Map< FixedList< int, 6 > > | starToFoamFaceAddr |
static const Map< FixedList< int, 6 > > | foamToStarFaceAddr |
static const char *const | defaultBoundaryName |
static const char *const | defaultSolidBoundaryName |
Reads CCM files as written by PROSTAR/STARCCM.
The Default_Boundary_Region (region 0) is a special region that serves two purposes:
The CCM node Meshes/FaceBasedTopology/Cells/Interfaces
holds the mapping of the corresponding mesh faces, which can be used to merge these internal boundaries.
If solid cells exist, there are three possible courses of action:
The constant/remapping
file is an IOdictionary
that is READ_IF_PRESENT
and can be used to remap certain information. eg,
// rename/combine cellTable entries // newName ( listOldNames ); cellTable { fluid ( inletRegion outletRegion ); cat1 ( CAT1 "cat1_(Back|Front|Gamma)" ); } // rename boundary regions // newName oldName; boundaryRegion { inlet_4 inlet_1; inlet_5 inlet_2; inlet_6 inlet_3; }
The constant/boundaryRegion
file is an IOMap<dictionary>
that is written. It contains the boundary type and names. eg,
( 0 { BoundaryType wall; Label Default_Boundary_Region; } 1 { BoundaryType inlet; Label inlet_1; } ... 4 { BoundaryType pressure; Label outlet; } )
The constant/cellTable
file is an IOMap<dictionary>
that is written. It contains the cellTable information. eg,
( 1 { Label inletRegion; MaterialType fluid; MaterialId 1; } 2 { Label cat1; MaterialType fluid; MaterialId 1; PorosityId 1; } 3 { Label outletRegion; MaterialType fluid; MaterialId 1; } )
Definition at line 179 of file ccmReader.H.
reader | ( | const fileName & | file, |
const reader::options & | opts | ||
) |
Definition at line 643 of file ccmReader.C.
References base::assertNoError(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, base::globalState_, Foam::isFile(), and reader::option().
~reader | ( | ) |
Definition at line 702 of file ccmReader.C.
Definition at line 64 of file ccmReaderAux.C.
References Foam::endl(), HashTable::find(), forAllConstIters(), Foam::Info, HashTable::insert(), and Foam::nl.
const Foam::ccm::reader::options & option | ( | ) | const |
Definition at line 710 of file ccmReader.C.
Referenced by reader::reader().
Foam::autoPtr< Foam::polyMesh > mesh | ( | const objectRegistry & | registry, |
const fileName & | remappingDictName = fileName::null |
||
) |
Definition at line 2594 of file ccmReaderMesh.C.
References IOobject::AUTO_WRITE, polyMesh::defaultRegion, mesh, meshPtr, autoPtr::New(), and IOobject::NO_READ.
bool hasGeometry | ( | ) |
Definition at line 557 of file ccmReader.C.
bool hasSolution | ( | ) |
Definition at line 564 of file ccmReader.C.
bool remapMeshInfo | ( | const objectRegistry & | registry, |
const fileName & | remappingDictName = fileName::null |
||
) |
Definition at line 586 of file ccmReader.C.
References dictionary::isDict(), IOobject::NO_WRITE, IOobject::READ_IF_PRESENT, and dictionary::subDict().
void writeMesh | ( | const polyMesh & | mesh, |
IOstreamOption | streamOpt = IOstreamOption(IOstreamOption::BINARY) |
||
) | const |
Definition at line 572 of file ccmReader.C.
References Foam::endl(), Foam::Info, and mesh.
void writeAux | ( | const objectRegistry & | registry | ) | const |
Definition at line 176 of file ccmReaderAux.C.
References IOstreamOption::ASCII, and IOstreamOption::BINARY.
bool readGeometry | ( | const scalar | scaleFactor = 1.0 | ) |
Definition at line 529 of file ccmReader.C.
void printInfo | ( | ) | const |
Definition at line 515 of file ccmReader.C.
References Foam::endl(), Foam::Info, and Foam::nl.
void clearGeom | ( | ) |
Definition at line 2573 of file ccmReaderMesh.C.
|
inline |
Definition at line 506 of file ccmReader.H.
|
inline |
Definition at line 512 of file ccmReader.H.
|
inline |
Definition at line 518 of file ccmReader.H.
|
inline |
Definition at line 524 of file ccmReader.H.
|
inline |
Definition at line 530 of file ccmReader.H.
Definition at line 536 of file ccmReader.H.
References cellTable::fluids().
Definition at line 542 of file ccmReader.H.
References cellTable::solids().
|
inline |
Definition at line 548 of file ccmReader.H.
|
inline |
Definition at line 555 of file ccmReader.H.
|
inline |
Definition at line 562 of file ccmReader.H.
Foam::tmp< Foam::scalarField > readField | ( | const word & | solutionName, |
const word & | fieldName, | ||
const bool | wallData = false |
||
) |
Definition at line 350 of file ccmReaderSolution.C.
References cellId, forAll, n, tmp::New(), tmp::ref(), and List::setSize().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.