49Foam::nonUniformTable::nonUniformTable
61 dict.readEntry(name_, values_);
63 if (values_.size() < 2)
65 FatalIOErrorInFunction(dict)
68 <<
" has fewer than 2 entries." << nl
69 << exit(FatalIOError);
72 Trange_.min() = values_.first().first();
73 Trange_.max() = values_.last().first();
75 for (label i = 1; i < values_.size(); ++i)
79 if (values_[i].first() <= values_[i-1].first())
84 <<
" out-of-order value: " << values_[i].first()
85 <<
" at index " << i <<
nl
90 deltaT_ =
min(deltaT_, values_[i].first() - values_[i-1].first());
95 jumpTable_.resize(Trange_.mag()/deltaT_ + 1);
100 const scalar
T = Trange_.min() + j*deltaT_;
102 if (
T > values_[i+1].first())
112Foam::nonUniformTable::nonUniformTable
117 nonUniformTable(
"values",
dict)
123Foam::scalar Foam::nonUniformTable::f
129 const label i = index(
p,
T);
130 const scalar Ti = values_[i].first();
131 const scalar
lambda = (
T - Ti)/(values_[i + 1].first() - Ti);
135 +
lambda*(values_[i + 1].second() - values_[i].second());
139Foam::scalar Foam::nonUniformTable::dfdT
145 const label i = index(
p,
T);
148 (values_[i + 1].second() - values_[i].second())
149 /(values_[i + 1].first() - values_[i].first());
153void Foam::nonUniformTable::writeData(Ostream&
os)
const
155 os.writeEntry(
"values", values_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
for(const label curEdgei :curPointEdges)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base class for thermo-physical functions.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
constexpr char nl
The newline '\n' character (0x0a).
dimensionedScalar lambda("lambda", dimTime/sqr(dimLength), laminarTransport)
#define forAll(list, i)
Loop across all elements in list.