PDRobstacle Class Reference

Obstacle definitions for PDR. More...

Inheritance diagram for PDRobstacle:
[legend]
Collaboration diagram for PDRobstacle:
[legend]

Public Types

enum  legacyTypes {
  NONE = 0 , CUBOID_1 = 1 , CYLINDER = 2 , LOUVER_BLOWOFF = 5 ,
  LOUVRE_BLOWOFF = 5 , CUBOID = 6 , WALL_BEAM = 7 , GRATING = 8 ,
  OLD_INLET = 9 , OLD_BLOWOFF = 10 , CIRC_PATCH = 12 , RECT_PATCH = 16 ,
  DIAG_BEAM = 22 , IGNITION = 41 , MESH_PLANE = 46 , IGNORE = 200
}
 Obstacle types (legacy numbering) More...
 

Public Member Functions

scalar dia () const
 
scalar theta () const
 
scalar len () const
 
scalar & dia ()
 
scalar & theta ()
 
scalar & len ()
 
 PDRobstacle ()
 Construct zero-initialized. More...
 
 PDRobstacle (Istream &is)
 Read construct as named dictionary. More...
 
 declareMemberFunctionSelectionTable (void, PDRobstacle, read, dictionary,(PDRobstacle &obs, const dictionary &dict),(obs, dict))
 
bool read (Istream &is)
 Read name / dictionary. More...
 
void readProperties (const dictionary &dict)
 Read the 'name' identifier if present. More...
 
scalar x () const
 Obstacle position accessors. More...
 
scalar y () const
 
scalar z () const
 
scalar & x ()
 
scalar & y ()
 
scalar & z ()
 
bool isCylinder () const
 Is obstacle cylinder-like? More...
 
void clear ()
 Reset to a zero obstacle. More...
 
void scale (const scalar factor)
 Scale obstacle dimensions by specified scaling factor. More...
 
scalar volume () const
 Volume of the obstacle. More...
 
bool tooSmall (const scalar minWidth) const
 True if the obstacle is considered to be too small. More...
 
bool setFromLegacy (const int groupTypeId, const string &buffer, const label lineNo=-1, const word &inputFile=word::null)
 Set values from single-line, multi-column format. More...
 
volumeType trim (const boundBox &bb)
 
meshedSurface surface () const
 Surface (points, faces) representation. More...
 
InfoProxy< PDRobstacleinfo () const
 Return info proxy. More...
 

Static Public Member Functions

static scalar legacyReadFiles (const fileName &obsFileDir, const wordList &obsFileNames, const boundBox &meshBb, DynamicList< PDRobstacle > &blocks, DynamicList< PDRobstacle > &cylinders)
 Read obstacle files and add to the lists. More...
 
static scalar readFiles (const fileName &obsFileDir, const wordList &obsFileNames, const boundBox &meshBb, DynamicList< PDRobstacle > &blocks, DynamicList< PDRobstacle > &cylinders)
 Read obstacle files and set the lists. More...
 
static bool isCylinder (const label id)
 Is obstacle type id cylinder-like? More...
 
static label addPieces (vtk::surfaceWriter &surfWriter, const UList< PDRobstacle > &list, label pieceId=0)
 Add pieces to vtp output. More...
 
static void generateVtk (const fileName &outputDir, const UList< PDRobstacle > &obslist, const UList< PDRobstacle > &cyllist)
 Generate multi-piece VTK (vtp) file of obstacles. More...
 

Public Attributes

label groupId
 The group-id. More...
 
int typeId
 The obstacle type-id. More...
 
direction orient
 The x/y/z orientation (0,1,2) More...
 
scalar sortBias
 Bias for position sorting. More...
 
point pt
 The obstacle location. More...
 
vector span
 The obstacle dimensions (for boxes) More...
 
union {
   scalar   wa
 
   scalar   slat_width
 
   scalar   blowoff_press
 
}; 
 
union {
   scalar   wb
 
   scalar   blowoff_time
 
}; 
 
scalar vbkge
 
scalar xbkge
 
scalar ybkge
 
scalar zbkge
 
union {
   int   blowoff_type
 
   int   inlet_dirn
 
}; 
 
string identifier
 

Static Public Attributes

static constexpr int maxBlowoffPressure = 10
 The max blowoff pressure [bar]. More...
 

Friends

