39namespace functionObjects
54 const bool loadFromFiles,
60 UName_(
dict.getOrDefault<
word>(
"U",
"U")),
61 radiationFieldName_(
dict.get<
word>(
"radiationField")),
111 if (radiationFieldName_ !=
"none")
120 rhoc = this->
sample(thermo_.rho()());
121 kappac = this->
sample(thermo_.kappa()());
122 muc = this->
sample(thermo_.mu()());
123 Cpc = this->
sample(thermo_.Cp()());
137 (epsilon_*(G/4 - sigma*
pow4(
y))*area + htc*(Tc -
y)*area)
150 derivatives(
x,
y, dfdt);
152 const label
n = nEqns();
154 for (label i=0; i<
n; i++)
156 for (label j=0; j<
n; j++)
168 (void) prepare(ACTION_WRITE);
170 const auto& Tfield = thermo_.T();
171 writeValues(Tfield.name(), Ttc_, Tfield.time().timeOutputValue());
174 probeDict.
add(
"Tc", Ttc_);
175 setProperty(typeName, probeDict);
187 scalar dt = mesh_.time().deltaTValue();
188 scalar t = mesh_.time().value();
189 odeSolver_->solve(t, t+dt, Ttc_, dt);
201 dict.readEntry(
"rho", rho_);
202 dict.readEntry(
"Cp", Cp_);
203 dict.readEntry(
"d", d_);
204 dict.readEntry(
"epsilon", epsilon_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
static const char *const typeName
Typename for Field.
Minimal example by using system/controlDict.functions:
Abstract base class for the systems of ordinary differential equations.
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Abstract base-class for fluid and solid thermodynamic properties.
virtual const volScalarField & T() const
Temperature [K].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
const Type & value() const
Return const reference to value.
Fundamental fluid thermodynamic properties.
Abstract base-class for Time/database function objects.
Computes the magnitude of an input field.
Computes the power of an input volScalarField.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
bool getDict(const word &entryName, dictionary &dict) const
Set dictionary, return true if set.
Sample probe for temperature using a thermocouple.
const fluidThermo & thermo_
Fluid thermo reference.
virtual void jacobian(const scalar t, const scalarField &y, scalarField &dfdt, scalarSquareMatrix &dfdy) const
Calculate the Jacobian of the system.
autoPtr< ODESolver > odeSolver_
ODESolver.
virtual void derivatives(const scalar x, const scalarField &y, scalarField &dydx) const
Calculate the derivatives in dydx.
virtual label nEqns() const
Number of ODE's to solve.
virtual bool execute()
Execute. Evaluates the ODESolver.
scalarField Ttc_
Cached thermocouple temperature.
virtual bool write()
Sample and write.
virtual bool read(const dictionary &)
Read.
Set of locations to sample.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const word dictName("faMeshDefinition")
constexpr scalar pi(M_PI)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m2/K4].
Different types of constants.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
scalarField Re(const UList< complex > &cf)
Extract real component.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensionedScalar pow4(const dimensionedScalar &ds)
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
dimensionedScalar Pr("Pr", dimless, laminarTransport)