Public Member Functions | Static Public Attributes | List of all members
writer Class Reference

Write OpenFOAM meshes and/or results to CCM format. More...

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

Public Member Functions

 writer (const fileName &file, const polyMesh &mesh, const bool backup=true)
 
 ~writer ()
 
void writeGeometry ()
 
void writeSolution (const IOobjectList &objects, const fileName &remappingDictName=fileName::null)
 
- Public Member Functions inherited from base
 base ()
 
 ~base ()
 
bool close ()
 

Static Public Attributes

static string defaultMeshName = "meshExport"
 

Additional Inherited Members

- Protected Types inherited from STARCDCore
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
}
 
- Protected Member Functions inherited from base
bool assertNoError (const char *msg) const
 
bool assertNoError (const std::string &msg) const
 
 base (const base &)=delete
 
void operator= (const base &)=delete
 
- Protected Member Functions inherited from STARCDCore
 STARCDCore ()=default
 
- Static Protected Member Functions inherited from base
static bool assertNoError (int err, const char *msg)
 
static bool assertNoError (int err, const std::string &msg)
 
- Static Protected Member Functions inherited from STARCDCore
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)
 
- Protected Attributes inherited from base
std::unique_ptr< ccmGlobalState > globalState_
 
- Static Protected Attributes inherited from STARCDCore
static const Map< FixedList< int, 6 > > starToFoamFaceAddr
 
static const Map< FixedList< int, 6 > > foamToStarFaceAddr
 
static const char *const defaultBoundaryName
 
static const char *const defaultSolidBoundaryName
 

Detailed Description

Write OpenFOAM meshes and/or results to CCM format.

Files

The constant/boundaryRegion and constant/cellTable files, which are described in ccmReader, are used to construct the CCM ProblemDescription node.

The constant/remapping file is an IOdictionary that is READ_IF_PRESENT and can be used to remap certain information. eg,

    // map OpenFOAM scalar fields to CCM output fields
    fields
    {
        tracer0
        {
            name    CONC_001;
            Label   "tracer0";
        }
        tracer1
        {
            name    CONC_002;
            Label   "tracer1";
        }
        tracer2
        {
            name    CONC_003;
            Label   "tracer2";
        }
        divPhi
        {
            name    CONC_004;
            Label   "divPhi";
        }
        // an example with units:
        p
        {
            name    P;
            Label   "Pressure";
            units   "Pa";
        }
    }
Note
This class is in development
  • any/all of the class names and members may change
Source files

Definition at line 115 of file ccmWriter.H.

Constructor & Destructor Documentation

◆ writer()

writer ( const fileName file,
const polyMesh mesh,
const bool  backup = true 
)

Definition at line 285 of file ccmWriter.C.

References cellModel::HEX, cellModel::index(), cellModel::PRISM, cellModel::PYR, cellModel::ref(), and cellModel::TET.

Here is the call graph for this function:

◆ ~writer()

~writer ( )

Definition at line 369 of file ccmWriter.C.

Member Function Documentation

◆ writeGeometry()

void writeGeometry ( )

Definition at line 710 of file ccmWriterMesh.C.

◆ writeSolution()

void writeSolution ( const IOobjectList objects,
const fileName remappingDictName = fileName::null 
)

Member Data Documentation

◆ defaultMeshName

Foam::string defaultMeshName = "meshExport"
static

Definition at line 214 of file ccmWriter.H.


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