Istreamoperator>> (Istream &is, PDRobstacle &obs)
 

Detailed Description

Obstacle definitions for PDR.

Source files

Definition at line 74 of file PDRobstacle.H.

Member Enumeration Documentation

◆ legacyTypes

Obstacle types (legacy numbering)

Enumerator
NONE 

Placeholder.

CUBOID_1 
CYLINDER 
LOUVER_BLOWOFF 
LOUVRE_BLOWOFF 
CUBOID 
WALL_BEAM 
GRATING 
OLD_INLET 

ignored (old)

OLD_BLOWOFF 

ignored (old)

CIRC_PATCH 
RECT_PATCH 
DIAG_BEAM 
IGNITION 

ignored (old)

MESH_PLANE 
IGNORE 

Definition at line 79 of file PDRobstacle.H.

Constructor & Destructor Documentation

◆ PDRobstacle() [1/2]

Construct zero-initialized.

◆ PDRobstacle() [2/2]

PDRobstacle ( Istream is)
explicit

Read construct as named dictionary.

Member Function Documentation

◆ dia() [1/2]

scalar dia ( ) const
inline

Definition at line 130 of file PDRobstacle.H.

References PDRobstacle::span, and Vector< scalar >::X.

◆ theta() [1/2]

scalar theta ( ) const
inline

Definition at line 131 of file PDRobstacle.H.

References PDRobstacle::span, and Vector< scalar >::Y.

◆ len() [1/2]

scalar len ( ) const
inline

Definition at line 132 of file PDRobstacle.H.

References PDRobstacle::span, and Vector< scalar >::Z.

◆ dia() [2/2]

scalar & dia ( )
inline

Definition at line 134 of file PDRobstacle.H.

References PDRobstacle::span, and Vector< scalar >::X.

◆ theta() [2/2]

scalar & theta ( )
inline

Definition at line 135 of file PDRobstacle.H.

References PDRobstacle::span, and Vector< scalar >::Y.

◆ len() [2/2]

scalar & len ( )
inline

Definition at line 136 of file PDRobstacle.H.

References PDRobstacle::span, and Vector< scalar >::Z.

◆ declareMemberFunctionSelectionTable()

