49Foam::nonUniformTable::nonUniformTable
52 const dictionary&
dict
63 if (values_.size() < 2)
68 <<
" has fewer than 2 entries." <<
nl
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
114 const dictionary&
dict
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.
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
Abstract base class for thermo-physical functions.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#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.
errorManipArg< error, int > exit(error &err, const int errNo=1)
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.