33 namespace thermophysicalFunctions
39 thermophysicalFunction,
49 "Tuple2<scalar,scalar>" 64 values_(dict.
lookup(name)),
67 if (values_.size() < 2)
72 <<
" has less than 2 entries." 77 Tlow_ = values_.first().first();
78 Thigh_ = values_.last().first();
80 for(
label i = 1; i<values_.size(); i++)
82 deltaT_ =
min(deltaT_, values_[i].first() - values_[i - 1].first());
87 jumpTable_.setSize((Thigh_ - Tlow_)/deltaT_ + 1);
92 const scalar T = Tlow_ + j*deltaT_;
94 if (T > values_[i + 1].first())
122 const label i = index(p, T);
123 const scalar Ti = values_[i].first();
124 const scalar
lambda = (T - Ti)/(values_[i + 1].first() - Ti);
128 + lambda*(values_[i + 1].second() - values_[i].second());
138 const label i = index(p, T);
141 (values_[i + 1].second() - values_[i].second())
142 /(values_[i + 1].first() - values_[i].first());
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
defineTypeNameAndDebug(APIdiffCoef, 0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Macros for easy insertion into run-time selection tables.
A class for handling words, derived from string.
addToRunTimeSelectionTable(thermophysicalFunction, APIdiffCoef, dictionary)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensionedScalar lambda(laminarTransport.lookup("lambda"))
static const char *const typeName
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.