declareMemberFunctionSelectionTable ( void  ,
PDRobstacle  ,
read  ,
dictionary  ,
(PDRobstacle &obs, const dictionary &dict ,
(obs, dict  
)

◆ legacyReadFiles()

static scalar legacyReadFiles ( const fileName obsFileDir,
const wordList obsFileNames,
const boundBox meshBb,
DynamicList< PDRobstacle > &  blocks,
DynamicList< PDRobstacle > &  cylinders 
)
static

Read obstacle files and add to the lists.

Returns
the total volume

◆ readFiles()

static scalar readFiles ( const fileName obsFileDir,
const wordList obsFileNames,
const boundBox meshBb,
DynamicList< PDRobstacle > &  blocks,
DynamicList< PDRobstacle > &  cylinders 
)
static

Read obstacle files and set the lists.

Returns
the total volume

◆ read()

bool read ( Istream is)

Read name / dictionary.

◆ readProperties()

void readProperties ( const dictionary dict)

Read the 'name' identifier if present.

◆ x() [1/2]

scalar x ( ) const
inline

Obstacle position accessors.

Definition at line 225 of file PDRobstacle.H.

References PDRobstacle::pt.

◆ y() [1/2]

scalar y ( ) const
inline

Definition at line 226 of file PDRobstacle.H.

References PDRobstacle::pt.

◆ z() [1/2]

scalar z ( ) const
inline

Definition at line 227 of file PDRobstacle.H.

References PDRobstacle::pt.

◆ x() [2/2]

scalar & x ( )
inline

Definition at line 228 of file PDRobstacle.H.

References PDRobstacle::pt.

◆ y() [2/2]

scalar & y ( )
inline

Definition at line 229 of file PDRobstacle.H.

References PDRobstacle::pt.

◆ z() [2/2]

scalar & z ( )
inline

Definition at line 230 of file PDRobstacle.H.

References PDRobstacle::pt.

◆ isCylinder() [1/2]

bool isCylinder ( const label  id)
inlinestatic

Is obstacle type id cylinder-like?

Definition at line 30 of file PDRobstacleI.H.

References PDRobstacle::CYLINDER, and PDRobstacle::DIAG_BEAM.

◆ isCylinder() [2/2]

bool isCylinder ( ) const
inline

Is obstacle cylinder-like?

Definition at line 40 of file PDRobstacleI.H.

◆ clear()

void clear ( )

Reset to a zero obstacle.

◆ scale()

void scale ( const scalar  factor)

Scale obstacle dimensions by specified scaling factor.

Zero and negative factors are ignored

◆ volume()

scalar volume ( ) const

Volume of the obstacle.

◆ tooSmall()

bool tooSmall ( const scalar  minWidth) const

True if the obstacle is considered to be too small.

◆ setFromLegacy()

bool setFromLegacy ( const int  groupTypeId,
const string buffer,
const label  lineNo = -1,
const word inputFile = word::null 
)

Set values from single-line, multi-column format.

The only input format, but termed 'legacy' since it may be replaced in the near future.

Returns
false if the scanning failed or if the obstacle type is not supported (or no longer supported)

◆ trim()

volumeType trim ( const boundBox bb)

Trim obstacle to ensure it is within the specified bounding box and return the intersection type.

Returns UNKNOWN for unknown types and invalid bounding boxes

◆ surface()

meshedSurface surface ( ) const

Surface (points, faces) representation.

◆ addPieces()

static label addPieces ( vtk::surfaceWriter surfWriter,
const UList< PDRobstacle > &  list,
label  pieceId = 0 
)
static

Add pieces to vtp output.

◆ generateVtk()

static void generateVtk ( const fileName outputDir,
const UList< PDRobstacle > &  obslist,
const UList< PDRobstacle > &  cyllist 
)
static

Generate multi-piece VTK (vtp) file of obstacles.

◆ info()

InfoProxy< PDRobstacle > info ( ) const
inline

Return info proxy.

Definition at line 293 of file PDRobstacle.H.

Friends And Related Function Documentation

◆ operator>>

Istream & operator>> ( Istream is,
PDRobstacle obs 
)
friend

Member Data Documentation

◆ maxBlowoffPressure

constexpr int maxBlowoffPressure = 10
staticconstexpr

The max blowoff pressure [bar].

Primarily to catch accidental input in Pa or mbar

Definition at line 104 of file PDRobstacle.H.

◆ groupId

label groupId

The group-id.

Definition at line 110 of file PDRobstacle.H.

◆ typeId

int typeId

The obstacle type-id.

Definition at line 113 of file PDRobstacle.H.

◆ orient

direction orient

The x/y/z orientation (0,1,2)

Definition at line 116 of file PDRobstacle.H.

◆ sortBias

scalar sortBias

Bias for position sorting.

Definition at line 119 of file PDRobstacle.H.

◆ pt

point pt

The obstacle location.

Lower corner for boxes, end-centre for cylinders

Definition at line 123 of file PDRobstacle.H.

Referenced by PDRobstacle::x(), PDRobstacle::y(), and PDRobstacle::z().

◆ span

vector span

The obstacle dimensions (for boxes)

Definition at line 126 of file PDRobstacle.H.

Referenced by PDRobstacle::dia(), PDRobstacle::len(), and PDRobstacle::theta().

◆ wa

scalar wa

Definition at line 140 of file PDRobstacle.H.

◆ slat_width

scalar slat_width

Definition at line 141 of file PDRobstacle.H.

◆ blowoff_press

scalar blowoff_press

Definition at line 142 of file PDRobstacle.H.

◆ 

union { ... } @4

◆ wb

scalar wb

Definition at line 146 of file PDRobstacle.H.

◆ blowoff_time

scalar blowoff_time

Definition at line 147 of file PDRobstacle.H.

◆ 

union { ... } @6

◆ vbkge

scalar vbkge

Definition at line 149 of file PDRobstacle.H.

◆ xbkge

scalar xbkge

Definition at line 150 of file PDRobstacle.H.

◆ ybkge

scalar ybkge

Definition at line 151 of file PDRobstacle.H.

◆ zbkge

scalar zbkge

Definition at line 152 of file PDRobstacle.H.

◆ blowoff_type

int blowoff_type

Definition at line 156 of file PDRobstacle.H.

◆ inlet_dirn

int inlet_dirn

Definition at line 157 of file PDRobstacle.H.

◆ 

union { ... } @8

◆ identifier

string identifier

Definition at line 160 of file PDRobstacle.H.


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