From 08165a9c1e805b8b81e6a035a28947b0ba6bcab3 Mon Sep 17 00:00:00 2001 From: Henry Weller <http://cfd.direct> Date: Tue, 27 Dec 2016 14:35:39 +0000 Subject: [PATCH] Documentation updates Patch contributed by Bruno Santos Resolves patch request https://bugs.openfoam.org/view.php?id=2409 --- .../functions/Polynomial/Polynomial.H | 16 +++--- .../functions/Polynomial/polynomialFunction.H | 14 +++--- .../prghTotalPressureFvPatchScalarField.H | 3 ++ .../polynomial/polynomialSolidTransport.H | 30 ++++++++++- .../icoPolynomial/icoPolynomial.H | 27 +++++++++- .../thermo/hPolynomial/hPolynomialThermo.H | 42 ++++++++++++++-- .../logPolynomial/logPolynomialTransport.H | 50 +++++++++++++++++-- .../polynomial/polynomialTransport.H | 40 +++++++++++++-- 8 files changed, 195 insertions(+), 27 deletions(-) diff --git a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H index 2d8f11d3af..7ba6f797c9 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H +++ b/src/OpenFOAM/primitives/functions/Polynomial/Polynomial.H @@ -27,17 +27,19 @@ Class Description Polynomial templated on size (order): - poly = sum(coeff_[i]*x^i) logCoeff*log(x) + \verbatim + poly = sum(coeffs[i]*x^i) + logCoeff*log(x) + \endverbatim - where 0 \<= i \<= N + where <tt> 0 <= i <= N </tt> - integer powers, starting at zero - - value(x) to evaluate the poly for a given value - - derivative(x) returns derivative at value - - integral(x1, x2) returns integral between two scalar values - - integral() to return a new, integral coeff polynomial + - \c value(x) to evaluate the poly for a given value + - \c derivative(x) returns derivative at value + - \c integral(x1, x2) returns integral between two scalar values + - \c integral() to return a new, integral coeff polynomial - increases the size (order) - - integralMinus1() to return a new, integral coeff polynomial where + - \c integralMinus1() to return a new, integral coeff polynomial where the base poly starts at order -1 SourceFiles diff --git a/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H b/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H index 1fe767582d..500469d94f 100644 --- a/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H +++ b/src/OpenFOAM/primitives/functions/Polynomial/polynomialFunction.H @@ -27,16 +27,18 @@ Class Description Polynomial function representation - poly = logCoeff*log(x) + sum(coeff_[i]*x^i) + \verbatim + poly = logCoeff*log(x) + sum(coeffs[i]*x^i) + \endverbatim - where 0 \<= i \<= N + where <tt> 0 <= i <= N </tt> - integer powers, starting at zero - - value(x) to evaluate the poly for a given value - - integrate(x1, x2) between two scalar values - - integral() to return a new, integral coeff polynomial + - \c value(x) to evaluate the poly for a given value + - \c integrate(x1, x2) between two scalar values + - \c integral() to return a new, integral coeff polynomial - increases the size (order) - - integralMinus1() to return a new, integral coeff polynomial where + - \c integralMinus1() to return a new, integral coeff polynomial where the base poly starts at order -1 See also diff --git a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H index a284712178..a7c1516eb5 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/prghTotalPressure/prghTotalPressureFvPatchScalarField.H @@ -33,6 +33,9 @@ Description \f[ p_rgh = p - \rho g.(h - hRef) + \f] + + \f[ p = p0 - 0.5 \rho |U|^2 \f] diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H index d2f2e45fac..d55a3c6733 100644 --- a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H @@ -25,12 +25,40 @@ Class Foam::polynomialSolidTransport Description - Transport package using polynomial functions for solid kappa + Transport package using polynomial functions for solid \c kappa. + +Usage + + \table + Property | Description + kappaCoeffs<8> | Thermal conductivity polynomial coefficients + \endtable + + Example of the specification of the transport properties: + \verbatim + transport + { + kappaCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 ); + } + \endverbatim + + The polynomial expression is evaluated as so: + + \f[ + \kappa = 1000 - 0.05 T + 0.003 T^2 + \f] + +Note + Thermal conductivity polynomial coefficients evaluate to an expression in + [W/m/K]. SourceFiles polynomialSolidTransportI.H polynomialSolidTransport.C +See also + Foam::Polynomial + \*---------------------------------------------------------------------------*/ #ifndef polynomialSolidTransport_H diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index a02883a70a..80bf9e928a 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H @@ -28,10 +28,36 @@ Description Incompressible, polynomial form of equation of state, using a polynomial function for density. +Usage + \table + Property | Description + rhoCoeffs<8> | Density polynomial coefficients + \endtable + + Example of the specification of the equation of state: + \verbatim + equationOfState + { + rhoCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 ); + } + \endverbatim + + The polynomial expression is evaluated as so: + + \f[ + \rho = 1000 - 0.05 T + 0.003 T^2 + \f] + +Note + Input in [kg/m3], but internally uses [kg/m3/kmol]. + SourceFiles icoPolynomialI.H icoPolynomial.C +See also + Foam::Polynomial + \*---------------------------------------------------------------------------*/ #ifndef icoPolynomial_H @@ -98,7 +124,6 @@ class icoPolynomial // Private data //- Density polynomial coefficients - // Note: input in [kg/m3], but internally uses [kg/m3/kmol] Polynomial<PolySize> rhoCoeffs_; diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H index 9a671e77ec..e7d48a6d0d 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -26,14 +26,48 @@ Class Description Thermodynamics package templated on the equation of state, using polynomial - functions for cp, h and s + functions for \c cp, \c h and \c s. - Polynomials for h and s derived from cp + Polynomials for \c h and \c s derived from \c cp. + +Usage + + \table + Property | Description + Hf | Heat of formation + Sf | Standard entropy + CpCoeffs<8> | Specific heat at constant pressure polynomial coeffs + \endtable + + Example of the specification of the thermodynamic properties: + \verbatim + thermodynamics + { + Hf 0; + Sf 0; + CpCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 ); + } + \endverbatim + + The polynomial expression is evaluated as so: + + \f[ + Cp = 1000 - 0.05 T + 0.003 T^2 + \f] + +Note + - Heat of formation is inputted in [J/kg], but internally uses [J/kmol] + - Standard entropy is inputted in [J/kg/K], but internally uses [J/kmol/K] + - Specific heat at constant pressure polynomial coefficients evaluate to an + expression in [J/(kg.K)]. SourceFiles hPolynomialThermoI.H hPolynomialThermo.C +See also + Foam::Polynomial + \*---------------------------------------------------------------------------*/ #ifndef hPolynomialThermo_H @@ -100,14 +134,12 @@ class hPolynomialThermo // Private data //- Heat of formation - // Note: input in [J/kg], but internally uses [J/kmol] scalar Hf_; //- Standard entropy - // Note: input in [J/kg/K], but internally uses [J/kmol/K] scalar Sf_; - //- Specific heat at constant pressure polynomial coeffs [J/(kg.K)] + //- Specific heat at constant pressure polynomial coeffs Polynomial<PolySize> CpCoeffs_; //- Enthalpy polynomial coeffs - derived from cp [J/kg] diff --git a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H index b93f5348f4..65f7ba6617 100644 --- a/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/logPolynomial/logPolynomialTransport.H @@ -25,15 +25,57 @@ Class Foam::logPolynomialTransport Description - Transport package using polynomial functions of ln(T) for mu and kappa: - - ln(mu) = sum_i=1^N( a[i] * ln(T)^(i-1) ) - ln(kappa) = sum_i=1^N( b[i] * ln(T)^(i-1) ) + Transport package using polynomial functions of \c ln(T) for \c mu and + \c kappa: + + \f[ + ln(mu) = \sum_{i=1}^N \left( a[i] * ln(T)^{i-1} \right) + \f] + + \f[ + ln(kappa) = \sum_{i=1}^N \left( b[i] * ln(T)^{i-1} \right) + \f] + +Usage + + \table + Property | Description + muCoeffs<8> | Dynamic viscosity polynomial coefficients + kappaCoeffs<8> | Thermal conductivity polynomial coefficients + \endtable + + Example of the specification of the transport properties: + \verbatim + transport + { + muCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 ); + kappaCoeffs<8> ( 2000 -0.15 0.023 0 0 0 0 0 ); + } + \endverbatim + + The polynomial expressions are evaluated as so: + + \f[ + \mu = 1000 - 0.05 ln(T) + 0.003 ln(T)^2 + \f] + + \f[ + \kappa = 2000 - 0.15 ln(T) + 0.023 ln(T)^2 + \f] + +Note + - Dynamic viscosity polynomial coefficients evaluate to an expression in + [Pa.s], but internally uses [Pa.s/kmol]. + - Thermal conductivity polynomial coefficients evaluate to an expression in + [W/m/K], but internally uses [W/m/K/kmol]. SourceFiles logPolynomialTransportI.H logPolynomialTransport.C +See also + Foam::Polynomial + \*---------------------------------------------------------------------------*/ #ifndef logPolynomialTransport_H diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index 9f7be3b8e2..8f7e39b1fb 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -25,12 +25,48 @@ Class Foam::polynomialTransport Description - Transport package using polynomial functions for mu and kappa + Transport package using polynomial functions for \c mu and \c kappa. + +Usage + + \table + Property | Description + muCoeffs<8> | Dynamic viscosity polynomial coefficients + kappaCoeffs<8> | Thermal conductivity polynomial coefficients + \endtable + + Example of the specification of the transport properties: + \verbatim + transport + { + muCoeffs<8> ( 1000 -0.05 0.003 0 0 0 0 0 ); + kappaCoeffs<8> ( 2000 -0.15 0.023 0 0 0 0 0 ); + } + \endverbatim + + The polynomial expressions are evaluated as so: + + \f[ + \mu = 1000 - 0.05 T + 0.003 T^2 + \f] + + \f[ + \kappa = 2000 - 0.15 T + 0.023 T^2 + \f] + +Note + - Dynamic viscosity polynomial coefficients evaluate to an expression in + [Pa.s], but internally uses [Pa.s/kmol]. + - Thermal conductivity polynomial coefficients evaluate to an expression in + [W/m/K], but internally uses [W/m/K/kmol]. SourceFiles polynomialTransportI.H polynomialTransport.C +See also + Foam::Polynomial + \*---------------------------------------------------------------------------*/ #ifndef polynomialTransport_H @@ -95,11 +131,9 @@ class polynomialTransport // Private data //- Dynamic viscosity polynomial coefficients - // Note: input in [Pa.s], but internally uses [Pa.s/kmol] Polynomial<PolySize> muCoeffs_; //- Thermal conductivity polynomial coefficients - // Note: input in [W/m/K], but internally uses [W/m/K/kmol] Polynomial<PolySize> kappaCoeffs_; -- GitLab