34 #define ReportLineInfo(line, file) \ 35 if (line >= 0 && !file.empty()) \ 37 Info<< " Line " << line << " of file '" << file << '\''; \ 46 const int groupTypeId,
66 for (std::size_t coli = 14; coli < columns.size(); ++coli)
69 if (!readDouble(columns[coli].str(), dummy1))
72 in_ident = buffer.substr(columns[coli].first - buffer.begin());
75 Info<<
"Identifier: " << in_ident <<
nl;
83 typeId = groupTypeId % 100;
97 double in_x, in_y, in_z;
98 double in_len, in_dia;
106 "%d %lf %lf %lf %lf %lf %d %lf",
107 &in_typeId, &in_x, &in_y, &in_z,
108 &in_len, &in_dia, &in_orient,
114 Info<<
"Expected 8 items, but read in " << nread;
115 ReportLineInfo(lineNo, inputFile);
127 vbkge = 1.0 - in_poro;
147 Info<<
"Unexpected orientation " << in_orient;
148 ReportLineInfo(lineNo, inputFile);
163 double in_x, in_y, in_z;
164 double in_len, in_theta;
166 double in_wa, in_wb, in_poro;
167 double col_11, col_12, col_14;
174 "%d %lf %lf %lf %lf %lf %d %lf %lf %lf %lf %lf %d %lf",
175 &in_typeId, &in_x, &in_y, &in_z,
176 &in_len, &in_theta, &in_orient,
177 &in_wa, &in_wb, &in_poro,
178 &col_11, &col_12, &col_13, &col_14
183 Info<<
"Expected min 10 items, but read in " << nread;
184 ReportLineInfo(lineNo, inputFile);
200 while (in_theta > 180) in_theta -= 180;
201 while (in_theta < 0) in_theta += 180;
237 Info<<
"Unexpected orientation " << in_orient;
238 ReportLineInfo(lineNo, inputFile);
276 Info<<
"... changed to type cuboid" <<
nl;
293 double in_x, in_y, in_z;
294 double in_delx, in_dely, in_delz;
295 double in_poro, in_porox, in_poroy, in_poroz;
298 double in_blowoff_time = 0;
304 "%d %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %d %lf",
305 &in_typeId, &in_x, &in_y, &in_z,
306 &in_delx, &in_dely, &in_delz,
307 &in_poro, &in_porox, &in_poroy, &in_poroz,
308 &col_12, &col_13, &in_blowoff_time
315 Info<<
"Expected 14 items, but read in " << nread;
316 ReportLineInfo(lineNo, inputFile);
325 vbkge = 1.0 - in_poro;
326 xbkge = 1.0 - in_porox;
327 ybkge = 1.0 - in_poroy;
328 zbkge = 1.0 - in_poroz;
341 Info<<
"Type " <<
typeId <<
" is porous (setting to blockage).";
342 ReportLineInfo(lineNo, inputFile);
357 <<
"RECT_PATCH without a patch name" 369 Info<<
"Type " <<
typeId <<
" has non-zero thickness.";
370 ReportLineInfo(lineNo, inputFile);
383 <<
": blowoff-type 1 not yet implemented.";
384 ReportLineInfo(lineNo, inputFile);
388 Info<<
"Type " <<
typeId <<
" has blowoff time set," 389 <<
" not set to blow off cell-by-cell";
390 ReportLineInfo(lineNo, inputFile);
403 Info<<
"Blowoff pressure (" << col_12
404 <<
") too high for blowoff type " 406 ReportLineInfo(lineNo, inputFile);
411 Info<<
"Problem with blowoff parameters";
412 ReportLineInfo(lineNo, inputFile);
413 Info<<
"Col12 " << col_12
458 Info<<
"Ignition cell type ignored";
459 ReportLineInfo(lineNo, inputFile);
465 ReportLineInfo(lineNo, inputFile);
constexpr scalar barToPa(const scalar bar) noexcept
Conversion from bar to Pa.
Cmpt cmptProduct(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
bool equal(const T &a, const T &b)
Compare two values for equality.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Unit conversion functions.
constexpr char nl
The newline '\n' character (0x0a)
scalar sortBias
Bias for position sorting.
static constexpr int maxBlowoffPressure
The max blowoff pressure [bar].
dimensionedScalar cos(const dimensionedScalar &ds)
label groupId
The group-id.
dimensionedScalar sin(const dimensionedScalar &ds)
Foam::SubStrings< StringType > splitSpace(const StringType &str)
Split string into sub-strings at whitespace (TAB, NL, VT, FF, CR, SPC)
vector point
Point is a vector.
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.
PtrList< volScalarField > & Y
vector span
The obstacle dimensions (for boxes)
messageStream Info
Information stream (stdout output on master, null elsewhere)
int typeId
The obstacle type-id.
direction orient
The x/y/z orientation (0,1,2)
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
point pt
The obstacle location.