diff --git a/applications/utilities/mesh/manipulation/Optional/setSet/setSet.C b/applications/utilities/mesh/manipulation/Optional/setSet/setSet.C index 705ffed422f6f7dd440fdbd71dd115b8e8255152..3c3f01de93fe743590fb4f17316c049be4317d4e 100644 --- a/applications/utilities/mesh/manipulation/Optional/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/Optional/setSet/setSet.C @@ -47,7 +47,7 @@ Description #include <stdio.h> -#ifdef READLINE +#if READLINE != 0 #include <readline/readline.h> #include <readline/history.h> #endif @@ -57,7 +57,7 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#ifdef READLINE +#if READLINE != 0 static const char* historyFile = ".setSet"; #endif @@ -739,7 +739,7 @@ int main(int argc, char *argv[]) fileStreamPtr = new std::ifstream(batchFile.c_str()); } -#ifdef READLINE +#if READLINE != 0 else if (!read_history(historyFile)) { Info<< "Successfully read history from " << historyFile << endl; @@ -784,7 +784,7 @@ int main(int argc, char *argv[]) } else { -# ifdef READLINE +# if READLINE != 0 { char* linePtr = readline("readline>"); diff --git a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C index 84bca40cf87bf4456f47ff430d2e0be3d405a50f..4c09f35ae7941a46956ad8a8903388963a4d66c4 100644 --- a/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C +++ b/src/dynamicMesh/polyMeshAdder/faceCoupleInfo.C @@ -1,4 +1,4 @@ -/*---------------------------------------------------------------------------*\ +/*---------------------------------------------------------------------------* \ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | @@ -333,7 +333,7 @@ Foam::labelList Foam::faceCoupleInfo::findMappedEdges label v0 = pointMap[e[0]]; label v1 = pointMap[e[1]]; - toPatchEdges[edgeI] = + toPatchEdges[edgeI] = meshTools::findEdge ( patch.edges(), @@ -517,7 +517,7 @@ void Foam::faceCoupleInfo::setCutEdgeToPoints(const labelList& cutToMasterEdges) labelListList masterToCutEdges ( invertOneToMany - ( + ( masterPatch().nEdges(), cutToMasterEdges ) @@ -577,7 +577,7 @@ void Foam::faceCoupleInfo::setCutEdgeToPoints(const labelList& cutToMasterEdges) while (startVertI != unsplitEdge[1]) { - // Loop over all string of edges. Update + // Loop over all string of edges. Update // - startVertI : previous vertex // - startEdgeI : previous edge // and insert any points into splitPoints @@ -995,7 +995,7 @@ void Foam::faceCoupleInfo::findPerfectMatchingFaces nMatched++; } } - + mesh0Faces.setSize(nMatched); mesh1Faces.setSize(nMatched); } @@ -1050,7 +1050,7 @@ void Foam::faceCoupleInfo::findSlavesCoveringMaster point fc(f1.centre(mesh1.points())); // Search in bounding box of face only. - treeBoundBox tightest(f1.points(mesh1.points())); + treeBoundBox tightest(static_cast<const pointField&>(f1.points(mesh1.points()))); scalar tightestDist = GREAT; @@ -1509,7 +1509,7 @@ void Foam::faceCoupleInfo::perfectPointMatch // Cut faces to slave patch. bool matchedAllFaces = false; - + if (slaveFacesOrdered) { cutToSlaveFaces_ = identity(cutFaces().size()); @@ -1576,7 +1576,7 @@ void Foam::faceCoupleInfo::perfectPointMatch compactToCut // compaction map: from compacted to cut ); - + // Use compaction lists to renumber cutPoints. cutPoints_ = IndirectList<point>(cutPoints_, compactToCut)(); { @@ -1882,7 +1882,7 @@ void Foam::faceCoupleInfo::subDivisionMatch break; } } - + // All cut faces matched? forAll(cutToMasterFaces_, cutFaceI) diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index d29f2c32bfac3fc619e7cca8c2af55479ead6007..ab3933d123056df6031137fba97cb49f07253b93 100755 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -48,4 +48,8 @@ submodels/addOns/radiation/scatter/cloudScatter/cloudScatter.C IntegrationScheme/makeIntegrationSchemes.C +/* Data entries */ +submodels/IO/DataEntry/makeDataEntries.C + + LIB = $(FOAM_LIBBIN)/liblagrangianIntermediate diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C index c68238a28f944681cda6add3c301578ce71d393c..92625963e66309d27eb4672f2e7553d4d11ddb05 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -112,15 +112,13 @@ Foam::scalar Foam::KinematicCloud<ParcelType>::setNumberOfParticles { nP = pVolumeFraction*massTotal_/nParcels /(pRho*mathematicalConstant::pi/6.0*pow(pDiameter, 3)); + break; } - break; - case pbNumber: { nP = pVolumeFraction*massTotal_/(pRho*pVolume); + break; } - break; - default: { nP = 0.0; @@ -364,13 +362,10 @@ void Foam::KinematicCloud<ParcelType>::inject scalar pRho = td.constProps().rho0(); + this->injection().prepareForNextTimeStep(time0_, time); + // Number of parcels to introduce during this timestep - const label nParcels = this->injection().nParcelsToInject - ( - nInjections_, - time0_, - time - ); + const label nParcels = this->injection().nParcels(); // Return if no parcels are required if (!nParcels) @@ -380,15 +375,10 @@ void Foam::KinematicCloud<ParcelType>::inject } // Volume of particles to introduce during this timestep - scalar pVolume = this->injection().volume - ( - time0_, - time, - this->meshInfo() - ); + scalar pVolume = this->injection().volume(); // Volume fraction to introduce during this timestep - scalar pVolumeFraction = this->injection().volumeFraction(time0_, time); + scalar pVolumeFraction = this->injection().volumeFraction(); // Duration of injection period during this timestep scalar deltaT = min @@ -419,8 +409,7 @@ void Foam::KinematicCloud<ParcelType>::inject ( iParcel, timeInj, - this->meshInfo(), - rndGen_ + this->meshInfo() ); // Diameter of parcels @@ -437,7 +426,12 @@ void Foam::KinematicCloud<ParcelType>::inject ); // Velocity of parcels - vector pU = this->injection().velocity(iParcel, timeInj); + vector pU = this->injection().velocity + ( + iParcel, + timeInj, + this->meshInfo() + ); // Determine the injection cell label pCell = -1; @@ -496,8 +490,9 @@ void Foam::KinematicCloud<ParcelType>::postInjectCheck() { if (nParcelsAdded_) { - Pout<< "\n--> Cloud: " << this->name() << nl << - " Added " << nParcelsAdded_ << " new parcels" << nl << endl; + Pout<< "\n--> Cloud: " << this->name() << nl + << " Added " << nParcelsAdded_ + << " new parcels" << nl << endl; } // Reset parcel counters diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index 7a572c45c1ee1656c01840b27dcc7c2c1048bb14..f4a9dc2419f731792fd0766656ade3d97c5f6ecd 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -363,6 +363,9 @@ public: inline const InjectionModel<KinematicCloud<ParcelType> >& injection() const; + inline InjectionModel<KinematicCloud<ParcelType> >& + injection(); + //- Return reference to wall interaction model inline const WallInteractionModel<KinematicCloud<ParcelType> >& wallInteraction() const; diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 72c467e92f3ebc755bc9b3c8a02c353881628dc3..9acc55a56231451cac48daa82a4d684e9643417b 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -139,6 +139,14 @@ Foam::KinematicCloud<ParcelType>::injection() const } +template<class ParcelType> +inline Foam::InjectionModel<Foam::KinematicCloud<ParcelType> >& +Foam::KinematicCloud<ParcelType>::injection() +{ + return injectionModel_(); +} + + template<class ParcelType> inline const Foam::WallInteractionModel<Foam::KinematicCloud<ParcelType> >& Foam::KinematicCloud<ParcelType>::wallInteraction() const diff --git a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C index 5251907c13035264f0be18f6ce39aefa70ac4d79..878a7a61498eccd2de836ada08e5174ce065c65d 100644 --- a/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/ReactingCloud/ReactingCloud.C @@ -200,13 +200,10 @@ void Foam::ReactingCloud<ParcelType>::inject scalar pRho = td.constProps().rho0(); + this->injection().prepareForNextTimeStep(this->time0(), time); + // Number of parcels to introduce during this timestep - const label nParcels = this->injection().nParcelsToInject - ( - this->nInjections(), - this->time0(), - time - ); + const label nParcels = this->injection().nParcels(); // Return if no parcels are required if (!nParcels) @@ -216,19 +213,10 @@ void Foam::ReactingCloud<ParcelType>::inject } // Volume of particles to introduce during this timestep - scalar pVolume = this->injection().volume - ( - this->time0(), - time, - this->meshInfo() - ); + scalar pVolume = this->injection().volume(); // Volume fraction to introduce during this timestep - scalar pVolumeFraction = this->injection().volumeFraction - ( - this->time0(), - time - ); + scalar pVolumeFraction = this->injection().volumeFraction(); // Duration of injection period during this timestep scalar deltaT = min @@ -259,8 +247,7 @@ void Foam::ReactingCloud<ParcelType>::inject ( iParcel, timeInj, - this->meshInfo(), - this->rndGen() + this->meshInfo() ); // Diameter of parcels @@ -277,7 +264,12 @@ void Foam::ReactingCloud<ParcelType>::inject ); // Velocity of parcels - vector pU = this->injection().velocity(iParcel, timeInj); + vector pU = this->injection().velocity + ( + iParcel, + timeInj, + this->meshInfo() + ); // Determine the injection cell label pCell = -1; diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index f18423e2576aa92b3714931f0d6ce09699ac8e0d..3c21589622b03db6e51f1fec441cd81abce420dd 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -277,38 +277,58 @@ public: //- Return type id inline const label typeId() const; - //- Return diameter + //- Return const access to diameter inline const scalar d() const; - inline scalar& d(); - //- Return velocity + //- Return const access to velocity inline const vector& U() const; - inline vector& U(); - //- Return relative velocity + //- Return const access to relative velocity inline const vector& Ur() const; - inline vector& Ur(); - //- Return number of particles + //- Return const access to number of particles inline const scalar nParticle() const; - inline scalar& nParticle(); - //- Return density + //- Return const access to density inline const scalar rho() const; - inline scalar& rho(); - //- Return time spent in turbulent eddy + //- Return const access to time spent in turbulent eddy inline const scalar tTurb() const; - inline scalar& tTurb(); - //- Return turbulent velocity fluctuation + //- Return const access to turbulent velocity fluctuation inline const vector& UTurb() const; - inline vector& UTurb(); //- The nearest distance to a wall that // the particle can be in the n direction inline scalar wallImpactDistance(const vector& n) const; + + // Edit + + //- Return access to diameter + inline scalar& d(); + + //- Return access to velocity + inline vector& U(); + + //- Return access to relative velocity + inline vector& Ur(); + + //- Return access to number of particles + inline scalar& nParticle(); + + //- Return access to density + inline scalar& rho(); + + //- Return access to time spent in turbulent eddy + inline scalar& tTurb(); + + //- Return access to turbulent velocity fluctuation + inline vector& UTurb(); + + + // Helper functions + //- Return the index of the face to be used in the interpolation // routine inline label faceInterpolation() const; diff --git a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H index 3b17542cd8e96732cca36ed9f0151e8b6ff11815..cc1348e7e486bb740446704b88629b5d8ee5eff6 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ReactingParcel/ReactingParcel.H @@ -259,24 +259,37 @@ public: // Access - //- Return mass fractions of gases + //- Return const access to mass fractions of gases inline const scalarField& YGas() const; - inline scalarField& YGas(); - //- Return mass fractions of liquids + //- Return const access to mass fractions of liquids inline const scalarField& YLiquid() const; - inline scalarField& YLiquid(); - //- Return mass fractions of solids + //- Return const access to mass fractions of solids inline const scalarField& YSolid() const; - inline scalarField& YSolid(); - //- Return mass fractions of mixture + //- Return const access to mass fractions of mixture inline const scalarField& YMixture() const; - inline scalarField& YMixture(); - //- Return initial mass + //- Return const access to initial mass inline const scalar mass0() const; + + + // Edit + + //- Return access to mass fractions of gases + inline scalarField& YGas(); + + //- Return access to mass fractions of liquids + inline scalarField& YLiquid(); + + //- Return access to mass fractions of solids + inline scalarField& YSolid(); + + //- Return access to mass fractions of mixture + inline scalarField& YMixture(); + + //- Return access to initial mass inline scalar& mass0(); @@ -315,6 +328,15 @@ public: static void readFields(ReactingCloud<ParcelType>& c); static void writeFields(const ReactingCloud<ParcelType>& c); + + + // Ostream Operator + + friend Ostream& operator<< <ParcelType> + ( + Ostream&, + const ReactingParcel<ParcelType>& + ); }; diff --git a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H index c9dd564cdfc27229deca2ef15bb1f3e44f745d05..2be7e9547b492c3f5ec4a7f526fc5b49add79e22 100644 --- a/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/ThermoParcel/ThermoParcel.H @@ -249,12 +249,19 @@ public: // Access - //- Return temperature + //- Return const access to temperature inline const scalar T() const; - inline scalar& T(); - //- Return specific heat capacity + //- Return const access to specific heat capacity inline const scalar cp() const; + + + // Edit + + //- Return access to temperature + inline scalar& T(); + + //- Return access to specific heat capacity inline scalar& cp(); @@ -293,6 +300,15 @@ public: static void readFields(ThermoCloud<ParcelType>& c); static void writeFields(const ThermoCloud<ParcelType>& c); + + + // Ostream Operator + + friend Ostream& operator<< <ParcelType> + ( + Ostream&, + const ThermoParcel<ParcelType>& + ); }; diff --git a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C index 7b72076611baaf8ad74f867e97754b6ffcdf3a65..ce0444a05c6ed5d67f0a399e092fcff595fb1374 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicKinematicParcel/makeBasicKinematicParcelInjectionModels.C @@ -26,8 +26,9 @@ License #include "basicKinematicParcel.H" #include "KinematicCloud.H" -#include "ManualInjection.H" #include "NoInjection.H" +#include "ManualInjection.H" +#include "ConeInjection.H" namespace Foam { @@ -35,6 +36,12 @@ namespace Foam // Add instances of injection model to the table makeInjectionModelType + ( + NoInjection, + KinematicCloud, + basicKinematicParcel + ); + makeInjectionModelType ( ManualInjection, KinematicCloud, @@ -42,7 +49,7 @@ namespace Foam ); makeInjectionModelType ( - NoInjection, + ConeInjection, KinematicCloud, basicKinematicParcel ); diff --git a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C index 64296007dc7b98e0b16e6204dff6cec1845a32f9..3907311df71a23bca1927091b46ec96becdff66c 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicReactingParcel/makeBasicReactingParcelInjectionModels.C @@ -26,8 +26,9 @@ License #include "basicReactingParcel.H" #include "ReactingCloud.H" -#include "ManualInjection.H" #include "NoInjection.H" +#include "ManualInjection.H" +#include "ConeInjection.H" namespace Foam { @@ -35,6 +36,12 @@ namespace Foam // Add instances of injection model to the table makeInjectionModelType + ( + NoInjection, + KinematicCloud, + basicReactingParcel + ); + makeInjectionModelType ( ManualInjection, KinematicCloud, @@ -42,7 +49,7 @@ namespace Foam ); makeInjectionModelType ( - NoInjection, + ConeInjection, KinematicCloud, basicReactingParcel ); diff --git a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C index 357ba8249889166cb2b5524b37864f25ba3e7fae..849d854fe3ea01fad90782d8450c4ffbaad25ef3 100644 --- a/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C +++ b/src/lagrangian/intermediate/parcels/derived/basicThermoParcel/makeBasicThermoParcelInjectionModels.C @@ -28,6 +28,7 @@ License #include "ThermoCloud.H" #include "NoInjection.H" #include "ManualInjection.H" +#include "ConeInjection.H" namespace Foam { @@ -37,6 +38,8 @@ namespace Foam makeInjectionModelType(NoInjection, KinematicCloud, basicThermoParcel); makeInjectionModelType(ManualInjection, KinematicCloud, basicThermoParcel); + + makeInjectionModelType(ConeInjection, KinematicCloud, basicThermoParcel); }; diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C new file mode 100644 index 0000000000000000000000000000000000000000..9b896215ef0b75481dada33e344d500b07856571 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.C @@ -0,0 +1,90 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "Constant.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +Foam::Constant<Type>::Constant +( + const word& entryName, + const dictionary& dict +) +: + DataEntry<Type>(typeName, entryName, dict), + value_(this->dict_.lookup("value")) +{} + + +template<> +Foam::Constant<Foam::label>::Constant +( + const word& entryName, + const dictionary& dict +) +: + DataEntry<label>(typeName, entryName, dict), + value_(readLabel(this->dict_.lookup("value"))) +{} + + +template<> +Foam::Constant<Foam::scalar>::Constant +( + const word& entryName, + const dictionary& dict +) +: + DataEntry<scalar>(typeName, entryName, dict), + value_(readScalar(this->dict_.lookup("value"))) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +Foam::Constant<Type>::~Constant() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +Type Foam::Constant<Type>::value(const scalar x) const +{ + return value_; +} + + +template<class Type> +Type Foam::Constant<Type>::integrate(const scalar x1, const scalar x2) const +{ + return (x2 - x1)*value_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H new file mode 100644 index 0000000000000000000000000000000000000000..ee8c0757528bdd1566773ab49445df6e3132b85a --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Constant/Constant.H @@ -0,0 +1,129 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Class + Foam::Constant + +Description + Templated basic entry that holds a constant value. + + @verbatim + entry Constant + entryCoeffs + { + value 100.0; // Constant value + } + @endverbatim + +SourceFiles + Constant.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Constant_H +#define Constant_H + +#include "DataEntry.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class Constant Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class Constant +: + public DataEntry<Type> +{ + // Private data + + Type value_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + Constant(const Constant<Type>&); + + //- Disallow default bitwise assignment + void operator=(const Constant<Type>&); + + +public: + + // Runtime type information + TypeName("Constant"); + + + // Constructors + + //- Construct from dictionary + Constant + ( + const word& entryName, + const dictionary& dict + ); + + + //- Destructor + + ~Constant(); + + + // Member Functions + + //- Return constant value + Type value(const scalar) const; + + //- Integrate between two values + Type integrate(const scalar x1, const scalar x2) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<> +Constant<label>::Constant(const word& entryName, const dictionary& dict); + +template<> +Constant<scalar>::Constant(const word& entryName, const dictionary& dict); + + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "Constant.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C new file mode 100644 index 0000000000000000000000000000000000000000..7d189f2d84c9d6d9df8eefd72a45bed707ff72e9 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "DataEntry.H" + +// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // + +template<class Type> +Foam::DataEntry<Type>::DataEntry +( + const word& typeName, + const word& entryName, + const dictionary& dict +) +: + dict_(dict.subDict(entryName + "Coeffs")), + entry_(entryName) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +Foam::DataEntry<Type>::~DataEntry() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +const Foam::dictionary& Foam::DataEntry<Type>::dict() const +{ + return dict_; +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H new file mode 100644 index 0000000000000000000000000000000000000000..6c8959f96df7bd7a668f54081474b1403a1e557f --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H @@ -0,0 +1,170 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Class + Foam::DataEntry + +Description + +SourceFiles + DataEntry.C + NewDataEntry.C + +\*---------------------------------------------------------------------------*/ + +#ifndef DataEntry_H +#define DataEntry_H + +#include "dictionary.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class DataEntry Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class DataEntry +{ + // Private Member Functions + + //- Disallow default bitwise copy construct + DataEntry(const DataEntry<Type>&); + + //- Disallow default bitwise assignment + void operator=(const DataEntry<Type>&); + + +protected: + + // Protected data + + //- Coefficients dictionary + const dictionary dict_; + + //- Name of entry + const word entry_; + + +public: + + //- Runtime type information + TypeName("DataEntry") + + //- Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + DataEntry, + dictionary, + ( + const word& entryName, + const dictionary& dict + ), + (entryName, dict) + ); + + + // Constructor + + //- Construct from type name and dictionary + DataEntry + ( + const word& TypeName, + const word& entryName, + const dictionary& dict + ); + + + //- Selector + static autoPtr<DataEntry<Type> > New + ( + const word& entryName, + const dictionary& dict + ); + + + //- Destructor + + virtual ~DataEntry(); + + + // Member Functions + + // Access + + //- Return the dictionary + const dictionary& dict() const; + + + // Evaluation + + //- Return value as a function of (scalar) independent variable + virtual Type value(const scalar x) const = 0; + + //- Integrate between two (scalar) values + virtual Type integrate(const scalar x1, const scalar x2) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define makeDataEntry(Type) \ + \ + defineNamedTemplateTypeNameAndDebug(DataEntry<Type>, 0); \ + \ + defineTemplateRunTimeSelectionTable \ + ( \ + DataEntry<Type>, \ + dictionary \ + ); + + +#define makeDataEntryType(SS, Type) \ + \ + defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \ + \ + DataEntry<Type>::adddictionaryConstructorToTable<SS<Type> > \ + add##SS##Type##ConstructorToTable_; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "DataEntry.C" +# include "NewDataEntry.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C new file mode 100644 index 0000000000000000000000000000000000000000..fccb831b1433eb86bcd9c59f781bd3d48ef9f928 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C @@ -0,0 +1,62 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "DataEntry.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +Foam::autoPtr<Foam::DataEntry<Type> > Foam::DataEntry<Type>::New +( + const word& entryName, + const dictionary& dict +) +{ + word DataEntryType(dict.lookup(entryName)); + + // Info<< "Selecting DataEntry " << DataEntryType << endl; + + typename dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(DataEntryType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn + ( + "DataEntry<Type>::New(const dictionary&" + ) << "Unknown DataEntry type " + << DataEntryType << " for " << entryName + << ", constructor not in hash table" << nl << nl + << " Valid DataEntry types are :" << nl + << dictionaryConstructorTablePtr_->toc() << nl + << exit(FatalError); + } + + return autoPtr<DataEntry<Type> >(cstrIter()(entryName, dict)); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C new file mode 100644 index 0000000000000000000000000000000000000000..507d0b154bcf71cf72c785f31298995a54ddfcc1 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.C @@ -0,0 +1,151 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "Table.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Type> +Foam::Table<Type>::Table +( + const word& entryName, + const dictionary& dict +) +: + DataEntry<Type>(typeName, entryName, dict), + table_(this->dict_.lookup("table")) +{ + if (!table_.size()) + { + FatalErrorIn + ( + "Foam::Table<Type>::Table" + "(" + "const word& entryName," + "const dictionary& dict" + ")" + ) << "Table is invalid (empty)" << nl + << exit(FatalError); + } + Info<< table_; +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class Type> +Foam::Table<Type>::~Table() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Type> +Type Foam::Table<Type>::value(const scalar x) const +{ + // Return zero if out of bounds + if ((x > table_[table_.size()-1].first()) || (x < table_[0].first())) + { + return pTraits<Type>::zero; + } + + label i = 0; + while ((table_[i].first() < x) && (i < table_.size())) + { + i++; + } + + if (i == 0) + { + return table_[0].second(); + } + else if (i == table_.size() - 1) + { + return table_[i-1].second(); + } + else + { + return + (x - table_[i-1].first())/(table_[i].first() - table_[i-1].first()) + * (table_[i].second() - table_[i-1].second()) + + table_[i-1].second(); + } +} + + +template<class Type> +Type Foam::Table<Type>::integrate(const scalar x1, const scalar x2) const +{ + // Initialise return value + Type sum = pTraits<Type>::zero; + + // Return zero if out of bounds + if ((x1 > table_[table_.size()-1].first()) || (x2 < table_[0].first())) + { + return sum; + } + + // Find start index + label id1 = 0; + while ((table_[id1].first() < x1) && (id1 < table_.size())) + { + id1++; + } + + // Find end index + label id2 = table_.size() - 1; + while ((table_[id2].first() > x2) && (id2 >= 1)) + { + id2--; + } + + // Integrate table body + for (label i=id1; i<id2; i++) + { + sum += + (table_[i].second() + table_[i+1].second()) + * (table_[i+1].first() - table_[i].first()); + } + sum *= 0.5; + + // Add table ends + if (id1 > 0) + { + sum += 0.5 + * (value(x1) + table_[id1].second()) + * (table_[id1].first() - x1); + } + if (id2 < table_.size() - 1) + { + sum += 0.5 + * (table_[id2].second() + value(x2)) + * (x2 - table_[id2].first()); + } + + return sum; +} + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.H new file mode 100644 index 0000000000000000000000000000000000000000..a7edcce3cd0b7cf72564c421b3f540ede3896be3 --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/Table/Table.H @@ -0,0 +1,130 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Class + Foam::Table + +Description + Templated table container data entry. Items are stored in a list of + Tuple2's. First column is always stored as scalar entries. Data is read + in the form, e.g. for (scalar, vector): + + @verbatim + entry Table + entryCoeffs + { + table + ( + 0.0 (1 2 3) + 1.0 (4 5 6) + ) + } + @endverbatim + +SourceFiles + Table.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Table_H +#define Table_H + +#include "DataEntry.H" +#include "Tuple2.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class Table Declaration +\*---------------------------------------------------------------------------*/ + +template<class Type> +class Table +: + public DataEntry<Type> +{ + // Private data + + //- Table data + List<Tuple2<scalar, Type> > table_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + Table(const Table<Type>&); + + //- Disallow default bitwise assignment + void operator=(const Table<Type>&); + + +public: + + // Runtime type information + TypeName("Table"); + + + // Constructors + + //- Construct from dictionary + Table + ( + const word& entryName, + const dictionary& dict + ); + + + //- Destructor + + ~Table(); + + + // Member Functions + + //- Return Table value + Type value(const scalar x) const; + + //- Integrate between two (scalar) values + Type integrate(const scalar x1, const scalar x2) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "Table.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/makeDataEntries.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/makeDataEntries.C new file mode 100644 index 0000000000000000000000000000000000000000..0035e1bf22409248162e357798a4fc96ded6841e --- /dev/null +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/makeDataEntries.C @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "DataEntry.H" +#include "Constant.H" +#include "Table.H" + +#include "label.H" +#include "scalar.H" +#include "vector.H" + +namespace Foam +{ + makeDataEntry(label); + makeDataEntryType(Constant, label); + makeDataEntryType(Table, label); + + makeDataEntry(scalar); + makeDataEntryType(Constant, scalar); + makeDataEntryType(Table, scalar); + + makeDataEntry(vector); + makeDataEntryType(Constant, vector); + makeDataEntryType(Table, vector); +}; + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H index 1caab64203d3714eea70fcd23e1242b6a90eba07..4dbf3b67eee13c92439459ebbe6525e505a289ca 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionRASModel/DispersionRASModel.H @@ -80,22 +80,11 @@ public: // Member Functions + //- Return const access to the turbulence model const compressible::turbulenceModel& turbulence() const { return turbulence_; } - - virtual bool active() const = 0; - - virtual vector update - ( - const scalar dt, - const label celli, - const vector& U, - const vector& Uc, - vector& UTurb, - scalar& tTurb - ) = 0; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H index 31bfdc4ad0b2bfeecd55e7d9a7003ebdff56b226..8771600330ff52d121942f6fe3d1331860ad06d1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/GradientDispersionRAS/GradientDispersionRAS.H @@ -75,8 +75,10 @@ public: // Member Functions + //- Flag to indicate whether model activates injection model bool active() const; + //- Update (disperse particles) vector update ( const scalar dt, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H index e9fcc2a445d25cd0106be8f5fc6b43c7a03d58a7..a942ebbfb17fe31ffee2c84bed5fa1399a9e0a03 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/NoDispersion/NoDispersion.H @@ -73,8 +73,10 @@ public: // Member Functions + //- Flag to indicate whether model activates injection model bool active() const; + //- Update (disperse particles) vector update ( const scalar dt, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H index f704a5daba69ec0f8a036a1594cc30dff0fa42cf..4f2bf2cc1d4383cba760849dd5b9860c56a7f62d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/StochasticDispersionRAS/StochasticDispersionRAS.H @@ -28,7 +28,7 @@ Class Description The velocity is perturbed in random direction, with a Gaussian random number distribution with variance sigma. - where sigma is defined below + where sigma is defined below \*---------------------------------------------------------------------------*/ @@ -75,8 +75,10 @@ public: // Member Functions + //- Flag to indicate whether model activates injection model bool active() const; + //- Update (disperse particles) vector update ( const scalar dt, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H index ae8385a204516e178a83deaa0cd452246ea81886..40d7de634121c1e82599f4a15dc54d577e96aa9d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/NoDrag/NoDrag.H @@ -72,8 +72,10 @@ public: // Member Functions + //- Flag to indicate whether model activates drag model bool active() const; + //- Return drag coefficient scalar Cd(const scalar) const; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H index 935bd07c48bd430c196c3c11a65d50c5ae8ff63e..5e01ed7462026b3bbb0d48f56703f3f98876d044 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/SphereDrag/SphereDrag.H @@ -72,8 +72,10 @@ public: // Member Functions + //- Flag to indicate whether model activates drag model bool active() const; + //- Return drag coefficient scalar Cd(const scalar Re) const; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C new file mode 100644 index 0000000000000000000000000000000000000000..adf2025287c1c9c244b69f1f8e22a8bea822562f --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.C @@ -0,0 +1,256 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 "ConeInjection.H" +#include "DataEntry.H" + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::ConeInjection<CloudType>::nParcelsToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((time0 >= 0.0) && (time0 < duration_)) + { + return round((time1 - time0)*parcelsPerSecond_); + } + else + { + return 0; + } +} + + +template<class CloudType> +Foam::scalar Foam::ConeInjection<CloudType>::volumeToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((time0 >= 0.0) && (time0 < duration_)) + { + return volumeFlowRate_().integrate(time0, time1); + } + else + { + return 0.0; + } +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ConeInjection<CloudType>::ConeInjection +( + const dictionary& dict, + CloudType& owner +) +: + InjectionModel<CloudType>(dict, owner, typeName), + duration_(readScalar(this->coeffDict().lookup("duration"))), + position_(this->coeffDict().lookup("position")), + direction_(this->coeffDict().lookup("direction")), + parcelsPerSecond_ + ( + readScalar(this->coeffDict().lookup("parcelsPerSecond")) + ), + volumeFlowRate_ + ( + DataEntry<scalar>::New + ( + "volumeFlowRate", + this->coeffDict() + ) + ), + Umag_ + ( + DataEntry<scalar>::New + ( + "Umag", + this->coeffDict() + ) + ), + thetaInner_ + ( + DataEntry<scalar>::New + ( + "thetaInner", + this->coeffDict() + ) + ), + thetaOuter_ + ( + DataEntry<scalar>::New + ( + "thetaOuter", + this->coeffDict() + ) + ), + parcelPDF_ + ( + pdf::New + ( + this->coeffDict().subDict("parcelPDF"), + owner.rndGen() + ) + ), + tanVec1_(vector::zero), + tanVec2_(vector::zero) +{ + // Normalise direction vector + direction_ /= mag(direction_); + + // Determine direction vectors tangential to direction + vector tangent = vector::zero; + scalar magTangent = 0.0; + + while (magTangent < SMALL) + { + vector v = this->owner().rndGen().vector01(); + + tangent = v - (v & direction_)*direction_; + magTangent = mag(tangent); + } + + tanVec1_ = tangent/magTangent; + tanVec2_ = direction_^tanVec1_; + + // Set total volume to inject + this->volumeTotal_ = volumeFlowRate_().integrate(0.0, duration_); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +template<class CloudType> +Foam::ConeInjection<CloudType>::~ConeInjection() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class CloudType> +bool Foam::ConeInjection<CloudType>::active() const +{ + return true; +} + + +template<class CloudType> +Foam::scalar Foam::ConeInjection<CloudType>::timeEnd() const +{ + return this->SOI_ + duration_; +} + + +template<class CloudType> +Foam::vector Foam::ConeInjection<CloudType>::position +( + const label, + const scalar, + const polyMeshInfo& meshInfo +) +{ + vector pos = position_; + if (meshInfo.caseIs2d()) + { + if (meshInfo.caseIs2dWedge()) + { + pos.component(meshInfo.emptyComponent()) = 0.0; + } + else if (meshInfo.caseIs2dSlab()) + { + pos.component(meshInfo.emptyComponent()) = + meshInfo.centrePoint().component(meshInfo.emptyComponent()); + } + else + { + FatalErrorIn + ( + "Foam::vector Foam::ConeInjection<CloudType>::position" + ) << "Could not determine 2-D case geometry" << nl + << abort(FatalError); + } + } + + return pos; +} + + +template<class CloudType> +Foam::vector Foam::ConeInjection<CloudType>::velocity +( + const label, + const scalar time, + const polyMeshInfo& meshInfo +) +{ + const scalar deg2Rad = mathematicalConstant::pi/180.0; + + scalar t = time - this->SOI_; + scalar ti = thetaInner_().value(t); + scalar to = thetaOuter_().value(t); + scalar coneAngle = this->owner().rndGen().scalar01()*(to - ti) + ti; + + coneAngle *= deg2Rad; + scalar alpha = sin(coneAngle); + scalar dcorr = cos(coneAngle); + scalar beta = + 2.0*mathematicalConstant::pi*this->owner().rndGen().scalar01(); + + vector normal = alpha*(tanVec1_*cos(beta) + tanVec2_*sin(beta)); + vector dirVec = dcorr*direction_; + dirVec += normal; + + // Remove empty component of velocity for slab cases + if (meshInfo.caseIs2dSlab()) + { + dirVec.component(meshInfo.emptyComponent()) = 0.0; + } + + dirVec /= mag(dirVec); + + return Umag_().value(t)*dirVec; +} + + +template<class CloudType> +Foam::scalar Foam::ConeInjection<CloudType>::d0 +( + const label, + const scalar +) const +{ + return parcelPDF_().sample(); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H new file mode 100644 index 0000000000000000000000000000000000000000..27e3dada09f7df1b38323ccd45a844944f095ecf --- /dev/null +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ConeInjection/ConeInjection.H @@ -0,0 +1,200 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2007 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 + +Class + Foam::ConeInjection + +Description + Cone injection + - User specifies + - time of start of injection + - injector position + - direction (along injection axis) + - parcel flow rate + - parcel velocity + - inner and outer cone angles + - Parcel diameters obtained by PDF model + +SourceFiles + ConeInjection.C + +\*---------------------------------------------------------------------------*/ + +#ifndef ConeInjection_H +#define ConeInjection_H + +#include "InjectionModel.H" +#include "pdf.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +template<class Type> +class DataEntry; + +/*---------------------------------------------------------------------------*\ + Class ConeInjection Declaration +\*---------------------------------------------------------------------------*/ + +template<class CloudType> +class ConeInjection +: + public InjectionModel<CloudType> +{ + + // Private data + + //- Coefficients dictionary + dictionary coeffDict_; + + //- Injection duration [s] + const scalar duration_; + + //- Injector position [m] + const vector position_; + + //- Injector direction [] + vector direction_; + + //- Number of parcels to introduce per second [] + const label parcelsPerSecond_; + + //- Volume flow rate of parcels to introduce relative to SOI [m^3] + const autoPtr<DataEntry<scalar> > volumeFlowRate_; + + //- Parcel velocity magnitude relative to SOI [m/s] + const autoPtr<DataEntry<scalar> > Umag_; + + //- Inner cone angle relative to SOI [deg] + const autoPtr<DataEntry<scalar> > thetaInner_; + + //- Outer cone angle relative to SOI [deg] + const autoPtr<DataEntry<scalar> > thetaOuter_; + + //- Parcel size PDF model + const autoPtr<pdf> parcelPDF_; + + + // Tangential vectors to the direction vector + + //- First tangential vector + vector tanVec1_; + + //- Second tangential vector + vector tanVec2_; + + +protected: + + // Protected member functions + + //- Number of parcels to introduce over the time step + label nParcelsToInject + ( + const scalar time0, + const scalar time1 + ) const; + + //- Number of parcels to introduce over the time step + scalar volumeToInject + ( + const scalar time0, + const scalar time1 + ) const; + + +public: + + //- Runtime type information + TypeName("ConeInjection"); + + + // Constructors + + //- Construct from dictionary + ConeInjection + ( + const dictionary& dict, + CloudType& owner + ); + + + // Destructor + + ~ConeInjection(); + + + // Member Functions + + //- Flag to indicate whether model activates injection model + bool active() const; + + //- Return the end-of-injection time + scalar timeEnd() const; + + + // Injection geometry + + //- Return the injection position + vector position + ( + const label iParcel, + const scalar time, + const polyMeshInfo& meshInfo + ); + + //- Return the velocity of the parcel to introduce at a time + vector velocity + ( + const label, + const scalar time, + const polyMeshInfo& meshInfo + ); + + //- Return the diameter of the parcel to introduce at a time + scalar d0 + ( + const label, + const scalar + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "ConeInjection.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index d2c26f96b273f10ed87683926d565278bce7ba25..254d85a7fefff33e41605104082d36d73f834d08 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -32,11 +32,17 @@ template<class CloudType> Foam::InjectionModel<CloudType>::InjectionModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ) : dict_(dict), owner_(owner), - rndGen_(label(0)) + coeffDict_(dict.subDict(type + "Coeffs")), + SOI_(readScalar(coeffDict_.lookup("SOI"))), + volumeTotal_(0.0), + timeStep0_(0.0), + nParcels_(0), + volume_(0.0) {} @@ -56,6 +62,13 @@ const CloudType& Foam::InjectionModel<CloudType>::owner() const } +template<class CloudType> +CloudType& Foam::InjectionModel<CloudType>::owner() +{ + return owner_; +} + + template<class CloudType> const Foam::dictionary& Foam::InjectionModel<CloudType>::dict() const { @@ -64,9 +77,85 @@ const Foam::dictionary& Foam::InjectionModel<CloudType>::dict() const template<class CloudType> -Foam::Random& Foam::InjectionModel<CloudType>::rndGen() +const Foam::dictionary& Foam::InjectionModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + +template<class CloudType> +const Foam::scalar Foam::InjectionModel<CloudType>::timeStart() const +{ + return SOI_; +} + + +template<class CloudType> +const Foam::scalar Foam::InjectionModel<CloudType>::volumeTotal() const +{ + return volumeTotal_; +} + + +template<class CloudType> +const Foam::label Foam::InjectionModel<CloudType>::nParcels() const +{ + return nParcels_; +} + + +template<class CloudType> +const Foam::scalar Foam::InjectionModel<CloudType>::volume() const +{ + return volume_; +} + + +template<class CloudType> +const Foam::scalar Foam::InjectionModel<CloudType>::volumeFraction() const +{ + return volume_/volumeTotal_; +} + + +template<class CloudType> +void Foam::InjectionModel<CloudType>::prepareForNextTimeStep +( + const scalar time0, + const scalar time1 +) { - return rndGen_; + // Initialise values + nParcels_ = 0; + volume_ = 0.0; + + // Return if not started injection event + if (time1 < SOI_) + { + timeStep0_ = time1; + return; + } + + // Make times relative to SOI + scalar t0 = timeStep0_ - SOI_; + scalar t1 = time1 - SOI_; + + // Number of parcels to inject + nParcels_ = nParcelsToInject(t0, t1); + + // Volume of parcels to inject + volume_ = volumeToInject(t0, t1); + + // Hold previous time if no parcels, but non-zero volume fraction + if ((nParcels_ == 0) && (volume_ > 0.0)) + { + // hold value of timeStep0_ + } + else + { + // advance value of timeStep0_ + timeStep0_ = time1; + } } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index 2a7e8c4a0e5f7f096f92a9e7fa8f2caf0aed9e32..5a31b36d7ca45ba89dfd4e46e3760b8fab0772f0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -63,8 +63,51 @@ class InjectionModel // Reference to the owner cloud class CloudType& owner_; - //- Random number generator - Random rndGen_; + //- The coefficients dictionary + const dictionary coeffDict_; + + +protected: + + // Protected data + + // Global injection properties + + //- Start of injection [s] + scalar SOI_; + + //- Total volume of parcels to introduce [m^3] + // Initialised in the individual injection models + scalar volumeTotal_; + + + // Injection properties per Lagrangian time step + + //- Time at start of injection time step [s] + scalar timeStep0_; + + //- Number of parcels to introduce [] + label nParcels_; + + //- Volume of parcels to introduce [m^3] + scalar volume_; + + + // Protected member functions + + //- Number of parcels to introduce over the time step + virtual label nParcelsToInject + ( + const scalar time0, + const scalar time1 + ) const = 0; + + //- Volume of parcels to introduce over the time step + virtual scalar volumeToInject + ( + const scalar time0, + const scalar time1 + ) const = 0; public: @@ -92,7 +135,8 @@ public: InjectionModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ); @@ -112,14 +156,17 @@ public: // Access - //- Return the owner cloud object + //- Return const access the owner cloud object const CloudType& owner() const; + //- Return non-const access the owner cloud object for manipulation + CloudType& owner(); + //- Return the dictionary const dictionary& dict() const; - //- Return reference to random number - inline Random& rndGen(); + //- Return the coefficients dictionary + const dictionary& coeffDict() const; // Member Functions @@ -127,57 +174,62 @@ public: //- Flag to indicate whether model activates injection model virtual bool active() const = 0; - //- Return the start-of-injection time - virtual scalar timeStart() const = 0; - //- Return the end-of-injection time - virtual scalar timeEnd() const = 0; + // Global information - //- Return the injection position - virtual vector position - ( - const label iParcel, - const scalar time, - const polyMeshInfo& meshInfo, - Random& rndGen - ) const = 0; + //- Return the start-of-injection time + const scalar timeStart() const; - //- Return the number of parcels to intruduce between two times - virtual label nParcelsToInject - ( - const label nInjections_, - const scalar time0, - const scalar time1 - ) const = 0; + //- Return the total volume to be injected across the event + const scalar volumeTotal() const; - //- Return the volume of parcels to introduce between two times - virtual scalar volume - ( - const scalar time0, - const scalar time1, - const polyMeshInfo& meshInfo - ) const = 0; + //- Return the end-of-injection time + virtual scalar timeEnd() const = 0; - //- Return the volume fraction to introduce between two times - virtual scalar volumeFraction - ( - const scalar time0, - const scalar time1 - ) const = 0; - //- Return the diameter of the parcel to introduce at a time - virtual scalar d0 - ( - const label iParcel, - const scalar time - ) const = 0; + // Per Lagrangian time step properties - //- Return the velocity of the parcel to introduce at a time - virtual vector velocity - ( - const label iParcel, - const scalar time - ) const = 0; + //- Determine properties for next time step/injection interval + void prepareForNextTimeStep + ( + const scalar time0, + const scalar time1 + ); + + //- Return the number of parcels to introduce + const label nParcels() const; + + //- Return the volume of parcels to introduce + const scalar volume() const; + + //- Return the volume fraction to introduce + const scalar volumeFraction() const; + + + // Injection geometry + + //- Return the injection position + virtual vector position + ( + const label iParcel, + const scalar time, + const polyMeshInfo& meshInfo + ) = 0; + + //- Return the velocity of the parcel to introduce at a time + virtual vector velocity + ( + const label iParcel, + const scalar time, + const polyMeshInfo& meshInfo + ) = 0; + + //- Return the diameter of the parcel to introduce at a time + virtual scalar d0 + ( + const label iParcel, + const scalar time + ) const = 0; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C index dc8541525b593e69099b4a736d1c053d3d2d6c28..e19931510eb9197fc2e9f0eb21a454cc86d25886 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.C @@ -24,10 +24,47 @@ License \*---------------------------------------------------------------------------*/ -#include "error.H" - #include "ManualInjection.H" +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::ManualInjection<CloudType>::nParcelsToInject +( + const scalar time0, + const scalar time1 +) const +{ + if ((0.0 >= time0) && (0.0 < time1)) + { + return positions_.size(); + } + else + { + return 0; + } +} + + +template<class CloudType> +Foam::scalar Foam::ManualInjection<CloudType>::volumeToInject +( + const scalar time0, + const scalar time1 +) const +{ + // All parcels introduced at SOI + if ((0.0 >= time0) && (0.0 < time1)) + { + return this->volumeTotal_; + } + else + { + return 0.0; + } +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> @@ -37,10 +74,8 @@ Foam::ManualInjection<CloudType>::ManualInjection CloudType& owner ) : - InjectionModel<CloudType>(dict, owner), - coeffDict_(dict.subDict(typeName + "Coeffs")), - injectionTime_(readScalar(coeffDict_.lookup("injectionTime"))), - positionsFile_(coeffDict_.lookup("positionsFile")), + InjectionModel<CloudType>(dict, owner, typeName), + positionsFile_(this->coeffDict().lookup("positionsFile")), positions_ ( IOobject @@ -53,12 +88,12 @@ Foam::ManualInjection<CloudType>::ManualInjection ) ), diameters_(positions_.size()), - U0_(coeffDict_.lookup("U0")), + U0_(this->coeffDict().lookup("U0")), parcelPDF_ ( pdf::New ( - coeffDict_.subDict("parcelPDF"), + this->coeffDict().subDict("parcelPDF"), owner.rndGen() ) ) @@ -70,7 +105,7 @@ Foam::ManualInjection<CloudType>::ManualInjection } // Determine volume of particles to inject - volumeTotal_ = sum(pow(diameters_, 3)) + this->volumeTotal_ = sum(pow(diameters_, 3)) *mathematicalConstant::pi/6.0; } @@ -91,13 +126,6 @@ bool Foam::ManualInjection<CloudType>::active() const } -template<class CloudType> -Foam::scalar Foam::ManualInjection<CloudType>::timeStart() const -{ - return injectionTime_; -} - - template<class CloudType> Foam::scalar Foam::ManualInjection<CloudType>::timeEnd() const { @@ -111,9 +139,8 @@ Foam::vector Foam::ManualInjection<CloudType>::position ( const label iParcel, const scalar time, - const polyMeshInfo& meshInfo, - Random& -) const + const polyMeshInfo& meshInfo +) { vector pos = positions_[iParcel]; if (meshInfo.caseIs2d()) @@ -129,8 +156,10 @@ Foam::vector Foam::ManualInjection<CloudType>::position } else { - FatalErrorIn("Foam::vector Foam::ManualInjection<CloudType>::position") - << "Could not determine 2-D case geometry" << nl + FatalErrorIn + ( + "Foam::vector Foam::ManualInjection<CloudType>::position" + ) << "Could not determine 2-D case geometry" << nl << abort(FatalError); } } @@ -140,53 +169,21 @@ Foam::vector Foam::ManualInjection<CloudType>::position template<class CloudType> -Foam::label Foam::ManualInjection<CloudType>::nParcelsToInject +Foam::vector Foam::ManualInjection<CloudType>::velocity ( const label, - const scalar time0, - const scalar time1 -) const -{ - if ((injectionTime_>=time0) && (injectionTime_<time1)) - { - return positions_.size(); - } - else - { - return 0; - } -} - - -template<class CloudType> -Foam::scalar Foam::ManualInjection<CloudType>::volume -( - const scalar, const scalar, - const polyMeshInfo& -) const -{ - // Since all parcels are introduced at once, volume introduced in this time - // interval = total mass - return volumeTotal_; -} - - -template<class CloudType> -Foam::scalar Foam::ManualInjection<CloudType>::volumeFraction -( - const scalar time0, - const scalar time1 -) const + const polyMeshInfo& meshInfo +) { - if ((injectionTime_>=time0) && (injectionTime_<time1)) + vector vel = U0_; + if (meshInfo.caseIs2dSlab()) { - return 1; - } - else - { - return 0; + vel.component(meshInfo.emptyComponent()) = + meshInfo.centrePoint().component(meshInfo.emptyComponent()); } + + return vel; } @@ -201,15 +198,4 @@ Foam::scalar Foam::ManualInjection<CloudType>::d0 } -template<class CloudType> -Foam::vector Foam::ManualInjection<CloudType>::velocity -( - const label, - const scalar -) const -{ - return U0_; -} - - // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H index 77059c857027a6a69db1828b53c17fc3e9584456..3de939a196c9f2aa0bb07df023f2cc7f41d1c878 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/ManualInjection/ManualInjection.H @@ -68,9 +68,6 @@ class ManualInjection //- Coefficients dictionary dictionary coeffDict_; - //- Time to introduce parcels - const scalar injectionTime_; - //- Name of file containing positions data const word positionsFile_; @@ -83,9 +80,6 @@ class ManualInjection //- Initial parcel velocity const vector U0_; - //- Total volume of parcels to introduce [m^3] - scalar volumeTotal_; - //- Parcel size PDF model const autoPtr<pdf> parcelPDF_; @@ -93,6 +87,25 @@ class ManualInjection scalar nParticlesPerParcel_; +protected: + + // Protected member functions + + //- Number of parcels to introduce over the time step + label nParcelsToInject + ( + const scalar time0, + const scalar time1 + ) const; + + //- Volume of parcels to introduce over the time step + scalar volumeToInject + ( + const scalar time0, + const scalar time1 + ) const; + + public: //- Runtime type information @@ -116,51 +129,37 @@ public: // Member Functions + //- Flag to indicate whether model activates injection model bool active() const; - scalar timeStart() const; - + //- Return the end-of-injection time scalar timeEnd() const; - vector position - ( - const label iParcel, - const scalar time, - const polyMeshInfo& meshInfo, - Random& - ) const; - - label nParcelsToInject - ( - const label, - const scalar time0, - const scalar time1 - ) const; - - scalar volume - ( - const scalar, - const scalar, - const polyMeshInfo& - ) const; - scalar volumeFraction - ( - const scalar time0, - const scalar time1 - ) const; - - scalar d0 - ( - const label iParcel, - const scalar - ) const; - - vector velocity - ( - const label, - const scalar - ) const; + // Injection geometry + + //- Return the injection position + vector position + ( + const label iParcel, + const scalar time, + const polyMeshInfo& meshInfo + ); + + //- Return the velocity of the parcel to introduce at a time + vector velocity + ( + const label, + const scalar time, + const polyMeshInfo& meshInfo + ); + + //- Return the diameter of the parcel to introduce at a time + scalar d0 + ( + const label, + const scalar + ) const; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C index 1815694c3f7b097930605548f2d1b7b0a9e262ee..fb7e2961cfcd230e214ad02b08d7895bf60ba2c2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.C @@ -24,11 +24,33 @@ License \*---------------------------------------------------------------------------*/ -#include "error.H" - #include "NoInjection.H" #include "addToRunTimeSelectionTable.H" +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class CloudType> +Foam::label Foam::NoInjection<CloudType>::nParcelsToInject +( + const scalar, + const scalar +) const +{ + return 0; +} + + +template<class CloudType> +Foam::scalar Foam::NoInjection<CloudType>::volumeToInject +( + const scalar, + const scalar +) const +{ + return 0.0; +} + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class CloudType> @@ -38,7 +60,7 @@ Foam::NoInjection<CloudType>::NoInjection CloudType& owner ) : - InjectionModel<CloudType>(dict, owner) + InjectionModel<CloudType>(dict, owner, typeName) {} @@ -58,13 +80,6 @@ bool Foam::NoInjection<CloudType>::active() const } -template<class CloudType> -Foam::scalar Foam::NoInjection<CloudType>::timeStart() const -{ - return 0.0; -} - - template<class CloudType> Foam::scalar Foam::NoInjection<CloudType>::timeEnd() const { @@ -77,46 +92,22 @@ Foam::vector Foam::NoInjection<CloudType>::position ( const label, const scalar, - const polyMeshInfo&, - Random& -) const + const polyMeshInfo& +) { return vector::zero; } template<class CloudType> -Foam::label Foam::NoInjection<CloudType>::nParcelsToInject +Foam::vector Foam::NoInjection<CloudType>::velocity ( const label, const scalar, - const scalar -) const -{ - return 0; -} - - -template<class CloudType> -Foam::scalar Foam::NoInjection<CloudType>::volume -( - const scalar, - const scalar, const polyMeshInfo& -) const -{ - return 0.0; -} - - -template<class CloudType> -Foam::scalar Foam::NoInjection<CloudType>::volumeFraction -( - const scalar, - const scalar -) const +) { - return 0.0; + return vector::zero; } @@ -131,15 +122,4 @@ Foam::scalar Foam::NoInjection<CloudType>::d0 } -template<class CloudType> -Foam::vector Foam::NoInjection<CloudType>::velocity -( - const label, - const scalar -) const -{ - return vector::zero; -} - - // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H index 82028a10225cbb119829c01aa177b61c0afdd81d..e739f6ed4af86dc8d0478e4f6d5073503a14d434 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/NoInjection/NoInjection.H @@ -53,6 +53,25 @@ class NoInjection public InjectionModel<CloudType> { +protected: + + // Protected member functions + + //- Number of parcels to introduce over the time step + label nParcelsToInject + ( + const scalar, + const scalar + ) const; + + //- Volume of parcels to introduce over the time step + scalar volumeToInject + ( + const scalar, + const scalar + ) const; + + public: //- Runtime type information @@ -76,51 +95,37 @@ public: // Member Functions + //- Flag to indicate whether model activates injection model bool active() const; - scalar timeStart() const; - + //- Return the end-of-injection time scalar timeEnd() const; - vector position - ( - const label, - const scalar, - const polyMeshInfo&, - Random& - ) const; - label nParcelsToInject - ( - const label, - const scalar, - const scalar - ) const; - - scalar volume - ( - const scalar, - const scalar, - const polyMeshInfo& - ) const; - - scalar volumeFraction - ( - const scalar, - const scalar - ) const; - - scalar d0 - ( - const label, - const scalar - ) const; - - vector velocity - ( - const label, - const scalar - ) const; + // Injection geometry + + //- Return the injection position + vector position + ( + const label iParcel, + const scalar time, + const polyMeshInfo& meshInfo + ); + + //- Return the velocity of the parcel to introduce at a time + vector velocity + ( + const label, + const scalar time, + const polyMeshInfo& meshInfo + ); + + //- Return the diameter of the parcel to introduce at a time + scalar d0 + ( + const label, + const scalar + ) const; }; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C index 7a928916707b04eae5a90491e48c9cbd9b9f1a64..0d4873b8842a12775eed4f017cf74c14ef3dced5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.C @@ -24,8 +24,6 @@ License \*---------------------------------------------------------------------------*/ -#include "error.H" - #include "Rebound.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -37,7 +35,8 @@ Foam::Rebound<CloudType>::Rebound CloudType& cloud ) : - WallInteractionModel<CloudType>(dict, cloud) + WallInteractionModel<CloudType>(dict, cloud, typeName), + UFactor_(readScalar(this->coeffDict().lookup("UFactor"))) {} @@ -71,9 +70,9 @@ void Foam::Rebound<CloudType>::correct scalar Un = U & nw; vector Ut = U - Un*nw; - if (Un > 0) + if (Un > 0.0) { - U -= 2.0*Un*nw; + U -= UFactor_*2.0*Un*nw; } U -= Ut; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H index a92ee9008dd1ce011aba5931d1005d33798aabe5..603f910a9ca2a48a5e4b759f1bc34b27d399de1f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/Rebound/Rebound.H @@ -48,6 +48,12 @@ class Rebound : public WallInteractionModel<CloudType> { + // Private data + + //- Factor applied to velocity on rebound + // Normal rebound = 1 + scalar UFactor_; + public: @@ -72,8 +78,10 @@ public: // Member Functions + //- Flag to indicate whether model activates heat transfer model bool active() const; + //- Apply wall correction virtual void correct ( const wallPolyPatch& wpp, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C index 282fc0b3233a8f1d747b4824a30ada321d2a5b04..349aa2701993d0525fdaa9cdc8c1a6ec65d28593 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -37,10 +37,9 @@ Foam::StandardWallInteraction<CloudType>::StandardWallInteraction CloudType& cloud ) : - WallInteractionModel<CloudType>(dict, cloud), - coeffDict_(dict.subDict(typeName + "Coeffs")), - e_(dimensionedScalar(coeffDict_.lookup("e")).value()), - mu_(dimensionedScalar(coeffDict_.lookup("mu")).value()) + WallInteractionModel<CloudType>(dict, cloud, typeName), + e_(dimensionedScalar(this->coeffDict().lookup("e")).value()), + mu_(dimensionedScalar(this->coeffDict().lookup("mu")).value()) {} diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H index fedd5f5aa90a961159dc59a98d02ba53eccc2a10..977371370f561814414d1017ff0a5923d6f86867 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/StandardWallInteraction/StandardWallInteraction.H @@ -51,9 +51,6 @@ class StandardWallInteraction // Private data - //- Coefficient dictionary - dictionary coeffDict_; - //- Elasticity const scalar e_; @@ -84,8 +81,10 @@ public: // Member Functions + //- Flag to indicate whether model activates heat transfer model bool active() const; + //- Apply wall correction virtual void correct ( const wallPolyPatch& wpp, diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C index 8125f12d7f63d2900f20b9a014f00a10c3ca89d5..af366c3c6bf29a4d47dbf5c48cb888a1d4e24d35 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.C @@ -32,10 +32,12 @@ template<class CloudType> Foam::WallInteractionModel<CloudType>::WallInteractionModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ) : dict_(dict), - owner_(owner) + owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -63,6 +65,14 @@ const Foam::dictionary& Foam::WallInteractionModel<CloudType>::dict() const } +template<class CloudType> +const Foam::dictionary& +Foam::WallInteractionModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "NewWallInteractionModel.C" diff --git a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H index 0c6c5a851ac085a60571b906edb086dbb06ba8f5..014a6e835fcc862b008f5123e2bb63ab3328fcb0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/WallInteractionModel/WallInteractionModel/WallInteractionModel.H @@ -63,6 +63,9 @@ class WallInteractionModel // reference to the owner cloud class CloudType& owner_; + //- The coefficients dictionary + const dictionary coeffDict_; + public: @@ -89,7 +92,8 @@ public: WallInteractionModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ); @@ -109,11 +113,14 @@ public: // Access + //- Return the owner cloud object + const CloudType& owner() const; + //- Return the dictionary const dictionary& dict() const; - //- Return the owner cloud object - const CloudType& owner() const; + //- Return the coefficients dictionary + const dictionary& coeffDict() const; // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index da638a66c4f9b965b5a8e8ead1134de86524faae..1cde137d9f73f226c09a3d9284f1273f4334bd04 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C @@ -32,10 +32,12 @@ template<class CloudType> Foam::CompositionModel<CloudType>::CompositionModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ) : dict_(dict), owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")), carrierThermo_(owner.carrierThermo()), gases_(owner.gases()), liquids_ @@ -84,6 +86,13 @@ const Foam::dictionary& Foam::CompositionModel<CloudType>::dict() const } +template<class CloudType> +const Foam::dictionary& Foam::CompositionModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + template<class CloudType> const Foam::hCombustionThermo& Foam::CompositionModel<CloudType>::carrierThermo() const diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H index 470549c91646c9ff9db1956eda428c114237c719..ada5d2e380eb2025b4023e275563cc879508329a 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H @@ -70,6 +70,9 @@ class CompositionModel //- Reference to the owner injection class CloudType& owner_; + //- The coefficients dictionary + const dictionary& coeffDict_; + //- Reference to the carrier phase thermo package hCombustionThermo& carrierThermo_; @@ -108,7 +111,8 @@ public: CompositionModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ); @@ -133,9 +137,12 @@ public: //- Return the cloud object const CloudType& owner() const; - //- Return the dictionary + //- Return the cloud dictionary const dictionary& dict() const; + //- Return the coefficients dictionary + const dictionary& coeffDict() const; + //- Return the carrier phase thermo package const hCombustionThermo& carrierThermo() const; @@ -216,6 +223,7 @@ public: const scalar T ) const = 0; + //- Return specific heat caparcity for the liquid mixture virtual const scalar cpLiquid ( const scalarField& YLiquid, @@ -223,6 +231,7 @@ public: const scalar T ) const = 0; + //- Return specific heat caparcity for the solid mixture virtual const scalar cpSolid ( const scalarField& YSolid diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C index 564b7cf5a6ef17d73e17ee9ede34d616eed0db89..39bc2bf76b20c15a2d7bd91ba48803f6c88d1285 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.C @@ -35,23 +35,22 @@ Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction CloudType& owner ) : - CompositionModel<CloudType>(dict, owner), - coeffDict_(dict.subDict(typeName + "Coeffs")), + CompositionModel<CloudType>(dict, owner, typeName), - gasNames_(coeffDict_.lookup("gasNames")), + gasNames_(this->coeffDict().lookup("gasNames")), gasGlobalIds_(gasNames_.size(), -1), - YGas0_(coeffDict_.lookup("YGas0")), - YGasTot0_(readScalar(coeffDict_.lookup("YGasTot0"))), + YGas0_(this->coeffDict().lookup("YGas0")), + YGasTot0_(readScalar(this->coeffDict().lookup("YGasTot0"))), - liquidNames_(coeffDict_.lookup("liquidNames")), + liquidNames_(this->coeffDict().lookup("liquidNames")), liquidGlobalIds_(liquidNames_.size(), -1), - YLiquid0_(coeffDict_.lookup("YLiquid0")), - YLiquidTot0_(readScalar(coeffDict_.lookup("YLiquidTot0"))), + YLiquid0_(this->coeffDict().lookup("YLiquid0")), + YLiquidTot0_(readScalar(this->coeffDict().lookup("YLiquidTot0"))), - solidNames_(coeffDict_.lookup("solidNames")), + solidNames_(this->coeffDict().lookup("solidNames")), solidGlobalIds_(solidNames_.size(), -1), - YSolid0_(coeffDict_.lookup("YSolid0")), - YSolidTot0_(readScalar(coeffDict_.lookup("YSolidTot0"))), + YSolid0_(this->coeffDict().lookup("YSolid0")), + YSolidTot0_(readScalar(this->coeffDict().lookup("YSolidTot0"))), YMixture0_(3) { @@ -73,7 +72,8 @@ Foam::SingleMixtureFraction<CloudType>::SingleMixtureFraction Info<< "\nThermo package species composition comprises:" << endl; forAll (this->carrierThermo().composition().Y(), k) { - Info<< this->carrierThermo().composition().Y()[k].name() << endl; + Info<< this->carrierThermo().composition().Y()[k].name() + << endl; } FatalErrorIn @@ -255,12 +255,14 @@ Foam::SingleMixtureFraction<CloudType>::gasLocalId(const word& gasName) const return i; } } + WarningIn ( "Foam::label SingleMixtureFraction<CloudType>::" "gasLocalId(const word& gasName) const" )<< "Gas name " << gasName << " not found in gasNames_" << endl; + return -1; } @@ -276,12 +278,14 @@ Foam::SingleMixtureFraction<CloudType>::gasGlobalId(const word& gasName) const return gasGlobalIds_[i]; } } + WarningIn ( "Foam::label SingleMixtureFraction<CloudType>::" "gasGlobalId(const word& gasName) const" )<< "Gas name " << gasName << " not found in gasNames_" << endl; + return -1; } @@ -329,12 +333,14 @@ Foam::SingleMixtureFraction<CloudType>::liquidLocalId(const word& liquidName) co return i; } } + WarningIn ( "Foam::label SingleMixtureFraction<CloudType>::" "liquidLocalId(const word& liquidName) const" )<< "Liquid name " << liquidName << " not found in liquidNames_" << endl; + return -1; } @@ -350,12 +356,14 @@ Foam::SingleMixtureFraction<CloudType>::liquidGlobalId(const word& liquidName) c return liquidGlobalIds_[i]; } } + WarningIn ( "Foam::label SingleMixtureFraction<CloudType>::" "liquidGlobalId(const word& liquidName) const" )<< "Liquid name " << liquidName << " not found in liquidNames_" << endl; + return -1; } @@ -403,12 +411,14 @@ Foam::SingleMixtureFraction<CloudType>::solidLocalId(const word& solidName) cons return i; } } + WarningIn ( "Foam::label SingleMixtureFraction<CloudType>::" "SolididLocalId(const word& solidName) const" )<< "Solid name " << solidName << " not found in solidNames_" << endl; + return -1; } @@ -424,12 +434,14 @@ Foam::SingleMixtureFraction<CloudType>::solidGlobalId(const word& solidName) con return solidGlobalIds_[i]; } } + WarningIn ( "Foam::label SingleMixtureFraction<CloudType>::" "solidGlobalId(const word& solidName) const" )<< "Solid name " << solidName << " not found in solidNames_" << endl; + return -1; } diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H index 1269c983069528eb255134a1a99c046f3b44ea6d..070e41e727f84304d7e96a51ed9703e22f7b4e95 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/SingleMixtureFraction/SingleMixtureFraction.H @@ -57,9 +57,6 @@ class SingleMixtureFraction // Private data - //- The coefficient dictionary - const dictionary& coeffDict_; - //- Parcel properties //- List of gas names @@ -146,40 +143,58 @@ public: // Access + //- Return the list of composition names const wordList compositionNames() const; + //- Return the list of gas names const wordList& gasNames() const; + //- Return the list indices of gases in global thermo list const labelList& gasGlobalIds() const; + //- Return the list of gas mass fractions const scalarField& YGas0() const; + //- Return the total gas mass fraction const scalar YGasTot0() const; + //- Return the list of liquid names const wordList& liquidNames() const; + //- Return the list indices of liquid in global thermo list const labelList& liquidGlobalIds() const; + //- Return the list of liquid mass fractions const scalarField& YLiquid0() const; + //- Return the total liquid mass fraction const scalar YLiquidTot0() const; + //- Return the list of solid names const wordList& solidNames() const; + //- Return the list indices of solids in global thermo list const labelList& solidGlobalIds() const; + //- Return the list of solid mass fractions const scalarField& YSolid0() const; + //- Return the total solid mass fraction const scalar YSolidTot0() const; + //- Return the list of mixture mass fractions const scalarField& YMixture0() const; + //- Return the gas constant for the gas mixture const scalar RGas(const scalarField& YGas) const; + //- Return enthalpy for the gas mixture const scalar HGas(const scalarField& YGas, const scalar T) const; + //- Return specific heat caparcity for the gas mixture const scalar cpGas(const scalarField& YGas, const scalar T) const; + //- Return specific heat caparcity for the liquid mixture const scalar cpLiquid ( const scalarField& YLiquid, @@ -187,6 +202,7 @@ public: const scalar T ) const; + //- Return specific heat caparcity for the solid mixture const scalar cpSolid(const scalarField& YSolid) const; }; diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C index b24dfd05005c6da9dfe0915fcdf96625845371d6..3d29eab791c39b56044e83695e71bb31d9f894ca 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.C @@ -35,12 +35,11 @@ Foam::ConstantRateDevolatilisation<CloudType>::ConstantRateDevolatilisation CloudType& owner ) : - MassTransferModel<CloudType>(dict, owner), - coeffDict_(dict.subDict(typeName + "Coeffs")), - A0_(dimensionedScalar(coeffDict_.lookup("A0")).value()), + MassTransferModel<CloudType>(dict, owner, typeName), + A0_(dimensionedScalar(this->coeffDict().lookup("A0")).value()), volatileResidualCoeff_ ( - readScalar(coeffDict_.lookup("volatileResidualCoeff")) + readScalar(this->coeffDict().lookup("volatileResidualCoeff")) ) {} diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H index 1f425868ad72f757e2ce585399a9480bd02acbd9..a2490e647270614e9f7bfc8d59a3fac36fb07776 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/ConstantRateDevolatilisation/ConstantRateDevolatilisation.H @@ -52,10 +52,6 @@ class ConstantRateDevolatilisation // Private data - //- Coefficients dictionary - dictionary coeffDict_; - - // Model constants //- Rate constant (suggested default = 12) [1/s] @@ -90,10 +86,13 @@ public: // Member Functions + //- Flag to indicate whether model activates mass transfer model bool active() const; + //- Flag to indicate whether model changes particle volume bool changesVolume() const; + //- Update model scalar calculate ( const scalar dt, diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.C b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.C index 00c5be1c4603ac880140ae6519e17d3c5030e4a9..8e0fb5e0a073dbac569775f3632055da2194482c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.C @@ -32,10 +32,12 @@ template<class CloudType> Foam::MassTransferModel<CloudType>::MassTransferModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ) : dict_(dict), - owner_(owner) + owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -61,6 +63,13 @@ const Foam::dictionary& Foam::MassTransferModel<CloudType>::dict() const } +template<class CloudType> +const Foam::dictionary& Foam::MassTransferModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "NewMassTransferModel.C" diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.H b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.H index cb5164782a1c83e4fd493abb555a78335b29c27b..81967a640f599ed478dea7079aa46b09f518f41c 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/MassTransferModel/MassTransferModel.H @@ -65,6 +65,9 @@ protected: //- Reference to the owner cloud class CloudType& owner_; + //- The coefficient dictionary + const dictionary coeffDict_; + public: @@ -91,7 +94,8 @@ public: MassTransferModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ); @@ -114,9 +118,12 @@ public: //- Return the owner cloud object const CloudType& owner() const; - //- Return the dictionary + //- Return the cloud dictionary const dictionary& dict() const; + //- Return the coefficient dictionary + const dictionary& coeffDict() const; + // Member Functions diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.C b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.C index 3e7c5a796b2b375ae1b94464d1796292a1fe8143..f490b0d6cfa632ab00d2ed8fad8c243526aae7b5 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.C +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.C @@ -35,7 +35,7 @@ Foam::NoMassTransfer<CloudType>::NoMassTransfer CloudType& cloud ) : - MassTransferModel<CloudType>(dict, cloud) + MassTransferModel<CloudType>(dict, cloud, typeName) {} diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.H b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.H index 78a538f57b1e9b46684ac8f8210832c0db95333d..18be1809e47c072538c90574f27478c0828ff31f 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.H +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/NoMassTransfer/NoMassTransfer.H @@ -72,10 +72,13 @@ public: // Member Functions + //- Flag to indicate whether model activates mass transfer model bool active() const; + //- Flag to indicate whether model changes particle volume bool changesVolume() const; + //- Update model scalar calculate ( const scalar, diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C index 3da409fa233838100b2880386b6a936327ca29b8..b6d2581a718e2f3fefa864909ea17efc4a62e21d 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.C @@ -35,13 +35,12 @@ Foam::SingleKineticRateDevolatilisation<CloudType>::SingleKineticRateDevolatilis CloudType& owner ) : - MassTransferModel<CloudType>(dict, owner), - coeffDict_(dict.subDict(typeName + "Coeffs")), - A1_(dimensionedScalar(coeffDict_.lookup("A1")).value()), - E_(dimensionedScalar(coeffDict_.lookup("E")).value()), + MassTransferModel<CloudType>(dict, owner, typeName), + A1_(dimensionedScalar(this->coeffDict().lookup("A1")).value()), + E_(dimensionedScalar(this->coeffDict().lookup("E")).value()), volatileResidualCoeff_ ( - readScalar(coeffDict_.lookup("volatileResidualCoeff")) + readScalar(this->coeffDict().lookup("volatileResidualCoeff")) ) {} diff --git a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H index 39b8bdf5c330d66a20e73e3bc15304ada39b73fb..fea51bffae4af9afaddcf38b1dcb9f15d981199f 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H +++ b/src/lagrangian/intermediate/submodels/Reacting/MassTransferModel/SingleKineticRateDevolatilisation/SingleKineticRateDevolatilisation.H @@ -51,10 +51,6 @@ class SingleKineticRateDevolatilisation // Private data - //- Coefficients dictionary - dictionary coeffDict_; - - // Model constants //- Activation energy @@ -92,10 +88,13 @@ public: // Member Functions + //- Flag to indicate whether model activates mass transfer model bool active() const; + //- Flag to indicate whether model changes particle volume bool changesVolume() const; + //- Update model scalar calculate ( const scalar dt, diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C index 388e07a13ec647e1c03c4f44d5a0cead0b10cc19..a4bc12aa40b69b93d67e22fd3f9faead7aad1cb2 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C +++ b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.C @@ -35,7 +35,7 @@ Foam::NoSurfaceReaction<CloudType>::NoSurfaceReaction CloudType& owner ) : - SurfaceReactionModel<CloudType>(dict, owner) + SurfaceReactionModel<CloudType>(dict, owner, typeName) {} diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H index 36056ac18300159e008d6e537c309e8831364b55..f07228bc59182f7a71bb8b8ed33631bc2fbc0739 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H +++ b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/NoSurfaceReaction/NoSurfaceReaction.H @@ -72,8 +72,10 @@ public: // Member Functions + //- Flag to indicate whether model activates devolatisation model bool active() const; + //- Update surface reactions void calculate ( const scalar dt, diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C index 5004c4436db351d535c52bc0e47682fe069833be..616dccd20bb7f3b19151b5c78e04b25b3557923f 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C @@ -32,10 +32,12 @@ template<class CloudType> Foam::SurfaceReactionModel<CloudType>::SurfaceReactionModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ) : dict_(dict), - owner_(owner) + owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -61,6 +63,13 @@ const Foam::dictionary& Foam::SurfaceReactionModel<CloudType>::dict() const } +template<class CloudType> +const Foam::dictionary& Foam::SurfaceReactionModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "NewSurfaceReactionModel.C" diff --git a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H index c6ab5c122539b1efc5e8daabc54a6188e0beceaf..61c870d44ec3da1ba81ad5ef810043cfe01e4a08 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H @@ -66,6 +66,9 @@ class SurfaceReactionModel // reference to the owner cloud class CloudType& owner_; + //- The coefficients dictionary + const dictionary coeffDict_; + public: @@ -93,7 +96,8 @@ public: SurfaceReactionModel ( const dictionary& dict, - CloudType& cloud + CloudType& cloud, + const word& type ); @@ -116,15 +120,19 @@ public: //- Return the owner cloud object const CloudType& owner() const; - //- Return the dictionary + //- Return the cloud dictionary const dictionary& dict() const; + //- Return the coefficients dictionary + const dictionary& coeffDict() const; + // Member Functions //- Flag to indicate whether model activates devolatisation model virtual bool active() const = 0; + //- Update surface reactions virtual void calculate ( const scalar dt, diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C index 5f352cfc98af2d41d23c1d82b860436d7ed969cb..f2b4fc929901abe08cd0890ce0d69b3719e8e0da 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C @@ -32,10 +32,12 @@ template<class CloudType> Foam::HeatTransferModel<CloudType>::HeatTransferModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ) : dict_(dict), - owner_(owner) + owner_(owner), + coeffDict_(dict.subDict(type + "Coeffs")) {} @@ -62,6 +64,13 @@ const Foam::dictionary& Foam::HeatTransferModel<CloudType>::dict() const } +template<class CloudType> +const Foam::dictionary& Foam::HeatTransferModel<CloudType>::coeffDict() const +{ + return coeffDict_; +} + + template<class CloudType> Foam::scalar Foam::HeatTransferModel<CloudType>::h ( diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H index e1ae0b7383c54bf067ef06c2b17e76e89a3a9208..ee763374188d5d30b9fa03aa122044c8d1c1a5dc 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H @@ -63,6 +63,9 @@ class HeatTransferModel //- Reference to the owner cloud class CloudType& owner_; + //- The coefficents dictionary + const dictionary coeffDict_; + public: @@ -89,7 +92,8 @@ public: HeatTransferModel ( const dictionary& dict, - CloudType& owner + CloudType& owner, + const word& type ); @@ -109,9 +113,12 @@ public: // Access - //- Return the dictionary + //- Return the cloud dictionary const dictionary& dict() const; + //- Return the coefficients dictionary + const dictionary& coeffDict() const; + //- Return the owner cloud object const CloudType& owner() const; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C index 4edf1d50ba6fcf3bde8a7a3d295f45a49425b5b4..0d2d4248632a5dfc6342e8aa2acf18e822815c5e 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.C @@ -35,7 +35,7 @@ Foam::NoHeatTransfer<CloudType>::NoHeatTransfer CloudType& cloud ) : - HeatTransferModel<CloudType>(dict, cloud) + HeatTransferModel<CloudType>(dict, cloud, typeName) {} diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H index b3076d74d5435a46d47f8a3bb18776665b0f85a5..95206b386582aa89654a4aaf7ea9c75982da938a 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/NoHeatTransfer/NoHeatTransfer.H @@ -72,14 +72,17 @@ public: // Member Functions + //- Flag to indicate whether model activates heat transfer model bool active() const; + //- Nusselt number scalar Nu ( const scalar, const scalar ) const; + //- Prandtl number scalar Pr() const; }; diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C index 223f509d39ecc6cf5c9cc473854df9ce397fe973..b568517b1c5acff0297f5fc2f9c25acce0b8efc0 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.C @@ -37,9 +37,8 @@ Foam::RanzMarshall<CloudType>::RanzMarshall CloudType& cloud ) : - HeatTransferModel<CloudType>(dict, cloud), - coeffDict_(dict.subDict(typeName + "Coeffs")), - Pr_(dimensionedScalar(coeffDict_.lookup("Pr")).value()) + HeatTransferModel<CloudType>(dict, cloud, typeName), + Pr_(dimensionedScalar(this->coeffDict().lookup("Pr")).value()) {} diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H index 13c79acc9176a00893c39dae8ebb7023d8ab8a6b..223bfc186fae358879754b0a3862768b606c1ef8 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/RanzMarshall/RanzMarshall.H @@ -51,9 +51,6 @@ class RanzMarshall // Private data - // Coefficients dictionary - dictionary coeffDict_; - // Prandtl number const scalar Pr_; @@ -81,14 +78,17 @@ public: // Member Functions + //- Flag to indicate whether model activates heat transfer model bool active() const; + //- Nusselt number scalar Nu ( const scalar Re, const scalar Pr ) const; + //- Prandtl number scalar Pr() const; }; diff --git a/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties b/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties index 3d652853607546d2299e6b1cfbd0eedbb8094897..d38573ea7a1834776b5249388133aa398082a995 100644 --- a/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties +++ b/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/kinematicCloud1Properties @@ -60,7 +60,7 @@ integrationSchemes ManualInjectionCoeffs { - injectionTime 0; + SOI 0.0; positionsFile kinematicCloud1Positions; U0 (0 0 0); parcelPDF @@ -76,6 +76,46 @@ ManualInjectionCoeffs } } +ConeInjectionCoeffs +{ + SOI 0.001; + duration 0.005; + position (0.25 0.25 0.05); + direction (0 -1 0); + parcelsPerSecond 10000; + volumeFlowRate Constant; + volumeFlowRateCoeffs + { + value 0.01; + } + Umag Constant; + UmagCoeffs + { + value 50.0; + } + thetaInner Constant; + thetaInnerCoeffs + { + value 0.0; + } + thetaOuter Constant; + thetaOuterCoeffs + { + value 30.0; + } + parcelPDF + { + pdfType RosinRammler; + RosinRammlerPDF + { + minValue 50.0e-06; + maxValue 100.0e-06; + d (75.0e-06); + n (0.5); + } + } +} + StandardWallInteractionCoeffs { e e [ 0 0 0 0 0] 1; diff --git a/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties b/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties index af6f908566aeb3e8bc53d98e05f646c9dc5e1896..ccf74ef18ed295d7e9c7d9ee71caebc24fb26ad5 100644 --- a/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties +++ b/tutorials/rhoTurbTwinParcelFoam/simplifiedSiwek/constant/thermoCloud1Properties @@ -70,7 +70,7 @@ integrationSchemes ManualInjectionCoeffs { - injectionTime 0; + SOI 0.0; positionsFile thermoCloud1Positions; U0 (0 0 0); parcelPDF