From 1f8c6e0f5b04975d4f868ee5157ce3f7cc548854 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Sat, 5 Jun 2021 13:07:42 +0100 Subject: [PATCH 1/6] ENH: rhoThermos: enable transport:tabulated + equationOfState:icoPolynomial --- .../basic/rhoThermo/rhoThermos.C | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C index 915511a899..a15bdbf62a 100644 --- a/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermos.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2017 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -199,6 +199,18 @@ makeThermos specie ); +makeThermos +( + rhoThermo, + heRhoThermo, + pureMixture, + tabulatedTransport, + sensibleEnthalpy, + hPolynomialThermo, + icoPolynomial, + specie +); + makeThermos ( rhoThermo, @@ -563,6 +575,18 @@ makeThermos specie ); +makeThermos +( + rhoThermo, + heRhoThermo, + pureMixture, + tabulatedTransport, + sensibleInternalEnergy, + hPolynomialThermo, + icoPolynomial, + specie +); + makeThermos ( rhoThermo, From 283c94fdd0e481ec6c60b22229502257cc8121f2 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Sat, 5 Jun 2021 14:19:55 +0100 Subject: [PATCH 2/6] ENH: RanzMarshall: generalises the Nusselt-number correlation --- .../HeatTransferModel/RanzMarshall/RanzMarshall.C | 15 ++++++++++++--- .../HeatTransferModel/RanzMarshall/RanzMarshall.H | 15 +++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C index c45e0968fa..9a3015164b 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,14 +37,22 @@ Foam::RanzMarshall::RanzMarshall CloudType& cloud ) : - HeatTransferModel(dict, cloud, typeName) + HeatTransferModel(dict, cloud, typeName), + a_(this->coeffDict().template getOrDefault("a", 2.0)), + b_(this->coeffDict().template getOrDefault("b", 0.6)), + m_(this->coeffDict().template getOrDefault("m", 1.0/2.0)), + n_(this->coeffDict().template getOrDefault("n", 1.0/3.0)) {} template Foam::RanzMarshall::RanzMarshall(const RanzMarshall& htm) : - HeatTransferModel(htm) + HeatTransferModel(htm), + a_(htm.a_), + b_(htm.b_), + m_(htm.m_), + n_(htm.n_) {} @@ -63,7 +72,7 @@ Foam::scalar Foam::RanzMarshall::Nu const scalar Pr ) const { - return 2.0 + 0.6*sqrt(Re)*cbrt(Pr); + return a_ + b_*pow(Re, m_)*pow(Pr, n_); } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H index 6377a33527..7cdaf14ca9 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,6 +54,20 @@ class RanzMarshall : public HeatTransferModel { + // Private Data + + //- Correlation coefficient + const scalar a_; + + //- Correlation coefficient + const scalar b_; + + //- Correlation exponent of particle Reynolds number + const scalar m_; + + //- Correlation exponent of Prandtl number + const scalar n_; + public: From 1911dba4d55c050e03d9dff1220d07aa79939e19 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Tue, 2 Mar 2021 10:08:37 +0000 Subject: [PATCH 3/6] DOC: lagrangian: review heat transfer models --- .../HeatTransferModel/HeatTransferModel.C | 10 +- .../HeatTransferModel/HeatTransferModel.H | 90 +++++++++++++++-- .../NoHeatTransfer/NoHeatTransfer.C | 35 +------ .../NoHeatTransfer/NoHeatTransfer.H | 54 +++++++++-- .../RanzMarshall/RanzMarshall.C | 8 +- .../RanzMarshall/RanzMarshall.H | 97 ++++++++++++++++++- 6 files changed, 226 insertions(+), 68 deletions(-) diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C index 4d7d74323a..2b6ed58ba0 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -46,7 +47,7 @@ Foam::HeatTransferModel::HeatTransferModel ) : CloudSubModelBase(owner, dict, typeName, type), - BirdCorrection_(this->coeffDict().lookup("BirdCorrection")) + BirdCorrection_(this->coeffDict().template get("BirdCorrection")) {} @@ -61,13 +62,6 @@ Foam::HeatTransferModel::HeatTransferModel {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::HeatTransferModel::~HeatTransferModel() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H index b9eb0ee48d..99576d207a 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -31,7 +31,77 @@ Group grpLagrangianIntermediateHeatTransferSubModels Description - Templated heat transfer model class + Templated class to calculate the fluid-particle heat transfer + coefficients based on a specified Nusselt-number model. + + \f[ + h = \frac{\mathrm{Nu} \, \kappa}{d_p} + \f] + where + + \vartable + h | Convective heat transfer coefficient of the flow + \mathrm{Nu} | Nusselt number + \kappa | Thermal conductivity of carrier in the film + d_p | Particle diameter + \endvartable + + Optionally, Bird-Stewart-Lightfoot correction can be applied + to correct the heat transfer coefficient for evaporation: + + \f[ + h_{corr} = h \, \frac{\beta}{ \exp(\beta) + 1 } + \f] + with + + \f[ + \beta = \frac{N \, C_p \, W}{h} + \f] + where + + \vartable + \beta | Correction factor + N | Molar flux + C_p | Specific heat capacity + W | Molecular weight + \endvartable + + Reference: + \verbatim + Bird, R. B., Stewart, W. E., & Lightfoot, E. N. (1960). + Transport phenomena. + John Wiley & Sons., New York. + DOI:10.1002/aic.690070245 + \endverbatim + +Usage + Minimal example by using \c constant/\: + \verbatim + subModels + { + heatTransferModel ; + + Coeffs + { + BirdCorrection true; + } + } + \endverbatim + + where the entries mean: + \table + Property | Description | Type | Reqd | Deflt + heatTransferModel | Type name: \ | word | yes | - + \Coeffs | Model properties | dict | cndtnl | - + BirdCorrection | Flag to apply Bird-Stewart-Lightfoot's correction to the heat transfer coefficient | bool | cndtnl | - + \endtable + + Options for the \c \ entry: + \verbatim + RanzMarshall | Ranz-Marshall correlation for Nusselt number + none | No active model + \endverbatim SourceFiles HeatTransferModel.C @@ -63,7 +133,7 @@ class HeatTransferModel { // Private Data - //- Apply Bird's correction to the htc + //- Flag to apply Bird-Stewart-Lightfoot's correction to the htc const Switch BirdCorrection_; @@ -86,6 +156,12 @@ public: ); + // Generated Methods + + //- No copy assignment + void operator=(const HeatTransferModel&) = delete; + + // Constructors //- Construct null from owner @@ -99,7 +175,7 @@ public: const word& type ); - //- Construct copy + //- Copy construct HeatTransferModel(const HeatTransferModel& htm); //- Construct and return a clone @@ -107,7 +183,7 @@ public: //- Destructor - virtual ~HeatTransferModel(); + virtual ~HeatTransferModel() = default; //- Selector @@ -121,7 +197,7 @@ public: // Member Functions //- The Bird HTC correction flag - bool BirdCorrection() const + bool BirdCorrection() const noexcept { return BirdCorrection_; } @@ -129,7 +205,7 @@ public: // Evaluation - //- Nusselt number + //- Return Nusselt number virtual scalar Nu ( const scalar Re, diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C index c1322b6380..7077771b2a 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -50,38 +51,4 @@ Foam::NoHeatTransfer::NoHeatTransfer {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::NoHeatTransfer::~NoHeatTransfer() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template -bool Foam::NoHeatTransfer::active() const -{ - return false; -} - - -template -Foam::scalar Foam::NoHeatTransfer::Nu -( - const scalar, - const scalar -) const -{ - return 0.0; -} - - -template -Foam::scalar Foam::NoHeatTransfer::Pr() const -{ - return 1.0; -} - - // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H index 34c2e9350e..efb8c85432 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H @@ -6,6 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2016 OpenFOAM Foundation + Copyright (C) 2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -30,7 +31,26 @@ Group grpLagrangianIntermediateHeatTransferSubModels Description - Dummy heat transfer model for 'none' + Nusselt-number model providing an interface to the + properties of \c HeatTransferModel without any active model. + +Usage + Minimal example by using \c constant/\: + \verbatim + subModels + { + heatTransferModel none; + } + \endverbatim + + where the entries mean: + \table + Property | Description | Type | Reqd | Deflt + heatTransferModel | Type name: none | word | yes | - + \endtable + +SourceFiles + NoHeatTransfer.C \*---------------------------------------------------------------------------*/ @@ -59,12 +79,18 @@ public: TypeName("none"); + // Generated Methods + + //- No copy assignment + void operator=(const NoHeatTransfer&) = delete; + + // Constructors //- Construct from dictionary NoHeatTransfer(const dictionary&, CloudType& owner); - //- Construct copy + //- Copy construct NoHeatTransfer(const NoHeatTransfer& im); //- Construct and return a clone @@ -78,19 +104,31 @@ public: //- Destructor - virtual ~NoHeatTransfer(); + virtual ~NoHeatTransfer() = default; // Member Functions //- Flag to indicate whether model activates heat transfer model - virtual bool active() const; + virtual bool active() const + { + return false; + } - //- Nusselt number - virtual scalar Nu(const scalar, const scalar) const; - //- Prandtl number - virtual scalar Pr() const; + // Evaluation + + //- Return Nusselt number + virtual scalar Nu(const scalar Re, const scalar Pr) const + { + return 0.0; + } + + //- Return Prandtl number + virtual scalar Pr() const + { + return 1.0; + } }; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C index 9a3015164b..adbff2fb76 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C @@ -56,13 +56,6 @@ Foam::RanzMarshall::RanzMarshall(const RanzMarshall& htm) {} -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template -Foam::RanzMarshall::~RanzMarshall() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template @@ -72,6 +65,7 @@ Foam::scalar Foam::RanzMarshall::Nu const scalar Pr ) const { + // (AOB:p. 18 below Eq. 42) return a_ + b_*pow(Re, m_)*pow(Pr, n_); } diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H index 7cdaf14ca9..bd197cd3b3 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H @@ -31,7 +31,90 @@ Group grpLagrangianIntermediateHeatTransferSubModels Description - The Ranz-Marshall correlation for heat transfer + Nusselt-number model using the empirical Ranz-Marshall correlation + to be used in modelling of the fluid-particle heat transfer coefficient: + + \f[ + \mathrm{Nu} = a + b \, \mathrm{Re}_p^{m} \, \mathrm{Pr}^{n} + \f] + with + + \f[ + \mathrm{Re}_p = + \frac{\rho_c \, | \mathbf{u}_\mathrm{rel} | \, d_p}{\mu_c} + \f] + + \f[ + \mathrm{Pr} = \frac{ C_p \, \mu_c }{ \kappa_c } + \f] + where + + \vartable + \mathrm{Nu} | Nusselt number + \mathrm{Re}_p | Particle Reynolds number + \mathrm{Pr} | Prandtl number + d_p | Particle diameter + \rho_c | Density of carrier in the film surrounding particle + \mu_c | Dynamic viscosity of carrier in the film surrounding particle + \mathbf{u}_\mathrm{rel} | Relative velocity between particle and carrier + a | Correlation coefficient + b | Correlation coefficient + m | Correlation exponent of particle Reynolds number + n | Correlation exponent of Prandtl number + C_p | Specific heat capacity + \kappa_c | Thermal conductivity of carrier in the film + \endvartable + + Reference: + \verbatim + Standard model: + Ranz, W. E., & Marshall, W. R. (1952). + Evaporation from drops - part 1. + Chem. Eng. Prog, 48, 22, pp. 141-146. + + Ranz, W. E., & Marshall, W. R. (1952). + Evaporation from drops - part 2. + Chem. Eng. Prog, 48, 4, pp. 173-180. + + Expressions (tag:AOB), p. 18: + Amsden, A. A., O'Rourke, P. J., & Butler, T. D. (1989). + KIVA-II: A computer program for chemically + reactive flows with sprays (No. LA-11560-MS). + Los Alamos National Lab.(LANL), Los Alamos, NM (United States). + DOI:10.2172/6228444 + \endverbatim + +Usage + Minimal example by using \c constant/\: + \verbatim + subModels + { + // Mandatory entries + heatTransferModel RanzMarshall; + + // Optional entries + RanzMarshallCoeffs + { + a 2.0; + b 0.6; + m 0.5; + n 0.66666; + } + } + \endverbatim + + where the entries mean: + \table + Property | Description | Type | Reqd | Deflt + heatTransferModel | Type name: RanzMarshall | word | yes | - + a | Correlation coefficient | scalar | no | 2.0 + b | Correlation coefficient | scalar | no | 0.6 + m | Correlation exponent of particle Reynolds number | scalar | no | 0.5 + n | Correlation exponent of Prandtl number | scalar | no | 1.0/3.0 + \endtable + +SourceFiles + RanzMarshall.C \*---------------------------------------------------------------------------*/ @@ -75,12 +158,18 @@ public: TypeName("RanzMarshall"); + // Generated Methods + + //- No copy assignment + void operator=(const RanzMarshall&) = delete; + + // Constructors //- Construct from dictionary RanzMarshall(const dictionary& dict, CloudType& cloud); - //- Construct copy + //- Copy construct RanzMarshall(const RanzMarshall& im); //- Construct and return a clone @@ -94,14 +183,14 @@ public: //- Destructor - virtual ~RanzMarshall(); + virtual ~RanzMarshall() = default; // Member Functions // Evaluation - //- Nusselt number + //- Return Nusselt number virtual scalar Nu ( const scalar Re, From ea0afd8a35de69217c6580b8bf0e213e24ccbbdd Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Sat, 5 Jun 2021 14:32:03 +0100 Subject: [PATCH 4/6] ENH: lagrangian: split macros for CloudFunctionObjects three macros: - makeParcelCloudFunctionObjects for kinematic parcels - makeThermoParcelCloudFunctionObjects for thermo parcels - makeReactingParcelCloudFunctionObjects for reacting parcels --- ...asicHeterogeneousReactingParcelSubmodels.C | 6 +- ...keBasicReactingMultiphaseParcelSubmodels.C | 6 +- .../makeBasicReactingParcelSubmodels.C | 6 +- .../makeBasicThermoParcelSubmodels.C | 6 +- .../makeReactingParcelCloudFunctionObjects.H | 4 +- .../makeThermoParcelCloudFunctionObjects.H | 68 +++++++++++++++++++ .../makeBasicSprayParcelSubmodels.C | 6 +- 7 files changed, 85 insertions(+), 17 deletions(-) create mode 100644 src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H diff --git a/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/makeBasicHeterogeneousReactingParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/makeBasicHeterogeneousReactingParcelSubmodels.C index c781eeb43d..6ab16be436 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/makeBasicHeterogeneousReactingParcelSubmodels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicHeterogeneousReactingParcel/makeBasicHeterogeneousReactingParcelSubmodels.C @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2018-2020 OpenCFD Ltd. + Copyright (C) 2018-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,7 +27,7 @@ License #include "basicHeterogeneousReactingCloud.H" -#include "makeParcelCloudFunctionObjects.H" +#include "makeReactingParcelCloudFunctionObjects.H" // Kinematic #include "makeThermoParcelForces.H" // thermo variant @@ -52,7 +52,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeParcelCloudFunctionObjects(basicHeterogeneousReactingCloud); +makeReactingParcelCloudFunctionObjects(basicHeterogeneousReactingCloud); // Kinematic sub-models makeThermoParcelForces(basicHeterogeneousReactingCloud); diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C index f866646f83..5b7a3623da 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingMultiphaseParcel/makeBasicReactingMultiphaseParcelSubmodels.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,7 +28,7 @@ License #include "basicReactingMultiphaseCloud.H" -#include "makeReactingParcelCloudFunctionObjects.H" // Reacting variant +#include "makeReactingParcelCloudFunctionObjects.H" // Kinematic #include "makeThermoParcelForces.H" // thermo variant @@ -56,7 +56,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeParcelCloudFunctionObjects(basicReactingMultiphaseCloud); +makeReactingParcelCloudFunctionObjects(basicReactingMultiphaseCloud); // Kinematic sub-models makeThermoParcelForces(basicReactingMultiphaseCloud); diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C index 9ae9230a56..bc7844de59 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelSubmodels.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,7 +28,7 @@ License #include "basicReactingCloud.H" -#include "makeReactingParcelCloudFunctionObjects.H" // Reacting variant +#include "makeReactingParcelCloudFunctionObjects.H" // Kinematic #include "makeThermoParcelForces.H" // thermo variant @@ -52,7 +52,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeParcelCloudFunctionObjects(basicReactingCloud); +makeReactingParcelCloudFunctionObjects(basicReactingCloud); // Kinematic sub-models makeThermoParcelForces(basicReactingCloud); diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C index e740fad685..1a360b94e1 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelSubmodels.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,7 +28,7 @@ License #include "basicThermoCloud.H" -#include "makeParcelCloudFunctionObjects.H" +#include "makeThermoParcelCloudFunctionObjects.H" // Kinematic #include "makeThermoParcelForces.H" // thermo variant @@ -48,7 +48,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeParcelCloudFunctionObjects(basicThermoCloud); +makeThermoParcelCloudFunctionObjects(basicThermoCloud); // Kinematic sub-models makeThermoParcelForces(basicThermoCloud); diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H index cd1eb439c9..a53731492c 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -46,7 +46,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define makeParcelCloudFunctionObjects(CloudType) \ +#define makeReactingParcelCloudFunctionObjects(CloudType) \ \ makeCloudFunctionObject(CloudType); \ \ diff --git a/src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H b/src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H new file mode 100644 index 0000000000..00816ea32a --- /dev/null +++ b/src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H @@ -0,0 +1,68 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#ifndef makeThermoParcelCloudFunctionObjects_H +#define makeThermoParcelCloudFunctionObjects_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "FacePostProcessing.H" +#include "ParticleCollector.H" +#include "ParticleErosion.H" +#include "ParticleTracks.H" +#include "ParticleTrap.H" +#include "PatchCollisionDensity.H" +#include "PatchInteractionFields.H" +#include "PatchPostProcessing.H" +#include "PatchParticleHistogram.H" +#include "RemoveParcels.H" +#include "VoidFraction.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeThermoParcelCloudFunctionObjects(CloudType) \ + \ + makeCloudFunctionObject(CloudType); \ + \ + makeCloudFunctionObjectType(FacePostProcessing, CloudType); \ + makeCloudFunctionObjectType(ParticleCollector, CloudType); \ + makeCloudFunctionObjectType(ParticleErosion, CloudType); \ + makeCloudFunctionObjectType(ParticleTracks, CloudType); \ + makeCloudFunctionObjectType(ParticleTrap, CloudType); \ + makeCloudFunctionObjectType(PatchCollisionDensity, CloudType); \ + makeCloudFunctionObjectType(PatchInteractionFields, CloudType); \ + makeCloudFunctionObjectType(PatchPostProcessing, CloudType); \ + makeCloudFunctionObjectType(PatchParticleHistogram, CloudType); \ + makeCloudFunctionObjectType(RemoveParcels, CloudType); \ + makeCloudFunctionObjectType(VoidFraction, CloudType); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/spray/parcels/derived/basicSprayParcel/makeBasicSprayParcelSubmodels.C b/src/lagrangian/spray/parcels/derived/basicSprayParcel/makeBasicSprayParcelSubmodels.C index c49daade00..67e601d559 100644 --- a/src/lagrangian/spray/parcels/derived/basicSprayParcel/makeBasicSprayParcelSubmodels.C +++ b/src/lagrangian/spray/parcels/derived/basicSprayParcel/makeBasicSprayParcelSubmodels.C @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2015 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -28,7 +28,7 @@ License #include "basicSprayCloud.H" -#include "makeReactingParcelCloudFunctionObjects.H" // Reacting variant +#include "makeReactingParcelCloudFunctionObjects.H" // Kinematic #include "makeThermoParcelForces.H" // thermo variant @@ -59,7 +59,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -makeParcelCloudFunctionObjects(basicSprayCloud); +makeReactingParcelCloudFunctionObjects(basicSprayCloud); // Kinematic sub-models makeThermoParcelForces(basicSprayCloud); From d3d82c6a2697f0d38dc1e609fbd50c0afed810b4 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Wed, 21 Apr 2021 11:37:54 +0100 Subject: [PATCH 5/6] ENH: lagrangian: add new CloudFunctionObjects New cloud function objects: - ReynoldsNumber (for kinematic parcels, i.e. KinematicReynoldsNumber) - ReynoldsNumber (for thermo/reacting parcels, i.e. ThermoReynoldsNumber) - NusseltNumber - HeatTransferCoeff --- .../include/makeParcelCloudFunctionObjects.H | 3 +- .../makeReactingParcelCloudFunctionObjects.H | 6 + .../makeThermoParcelCloudFunctionObjects.H | 8 +- .../HeatTransferCoeff/HeatTransferCoeff.C | 114 +++++++++++ .../HeatTransferCoeff/HeatTransferCoeff.H | 154 +++++++++++++++ .../KinematicReynoldsNumber.C | 100 ++++++++++ .../KinematicReynoldsNumber.H | 171 +++++++++++++++++ .../NusseltNumber/NusseltNumber.C | 114 +++++++++++ .../NusseltNumber/NusseltNumber.H | 154 +++++++++++++++ .../ThermoReynoldsNumber.C | 110 +++++++++++ .../ThermoReynoldsNumber.H | 177 ++++++++++++++++++ 11 files changed, 1109 insertions(+), 2 deletions(-) create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.C create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.H create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.C create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.H create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.C create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.H create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.C create mode 100644 src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.H diff --git a/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H b/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H index 7101579845..cc6d7b563e 100644 --- a/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H +++ b/src/lagrangian/intermediate/parcels/include/makeParcelCloudFunctionObjects.H @@ -6,7 +6,7 @@ \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2011-2018 OpenFOAM Foundation - Copyright (C) 2020 OpenCFD Ltd. + Copyright (C) 2020-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,6 +42,7 @@ License #include "PatchParticleHistogram.H" #include "RemoveParcels.H" #include "VoidFraction.H" +#include "KinematicReynoldsNumber.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H index a53731492c..bc5bb9ec07 100644 --- a/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H +++ b/src/lagrangian/intermediate/parcels/include/makeReactingParcelCloudFunctionObjects.H @@ -42,6 +42,9 @@ License #include "PatchParticleHistogram.H" #include "RemoveParcels.H" #include "VoidFraction.H" +#include "NusseltNumber.H" +#include "HeatTransferCoeff.H" +#include "ThermoReynoldsNumber.H" #include "WeberNumberReacting.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,6 +64,9 @@ License makeCloudFunctionObjectType(PatchParticleHistogram, CloudType); \ makeCloudFunctionObjectType(RemoveParcels, CloudType); \ makeCloudFunctionObjectType(VoidFraction, CloudType); \ + makeCloudFunctionObjectType(NusseltNumber, CloudType); \ + makeCloudFunctionObjectType(HeatTransferCoeff, CloudType); \ + makeCloudFunctionObjectType(ThermoReynoldsNumber, CloudType); \ makeCloudFunctionObjectType(WeberNumberReacting, CloudType); diff --git a/src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H b/src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H index 00816ea32a..635e809c8d 100644 --- a/src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H +++ b/src/lagrangian/intermediate/parcels/include/makeThermoParcelCloudFunctionObjects.H @@ -41,6 +41,9 @@ License #include "PatchParticleHistogram.H" #include "RemoveParcels.H" #include "VoidFraction.H" +#include "NusseltNumber.H" +#include "HeatTransferCoeff.H" +#include "ThermoReynoldsNumber.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -58,7 +61,10 @@ License makeCloudFunctionObjectType(PatchPostProcessing, CloudType); \ makeCloudFunctionObjectType(PatchParticleHistogram, CloudType); \ makeCloudFunctionObjectType(RemoveParcels, CloudType); \ - makeCloudFunctionObjectType(VoidFraction, CloudType); + makeCloudFunctionObjectType(VoidFraction, CloudType); \ + makeCloudFunctionObjectType(NusseltNumber, CloudType); \ + makeCloudFunctionObjectType(HeatTransferCoeff, CloudType); \ + makeCloudFunctionObjectType(ThermoReynoldsNumber, CloudType); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.C new file mode 100644 index 0000000000..ff1aa1fe90 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.C @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "HeatTransferCoeff.H" +#include "ThermoCloud.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::HeatTransferCoeff::HeatTransferCoeff +( + const dictionary& dict, + CloudType& owner, + const word& modelName +) +: + CloudFunctionObject(dict, owner, modelName, typeName) +{} + + +template +Foam::HeatTransferCoeff::HeatTransferCoeff +( + const HeatTransferCoeff& htc +) +: + CloudFunctionObject(htc) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::HeatTransferCoeff::postEvolve +( + const typename parcelType::trackingData& td +) +{ + auto& c = this->owner(); + const auto& tc = + static_cast>>&>(c); + + if (!c.template foundObject>("htc")) + { + auto* htcPtr = + new IOField + ( + IOobject + ( + "htc", + c.time().timeName(), + c, + IOobject::NO_READ + ) + ); + + htcPtr->store(); + } + + auto& htc = c.template lookupObjectRef>("htc"); + htc.setSize(c.size()); + + const auto& heatTransfer = tc.heatTransfer(); + typename parcelType::trackingData& nctd = + const_cast(td); + + label parceli = 0; + forAllConstIters(c, parcelIter) + { + const parcelType& p = parcelIter(); + + scalar Ts, rhos, mus, Pr, kappas; + p.template calcSurfaceValues + ( + c, nctd, p.T(), Ts, rhos, mus, Pr, kappas + ); + const scalar Re = p.Re(rhos, p.U(), td.Uc(), p.d(), mus); + + htc[parceli++] = heatTransfer.htc(p.d(), Re, Pr, kappas, 0); + } + + + if (c.size() && c.time().writeTime()) + { + htc.write(); + } +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.H new file mode 100644 index 0000000000..7d64fa0008 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/HeatTransferCoeff/HeatTransferCoeff.H @@ -0,0 +1,154 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::HeatTransferCoeff + +Group + grpLagrangianIntermediateFunctionObjects + +Description + Calculates and writes particle heat transfer coefficient field on the cloud. + + Operands: + \table + Operand | Type | Location + input | - | - + output file | - | - + output field | scalarField | \/lagrangian/\/htc + \endtable + +Usage + Minimal example by using \c constant/: + \verbatim + cloudFunctionObjects + { + HeatTransferCoeff1 + { + // Mandatory entries + type HeatTransferCoeff; + } + } + \endverbatim + + where the entries mean: + \table + Property | Description | Type | Reqd | Deflt + type | Type name: HeatTransferCoeff | word | yes | - + \endtable + +SourceFiles + HeatTransferCoeff.C + +\*---------------------------------------------------------------------------*/ + +#ifndef HeatTransferCoeff_H +#define HeatTransferCoeff_H + +#include "CloudFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class HeatTransferCoeff Declaration +\*---------------------------------------------------------------------------*/ + +template +class HeatTransferCoeff +: + public CloudFunctionObject +{ + // Private Data + + // Typedefs + + //- Convenience typedef for parcel type + typedef typename CloudType::parcelType parcelType; + + +public: + + //- Runtime type information + TypeName("HeatTransferCoeff"); + + + // Generated Methods + + //- No copy assignment + void operator=(const HeatTransferCoeff&) = delete; + + + // Constructors + + //- Construct from dictionary + HeatTransferCoeff + ( + const dictionary& dict, + CloudType& owner, + const word& modelName + ); + + //- Copy construct + HeatTransferCoeff(const HeatTransferCoeff& vf); + + //- Construct and return a clone + virtual autoPtr> clone() const + { + return autoPtr> + ( + new HeatTransferCoeff(*this) + ); + } + + + //- Destructor + virtual ~HeatTransferCoeff() = default; + + + // Member Functions + + //- Post-evolve hook + virtual void postEvolve(const typename parcelType::trackingData& td); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "HeatTransferCoeff.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.C new file mode 100644 index 0000000000..f73fb0f661 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.C @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "KinematicReynoldsNumber.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::KinematicReynoldsNumber::KinematicReynoldsNumber +( + const dictionary& dict, + CloudType& owner, + const word& modelName +) +: + CloudFunctionObject(dict, owner, modelName, typeName) +{} + + +template +Foam::KinematicReynoldsNumber::KinematicReynoldsNumber +( + const KinematicReynoldsNumber& re +) +: + CloudFunctionObject(re) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::KinematicReynoldsNumber::postEvolve +( + const typename parcelType::trackingData& td +) +{ + auto& c = this->owner(); + + if (!c.template foundObject>("Re")) + { + auto* RePtr = + new IOField + ( + IOobject + ( + "Re", + c.time().timeName(), + c, + IOobject::NO_READ + ) + ); + + RePtr->store(); + } + + auto& Re = c.template lookupObjectRef>("Re"); + Re.setSize(c.size()); + + label parceli = 0; + forAllConstIters(c, parcelIter) + { + const parcelType& p = parcelIter(); + + Re[parceli++] = p.Re(td); + } + + + if (c.size() && c.time().writeTime()) + { + Re.write(); + } +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.H new file mode 100644 index 0000000000..9db624cd42 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/KinematicReynoldsNumber/KinematicReynoldsNumber.H @@ -0,0 +1,171 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::KinematicReynoldsNumber + +Group + grpLagrangianIntermediateFunctionObjects + +Description + Calculates and writes particle Reynolds number field on the cloud. + The normalisation factors are calculated without thermal effects. + + \f[ + \mathrm{Re}_p = + \frac{\rho_c \, | \mathbf{u}_\mathrm{rel} | \, d_p}{\mu_c} + \f] + + \vartable + \mathrm{Re}_p | Particle Reynolds number + d_p | Particle diameter + \rho_c | Density of carrier + \mu_c | Dynamic viscosity of carrier + \mathbf{u}_\mathrm{rel} | Relative velocity between particle and carrier + \endvartable + + Operands: + \table + Operand | Type | Location + input | - | - + output file | - | - + output field | scalarField | \/lagrangian/\/kinematicRe + \endtable + +Usage + Minimal example by using \c constant/\: + \verbatim + cloudFunctions + { + KinematicReynoldsNumber1 + { + // Mandatory entries + type KinematicReynoldsNumber; + } + } + \endverbatim + + where the entries mean: + \table + Property | Description | Type | Reqd | Deflt + type | Type name: KinematicReynoldsNumber | word | yes | - + \endtable + +See also + - Foam::ThermoReynoldsNumber + +SourceFiles + KinematicReynoldsNumber.C + +\*---------------------------------------------------------------------------*/ + +#ifndef KinematicReynoldsNumber_H +#define KinematicReynoldsNumber_H + +#include "CloudFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class KinematicReynoldsNumber Declaration +\*---------------------------------------------------------------------------*/ + +template +class KinematicReynoldsNumber +: + public CloudFunctionObject +{ + // Private Data + + // Typedefs + + //- Convenience typedef for parcel type + typedef typename CloudType::parcelType parcelType; + + +public: + + //- Runtime type information + TypeName("ReynoldsNumber"); + + + // Generated Methods + + //- No copy assignment + void operator=(const KinematicReynoldsNumber&) = delete; + + + // Constructors + + //- Construct from dictionary + KinematicReynoldsNumber + ( + const dictionary& dict, + CloudType& owner, + const word& modelName + ); + + //- Copy construct + KinematicReynoldsNumber(const KinematicReynoldsNumber& vf); + + //- Construct and return a clone + virtual autoPtr> clone() const + { + return autoPtr> + ( + new KinematicReynoldsNumber(*this) + ); + } + + + //- Destructor + virtual ~KinematicReynoldsNumber() = default; + + + // Member Functions + + //- Post-evolve hook + virtual void postEvolve(const typename parcelType::trackingData& td); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "KinematicReynoldsNumber.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.C new file mode 100644 index 0000000000..142a1f1516 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.C @@ -0,0 +1,114 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "NusseltNumber.H" +#include "ThermoCloud.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::NusseltNumber::NusseltNumber +( + const dictionary& dict, + CloudType& owner, + const word& modelName +) +: + CloudFunctionObject(dict, owner, modelName, typeName) +{} + + +template +Foam::NusseltNumber::NusseltNumber +( + const NusseltNumber& nu +) +: + CloudFunctionObject(nu) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::NusseltNumber::postEvolve +( + const typename parcelType::trackingData& td +) +{ + auto& c = this->owner(); + const auto& tc = + static_cast>>&>(c); + + if (!c.template foundObject>("Nu")) + { + auto* NuPtr = + new IOField + ( + IOobject + ( + "Nu", + c.time().timeName(), + c, + IOobject::NO_READ + ) + ); + + NuPtr->store(); + } + + auto& Nu = c.template lookupObjectRef>("Nu"); + Nu.setSize(c.size()); + + const auto& heatTransfer = tc.heatTransfer(); + typename parcelType::trackingData& nctd = + const_cast(td); + + label parceli = 0; + forAllConstIters(c, parcelIter) + { + const parcelType& p = parcelIter(); + + scalar Ts, rhos, mus, Pr, kappas; + p.template calcSurfaceValues + ( + c, nctd, p.T(), Ts, rhos, mus, Pr, kappas + ); + const scalar Re = p.Re(rhos, p.U(), td.Uc(), p.d(), mus); + + Nu[parceli++] = heatTransfer.Nu(Re, Pr); + } + + + if (c.size() && c.time().writeTime()) + { + Nu.write(); + } +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.H new file mode 100644 index 0000000000..86727c39e4 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/NusseltNumber/NusseltNumber.H @@ -0,0 +1,154 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::NusseltNumber + +Group + grpLagrangianIntermediateFunctionObjects + +Description + Calculates and writes particle Nusselt number field on the cloud. + + Operands: + \table + Operand | Type | Location + input | - | - + output file | - | - + output field | scalarField | \/lagrangian/\/Nu + \endtable + +Usage + Minimal example by using \c constant/: + \verbatim + cloudFunctionObjects + { + NusseltNumber1 + { + // Mandatory entries + type NusseltNumber; + } + } + \endverbatim + + where the entries mean: + \table + Property | Description | Type | Reqd | Deflt + type | Type name: NusseltNumber | word | yes | - + \endtable + +SourceFiles + NusseltNumber.C + +\*---------------------------------------------------------------------------*/ + +#ifndef NusseltNumber_H +#define NusseltNumber_H + +#include "CloudFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class NusseltNumber Declaration +\*---------------------------------------------------------------------------*/ + +template +class NusseltNumber +: + public CloudFunctionObject +{ + // Private Data + + // Typedefs + + //- Convenience typedef for parcel type + typedef typename CloudType::parcelType parcelType; + + +public: + + //- Runtime type information + TypeName("NusseltNumber"); + + + // Generated Methods + + //- No copy assignment + void operator=(const NusseltNumber&) = delete; + + + // Constructors + + //- Construct from dictionary + NusseltNumber + ( + const dictionary& dict, + CloudType& owner, + const word& modelName + ); + + //- Copy construct + NusseltNumber(const NusseltNumber& vf); + + //- Construct and return a clone + virtual autoPtr> clone() const + { + return autoPtr> + ( + new NusseltNumber(*this) + ); + } + + + //- Destructor + virtual ~NusseltNumber() = default; + + + // Member Functions + + //- Post-evolve hook + virtual void postEvolve(const typename parcelType::trackingData& td); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "NusseltNumber.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.C b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.C new file mode 100644 index 0000000000..528b367c92 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.C @@ -0,0 +1,110 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "ThermoReynoldsNumber.H" +#include "ThermoCloud.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template +Foam::ThermoReynoldsNumber::ThermoReynoldsNumber +( + const dictionary& dict, + CloudType& owner, + const word& modelName +) +: + CloudFunctionObject(dict, owner, modelName, typeName) +{} + + +template +Foam::ThermoReynoldsNumber::ThermoReynoldsNumber +( + const ThermoReynoldsNumber& re +) +: + CloudFunctionObject(re) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template +void Foam::ThermoReynoldsNumber::postEvolve +( + const typename parcelType::trackingData& td +) +{ + auto& c = this->owner(); + + if (!c.template foundObject>("Re")) + { + auto* RePtr = + new IOField + ( + IOobject + ( + "Re", + c.time().timeName(), + c, + IOobject::NO_READ + ) + ); + + RePtr->store(); + } + + auto& Re = c.template lookupObjectRef>("Re"); + Re.setSize(c.size()); + + typename parcelType::trackingData& nctd = + const_cast(td); + + label parceli = 0; + forAllConstIters(c, parcelIter) + { + const parcelType& p = parcelIter(); + + scalar Ts, rhos, mus, Pr, kappas; + p.template calcSurfaceValues + ( + c, nctd, p.T(), Ts, rhos, mus, Pr, kappas + ); + + Re[parceli++] = p.Re(rhos, p.U(), td.Uc(), p.d(), mus); + } + + + if (c.size() && c.time().writeTime()) + { + Re.write(); + } +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.H b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.H new file mode 100644 index 0000000000..b7a922104b --- /dev/null +++ b/src/lagrangian/intermediate/submodels/CloudFunctionObjects/ThermoReynoldsNumber/ThermoReynoldsNumber.H @@ -0,0 +1,177 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::ThermoReynoldsNumber + +Group + grpLagrangianIntermediateFunctionObjects + +Description + Calculates and writes particle Reynolds number field on the cloud. + The normalisation factors are calculated with thermal effects. + + \f[ + \mathrm{Re}_p = + \frac{\rho_c \, | \mathbf{u}_\mathrm{rel} | \, d_p}{\mu_c} + \f] + + \vartable + \mathrm{Re}_p | Particle Reynolds number + d_p | Particle diameter + \rho_c | Density of carrier in the film surrounding particle + \mu_c | Dynamic viscosity of carrier in the film surrounding particle + \mathbf{u}_\mathrm{rel} | Relative velocity between particle and carrier + \endvartable + + Operands: + \table + Operand | Type | Location + input | - | - + output file | - | - + output field | scalarField | \/lagrangian/\/thermoRe + \endtable + +Usage + Minimal example by using \c constant/\: + \verbatim + cloudFunctions + { + ThermoReynoldsNumber1 + { + // Mandatory entries + type ThermoReynoldsNumber; + } + } + \endverbatim + + where the entries mean: + \table + Property | Description | Type | Reqd | Deflt + type | Type name: ThermoReynoldsNumber | word | yes | - + \endtable + +Note + - Normalisation factors \c rhoc and \c muc are based on temperature + dependent values calculated inside the film surrounding the particle + rather than freestream values; therefore, \c ThermoReynoldsNumber should not + be expected to operate with kinematic (non-thermo) applications. + +See also + - Foam::KinematicReynoldsNumber + +SourceFiles + ThermoReynoldsNumber.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ThermoReynoldsNumber_H +#define ThermoReynoldsNumber_H + +#include "CloudFunctionObject.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class ThermoReynoldsNumber Declaration +\*---------------------------------------------------------------------------*/ + +template +class ThermoReynoldsNumber +: + public CloudFunctionObject +{ + // Private Data + + // Typedefs + + //- Convenience typedef for parcel type + typedef typename CloudType::parcelType parcelType; + + +public: + + //- Runtime type information + TypeName("ReynoldsNumber"); + + + // Generated Methods + + //- No copy assignment + void operator=(const ThermoReynoldsNumber&) = delete; + + + // Constructors + + //- Construct from dictionary + ThermoReynoldsNumber + ( + const dictionary& dict, + CloudType& owner, + const word& modelName + ); + + //- Copy construct + ThermoReynoldsNumber(const ThermoReynoldsNumber& vf); + + //- Construct and return a clone + virtual autoPtr> clone() const + { + return autoPtr> + ( + new ThermoReynoldsNumber(*this) + ); + } + + + //- Destructor + virtual ~ThermoReynoldsNumber() = default; + + + // Member Functions + + //- Post-evolve hook + virtual void postEvolve(const typename parcelType::trackingData& td); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "ThermoReynoldsNumber.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // From 7788a1a01ab533f57b3a2587ce4a07b22436ae20 Mon Sep 17 00:00:00 2001 From: Kutalmis Bercin Date: Sat, 5 Jun 2021 14:39:47 +0100 Subject: [PATCH 6/6] TUT: sprayFoam: add examples for the new cloud function objects - ReynoldsNumber (thermo) - NusseltNumber - HeatTransferCoeff --- .../sprayFoam/aachenBomb/{0 => 0.orig}/N2 | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/O2 | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/T | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/U | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/Ydefault | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/alphat | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/epsilon | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/k | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/nut | 0 .../sprayFoam/aachenBomb/{0 => 0.orig}/p | 0 .../lagrangian/sprayFoam/aachenBomb/Allclean | 8 ++++++++ tutorials/lagrangian/sprayFoam/aachenBomb/Allrun | 12 ++++++++++++ .../aachenBomb/constant/sprayCloudProperties | 15 +++++++++++++++ 13 files changed, 35 insertions(+) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/N2 (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/O2 (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/T (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/U (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/Ydefault (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/alphat (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/epsilon (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/k (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/nut (100%) rename tutorials/lagrangian/sprayFoam/aachenBomb/{0 => 0.orig}/p (100%) create mode 100755 tutorials/lagrangian/sprayFoam/aachenBomb/Allclean create mode 100755 tutorials/lagrangian/sprayFoam/aachenBomb/Allrun diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/N2 b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/N2 similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/N2 rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/N2 diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/O2 b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/O2 similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/O2 rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/O2 diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/T b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/T similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/T rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/T diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/U b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/U similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/U rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/U diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/Ydefault b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/Ydefault similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/Ydefault rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/Ydefault diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/alphat b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/alphat similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/alphat rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/alphat diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/epsilon b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/epsilon similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/epsilon rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/epsilon diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/k b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/k similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/k rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/k diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/nut b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/nut similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/nut rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/nut diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/0/p b/tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/p similarity index 100% rename from tutorials/lagrangian/sprayFoam/aachenBomb/0/p rename to tutorials/lagrangian/sprayFoam/aachenBomb/0.orig/p diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/Allclean b/tutorials/lagrangian/sprayFoam/aachenBomb/Allclean new file mode 100755 index 0000000000..fb1f384730 --- /dev/null +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/Allclean @@ -0,0 +1,8 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions +#------------------------------------------------------------------------------ + +cleanCase0 + +#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/Allrun b/tutorials/lagrangian/sprayFoam/aachenBomb/Allrun new file mode 100755 index 0000000000..5f30e6c3bb --- /dev/null +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/Allrun @@ -0,0 +1,12 @@ +#!/bin/sh +cd "${0%/*}" || exit # Run from this directory +. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions +#------------------------------------------------------------------------------ + +restore0Dir + +runApplication blockMesh + +runApplication $(getApplication) + +#------------------------------------------------------------------------------ diff --git a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties index 3f780e0657..fb80eb6f6e 100644 --- a/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties +++ b/tutorials/lagrangian/sprayFoam/aachenBomb/constant/sprayCloudProperties @@ -232,6 +232,21 @@ cloudFunctions { type WeberNumber; } + + ReynoldsNumber1 + { + type ReynoldsNumber; + } + + NusseltNumber1 + { + type NusseltNumber; + } + + HeatTransferCoeff1 + { + type HeatTransferCoeff; + } }