diff --git a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C index 8a7fb290b8493a21b5cbfb24ccec1438736bfa4c..f6794e92b2a18db82f8265223e9381a2c66dc847 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C +++ b/applications/solvers/lagrangian/coalChemistryFoam/coalChemistryFoam.C @@ -38,7 +38,6 @@ Description #include "CoalCloud.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" -#include "thermoPhysicsTypes.H" #include "timeActivatedExplicitCellSource.H" #include "radiationModel.H" diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H b/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H index 0a5fd91b756b58ec1b2bbadae9b72751a1ce2813..dbd7cf9659140945f1647d73b68255bfce4b38d4 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createClouds.H @@ -1,5 +1,5 @@ Info<< "\nConstructing coal cloud" << endl; -CoalCloud<gasThermoPhysics> coalParcels +thermoCoalCloud coalParcels ( "coalCloud1", rho, diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H index 728e605e572d043b2b0158ebe8a57f5741e3fe09..2accb8e1c9a276191c08caf65185bba9b6d44a3a 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createClouds.H @@ -1,5 +1,5 @@ Info<< "\nConstructing reacting cloud" << endl; -BasicReactingCloud<icoPoly8ThermoPhysics> parcels +icoPoly8ThermoReactingCloud parcels ( "reactingCloud1", rho, diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index 4242452440dff07116b5f384867d9279e67ec436..bf0a16af28b34cc5a1d6f93309df6933d36023ff 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -46,7 +46,6 @@ Description #include "BasicReactingCloud.H" #include "rhoChemistryModel.H" #include "chemistrySolver.H" -#include "thermoPhysicsTypes.H" #include "radiationModel.H" #include "porousZones.H" #include "timeActivatedExplicitMulticomponentPointSource.H" diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H b/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H index 4ae0633ab7bc74f993286571c10f3c52f645e7e4..f3e043143cab716ea24f6c58425208e9a904bd45 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createClouds.H @@ -1,5 +1,5 @@ Info<< "\nConstructing reacting cloud" << endl; -BasicReactingCloud<gasThermoPhysics> parcels +thermoReactingCloud parcels ( "reactingCloud1", rho, diff --git a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C index 62f8f4834a93529078603ab923a7336c60a7ae90..4dfd367d0920ab2b5a15406eb1969cdcc7c80f37 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C +++ b/applications/solvers/lagrangian/reactingParcelFoam/reactingParcelFoam.C @@ -37,7 +37,6 @@ Description #include "BasicReactingCloud.H" #include "psiChemistryModel.H" #include "chemistrySolver.H" -#include "thermoPhysicsTypes.H" #include "radiationModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index c1e4b30f808a9f8015f07e57bf3eb1ceaaa61b7d..ac23db92e4d447f2c3c205c66466a828209e7c2d 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -139,7 +139,13 @@ void Foam::Cloud<ParticleType>::readFields() template<class ParticleType> void Foam::Cloud<ParticleType>::writeFields() const -{} +{ + if (this->size()) + { + const ParticleType& p = *this->first(); + ParticleType::writeFields(p.cloud()); + } +} template<class ParticleType> diff --git a/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C deleted file mode 100644 index 0f274d70bf338b8e8a45ac0ee056b439b294be16..0000000000000000000000000000000000000000 --- a/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.C +++ /dev/null @@ -1,70 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "CoalCloud.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class ThermoType> -Foam::CoalCloud<ThermoType>::CoalCloud -( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo -) -: - ReactingMultiphaseCloud<CoalParcel<ThermoType> > - ( - cloudName, - rho, - U, - g, - thermo - ) -{ - CoalParcel<ThermoType>::readFields(*this); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class ThermoType> -Foam::CoalCloud<ThermoType>::~CoalCloud() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class ThermoType> -void Foam::CoalCloud<ThermoType>::writeFields() const -{ - CoalParcel<ThermoType>::writeFields(*this); -} - - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H index 8516508d8b317ea68a462d4bc3832fd05e0a5b43..0ca7aa497ca4f5ca50745b1f88180835c6a7b3ba 100644 --- a/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H +++ b/src/lagrangian/coalCombustion/CoalCloud/CoalCloud.H @@ -26,9 +26,7 @@ Class CoalCloud Description - -SourceFiles - CoalCloud.C + Coal cloud templated on the type of carrier phase thermodynamics \*---------------------------------------------------------------------------*/ @@ -37,69 +35,21 @@ SourceFiles #include "ReactingMultiphaseCloud.H" #include "CoalParcel.H" +#include "thermoPhysicsTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { + typedef ReactingMultiphaseCloud<CoalParcel<constGasThermoPhysics> > + constThermoCoalCloud; -/*---------------------------------------------------------------------------*\ - Class CoalCloud Declaration -\*---------------------------------------------------------------------------*/ - -template<class ThermoType> -class CoalCloud -: - public ReactingMultiphaseCloud<CoalParcel<ThermoType> > -{ - // Private Member Functions - - //- Disallow default bitwise copy construct - CoalCloud(const CoalCloud&); - - //- Disallow default bitwise assignment - void operator=(const CoalCloud&); - - -public: - - //-Runtime type information - TypeName("CoalCloud"); - - - // Constructors - - //- Construct given carrier gas fields - CoalCloud - ( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo - ); + typedef ReactingMultiphaseCloud<CoalParcel<gasThermoPhysics> > + thermoCoalCloud; - - //- Destructor - ~CoalCloud(); - - - // Member Functions - - //- Write fields - virtual void writeFields() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "CoalCloud.C" -#endif + typedef ReactingMultiphaseCloud<CoalParcel<icoPoly8ThermoPhysics> > + icoPoly8ThermoCoalCloud; +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C b/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C deleted file mode 100644 index cc0fa34f49fd096cc4b831c19fdaaec8fab3abde..0000000000000000000000000000000000000000 --- a/src/lagrangian/coalCombustion/CoalCloud/defineCoalCloud.C +++ /dev/null @@ -1,38 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "createReactingCloudTypes.H" -#include "CoalCloud.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - createReactingCloudType(CoalCloud); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/coalCombustion/Make/files b/src/lagrangian/coalCombustion/Make/files index 2c7aac61ab97d66fe76fab863c8186c643d3beba..e00ab1713187833fe668441fa19284da0af5a227 100644 --- a/src/lagrangian/coalCombustion/Make/files +++ b/src/lagrangian/coalCombustion/Make/files @@ -1,6 +1,3 @@ -/* Coal cloud */ -CoalCloud/defineCoalCloud.C - /* Coal parcel and sub-models */ CoalParcel/defineCoalParcel.C CoalParcel/makeCoalParcelSubmodels.C diff --git a/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H b/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H index 7d7f95da36a1d0f7a0db56b22d6ac36e53d70aa1..f81595ad5903169c00e1d0a7b61fee09f7f4914f 100644 --- a/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H +++ b/src/lagrangian/coalCombustion/include/createCoalParcelTypes.H @@ -92,8 +92,7 @@ License ( \ ReactingMultiphaseCloud<ParcelType##ThermoType>, \ 0 \ - ); \ - defineParcelTypeNameAndDebug(CoalCloud<ParcelType##ThermoType>, 0); + ); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/dieselSpray/parcel/parcelIO.C b/src/lagrangian/dieselSpray/parcel/parcelIO.C index 4ae7bbc90ad6befee259df34c77ff20ef41ee403..f9c02933831434e092ef442c569f086a605b6ca0 100644 --- a/src/lagrangian/dieselSpray/parcel/parcelIO.C +++ b/src/lagrangian/dieselSpray/parcel/parcelIO.C @@ -96,10 +96,7 @@ Foam::parcel::parcel } -void Foam::parcel::readFields -( - Cloud<parcel>& c -) +void Foam::parcel::readFields(Cloud<parcel>& c) { if (!c.size()) { @@ -195,10 +192,7 @@ void Foam::parcel::readFields } -void Foam::parcel::writeFields -( - const Cloud<parcel>& c -) +void Foam::parcel::writeFields(const Cloud<parcel>& c) { Particle<parcel>::writeFields(c); diff --git a/src/lagrangian/dieselSpray/spray/spray.C b/src/lagrangian/dieselSpray/spray/spray.C index 1f1945ef5dbc96f88594fd632c2035bbbb03e543..8dc5ad5fe0e7dc8fbe76eff70583d4a17b8f4ed3 100644 --- a/src/lagrangian/dieselSpray/spray/spray.C +++ b/src/lagrangian/dieselSpray/spray/spray.C @@ -59,7 +59,8 @@ Foam::spray::spray const basicMultiComponentMixture& composition, const PtrList<gasThermoPhysics>& gasProperties, const dictionary&, - const dimensionedVector& g + const dimensionedVector& g, + bool readFields ) : Cloud<parcel>(U.mesh(), false), // suppress className checking on positions @@ -345,7 +346,10 @@ Foam::spray::spray } } - parcel::readFields(*this); + if (readFields) + { + parcel::readFields(*this); + } } @@ -355,12 +359,4 @@ Foam::spray::~spray() {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::spray::writeFields() const -{ - parcel::writeFields(*this); -} - - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spray/spray.H b/src/lagrangian/dieselSpray/spray/spray.H index 60127656e73dde45f4954dd690a053567af9f904..5c641ec84e852375028118b730d930626a7ac6a7 100644 --- a/src/lagrangian/dieselSpray/spray/spray.H +++ b/src/lagrangian/dieselSpray/spray/spray.H @@ -194,7 +194,8 @@ public: const basicMultiComponentMixture& composition, const PtrList<gasThermoPhysics>& gasProperties, const dictionary& thermophysicalProperties, - const dimensionedVector& g + const dimensionedVector& g, + bool readFields = true ); @@ -339,12 +340,6 @@ public: //- Return Ambient Temperature void calculateAmbientTemperature(); - - - // I/O - - //- Write fields - virtual void writeFields() const; }; diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C index 23aa3dc47823a780110e71326cdab70b9cb066db..5ac29101e59c71199ceacdd9c7c8585a97a280df 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.C @@ -28,11 +28,9 @@ License #include "BinaryCollisionModel.H" #include "WallInteractionModel.H" #include "InflowBoundaryModel.H" +#include "constants.H" -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -template<class ParcelType> -Foam::scalar Foam::DsmcCloud<ParcelType>::kb = 1.380650277e-23; +using namespace Foam::constant; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -526,7 +524,8 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud ( const word& cloudName, const volScalarField& T, - const volVectorField& U + const volVectorField& U, + bool readFields ) : Cloud<ParcelType>(T.mesh(), cloudName, false), @@ -630,6 +629,11 @@ Foam::DsmcCloud<ParcelType>::DsmcCloud { collisionSelectionRemainder_[i] = rndGen_.scalar01(); } + + if (readFields) + { + ParcelType::readFields(*this); + } } @@ -853,7 +857,7 @@ Foam::vector Foam::DsmcCloud<ParcelType>::equipartitionLinearVelocity ) { return - sqrt(kb*temperature/mass) + sqrt(physicoChemical::k.value()*temperature/mass) *vector ( rndGen_.GaussNormal(), @@ -879,7 +883,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy else if (iDof < 2.0 + SMALL && iDof > 2.0 - SMALL) { // Special case for iDof = 2, i.e. diatomics; - Ei = -log(rndGen_.scalar01())*kb*temperature; + Ei = -log(rndGen_.scalar01())*physicoChemical::k.value()*temperature; } else { @@ -897,7 +901,7 @@ Foam::scalar Foam::DsmcCloud<ParcelType>::equipartitionInternalEnergy } while (P < rndGen_.scalar01()); - Ei = energyRatio*kb*temperature; + Ei = energyRatio*physicoChemical::k.value()*temperature; } return Ei; diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H index 76b1dd7e79046022dd7869178c84dbc612211abf..c3765ba0dfccd08eed048633f144451aed099f9a 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloud.H @@ -171,12 +171,6 @@ class DsmcCloud public: - // Static data members - - //- Boltzmann constant - static scalar kb; - - // Constructors //- Construct given name and mesh, will read Parcels from file @@ -184,7 +178,8 @@ public: ( const word& cloudName, const volScalarField& T, - const volVectorField& U + const volVectorField& U, + bool readFields = true ); //- Construct given name and mesh. Used to initialise. @@ -338,6 +333,7 @@ public: scalar mass ) const; + // Sub-models //- Return reference to binary elastic collision model @@ -429,11 +425,8 @@ public: //- Evolve the cloud (move, collide) void evolve(); - //- Clear the Cloud inline void clear(); - - }; diff --git a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H index 492bc98e18d260bb8effeb949ef0bde10a805f34..1c58b87c247623989077ef6bf4897cfc609d1519 100644 --- a/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H +++ b/src/lagrangian/dsmc/clouds/Templates/DsmcCloud/DsmcCloudI.H @@ -24,7 +24,9 @@ License \*---------------------------------------------------------------------------*/ -#include "mathConstants.H" +#include "constants.H" + +using namespace Foam::constant; // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -314,7 +316,8 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed scalar mass ) const { - return 2.0*sqrt(2.0*kb*temperature/(constant::math::pi*mass)); + return + 2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(math::pi*mass)); } @@ -325,7 +328,8 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianAverageSpeed scalar mass ) const { - return 2.0*sqrt(2.0*kb*temperature/(constant::math::pi*mass)); + return + 2.0*sqrt(2.0*physicoChemical::k.value()*temperature/(math::pi*mass)); } @@ -336,7 +340,7 @@ inline Foam::scalar Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed scalar mass ) const { - return sqrt(3.0*kb*temperature/mass); + return sqrt(3.0*physicoChemical::k.value()*temperature/mass); } @@ -347,7 +351,7 @@ inline Foam::scalarField Foam::DsmcCloud<ParcelType>::maxwellianRMSSpeed scalar mass ) const { - return sqrt(3.0*kb*temperature/mass); + return sqrt(3.0*physicoChemical::k.value()*temperature/mass); } @@ -359,7 +363,7 @@ Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed scalar mass ) const { - return sqrt(2.0*kb*temperature/mass); + return sqrt(2.0*physicoChemical::k.value()*temperature/mass); } @@ -371,7 +375,7 @@ Foam::DsmcCloud<ParcelType>::maxwellianMostProbableSpeed scalar mass ) const { - return sqrt(2.0*kb*temperature/mass); + return sqrt(2.0*physicoChemical::k.value()*temperature/mass); } diff --git a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C index 425e47a70581d9c062d591209e8dc066ddd7b6ca..7f94f3e73958af10eb1e1bae07a61ba3945978eb 100644 --- a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C +++ b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.C @@ -44,9 +44,7 @@ Foam::dsmcCloud::dsmcCloud ) : DsmcCloud<dsmcParcel>(cloudName, T, U) -{ - dsmcParcel::readFields(*this); -} +{} Foam::dsmcCloud::dsmcCloud @@ -65,11 +63,4 @@ Foam::dsmcCloud::~dsmcCloud() {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::dsmcCloud::writeFields() const -{ - dsmcParcel::writeFields(*this); -} - // ************************************************************************* // diff --git a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H index ad63aca9fcaef68e5278f5e02d7563120220a079..99343c2b3ec74faf763a08b43562dd2aac9d3086 100644 --- a/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H +++ b/src/lagrangian/dsmc/clouds/derived/dsmcCloud/dsmcCloud.H @@ -86,12 +86,6 @@ public: //- Destructor ~dsmcCloud(); - - - // Member functions - - //- Write fields - virtual void writeFields() const; }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H index d96d51584344609f421672f2f9e128450c3f7a5a..918767b1af1d961821bcaea3fd539cbe645ed6d7 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcel.H @@ -308,9 +308,9 @@ public: // I-O - static void readFields(DsmcCloud<ParcelType>& c); + static void readFields(Cloud<ParcelType>& c); - static void writeFields(const DsmcCloud<ParcelType>& c); + static void writeFields(const Cloud<ParcelType>& c); // Ostream Operator diff --git a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C index 6677591009bd879cf23747f964a81a9e8dcb7911..6e43e47508108aad14064ecf7d15d298e811814c 100644 --- a/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C +++ b/src/lagrangian/dsmc/parcels/Templates/DsmcParcel/DsmcParcelIO.C @@ -74,10 +74,7 @@ Foam::DsmcParcel<ParcelType>::DsmcParcel template<class ParcelType> -void Foam::DsmcParcel<ParcelType>::readFields -( - DsmcCloud<ParcelType>& c -) +void Foam::DsmcParcel<ParcelType>::readFields(Cloud<ParcelType>& c) { if (!c.size()) { @@ -107,10 +104,7 @@ void Foam::DsmcParcel<ParcelType>::readFields template<class ParcelType> -void Foam::DsmcParcel<ParcelType>::writeFields -( - const DsmcCloud<ParcelType>& c -) +void Foam::DsmcParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c) { Particle<ParcelType>::writeFields(c); diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C index 3ab8c5511e1ccf6114859e479003e96b0de23443..e445f7cde5b1dd52b2338078ad947692eadb9e07 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/LarsenBorgnakkeVariableHardSphere/LarsenBorgnakkeVariableHardSphere.C @@ -25,7 +25,9 @@ License \*---------------------------------------------------------------------------*/ #include "LarsenBorgnakkeVariableHardSphere.H" -#include "mathConstants.H" +#include "constants.H" + +using namespace Foam::constant; // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -157,8 +159,8 @@ Foam::scalar Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::sigmaTcR // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79 scalar sigmaTPQ = - constant::math::pi*dPQ*dPQ - *pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5) + math::pi*dPQ*dPQ + *pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5) /exp(Foam::lgamma(2.5 - omegaPQ)); return sigmaTPQ*cR; @@ -253,7 +255,7 @@ void Foam::LarsenBorgnakkeVariableHardSphere<CloudType>::collide scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta); - scalar phi = constant::math::twoPi*rndGen.scalar01(); + scalar phi = math::twoPi*rndGen.scalar01(); vector postCollisionRelU = cR diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C index 8afc892c84b7a67234154c845c21b347693b37e1..3174445ac6f02ad18650addf5bd7291b810c4a4e 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/VariableHardSphere/VariableHardSphere.C @@ -25,7 +25,9 @@ License \*---------------------------------------------------------------------------*/ #include "VariableHardSphere.H" -#include "mathConstants.H" +#include "constants.H" + +using namespace Foam::constant; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -91,8 +93,8 @@ Foam::scalar Foam::VariableHardSphere<CloudType>::sigmaTcR // calculating cross section = pi*dPQ^2, where dPQ is from Bird, eq. 4.79 scalar sigmaTPQ = - constant::math::pi*dPQ*dPQ - *pow(2.0*CloudType::kb*Tref_/(mR*cR*cR), omegaPQ - 0.5) + math::pi*dPQ*dPQ + *pow(2.0*physicoChemical::k.value()*Tref_/(mR*cR*cR), omegaPQ - 0.5) /exp(Foam::lgamma(2.5 - omegaPQ)); return sigmaTPQ*cR; @@ -126,7 +128,7 @@ void Foam::VariableHardSphere<CloudType>::collide scalar sinTheta = sqrt(1.0 - cosTheta*cosTheta); - scalar phi = constant::math::twoPi*rndGen.scalar01(); + scalar phi = math::twoPi*rndGen.scalar01(); vector postCollisionRelU = cR diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C index 5472e6c237b51f30e3c0badfc902d8ed9931a8f6..dded033d73deb96af6944d54654fe336b9e5764b 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/FreeStream/FreeStream.C @@ -25,7 +25,9 @@ License \*---------------------------------------------------------------------------*/ #include "FreeStream.H" -#include "mathConstants.H" +#include "constants.H" + +using namespace Foam::constant; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -131,7 +133,7 @@ void Foam::FreeStream<CloudType>::inflow() Random& rndGen(cloud.rndGen()); - scalar sqrtPi = sqrt(constant::math::pi); + scalar sqrtPi = sqrt(math::pi); label particlesInserted = 0; @@ -370,7 +372,7 @@ void Foam::FreeStream<CloudType>::inflow() } while (P < rndGen.scalar01()); vector U = - sqrt(CloudType::kb*faceTemperature/mass) + sqrt(physicoChemical::k.value()*faceTemperature/mass) *( rndGen.GaussNormal()*t1 + rndGen.GaussNormal()*t2 diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C index e7213561c0d2a2f2dacd103daeee8a74676c7aaf..569e9b21e625ea0a327be582c8e8bfdfa4ca7978 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/MaxwellianThermal/MaxwellianThermal.C @@ -25,6 +25,9 @@ License \*---------------------------------------------------------------------------*/ #include "MaxwellianThermal.H" +#include "constants.H" + +using namespace Foam::constant; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -108,7 +111,7 @@ void Foam::MaxwellianThermal<CloudType>::correct scalar iDof = cloud.constProps(typeId).internalDegreesOfFreedom(); U = - sqrt(CloudType::kb*T/mass) + sqrt(physicoChemical::k.value()*T/mass) *( rndGen.GaussNormal()*tw1 + rndGen.GaussNormal()*tw2 diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index 791138314619b734da0035075f4bdf801ffd71a4..270bc40e2e04ac5b6d9f1ad4c66a3474e7d84c38 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -18,13 +18,6 @@ $(BASECLOUDS)/reactingCloud/reactingCloud.C $(BASECLOUDS)/reactingMultiphaseCloud/reactingMultiphaseCloud.C -/* Cloud container/injection mechanisms */ -$(DERIVEDCLOUDS)/basicKinematicCloud/basicKinematicCloud.C -$(DERIVEDCLOUDS)/basicThermoCloud/basicThermoCloud.C -$(DERIVEDCLOUDS)/BasicReactingCloud/defineBasicReactingCloud.C -$(DERIVEDCLOUDS)/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C - - /* kinematic parcel sub-models */ KINEMATICPARCEL=$(DERIVEDPARCELS)/basicKinematicParcel $(KINEMATICPARCEL)/basicKinematicParcel.C diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index 650cb7ddcbdc9f47bb7ca2782d67d99e0d743a84..f034fbbaa3d8f5bf5706eba27e8dc6d5d332b7db 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -43,7 +43,8 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud const volScalarField& rho, const volVectorField& U, const volScalarField& mu, - const dimensionedVector& g + const dimensionedVector& g, + bool readFields ) : Cloud<ParcelType>(rho.mesh(), cloudName, false), @@ -136,7 +137,12 @@ Foam::KinematicCloud<ParcelType>::KinematicCloud mesh_, dimensionedVector("zero", dimMass*dimVelocity, vector::zero) ) -{} +{ + if (readFields) + { + ParcelType::readFields(*this); + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index ee2b3bafe2c2329048734b33fcd99d6154316a83..4d5295b08de8cd2fa3555847a17ad1bce840a56a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -204,7 +204,8 @@ public: const volScalarField& rho, const volVectorField& U, const volScalarField& mu, - const dimensionedVector& g + const dimensionedVector& g, + bool readFields = true ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index 1e58d2876cc52a74661e11277a2b933524e1d475..6f4b4bc7636628da64ef38dac695b2ba082f2ba5 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -67,10 +67,11 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo + basicThermo& thermo, + bool readFields ) : - ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo), + ThermoCloud<ParcelType>(cloudName, rho, U, g, thermo, false), reactingCloud(), constProps_(this->particleProperties()), mcCarrierThermo_ @@ -118,6 +119,11 @@ Foam::ReactingCloud<ParcelType>::ReactingCloud ) ); } + + if (readFields) + { + ParcelType::readFields(*this); + } } diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H index 74b75ea4162ed61c921b4a3eaf329ed0349fe3f3..23f579649a34984379a906f13aa32f3c4f366860 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.H @@ -152,7 +152,8 @@ public: const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo + basicThermo& thermo, + bool readFields = true ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C index 5e7dee64bcf6f593cde895c9e3f5d34220c269c7..e81aa2ee8d5d75adf30811bdb840c803580de300 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.C @@ -38,10 +38,11 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo + basicThermo& thermo, + bool readFields ) : - ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo), + ReactingCloud<ParcelType>(cloudName, rho, U, g, thermo, false), reactingMultiphaseCloud(), constProps_(this->particleProperties()), devolatilisationModel_ @@ -61,7 +62,12 @@ Foam::ReactingMultiphaseCloud<ParcelType>::ReactingMultiphaseCloud ) ), dMassDevolatilisation_(0.0) -{} +{ + if (readFields) + { + ParcelType::readFields(*this); + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H index b073308407451d7655177fa454a2e770a5c19565..61dcdf66797c144d733e7487457497e5f4f60ee2 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingMultiphaseCloud/ReactingMultiphaseCloud.H @@ -134,7 +134,8 @@ public: const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo + basicThermo& thermo, + bool readFields = true ); diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C index 0585629246ec074406f04a9d4a11c6ce077deb8c..48ef62ee1986c7d8cfbde5078b913760a5a3cb23 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.C @@ -39,7 +39,8 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo + basicThermo& thermo, + bool readFields ) : KinematicCloud<ParcelType> @@ -48,7 +49,8 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud rho, U, thermo.mu(), - g + g, + false ), thermoCloud(), constProps_(this->particleProperties()), @@ -98,7 +100,12 @@ Foam::ThermoCloud<ParcelType>::ThermoCloud this->mesh(), dimensionedScalar("zero", dimensionSet(1, 2, -2, 0, 0), 0.0) ) -{} +{ + if (readFields) + { + ParcelType::readFields(*this); + } +} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H index 151b0764117334be96ac1df2b4eb8376d0724349..793a563f5b8a3042b23f6365c544b8b704e54a7c 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/ThermoCloud/ThermoCloud.H @@ -140,7 +140,8 @@ public: const volScalarField& rho, const volVectorField& U, const dimensionedVector& g, - basicThermo& thermo + basicThermo& thermo, + bool readFields = true ); diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.C deleted file mode 100644 index e59ca18ecf7dcf98670722534fc12059f9cd6665..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.C +++ /dev/null @@ -1,70 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "BasicReactingCloud.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class ThermoType> -Foam::BasicReactingCloud<ThermoType>::BasicReactingCloud -( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo -) -: - ReactingCloud<BasicReactingParcel<ThermoType> > - ( - cloudName, - rho, - U, - g, - thermo - ) -{ - BasicReactingParcel<ThermoType>::readFields(*this); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class ThermoType> -Foam::BasicReactingCloud<ThermoType>::~BasicReactingCloud() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class ThermoType> -void Foam::BasicReactingCloud<ThermoType>::writeFields() const -{ - BasicReactingParcel<ThermoType>::writeFields(*this); -} - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H index 0dea7344a6656abfd275f4001a81ed05c5a3c8b0..7c737d1c628cca34135d9f20fc4f7baff6c1d38c 100644 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/BasicReactingCloud.H @@ -38,73 +38,21 @@ SourceFiles #include "ReactingCloud.H" #include "BasicReactingParcel.H" +#include "thermoPhysicsTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { + typedef ReactingCloud<BasicReactingParcel<constGasThermoPhysics> > + constThermoReactingCloud; -// Forward declaration of classes -template<class ThermoType> -class BasicReactingCloud; + typedef ReactingCloud<BasicReactingParcel<gasThermoPhysics> > + thermoReactingCloud; -/*---------------------------------------------------------------------------*\ - Class BasicReactingCloud Declaration -\*---------------------------------------------------------------------------*/ - -template<class ThermoType> -class BasicReactingCloud -: - public ReactingCloud<BasicReactingParcel<ThermoType> > -{ - // Private Member Functions - - //- Disallow default bitwise copy construct - BasicReactingCloud(const BasicReactingCloud&); - - //- Disallow default bitwise assignment - void operator=(const BasicReactingCloud&); - - -public: - - //- Runtime type information - TypeName("BasicReactingCloud"); - - - // Constructors - - //- Construct given carrier gas fields - BasicReactingCloud - ( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo - ); - - - //- Destructor - ~BasicReactingCloud(); - - - // Member Functions - - //- Write fields - virtual void writeFields() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "BasicReactingCloud.C" -#endif + typedef ReactingCloud<BasicReactingParcel<icoPoly8ThermoPhysics> > + icoPoly8ThermoReactingCloud; +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C deleted file mode 100644 index ca5b9e809062d6fac2137e44c146fe5c59beea21..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingCloud/defineBasicReactingCloud.C +++ /dev/null @@ -1,38 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "createReactingCloudTypes.H" -#include "BasicReactingCloud.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - createReactingCloudType(BasicReactingCloud); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C deleted file mode 100644 index 6f08db20167346b0b1fc41e9c669661c38d39861..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.C +++ /dev/null @@ -1,70 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "BasicReactingMultiphaseCloud.H" - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -template<class ThermoType> -Foam::BasicReactingMultiphaseCloud<ThermoType>::BasicReactingMultiphaseCloud -( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo -) -: - ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> > - ( - cloudName, - rho, - U, - g, - thermo - ) -{ - BasicReactingMultiphaseParcel<ThermoType>::readFields(*this); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -template<class ThermoType> -Foam::BasicReactingMultiphaseCloud<ThermoType>::~BasicReactingMultiphaseCloud() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -template<class ThermoType> -void Foam::BasicReactingMultiphaseCloud<ThermoType>::writeFields() const -{ - BasicReactingMultiphaseParcel<ThermoType>::writeFields(*this); -} - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H index 11b6fb237873433fd102c1976eb19746246bfa82..f02475a316fea3f5882ead651d7dbb52dc40600e 100644 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/BasicReactingMultiphaseCloud.H @@ -26,10 +26,8 @@ Class Foam::BasicReactingMultiphaseCloud Description - Reacting multiphase cloud templated on the type of carrier phase thermodynamics - -SourceFiles - BasicReactingMultiphaseCloud.C + Reacting multiphase cloud templated on the type of carrier phase + thermodynamics \*---------------------------------------------------------------------------*/ @@ -38,73 +36,21 @@ SourceFiles #include "ReactingMultiphaseCloud.H" #include "BasicReactingMultiphaseParcel.H" +#include "thermoPhysicsTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { + typedef ReactingMultiphaseCloud<BasicReactingParcel<constGasThermoPhysics> > + constThermoReactingMultiphaseCloud; -// Forward declaration of classes -template<class ThermoType> -class BasicReactingMultiphaseCloud; - -/*---------------------------------------------------------------------------*\ - Class BasicReactingMultiphaseCloud Declaration -\*---------------------------------------------------------------------------*/ - -template<class ThermoType> -class BasicReactingMultiphaseCloud -: - public ReactingMultiphaseCloud<BasicReactingMultiphaseParcel<ThermoType> > -{ - // Private Member Functions - - //- Disallow default bitwise copy construct - BasicReactingMultiphaseCloud(const BasicReactingMultiphaseCloud&); - - //- Disallow default bitwise assignment - void operator=(const BasicReactingMultiphaseCloud&); - - -public: - - //- Runtime type information - TypeName("BasicReactingMultiphaseCloud"); - - - // Constructors + typedef ReactingMultiphaseCloud<BasicReactingParcel<gasThermoPhysics> > + thermoReactingMultiphaseCloud; - //- Construct given carrier gas fields - BasicReactingMultiphaseCloud - ( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo - ); - - - //- Destructor - ~BasicReactingMultiphaseCloud(); - - - // Member Functions - - //- Write fields - virtual void writeFields() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository - #include "BasicReactingMultiphaseCloud.C" -#endif + typedef ReactingMultiphaseCloud<BasicReactingParcel<icoPoly8ThermoPhysics> > + icoPoly8ThermoReactingMultiphaseCloud; +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C b/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C deleted file mode 100644 index d23115997d07bccb9ef83af7ff595635db9c634a..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/clouds/derived/BasicReactingMultiphaseCloud/defineBasicReactingMultiphaseCloud.C +++ /dev/null @@ -1,38 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "createReactingCloudTypes.H" -#include "BasicReactingMultiphaseCloud.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - createReactingCloudType(BasicReactingMultiphaseCloud); -}; - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.C b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.C deleted file mode 100644 index 15ab7afdfcdf1673493fab546a2e0787aa86ab3f..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.C +++ /dev/null @@ -1,68 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "basicKinematicCloud.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(basicKinematicCloud, 0); -}; - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::basicKinematicCloud::basicKinematicCloud -( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const volScalarField& mu, - const dimensionedVector& g -) -: - KinematicCloud<basicKinematicParcel>(cloudName, rho, U, mu, g) -{ - basicKinematicParcel::readFields(*this); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::basicKinematicCloud::~basicKinematicCloud() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::basicKinematicCloud::writeFields() const -{ - basicKinematicParcel::writeFields(*this); -} - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H index 9b2c6003d318c1c413a986aed963c4ee6946ea4c..3a277e415a93425ccc0e176c3a6d1642a4186a5a 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicKinematicCloud/basicKinematicCloud.H @@ -43,56 +43,8 @@ SourceFiles namespace Foam { - -/*---------------------------------------------------------------------------*\ - Class basicKinematicCloud Declaration -\*---------------------------------------------------------------------------*/ - -class basicKinematicCloud -: - public KinematicCloud<basicKinematicParcel> -{ - // Private member functions - - //- Disallow default bitwise copy construct - basicKinematicCloud(const basicKinematicCloud&); - - //- Disallow default bitwise assignment - void operator=(const basicKinematicCloud&); - - -public: - - //- Runtime type information - TypeName("basicKinematicCloud"); - - - // Constructors - - //- Construct from components - basicKinematicCloud - ( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const volScalarField& mu, - const dimensionedVector& g - ); - - - //- Destructor - ~basicKinematicCloud(); - - - // Member functions - - //- Write fields - virtual void writeFields() const; -}; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + typedef KinematicCloud<basicKinematicParcel> basicKinematicCloud; +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.C b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.C deleted file mode 100644 index fc7ee7dc26eb80fbf66a701b839b8ef13a36fd25..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.C +++ /dev/null @@ -1,68 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "basicThermoCloud.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(basicThermoCloud, 0); -}; - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::basicThermoCloud::basicThermoCloud -( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo -) -: - ThermoCloud<basicThermoParcel>(cloudName, rho, U, g, thermo) -{ - basicThermoParcel::readFields(*this); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::basicThermoCloud::~basicThermoCloud() -{} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::basicThermoCloud::writeFields() const -{ - basicThermoParcel::writeFields(*this); -} - - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H index cbe3695d5d42f44aea195f5e4c1e67978ffe030b..c8ce18494fd05c0cc12f0f6fc0d266e2c149679f 100644 --- a/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H +++ b/src/lagrangian/intermediate/clouds/derived/basicThermoCloud/basicThermoCloud.H @@ -43,60 +43,8 @@ SourceFiles namespace Foam { - -/*---------------------------------------------------------------------------*\ - Class basicThermoCloud Declaration -\*---------------------------------------------------------------------------*/ - -class basicThermoCloud -: - public ThermoCloud<basicThermoParcel> -{ - // Private Member Functions - - //- Disallow default bitwise copy construct - basicThermoCloud - ( - const basicThermoCloud& - ); - - //- Disallow default bitwise assignment - void operator=(const basicThermoCloud&); - - -public: - - //- Runtime type information - TypeName("basicThermoCloud"); - - - // Constructors - - //- Construct given carrier gas fields - basicThermoCloud - ( - const word& cloudName, - const volScalarField& rho, - const volVectorField& U, - const dimensionedVector& g, - basicThermo& thermo - ); - - - //- Destructor - ~basicThermoCloud(); - - - // Member Functions - - //- Write fields - virtual void writeFields() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam + typedef ThermoCloud<basicThermoParcel> basicThermoCloud; +} // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H b/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H deleted file mode 100644 index 14f439e28524df4fe17cb0269b9409207e003082..0000000000000000000000000000000000000000 --- a/src/lagrangian/intermediate/clouds/include/createReactingCloudTypes.H +++ /dev/null @@ -1,50 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2008-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -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 2 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, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#ifndef createReactingCloudTypes_H -#define createReactingCloudTypes_H - -#include "thermoPhysicsTypes.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#define createReactingCloudType(CloudType) \ - \ - createReactingCloudThermoType(CloudType, constGasThermoPhysics); \ - createReactingCloudThermoType(CloudType, gasThermoPhysics); \ - createReactingCloudThermoType(CloudType, icoPoly8ThermoPhysics); - - -#define createReactingCloudThermoType(CloudType, ThermoType) \ - \ - defineTemplateTypeNameAndDebug(CloudType<ThermoType>, 0); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 973c97a2d8151beb0672b16d4fd065a54a5bf1a4..b09cac479080fe042b8a578dd27c5bc63c2fc523 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -520,10 +520,10 @@ public: // I-O //- Read - static void readFields(KinematicCloud<ParcelType>& c); + static void readFields(Cloud<ParcelType>& c); //- Write - static void writeFields(const KinematicCloud<ParcelType>& c); + static void writeFields(const Cloud<ParcelType>& c); // Ostream Operator diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C index c69199cfb7ce7887bc0ae6212057b8ac6ed3974e..637de03109e51dbd3fff9548e0af0aacf2344a5f 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C @@ -103,10 +103,7 @@ Foam::KinematicParcel<ParcelType>::KinematicParcel template<class ParcelType> -void Foam::KinematicParcel<ParcelType>::readFields -( - KinematicCloud<ParcelType>& c -) +void Foam::KinematicParcel<ParcelType>::readFields(Cloud<ParcelType>& c) { if (!c.size()) { @@ -153,10 +150,7 @@ void Foam::KinematicParcel<ParcelType>::readFields template<class ParcelType> -void Foam::KinematicParcel<ParcelType>::writeFields -( - const KinematicCloud<ParcelType>& c -) +void Foam::KinematicParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c) { Particle<ParcelType>::writeFields(c); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H index fabe2f6136de2182d8c67f1eeb7f3e312a6864b9..1bc1ee99d73136a48dbbb4311814d98148c70f44 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcel.H @@ -399,13 +399,10 @@ public: // I-O //- Read - static void readFields(ReactingMultiphaseCloud<ParcelType>& c); + static void readFields(Cloud<ParcelType>& c); //- Write - static void writeFields - ( - const ReactingMultiphaseCloud<ParcelType>& c - ); + static void writeFields(const Cloud<ParcelType>& c); // Ostream Operator diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C index 512f21e9530950563d4d71e0cfb89e1f54215000..04747d9420bcfc9891bd7083c3f4dab86339bd30 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingMultiphaseParcel/ReactingMultiphaseParcelIO.C @@ -94,14 +94,17 @@ Foam::ReactingMultiphaseParcel<ParcelType>::ReactingMultiphaseParcel template<class ParcelType> void Foam::ReactingMultiphaseParcel<ParcelType>::readFields ( - ReactingMultiphaseCloud<ParcelType>& c + Cloud<ParcelType>& cIn ) { - if (!c.size()) + if (!cIn.size()) { return; } + ReactingMultiphaseCloud<ParcelType>& c = + dynamic_cast<ReactingMultiphaseCloud<ParcelType>&>(cIn); + ReactingParcel<ParcelType>::readFields(c); // Get names and sizes for each Y... @@ -185,9 +188,12 @@ void Foam::ReactingMultiphaseParcel<ParcelType>::readFields template<class ParcelType> void Foam::ReactingMultiphaseParcel<ParcelType>::writeFields ( - const ReactingMultiphaseCloud<ParcelType>& c + const Cloud<ParcelType>& cIn ) { + const ReactingMultiphaseCloud<ParcelType>& c = + dynamic_cast<const ReactingMultiphaseCloud<ParcelType>&>(cIn); + ReactingParcel<ParcelType>::writeFields(c); label np = c.size(); diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H index c3910a46ab7523d31b8e224677ae0cf71b1c7a37..8219ec2ac7b8f49495c081074cc1e50cb94730da 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -348,10 +348,10 @@ public: // I-O //- Read - static void readFields(ReactingCloud<ParcelType>& c); + static void readFields(Cloud<ParcelType>& c); //- Write - static void writeFields(const ReactingCloud<ParcelType>& c); + static void writeFields(const Cloud<ParcelType>& c); // Ostream Operator diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C index d6591ee050ec33330e679831858e74c90202cdf7..f8bfbf24f7eb1b731193ab2e2006ec05a97ec592 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcelIO.C @@ -88,16 +88,16 @@ Foam::ReactingParcel<ParcelType>::ReactingParcel template<class ParcelType> -void Foam::ReactingParcel<ParcelType>::readFields -( - ReactingCloud<ParcelType>& c -) +void Foam::ReactingParcel<ParcelType>::readFields(Cloud<ParcelType>& cIn) { - if (!c.size()) + if (!cIn.size()) { return; } + ReactingCloud<ParcelType>& c = + dynamic_cast<ReactingCloud<ParcelType>&>(cIn); + ThermoParcel<ParcelType>::readFields(c); IOField<scalar> mass0(c.fieldIOobject("mass0", IOobject::MUST_READ)); @@ -152,9 +152,12 @@ void Foam::ReactingParcel<ParcelType>::readFields template<class ParcelType> void Foam::ReactingParcel<ParcelType>::writeFields ( - const ReactingCloud<ParcelType>& c + const Cloud<ParcelType>& cIn ) { + const ReactingCloud<ParcelType>& c = + dynamic_cast<const ReactingCloud<ParcelType>&>(cIn); + ThermoParcel<ParcelType>::writeFields(c); const label np = c.size(); diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H index f0e728bc1f638a7d1702f37c6c516026db6aba17..4bcdc437075b293754795b2fd5c122413614dc1e 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -359,10 +359,10 @@ public: // I-O //- Read - static void readFields(ThermoCloud<ParcelType>& c); + static void readFields(Cloud<ParcelType>& c); //- Write - static void writeFields(const ThermoCloud<ParcelType>& c); + static void writeFields(const Cloud<ParcelType>& c); // Ostream Operator diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C index 827b2f36f41ec7f94068c8f6a7213800d2fa26bb..b0a075af06993d553229a7016609a6802af0c11f 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcelIO.C @@ -79,10 +79,7 @@ Foam::ThermoParcel<ParcelType>::ThermoParcel template<class ParcelType> -void Foam::ThermoParcel<ParcelType>::readFields -( - ThermoCloud<ParcelType>& c -) +void Foam::ThermoParcel<ParcelType>::readFields(Cloud<ParcelType>& c) { if (!c.size()) { @@ -111,10 +108,7 @@ void Foam::ThermoParcel<ParcelType>::readFields template<class ParcelType> -void Foam::ThermoParcel<ParcelType>::writeFields -( - const ThermoCloud<ParcelType>& c -) +void Foam::ThermoParcel<ParcelType>::writeFields(const Cloud<ParcelType>& c) { KinematicParcel<ParcelType>::writeFields(c); diff --git a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H index 788763b163df63c6e173b91ce6905bd81384f758..34dd65156a90d7cc61c1f212a33f5518c37703d1 100644 --- a/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H +++ b/src/lagrangian/molecularDynamics/molecule/mdTools/temperatureAndPressure.H @@ -57,7 +57,7 @@ if (runTime.outputTime()) averageTemperature = ( - 2.0/(moleculeCloud::kb * accumulatedDOFs) + 2.0/(physicoChemical::k.value()*accumulatedDOFs) * ( accumulatedTotalLinearKE + accumulatedTotalAngularKE @@ -70,10 +70,8 @@ if (runTime.outputTime()) ( ( (accumulatedNMols/nAveragingSteps) - * - moleculeCloud::kb * averageTemperature - + - accumulatedTotalrDotfSum/(6.0 * nAveragingSteps) + *physicoChemical::k.value()*averageTemperature + + accumulatedTotalrDotfSum/(6.0*nAveragingSteps) ) / meshVolume diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H index ef2de145c464a7e5cefe15e652bcf34cd440c908..990c4af6be7ba0b06411dca560eac2f3c47c7bff 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H +++ b/src/lagrangian/molecularDynamics/molecule/molecule/molecule.H @@ -382,9 +382,12 @@ public: int& ); - static void readFields(moleculeCloud& mC); - static void writeFields(const moleculeCloud& mC); + // I-O + + static void readFields(Cloud<molecule>& mC); + + static void writeFields(const Cloud<molecule>& mC); // IOstream Operators diff --git a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C index fa2e2393048f5d88a457acf0d6385653e7ccafad..fb732c77f149688b6f8555ec36f32417ba1cc7f3 100644 --- a/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C +++ b/src/lagrangian/molecularDynamics/molecule/molecule/moleculeIO.C @@ -98,7 +98,7 @@ Foam::molecule::molecule } -void Foam::molecule::readFields(moleculeCloud& mC) +void Foam::molecule::readFields(Cloud<molecule>& mC) { if (!mC.size()) { @@ -150,7 +150,7 @@ void Foam::molecule::readFields(moleculeCloud& mC) } -void Foam::molecule::writeFields(const moleculeCloud& mC) +void Foam::molecule::writeFields(const Cloud<molecule>& mC) { Particle<molecule>::writeFields(mC); @@ -241,9 +241,10 @@ void Foam::molecule::writeFields(const moleculeCloud& mC) orientation2.write(); orientation3.write(); - mC.writeXYZ + const moleculeCloud& m = dynamic_cast<const moleculeCloud&>(mC); + m.writeXYZ ( - mC.mesh().time().timePath() + "/lagrangian" + "/moleculeCloud.xmol" + m.mesh().time().timePath() + "/lagrangian" + "/moleculeCloud.xmol" ); } diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index 40ebfba487242eb91a7e8549d3091d32958e7cc1..d51e92f4533b579cc521b55b5b3516218ae6e917 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -28,6 +28,8 @@ License #include "fvMesh.H" #include "mathConstants.H" +using namespace Foam::constant; + // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -36,13 +38,6 @@ namespace Foam defineTemplateTypeNameAndDebug(Cloud<molecule>, 0); }; -Foam::scalar Foam::moleculeCloud::kb = 1.380650277e-23; - -Foam::scalar Foam::moleculeCloud::elementaryCharge = 1.602176487e-19; - -Foam::scalar Foam::moleculeCloud::vacuumPermittivity = 8.854187817e-12; - - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::moleculeCloud::buildConstProps() @@ -103,9 +98,7 @@ void Foam::moleculeCloud::buildConstProps() void Foam::moleculeCloud::setSiteSizesAndPositions() { - iterator mol(this->begin()); - - for (mol = this->begin(); mol != this->end(); ++mol) + forAllIter(moleculeCloud, *this, mol) { const molecule::constantProperties& cP = constProps(mol().id()); @@ -123,14 +116,7 @@ void Foam::moleculeCloud::buildCellOccupancy() cellOccupancy_[cO].clear(); } - iterator mol(this->begin()); - - for - ( - mol = this->begin(); - mol != this->end(); - ++mol - ) + forAllIter(moleculeCloud, *this, mol) { cellOccupancy_[mol().cell()].append(&mol()); } @@ -225,9 +211,7 @@ void Foam::moleculeCloud::calculateTetherForce() { const tetherPotentialList& tetherPot(pot_.tetherPotentials()); - iterator mol(this->begin()); - - for (mol = this->begin(); mol != this->end(); ++mol) + forAllIter(moleculeCloud, *this, mol) { if (mol().tethered()) { @@ -252,9 +236,7 @@ void Foam::moleculeCloud::calculateTetherForce() void Foam::moleculeCloud::calculateExternalForce() { - iterator mol(this->begin()); - - for (mol = this->begin(); mol != this->end(); ++mol) + forAllIter(moleculeCloud, *this, mol) { mol().a() += pot_.gravity(); } @@ -624,11 +606,11 @@ void Foam::moleculeCloud::initialiseMolecules zoneDict.lookup("orientationAngles") ); - scalar phi(orientationAngles.x()*constant::math::pi/180.0); + scalar phi(orientationAngles.x()*math::pi/180.0); - scalar theta(orientationAngles.y()*constant::math::pi/180.0); + scalar theta(orientationAngles.y()*math::pi/180.0); - scalar psi(orientationAngles.z()*constant::math::pi/180.0); + scalar psi(orientationAngles.z()*math::pi/180.0); const tensor R ( @@ -994,11 +976,11 @@ void Foam::moleculeCloud::createMolecule { pi = equipartitionAngularMomentum(temperature, cP); - scalar phi(rndGen_.scalar01()*constant::math::twoPi); + scalar phi(rndGen_.scalar01()*math::twoPi); - scalar theta(rndGen_.scalar01()*constant::math::twoPi); + scalar theta(rndGen_.scalar01()*math::twoPi); - scalar psi(rndGen_.scalar01()*constant::math::twoPi); + scalar psi(rndGen_.scalar01()*math::twoPi); Q = tensor ( @@ -1039,9 +1021,7 @@ Foam::label Foam::moleculeCloud::nSites() const { label n = 0; - const_iterator mol(this->begin()); - - for (mol = this->begin(); mol != this->end(); ++mol) + forAllConstIter(moleculeCloud, *this, mol) { n += constProps(mol().id()).nSites(); } @@ -1055,7 +1035,8 @@ Foam::label Foam::moleculeCloud::nSites() const Foam::moleculeCloud::moleculeCloud ( const polyMesh& mesh, - const potential& pot + const potential& pot, + bool readFields ) : Cloud<molecule>(mesh, "moleculeCloud", false), @@ -1066,7 +1047,10 @@ Foam::moleculeCloud::moleculeCloud constPropList_(), rndGen_(clock::getTime()) { - molecule::readFields(*this); + if (readFields) + { + molecule::readFields(*this); + } buildConstProps(); @@ -1082,9 +1066,10 @@ Foam::moleculeCloud::moleculeCloud ( const polyMesh& mesh, const potential& pot, - const IOdictionary& mdInitialiseDict + const IOdictionary& mdInitialiseDict, + bool readFields ) - : +: Cloud<molecule>(mesh, "moleculeCloud", false), mesh_(mesh), pot_(pot), @@ -1092,7 +1077,10 @@ Foam::moleculeCloud::moleculeCloud constPropList_(), rndGen_(clock::getTime()) { - molecule::readFields(*this); + if (readFields) + { + molecule::readFields(*this); + } clear(); @@ -1126,10 +1114,8 @@ void Foam::moleculeCloud::calculateForce() { buildCellOccupancy(); - iterator mol(this->begin()); - // Set accumulated quantities to zero - for (mol = this->begin(); mol != this->end(); ++mol) + forAllIter(moleculeCloud, *this, mol) { mol().siteForces() = vector::zero; @@ -1166,9 +1152,7 @@ void Foam::moleculeCloud::applyConstraintsAndThermostats << "----------------------------------------" << endl; - iterator mol(this->begin()); - - for (mol = this->begin(); mol != this->end(); ++mol) + forAllIter(moleculeCloud, *this, mol) { mol().v() *= temperatureCorrectionFactor; @@ -1177,21 +1161,13 @@ void Foam::moleculeCloud::applyConstraintsAndThermostats } -void Foam::moleculeCloud::writeFields() const -{ - molecule::writeFields(*this); -} - - void Foam::moleculeCloud::writeXYZ(const fileName& fName) const { OFstream str(fName); str << nSites() << nl << "moleculeCloud site positions in angstroms" << nl; - const_iterator mol(this->begin()); - - for (mol = this->begin(); mol != this->end(); ++mol) + forAllConstIter(moleculeCloud, *this, mol) { const molecule::constantProperties& cP = constProps(mol().id()); diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H index 6863227c12ceb43c81f07e51e7dea4b1bc2ee5e5..81623e715f60a72db4d19708b82df2996e165fbc 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.H @@ -156,22 +156,14 @@ private: public: - // Static data members - - static scalar kb; - - static scalar elementaryCharge; - - static scalar vacuumPermittivity; - - // Constructors //- Construct given mesh and potential references moleculeCloud ( const polyMesh& mesh, - const potential& pot + const potential& pot, + bool readFields = true ); //- Construct given mesh, potential and mdInitialiseDict @@ -179,7 +171,8 @@ public: ( const polyMesh& mesh, const potential& pot, - const IOdictionary& mdInitialiseDict + const IOdictionary& mdInitialiseDict, + bool readFields = true ); @@ -217,9 +210,6 @@ public: // Member Operators - //- Write fields - void writeFields() const; - //- Write molecule sites in XYZ format void writeXYZ(const fileName& fName) const; }; diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H index 94c9f49286bda8afbdbd62eef7ca2dd8cb19327e..fee67cfced40f59f4820a7ae232844502aad8d83 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloudI.H @@ -24,6 +24,10 @@ License \*---------------------------------------------------------------------------*/ +#include "constants.H" + +using namespace Foam::constant; + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // inline void Foam::moleculeCloud::evaluatePair @@ -576,7 +580,7 @@ inline Foam::vector Foam::moleculeCloud::equipartitionLinearVelocity scalar mass ) { - return sqrt(kb*temperature/mass)*vector + return sqrt(physicoChemical::k.value()*temperature/mass)*vector ( rndGen_.GaussNormal(), rndGen_.GaussNormal(), @@ -591,7 +595,7 @@ inline Foam::vector Foam::moleculeCloud::equipartitionAngularMomentum const molecule::constantProperties& cP ) { - scalar sqrtKbT = sqrt(kb*temperature); + scalar sqrtKbT = sqrt(physicoChemical::k.value()*temperature); if (cP.linearMolecule()) { diff --git a/src/lagrangian/solidParticle/solidParticleCloud.C b/src/lagrangian/solidParticle/solidParticleCloud.C index b317f75d94139b374f90c35958fee64b1bce4b46..e17f4efc606a190bc3b06e0a0e6cdc28ae8ef051 100644 --- a/src/lagrangian/solidParticle/solidParticleCloud.C +++ b/src/lagrangian/solidParticle/solidParticleCloud.C @@ -42,7 +42,8 @@ namespace Foam Foam::solidParticleCloud::solidParticleCloud ( const fvMesh& mesh, - const word& cloudName + const word& cloudName, + bool readFields ) : Cloud<solidParticle>(mesh, cloudName, false), @@ -62,7 +63,10 @@ Foam::solidParticleCloud::solidParticleCloud e_(dimensionedScalar(particleProperties_.lookup("e")).value()), mu_(dimensionedScalar(particleProperties_.lookup("mu")).value()) { - solidParticle::readFields(*this); + if (readFields) + { + solidParticle::readFields(*this); + } } @@ -84,10 +88,4 @@ void Foam::solidParticleCloud::move(const dimensionedVector& g) } -void Foam::solidParticleCloud::writeFields() const -{ - solidParticle::writeFields(*this); -} - - // ************************************************************************* // diff --git a/src/lagrangian/solidParticle/solidParticleCloud.H b/src/lagrangian/solidParticle/solidParticleCloud.H index f171007ce35311aa54cee38788c642d71a3d8f58..81675b34cd0b6a46d81bf4a2becbee4c2f3250d3 100644 --- a/src/lagrangian/solidParticle/solidParticleCloud.H +++ b/src/lagrangian/solidParticle/solidParticleCloud.H @@ -86,7 +86,8 @@ public: solidParticleCloud ( const fvMesh&, - const word& cloudName = "defaultCloud" + const word& cloudName = "defaultCloud", + bool readFields = true ); @@ -106,12 +107,6 @@ public: //- Move the particles under the influence of the given // gravitational acceleration void move(const dimensionedVector& g); - - - // Write - - //- Write fields - virtual void writeFields() const; }; diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C index 03b5a802881f37959a797ee7d662cab461da2dee..8754ed2df4789c95297e6a38a2ce203e7d909bf4 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C @@ -387,10 +387,7 @@ void Foam::streamLineParticle::hitPatch {} -void Foam::streamLineParticle::readFields -( - Cloud<streamLineParticle>& c -) +void Foam::streamLineParticle::readFields(Cloud<streamLineParticle>& c) { if (!c.size()) { @@ -426,10 +423,7 @@ void Foam::streamLineParticle::readFields } -void Foam::streamLineParticle::writeFields -( - const Cloud<streamLineParticle>& c -) +void Foam::streamLineParticle::writeFields(const Cloud<streamLineParticle>& c) { Particle<streamLineParticle>::writeFields(c); diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.C index 95a92d024acede9d4b9c4bbae8f195a89bf0e17a..51f16c91f9ad7dc5e1ced247021c3204a16bccbb 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.C @@ -26,15 +26,11 @@ License #include "streamLineParticleCloud.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0); - + defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0); }; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -42,12 +38,16 @@ defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0); Foam::streamLineParticleCloud::streamLineParticleCloud ( const polyMesh& mesh, - const word& cloudName + const word& cloudName, + bool readFields ) : Cloud<streamLineParticle>(mesh, cloudName, false) { - readFields(); + if (readFields) + { + streamLineParticle::readFields(*this); + } } @@ -62,18 +62,4 @@ Foam::streamLineParticleCloud::streamLineParticleCloud {} -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -void Foam::streamLineParticleCloud::readFields() -{ - streamLineParticle::readFields(*this); -} - - -void Foam::streamLineParticleCloud::writeFields() const -{ - streamLineParticle::writeFields(*this); -} - - // ************************************************************************* // diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H b/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H index 40171fca9d39d14abe3f4e0a77e7094f578c0a35..589412427743074683b725e2dbecb038b334d347 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticleCloud.H @@ -45,7 +45,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class streamLineCloud Declaration + Class streamLineCloud Declaration \*---------------------------------------------------------------------------*/ class streamLineParticleCloud @@ -72,7 +72,8 @@ public: streamLineParticleCloud ( const polyMesh&, - const word& cloudName = "defaultCloud" + const word& cloudName = "defaultCloud", + bool readFields = true ); //- Construct from mesh, cloud name, and a list of particles @@ -82,15 +83,6 @@ public: const word& cloudName, const IDLList<streamLineParticle>& particles ); - - - // Member Functions - - //- Read fields - virtual void readFields(); - - //- Write fields - virtual void writeFields() const; }; diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C index 8957dee17cda6ce696f191b04e79c4347f020994..eac6499043d5036b7beef61b43baf64e3d34e00b 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C @@ -29,6 +29,10 @@ License #include "dictionary.H" #include "dsmcCloud.H" +#include "constants.H" + +using namespace Foam::constant; + // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -164,7 +168,7 @@ void Foam::dsmcFields::write() obr_, IOobject::NO_READ ), - 2.0/(3.0*dsmcCloud::kb*rhoNMean) + 2.0/(3.0*physicoChemical::k.value()*rhoNMean) *(linearKEMean - 0.5*rhoMMean*(UMean & UMean)) ); @@ -178,7 +182,7 @@ void Foam::dsmcFields::write() obr_, IOobject::NO_READ ), - 2.0/(dsmcCloud::kb*iDofMean)*internalEMean + 2.0/(physicoChemical::k.value()*iDofMean)*internalEMean ); Info<< " Calculating overallT field." << endl; @@ -191,7 +195,7 @@ void Foam::dsmcFields::write() obr_, IOobject::NO_READ ), - 2.0/(dsmcCloud::kb*(3.0*rhoNMean + iDofMean)) + 2.0/(physicoChemical::k.value()*(3.0*rhoNMean + iDofMean)) *(linearKEMean - 0.5*rhoMMean*(UMean & UMean) + internalEMean) );