63 return (idx.
x() >= 0 && idx.
y() >= 0 && idx.
z() >= 0);
76 {
"Aw",
"surface area per unit volume" },
83 {
"Bv",
"area blockage" },
84 {
"B",
"area blockage" },
86 {
"Blong",
"longitudinal blockage" },
108static constexpr unsigned outputPrecision = 8;
112 double brs,
double brr,
bool blocked,
113 double surr_br,
double surr_dr,
114 scalar* drags_p, scalar* dragr_p,
121void write_scalarField
130void write_uniformField
132 const word& fieldName,
const scalar& deflt,
const char *wall_bc,
145void write_symmTensorField
154void write_symmTensorFieldV
163void write_blocked_face_list
172 double limit_par,
const fileName& casepath
175void write_blockedCellsSet
186static inline scalar averageSurrounding
195 mat(i,j) + mat(i,j+1) + mat(i,j+2)
196 + mat(i+1,j) + mat(i+1,j+2)
197 + mat(i+2,j) + mat(i+2,j+1) + mat(i+2,j+2)
206 os.writeKeyword(key);
213static void make_header
221 string note = fieldNotes(
object);
225 os <<
"FoamFile\n{\n"
227 <<
" format ascii;\n"
228 <<
" class " << clsName <<
";\n";
232 os <<
" note " << note <<
";\n";
235 if (!location.empty())
237 os <<
" location " << location <<
";\n";
240 os <<
" object " <<
object <<
";\n"
258 <<
"No PDRblock set" <<
nl
262 const PDRblock& pdrBlock = arr.
block();
267 const int xdim = faceDims.
x();
268 const int ydim = faceDims.
y();
269 const int zdim = faceDims.
z();
294 Info<<
"Calculating fields" <<
nl;
300 IjkField<vector> cbdi(cellDims,
Zero);
310 const label maxDim =
cmptMax(surrDims);
321 SquareMatrix<scalar> neiBlock(maxDim,
Zero);
322 SquareMatrix<scalar> neiDrag(maxDim,
Zero);
330 for (label iz = 0; iz <= zdim; ++iz)
333 (iz == 0 ? 0 : iz == zdim ? zdim - 2 : iz - 1);
348 for (label iz = 0; iz < surrDims.
z(); ++iz)
353 neiBlock(0, iz) = neiBlock(cellDims.
y(), iz);
354 neiDrag(0, iz) = neiDrag(cellDims.
y(), iz);
355 neiBlock(ydim, iz) = neiBlock(1, iz);
356 neiDrag(ydim, iz) = neiDrag(1, iz);
360 neiBlock(0, iz) = neiBlock(1, iz);
361 neiDrag(0, iz) = neiDrag(1, iz);
362 neiBlock(ydim, iz) = neiBlock(cellDims.
y(), iz);
363 neiDrag(ydim, iz) = neiDrag(cellDims.
y(), iz);
371 const scalar cell_vol = pdrBlock.
V(ix,iy,iz);
373 const scalar surr_br = averageSurrounding(neiBlock, iy, iz);
374 const scalar surr_dr = averageSurrounding(neiDrag, iy, iz);
385 &(cbdi(ix,iy,iz).
x()),
402 for (label ix = 0; ix <= xdim; ++ix)
405 (ix == 0 ? 0 : ix == xdim ? xdim - 2 : ix - 1);
419 for (label ix = 0; ix < surrDims.
x(); ++ix)
421 neiBlock(0, ix) = neiBlock(1, ix);
422 neiDrag(0, ix) = neiDrag(1, ix);
423 neiBlock(zdim, ix) = neiBlock(cellDims.
z(), ix);
424 neiDrag(zdim, ix) = neiDrag(cellDims.
z(), ix);
431 const scalar cell_vol = pdrBlock.
V(ix,iy,iz);
433 const scalar surr_br = averageSurrounding(neiBlock, iz, ix);
434 const scalar surr_dr = averageSurrounding(neiDrag, iz, ix);
445 &(cbdi(ix,iy,iz).
y()),
462 for (label iy = 0; iy <= ydim; ++iy)
468 iyy = (iy == 0 ? ydim - 2 : iy == ydim ? 0 : iy - 1);
472 iyy = (iy == 0 ? 0 : iy == ydim ? ydim - 2 : iy - 1);
487 for (label iy = 0; iy < surrDims.
y(); ++iy)
489 neiBlock(0, iy) = neiBlock(1, iy);
490 neiDrag(0, iy) = neiDrag(1, iy);
491 neiBlock(xdim, iy) = neiBlock(cellDims.
x(), iy);
492 neiDrag(xdim, iy) = neiDrag(cellDims.
x(), iy);
499 const scalar cell_vol = pdrBlock.
V(ix,iy,iz);
501 const scalar surr_br = averageSurrounding(neiBlock, ix, iy);
502 const scalar surr_dr = averageSurrounding(neiDrag, ix, iy);
513 &(cbdi(ix,iy,iz).z()),
532 const scalar dx = pdrBlock.
dx(ix);
533 const scalar dy = pdrBlock.
dy(iy);
534 const scalar dz = pdrBlock.
dz(iz);
535 const scalar cell_vol = pdrBlock.
V(ix, iy, iz);
536 const scalar cell_size = pdrBlock.
width(ix, iy, iz);
546 if (cbdi(ix,iy,iz).
x() > maxCT ) { cbdi(ix,iy,iz).x() = maxCT; } ;
547 if (cbdi(ix,iy,iz).
y() > maxCT ) { cbdi(ix,iy,iz).y() = maxCT; } ;
548 if (cbdi(ix,iy,iz).z() > maxCT ) { cbdi(ix,iy,iz).z() = maxCT; } ;
550 surf(ix,iy,iz) /= cell_vol;
556 const scalar vb =
v_block(ix,iy,iz);
567 || (
surf(ix,iy,iz) <= 0.0 )
577 double nn, lobs, lobsMax;
579 if ( nn < 1.0 ) { nn = 1.0; }
582 if ( nn < 1.0 ) { nn = 1.0; }
584 if ( lobs > lobsMax )
590 if ( nn < 1.0 ) { nn = 1.0; }
592 if ( lobs > lobsMax )
611 else if (
v_block(ix,iy,iz) > 1)
643 IjkField<Vector<direction>> n_blocked_faces
649 write_blocked_face_list
656 write_blockedCellsSet
660 casepath,
"blockedCellsSet"
665 "betav", arr.
v_block, 1, {0, pars.cong_max_betav},
"zeroGradient",
676 const scalar cell_vol = pdrBlock.
V(ix, iy, iz);
699 const scalar cell_23 =
::pow(cell_vol, 2.0/3.0);
709 Info<<
"Writing field files" <<
nl;
721 "Aw", arr.
surf, 0, {0, 1000},
"zeroGradient",
725 write_symmTensorField
730 write_symmTensorFieldV
732 "CT", cbdi,
Zero,
"zeroGradient",
741 "Nv", arr.
obs_count, 0, {0, 1000},
"zeroGradient",
745 write_symmTensorFieldV
756 "N", arr.
obs_count, 0, {0, 1000},
"zeroGradient",
760 write_symmTensorFieldV
787 eff_block /= pdrBlock.
width(ix, iy, iz);
793 if (
dirn_block(ix,iy,iz)[cmpt] || eff_block[cmpt] < 0)
801 drag_s(ix,iy,iz).xx() = eff_block.x();
802 drag_s(ix,iy,iz).yy() = eff_block.y();
803 drag_s(ix,iy,iz).zz() = eff_block.z();
805 cbdi(ix,iy,iz).x() = 1.0 / (
betai_inv1(ix,iy,iz).x() + 1.0);
806 cbdi(ix,iy,iz).y() = 1.0 / (
betai_inv1(ix,iy,iz).y() + 1.0);
807 cbdi(ix,iy,iz).z() = 1.0 / (
betai_inv1(ix,iy,iz).z() + 1.0);
809 if (cbdi(ix,iy,iz).z() < 0 || cbdi(ix,iy,iz).z() > 1.0)
812 <<
"beta_i problem. z-betai_inv1=" <<
betai_inv1(ix,iy,iz).z()
813 <<
" beta_i=" << cbdi(ix,iy,iz).z()
831 write_symmTensorField
840 write_symmTensorField
849 write_symmTensorFieldV
857 write_symmTensorFieldV
873 "b", 1.0,
"zeroGradient",
893 "ft", 0,
"zeroGradient",
917 "Xi", 1,
"zeroGradient",
923 "Xp", 1,
"zeroGradient",
929 "GRxp", 0,
"zeroGradient",
935 "GRep", 0,
"zeroGradient",
941 "RPers", 0,
"zeroGradient",
945 write_pU_fields(meshIndexing,
patches, casepath);
966 "combustFlag", 1,
"zeroGradient",
984 "H2OPS", 0,
"zeroGradient",
990 "AIR", 0,
"zeroGradient",
996 "Ydefault", 0,
"zeroGradient",
1002 "eRatio", 1,
"zeroGradient",
1008 "sprayFlag", 1,
"zeroGradient",
1024 calculateAndWrite(*
this, meshIndexing, casepath,
patches);
1030 double brs,
double brr,
bool blocked,
1031 double surr_br,
double surr_dr,
1032 scalar* drags_p, scalar* dragr_p,
1039 scalar br = brr + brs;
1043 if (count > 1.0) { br /= std::sqrt(count); }
1045 const scalar
alpha =
1048 ? (1.0 - 0.5 * br) / (1.0 - br) / (1.0 - br)
1056 const scalar
expon =
1059 ?
Foam::clamp((surr_br / br - 0.25) * 4.0 / 3.0, Foam::zero_one{})
1066 *dragr_p *= alpha_r;
1067 *drags_p *=
::pow(alpha_s, 1.09);
1068 *cbdi_p = (
pars.cb_r *
pars.cd_r * *dragr_p +
pars.cb_s *
pars.cd_s * *drags_p );
1069 if ( *cbdi_p < 0.0 ) { *cbdi_p = 0.0; }
1072 *drags_p = ( *drags_p *
pars.cd_s + *dragr_p *
pars.cd_r );
1073 if ( *drags_p < 0.0 ) { *drags_p = 0.0; }
1077 if ( (surr_dr * 0.25) > *drags_p )
1079 *drags_p = surr_dr * 0.25;
1080 *cbdi_p = *drags_p * (
pars.cb_r +
pars.cb_s ) * 0.5;
1083 if ( blocked ) { *cbdi_p = 0.0; *drags_p = 0.0; *dragr_p = 0.0; }
1093 <<
"No blockage information - PDRblock is not set" <<
nl;
1100 scalar totCount = 0;
1101 scalar totVolBlock = 0;
1114 totVolBlock += v_block(ijk) * pdrBlock.
V(ijk);
1115 totArea += surf(ijk);
1117 totCount +=
Foam::max(0, obs_count(ijk));
1119 totDrag.x() +=
Foam::max(0, drag_s(ijk).xx());
1120 totDrag.y() +=
Foam::max(0, drag_s(ijk).yy());
1121 totDrag.z() +=
Foam::max(0, drag_s(ijk).zz());
1125 totBlock[cmpt] +=
Foam::max(0, area_block_s(ijk)[cmpt]);
1126 totBlock[cmpt] +=
Foam::max(0, area_block_r(ijk)[cmpt]);
1133 <<
"Volume blockage: " << totVolBlock <<
nl
1134 <<
"Total drag: " << totDrag <<
nl
1135 <<
"Total count: " << totCount <<
nl
1136 <<
"Total area blockage: " << totBlock <<
nl
1137 <<
"Total surface area: " << totArea <<
nl;
1145static void tail_field
1149 const char* wall_bc,
1157 putUniform(
os,
"value", deflt);
1163 const word& patchName =
patches[patchi].patchName;
1171 if (
pars.blockedFacesWallFn)
1174 putUniform(
os,
"value", deflt);
1183 else if (
patches[patchi].patchType == 0)
1188 putUniform(
os,
"value", deflt);
1196 putUniform(
os,
"value", deflt);
1233 if (
pars.outer_orthog)
1250void write_scalarField
1272 for (label celli=0; celli < meshIndexing.
nCells(); ++celli)
1276 if (!isGoodIndex(cellIdx))
1297 putUniform(
os,
"inletValue", deflt);
1298 putUniform(
os,
"value", deflt);
1303 tail_field(
os, deflt, wall_bc,
patches);
1313void write_uniformField
1315 const word& fieldName,
const scalar& deflt,
const char *wall_bc,
1329 putUniform(
os,
"internalField", deflt);
1338 if (fieldName ==
"alphat" || fieldName ==
"nut")
1346 putUniform(
os,
"inletValue", deflt);
1349 putUniform(
os,
"value", deflt);
1353 tail_field(
os, deflt, wall_bc,
patches);
1401 for (label patchi = 0; patchi < 3; ++patchi)
1408 for (label patchi = 3; patchi <
patches.
size(); ++patchi)
1411 const word& patchName =
p.patchName;
1413 if (
p.patchType == 0)
1418 os.
writeEntry(
"fileName",
"<case>" / (patchName +
".dat"));
1426 os.
writeEntry(
"type",
"activePressureForceBaffleVelocity");
1468 if (
pars.outer_orthog )
1489 const char *wall_bc =
"zeroGradient;\n\trho\trho";
1499 putUniform(
os,
"internalField", deflt);
1512 putUniform(
os,
"value", deflt);
1516 tail_field(
os, deflt, wall_bc,
patches);
1527void write_symmTensorField
1529 const word& fieldName,
1531 const symmTensor& deflt,
const char *wall_bc,
1549 for (label celli=0; celli < meshIndexing.
nCells(); ++celli)
1553 if (!isGoodIndex(cellIdx))
1572 putUniform(
os,
"inletValue", deflt);
1573 putUniform(
os,
"value", deflt);
1578 tail_field(
os, deflt, wall_bc,
patches);
1588void write_symmTensorFieldV
1590 const word& fieldName,
1592 const symmTensor& deflt,
const char *wall_bc,
1612 for (label celli=0; celli < meshIndexing.
nCells(); ++celli)
1616 if (!isGoodIndex(cellIdx))
1641 putUniform(
os,
"inletValue", deflt);
1642 putUniform(
os,
"value", deflt);
1647 tail_field(
os, deflt, wall_bc,
patches);
1657void write_blocked_face_list
1665 double limit_par,
const fileName& casepath
1678 for (label facei=0; facei < meshIndexing.
nFaces(); ++facei)
1683 if (!isGoodIndex(faceIdx))
1688 const label ix = faceIdx.
x();
1689 const label iy = faceIdx.
y();
1690 const label iz = faceIdx.
z();
1707 val = face_block(faceIdx).x();
1708 patchId = face_patch(faceIdx).x();
1722 ++n_blocked_faces(ix,iy,iz).x();
1723 sub_count(ix,iy,iz).x() = obs_count(ix,iy,iz);
1729 ++n_blocked_faces(ix-1,iy,iz).x();
1730 sub_count(ix-1,iy,iz).x() = obs_count(ix-1,iy,iz);
1738 val = face_block(faceIdx).y();
1739 patchId = face_patch(faceIdx).y();
1753 ++n_blocked_faces(ix,iy,iz).y();
1754 sub_count(ix,iy,iz).y() = obs_count(ix,iy,iz);
1760 ++n_blocked_faces(ix,iy-1,iz).y();
1761 sub_count(ix,iy-1,iz).y() = obs_count(ix,iy-1,iz);
1769 val = face_block(faceIdx).z();
1770 patchId = face_patch(faceIdx).z();
1784 ++n_blocked_faces(ix,iy,iz).z();
1785 sub_count(ix,iy,iz).z() = obs_count(ix,iy,iz);
1791 ++n_blocked_faces(ix,iy,iz-1).z();
1792 sub_count(ix,iy,iz-1).z() = obs_count(ix,iy,iz-1);
1804 else if (val > limit_par)
1813 const bool hasPolyMeshTimeDir =
isDir(casepath/
pars.timeName/
"polyMesh");
1818 / (hasPolyMeshTimeDir ?
pars.timeName :
word(
"constant"))
1822 if (!
isDir(setsDir))
1832 const word& patchName =
patches[patchi].patchName;
1836 make_header(
os,
"polyMesh/sets",
"faceSet", patchName);
1839 const auto& fnd = usedFaces.
cfind(patchi);
1841 if (fnd.good() && (*fnd).any())
1843 os <<
nl << (*fnd).toc() <<
nl;
1858 OFstream os(casepath /
"system/PDRMeshDict");
1860 make_header(
os,
"system",
"dictionary",
"PDRMeshDict");
1867 const word& patchName =
p.patchName;
1868 const word setName = patchName +
"Set";
1870 if (
p.patchType == 0)
1877 else if (
p.patchType > 0)
1879 panelNames.
append(setName);
1890 const word& patchName =
p.patchName;
1891 const word setName = patchName +
"Set";
1893 if (
p.patchType > 0)
1908 OFstream os2(casepath /
"panelList");
1916void write_blockedCellsSet
1923 const word& listName
1926 if (listName.empty())
1932 const bool hasPolyMeshTimeDir =
isDir(casepath/
pars.timeName/
"polyMesh");
1937 / (hasPolyMeshTimeDir ?
pars.timeName :
word(
"constant"))
1949 for (label celli=0; celli < meshIndexing.
nCells(); ++celli)
1953 if (!isGoodIndex(cellIdx))
1958 if (
fld(cellIdx) < limit_par)
1960 blockedCell.
set(celli);
1966 const label n_bfaces =
cmptSum(blocked);
1974 if (blocked[cmpt] > 1) ++n_bpairs;
1979 Info<<
"block " << celli <<
" from "
1980 << blocked <<
" -> ("
1981 << n_bfaces <<
' ' << n_bpairs
1988 n_bfaces >=
pars.nFacesToBlockC
1989 || n_bpairs >=
pars.nPairsToBlockC
1992 blockedCell.
set(celli);
1998 make_header(
os,
"constant/polyMesh/sets",
"cellSet", listName);
2000 if (blockedCell.
any())
2002 os << blockedCell.
toc();
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Preparation of fields for PDRFoam.
#define MIN_COUNT_FOR_SIZE
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
static const char *const typeName
Typename for Field.
A HashTable similar to std::unordered_map.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
static Ostream & writeDivider(Ostream &os)
Write the standard file section divider.
static Ostream & writeEndDivider(Ostream &os)
Write the standard end file divider.
static Ostream & writeBanner(Ostream &os, const bool noSyntaxHint=false)
Write the standard OpenFOAM file/dictionary banner.
Generic templated field type with i-j-k addressing.
A HashTable to objects of type <T> with a label key.
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
virtual int precision() const override
Get precision of output field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
virtual Ostream & endBlock()
Write end block group.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
virtual Ostream & writeKeyword(const keyType &kw)
Write the keyword followed by an appropriate indentation.
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
virtual Ostream & endEntry()
Write end entry (';') followed by newline.
Work array definitions for PDR fields.
void blockageSummary() const
Summary of the blockages.
IjkField< vector > drag_r
Directional drag from round obstacles.
IjkField< vector > betai_inv1
IjkField< vector > along_block
Longitudinal area blockage from obstacles that extend all the way through the cell in a given directi...
IjkField< scalar > v_block
Volume blockage.
IjkField< vector > area_block_r
Summed area blockage (directional) from round obstacles.
IjkField< vector > sub_count
Number of obstacles parallel to specified direction.
static void calculateAndWrite(PDRarrays &arr, const PDRmeshArrays &meshIndexing, const fileName &casepath, const UList< PDRpatchDef > &patches)
IjkField< vector > area_block_s
Summed area blockage (directional) from sharp obstacles.
const PDRblock & block() const
Reference to PDRblock.
IjkField< scalar > obs_size
Obstacle size in cell.
IjkField< Vector< bool > > dirn_block
A total directional blockage in the cell.
IjkField< scalar > obs_count
Number of obstacles in cell.
IjkField< vector > grating_count
Addition to count to account for grating comprises many bars (to get Lobs right).
IjkField< symmTensor > drag_s
Tensorial drag from sharp obstacles.
IjkField< vector > face_block
Face area blockage for face, summed from cell centre-plane to cell centre-plane.
IjkField< labelVector > face_patch
Face field for (directional) for patch Id.
IjkField< scalar > surf
Surface area in cell.
A single block x-y-z rectilinear mesh addressable as i,j,k with simplified creation....
scalar V(const label i, const label j, const label k) const
Cell volume at i,j,k position.
scalar dx(const label i) const
Cell size in x-direction at i position.
scalar dy(const label j) const
Cell size in y-direction at j position.
scalar dz(const label k) const
Cell size in z-direction at k position.
scalar width(const label i, const label j, const label k) const
Characteristic cell size at i,j,k position.
OpenFOAM/PDRblock addressing information.
label nCells() const
The number of cells.
List< labelVector > cellIndex
For each cell, the corresponding i-j-k address.
List< direction > faceOrient
For each face, the x/y/z orientation.
labelVector cellDims
The cell i-j-k addressing range.
List< labelVector > faceIndex
For each face, the corresponding i-j-k address.
label nFaces() const
The number of faces.
labelVector faceDims
The face i-j-k addressing range.
scalar blockedFacePar
Faces with area blockage greater than this are blocked.
scalar empty_lobs_fac
Lobs in empty cell is this * cube root of cell volume.
scalar maxCR
Upper limit on CR (CT also gets limited).
scalar blockedCellPoros
Cells with porosity less than this are blocked.
scalar outerCombFac
Value for outer region.
Bookkeeping for patch definitions.
A templated (N x N) square matrix of objects of <Type>, containing N*N elements, derived from Matrix.
static const SymmTensor I
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const noexcept
The number of entries in the list.
static constexpr direction nComponents
Number of components in this vector space.
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
const Cmpt & x() const noexcept
Access to the vector x component.
const Cmpt & z() const noexcept
Access to the vector z component.
const Cmpt & y() const noexcept
Access to the vector y component.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
void set(const bitSet &bitset)
Set specified bits from another bitset.
labelList toc() const
The indices of the on bits as a sorted labelList.
bool any() const
True if any bits in this bitset are set.
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
A class for handling file names.
static std::string path(const std::string &str)
Return directory path name (part before last /).
label size() const noexcept
Return the total i*j*k size.
@ BEGIN_LIST
Begin list [isseparator].
@ END_LIST
End list [isseparator].
A class for handling words, derived from Foam::string.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
const polyBoundaryMesh & patches
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionSet dimPressure
const dimensionSet dimViscosity
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Vector< label > labelVector
Vector of labels.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
bool equal(const T &a, const T &b)
Compare two values for equality.
const dimensionSet dimVelocity
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
messageStream Info
Information stream (stdout output on master, null elsewhere).
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
MinMax< scalar > scalarMinMax
A scalar min/max range.
Cmpt cmptSum(const SphericalTensor< Cmpt > &st)
Return the sum of components of a SphericalTensor.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionSet dimTemperature(0, 0, 0, 1, 0, 0, 0)
Foam::PDRparams pars
Globals for program parameters (ugly hack).
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
const dimensionSet dimMass(1, 0, 0, 0, 0, 0, 0)
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
bool isNull(const T *ptr) noexcept
True if ptr is a pointer (of type T) to the nullObject.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.