49Foam::functionObjects::thermoCoupleProbes::thermoCoupleProbes
54 const bool loadFromFiles,
60 UName_(
dict.getOrDefault<
word>(
"U",
"U")),
61 radiationFieldName_(
dict.get<
word>(
"radiationField")),
113 if (radiationFieldName_ !=
"none")
118 Tc =
p.sample(thermo_.T());
122 rhoc =
p.sample(thermo_.rho()());
123 kappac =
p.sample(thermo_.kappa()());
124 muc =
p.sample(thermo_.mu()());
125 Cpc =
p.sample(thermo_.Cp()());
152 derivatives(
x,
y, dfdt);
154 const label
n = nEqns();
156 for (label i=0; i<
n; i++)
158 for (label j=0; j<
n; j++)
170 (void) prepare(ACTION_WRITE);
172 const auto& Tfield = thermo_.T();
173 writeValues(Tfield.name(), Ttc_, Tfield.time().timeOutputValue());
176 probeDict.
add(
"Tc", Ttc_);
189 scalar dt = mesh_.time().deltaTValue();
190 scalar t = mesh_.time().value();
191 odeSolver_->solve(t, t+dt, Ttc_, dt);
203 dict.readEntry(
"rho", rho_);
204 dict.readEntry(
"Cp", Cp_);
205 dict.readEntry(
"d", d_);
206 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 autoPtr< ODESolver > New(const ODESystem &ode, const dictionary &dict)
Select null constructed.
Abstract base class for the systems of ordinary differential equations.
ODESystem()
Construct null.
label prepare(unsigned request)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Abstract base-class for fluid and solid thermodynamic properties.
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, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ) const
Find entry and assign to T val. FatalIOError if it is found and the number of tokens is incorrect,...
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
Fundamental fluid thermodynamic properties.
Abstract base-class for Time/database function objects.
const fvMesh & mesh_
Reference to the fvMesh.
Reads fields from the time directories and adds them to the mesh database for further post-processing...
const ObjectType & lookupObject(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
bool getDict(const word &entryName, dictionary &dict) const
Set dictionary, return true if set.
void setProperty(const word &entryName, const Type &value)
Add generic property.
Sample probe for temperature using a thermocouple.
const fluidThermo & thermo_
Fluid thermo reference.
scalar Cp_
Thermocouple heat capacity.
word UName_
Name of the velocity field.
scalar rho_
Thermocouple density.
virtual void jacobian(const scalar t, const scalarField &y, scalarField &dfdt, scalarSquareMatrix &dfdy) const
Calculate the Jacobian of the system.
scalar d_
Thermocouple diameter.
scalar epsilon_
Thermocouple emissivity.
word radiationFieldName_
Name of the incident radiation field.
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 the function-object operations.
scalarField Ttc_
Cached thermocouple temperature.
virtual bool write()
Write the function-object results.
virtual bool read(const dictionary &)
Read the function-object dictionary.
tmp< Field< Type > > sample(const VolumeField< Type > &) const
Sample a volume field at all locations.
Base class for sampling fields at specified internal and boundary locations.
Function object to sample fields at specified internal-mesh locations and write to file.
const internalFieldProbe & probeModel() const noexcept
Bring Base::probeModel into this class's public scope.
virtual bool read(const dictionary &)
Read the settings from the dictionary.
probes(const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false, const bool readFields=true)
Construct from Time and dictionary.
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.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
GeometricField< vector, fvPatchField, volMesh > volVectorField
void readFields(const typename GeoFieldType::Mesh &mesh, const IOobjectList &objects, const NameMatchPredicate &selectedFields, DynamicList< regIOobject * > &storedObjects)
Read the selected GeometricFields of the templated type and store on the objectRegistry.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar pow3(const dimensionedScalar &ds)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
dimensionedScalar sqrt(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
dimensionedScalar pow4(const dimensionedScalar &ds)
SquareMatrix< scalar > scalarSquareMatrix
static constexpr const zero Zero
Global zero (0).
scalarField Re(const UList< complex > &cmplx)
Extract real component.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
dimensionedScalar sigma("sigma", dimMass/sqr(dimTime), transportProperties)
dimensionedScalar Pr("Pr", dimless, laminarTransport)