From 5d40885f13dbd6d127117eb49973cfda42e7ba90 Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 25 Feb 2011 15:19:49 +0000 Subject: [PATCH] ENH: re-located cloudSolution into separate files --- src/lagrangian/intermediate/Make/files | 4 + .../Templates/KinematicCloud/KinematicCloud.C | 150 ------------ .../Templates/KinematicCloud/KinematicCloud.H | 163 +------------ .../KinematicCloud/KinematicCloudI.H | 142 +----------- .../cloudSolution/cloudSolution.C | 167 ++++++++++++++ .../cloudSolution/cloudSolution.H | 218 ++++++++++++++++++ .../cloudSolution/cloudSolutionI.H | 128 ++++++++++ 7 files changed, 520 insertions(+), 452 deletions(-) create mode 100644 src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C create mode 100644 src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H create mode 100644 src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolutionI.H diff --git a/src/lagrangian/intermediate/Make/files b/src/lagrangian/intermediate/Make/files index 7cbe15fe5c..f3a6866a97 100644 --- a/src/lagrangian/intermediate/Make/files +++ b/src/lagrangian/intermediate/Make/files @@ -59,6 +59,7 @@ $(THERMOINJECTION)/ThermoLookupTableInjection/thermoParcelInjectionData.C $(THERMOINJECTION)/ThermoLookupTableInjection/thermoParcelInjectionDataIO.C $(THERMOINJECTION)/ThermoLookupTableInjection/thermoParcelInjectionDataIOList.C + REACTINGINJECTION=submodels/Reacting/InjectionModel $(REACTINGINJECTION)/ReactingLookupTableInjection/reactingParcelInjectionData.C $(REACTINGINJECTION)/ReactingLookupTableInjection/reactingParcelInjectionDataIO.C @@ -79,5 +80,8 @@ phaseProperties/phaseProperties/phaseProperties.C phaseProperties/phaseProperties/phasePropertiesIO.C phaseProperties/phasePropertiesList/phasePropertiesList.C +/* Additional helper classes */ +clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.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 da0ee829bb..4275cf78f8 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.C @@ -34,156 +34,6 @@ License #include "PostProcessingModel.H" #include "SurfaceFilmModel.H" -// * * * * * * * * * * * * * * cloudSolution * * * * * * * * * * * * * * * * // - -template -void Foam::KinematicCloud::cloudSolution::read() -{ - dict_.lookup("transient") >> transient_; - dict_.lookup("coupled") >> coupled_; - dict_.lookup("cellValueSourceCorrection") >> cellValueSourceCorrection_; - - if (steadyState()) - { - dict_.lookup("calcFrequency") >> calcFrequency_; - dict_.lookup("maxCo") >> maxCo_; - dict_.lookup("maxTrackTime") >> maxTrackTime_; - dict_.subDict("sourceTerms").lookup("resetOnStartup") - >> resetSourcesOnStartup_; - } -} - - -template -Foam::KinematicCloud::cloudSolution::cloudSolution -( - const fvMesh& mesh, - const dictionary& dict -) -: - mesh_(mesh), - dict_(dict), - active_(dict.lookup("active")), - transient_(false), - calcFrequency_(1), - maxCo_(0.3), - iter_(1), - deltaT_(0.0), - coupled_(false), - cellValueSourceCorrection_(false), - maxTrackTime_(0.0), - resetSourcesOnStartup_(true) -{ - if (active_) - { - read(); - } -} - - -template -Foam::KinematicCloud::cloudSolution::cloudSolution -( - const cloudSolution& cs -) -: - mesh_(cs.mesh_), - dict_(cs.dict_), - active_(cs.active_), - transient_(cs.transient_), - calcFrequency_(cs.calcFrequency_), - maxCo_(cs.maxCo_), - iter_(cs.iter_), - deltaT_(cs.deltaT_), - coupled_(cs.coupled_), - cellValueSourceCorrection_(cs.cellValueSourceCorrection_), - maxTrackTime_(cs.maxTrackTime_), - resetSourcesOnStartup_(cs.resetSourcesOnStartup_) -{} - - -template -Foam::KinematicCloud::cloudSolution::cloudSolution -( - const fvMesh& mesh -) -: - mesh_(mesh), - dict_(dictionary::null), - active_(false), - transient_(false), - calcFrequency_(0), - maxCo_(GREAT), - iter_(0), - deltaT_(0.0), - coupled_(false), - cellValueSourceCorrection_(false), - maxTrackTime_(0.0), - resetSourcesOnStartup_(false) -{} - - -template -Foam::KinematicCloud::cloudSolution::~cloudSolution() -{} - - -template -Foam::scalar Foam::KinematicCloud::cloudSolution::relaxCoeff -( - const word& fieldName -) const -{ - return readScalar(sourceTermDict().subDict(fieldName).lookup("alpha")); -} - - -template -bool Foam::KinematicCloud::cloudSolution::semiImplicit -( - const word& fieldName -) const -{ - return readBool(sourceTermDict().subDict(fieldName).lookup("semiImplicit")); -} - - -template -bool Foam::KinematicCloud::cloudSolution::solveThisStep() const -{ - return - active_ - && ( - mesh_.time().outputTime() - || (mesh_.time().timeIndex() % calcFrequency_ == 0) - ); -} - - -template -bool Foam::KinematicCloud::cloudSolution::canEvolve() -{ - // Set the calculation time step - if (transient_) - { - deltaT_ = mesh_.time().deltaTValue(); - } - else - { - deltaT_ = maxTrackTime_; - } - - return solveThisStep(); -} - - -template -bool Foam::KinematicCloud::cloudSolution::output() const -{ - return active_ && mesh_.time().outputTime(); -} - - // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // template diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H index 5ae19c02a6..5a124609f6 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloud.H @@ -27,8 +27,6 @@ Class Description Templated base class for kinematic cloud - - holds a 'cloudSolution' class that stores all relevant solution info - - particle forces - buoyancy - drag @@ -59,9 +57,8 @@ SourceFiles #include "fvMesh.H" #include "volFields.H" #include "fvMatrices.H" - #include "IntegrationSchemesFwd.H" - +#include "cloudSolution.H" #include "ParticleForceList.H" @@ -126,164 +123,6 @@ private: void operator=(const KinematicCloud&); -public: - - // Cloud solution helper class - class cloudSolution - { - // Private Data - - //- Reference to the mesh - const fvMesh& mesh_; - - //- Dictionary used during construction - dictionary dict_; - - //- Cloud active flag - const Switch active_; - - //- Transient flag - Switch transient_; - - //- Calculation frequency - carrier steps per cloud step - // NOTE: Steady operation only - label calcFrequency_; - - //- Maximum particle Courant number - // Max fraction of current cell that can be traversed in a single - // step - scalar maxCo_; - - //- Current cloud iteration - label iter_; - - //- Cloud solution time step - scalar deltaT_; - - - // Run-time options - - //- Flag to indicate whether parcels are coupled to the carrier - // phase, i.e. whether or not to generate source terms for - // carrier phase - Switch coupled_; - - //- Flag to correct cell values with latest transfer information - // during the lagrangian timestep - Switch cellValueSourceCorrection_; - - //- Maximum particle track time [s] - scalar maxTrackTime_; - - //- Flag to indicate whether coupling source terms should be - // reset on start-up/first read - Switch resetSourcesOnStartup_; - - - // Private Member Functions - - //- Disallow default bitwise assignment - void operator=(const cloudSolution&); - - - public: - - // Constructors - - //- Construct null from mesh reference - cloudSolution(const fvMesh& mesh); - - //- Construct from mesh and dictionary - cloudSolution(const fvMesh& mesh, const dictionary& dict); - - //- Construct copy - cloudSolution(const cloudSolution& cs); - - - //- Destructor - virtual ~cloudSolution(); - - - // Member functions - - //- Read properties from dictionary - void read(); - - - // Access - - //- Return relaxation coefficient for field - scalar relaxCoeff(const word& fieldName) const; - - //- Return semi-implicit flag coefficient for field - bool semiImplicit(const word& fieldName) const; - - //- Return reference to the mesh - inline const fvMesh& mesh() const; - - //- Return const access to the dictionary - inline const dictionary& dict() const; - - //- Return the active flag - inline const Switch active() const; - - //- Return const access to the transient flag - inline const Switch transient() const; - - //- Return const access to the steady flag - inline const Switch steadyState() const; - - //- Return const access to the calculation frequency - inline label calcFrequency() const; - - //- Return const access to the max particle Courant number - inline scalar maxCo() const; - - //- Return const access to the current cloud iteration - inline label iter() const; - - //- Increment and return iter counter - inline label nextIter(); - - //- Return the time step - inline scalar deltaT() const; - - //- Return const access to the coupled flag - inline const Switch coupled() const; - - //- Return const access to the cell value correction flag - inline const Switch cellValueSourceCorrection() const; - - //- Return const access to the particle track time - inline scalar maxTrackTime() const; - - //- Return const access to the reset sources flag - inline const Switch resetSourcesOnStartup() const; - - //- Source terms dictionary - inline const dictionary& sourceTermDict() const; - - //- Interpolation schemes dictionary - inline const dictionary& interpolationSchemes() const; - - //- Integration schemes dictionary - inline const dictionary& integrationSchemes() const; - - - // Helper functions - - //- Returns true if performing a cloud iteration this calc step - bool solveThisStep() const; - - //- Returns true if possible to evolve the cloud and sets timestep - // parameters - bool canEvolve(); - - //- Returns true if writing this step - bool output() const; - }; - - protected: // Protected data diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H index 86f5b99a5e..41aae6135a 100644 --- a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/KinematicCloudI.H @@ -25,143 +25,6 @@ License #include "fvmSup.H" -// * * * * * * * * * * * cloudSolution Member Functions * * * * * * * * * * // - -template -inline const Foam::fvMesh& -Foam::KinematicCloud::cloudSolution::mesh() const -{ - return mesh_; -} - - -template -inline const Foam::dictionary& -Foam::KinematicCloud::cloudSolution::dict() const -{ - return dict_; -} - - -template -inline const Foam::Switch -Foam::KinematicCloud::cloudSolution::active() const -{ - return active_; -} - - -template -inline const Foam::dictionary& -Foam::KinematicCloud::cloudSolution::sourceTermDict() const -{ - return dict_.subDict("sourceTerms"); -} - - -template -inline const Foam::dictionary& -Foam::KinematicCloud::cloudSolution::interpolationSchemes() const -{ - return dict_.subDict("interpolationSchemes"); -} - - -template -inline const Foam::dictionary& -Foam::KinematicCloud::cloudSolution::integrationSchemes() const -{ - return dict_.subDict("integrationSchemes"); -} - - -template -inline const Foam::Switch -Foam::KinematicCloud::cloudSolution::transient() const -{ - return transient_; -} - - -template -inline const Foam::Switch -Foam::KinematicCloud::cloudSolution::steadyState() const -{ - return !transient_; -} - - -template -inline Foam::label -Foam::KinematicCloud::cloudSolution::calcFrequency() const -{ - return calcFrequency_; -} - - -template -inline Foam::scalar -Foam::KinematicCloud::cloudSolution::maxCo() const -{ - return maxCo_; -} - - -template -inline Foam::label Foam::KinematicCloud::cloudSolution::iter() const -{ - return iter_; -} - - -template -inline Foam::label Foam::KinematicCloud::cloudSolution::nextIter() -{ - return ++iter_; -} - - -template -inline Foam::scalar -Foam::KinematicCloud::cloudSolution::deltaT() const -{ - return deltaT_; -} - - -template -inline const Foam::Switch -Foam::KinematicCloud::cloudSolution::coupled() const -{ - return coupled_; -} - - -template -inline const Foam::Switch -Foam::KinematicCloud::cloudSolution::cellValueSourceCorrection() -const -{ - return cellValueSourceCorrection_; -} - - -template -inline Foam::scalar -Foam::KinematicCloud::cloudSolution::maxTrackTime() const -{ - return maxTrackTime_; -} - - -template -inline const Foam::Switch -Foam::KinematicCloud::cloudSolution::resetSourcesOnStartup() const -{ - return resetSourcesOnStartup_; -} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template @@ -188,7 +51,7 @@ Foam::KinematicCloud::particleProperties() const template -inline const typename Foam::KinematicCloud::cloudSolution& +inline const Foam::cloudSolution& Foam::KinematicCloud::solution() const { return solution_; @@ -196,8 +59,7 @@ Foam::KinematicCloud::solution() const template -inline typename Foam::KinematicCloud::cloudSolution& -Foam::KinematicCloud::solution() +inline Foam::cloudSolution& Foam::KinematicCloud::solution() { return solution_; } diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C new file mode 100644 index 0000000000..e5def7971d --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.C @@ -0,0 +1,167 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 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 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "cloudSolution.H" +#include "Time.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::cloudSolution::cloudSolution +( + const fvMesh& mesh, + const dictionary& dict +) +: + mesh_(mesh), + dict_(dict), + active_(dict.lookup("active")), + transient_(false), + calcFrequency_(1), + maxCo_(0.3), + iter_(1), + deltaT_(0.0), + coupled_(false), + cellValueSourceCorrection_(false), + maxTrackTime_(0.0), + resetSourcesOnStartup_(true) +{ + if (active_) + { + read(); + } +} + + +Foam::cloudSolution::cloudSolution +( + const cloudSolution& cs +) +: + mesh_(cs.mesh_), + dict_(cs.dict_), + active_(cs.active_), + transient_(cs.transient_), + calcFrequency_(cs.calcFrequency_), + maxCo_(cs.maxCo_), + iter_(cs.iter_), + deltaT_(cs.deltaT_), + coupled_(cs.coupled_), + cellValueSourceCorrection_(cs.cellValueSourceCorrection_), + maxTrackTime_(cs.maxTrackTime_), + resetSourcesOnStartup_(cs.resetSourcesOnStartup_) +{} + + +Foam::cloudSolution::cloudSolution +( + const fvMesh& mesh +) +: + mesh_(mesh), + dict_(dictionary::null), + active_(false), + transient_(false), + calcFrequency_(0), + maxCo_(GREAT), + iter_(0), + deltaT_(0.0), + coupled_(false), + cellValueSourceCorrection_(false), + maxTrackTime_(0.0), + resetSourcesOnStartup_(false) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::cloudSolution::~cloudSolution() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::cloudSolution::read() +{ + dict_.lookup("transient") >> transient_; + dict_.lookup("coupled") >> coupled_; + dict_.lookup("cellValueSourceCorrection") >> cellValueSourceCorrection_; + + if (steadyState()) + { + dict_.lookup("calcFrequency") >> calcFrequency_; + dict_.lookup("maxCo") >> maxCo_; + dict_.lookup("maxTrackTime") >> maxTrackTime_; + dict_.subDict("sourceTerms").lookup("resetOnStartup") + >> resetSourcesOnStartup_; + } +} + + +Foam::scalar Foam::cloudSolution::relaxCoeff(const word& fieldName) const +{ + return readScalar(sourceTermDict().subDict(fieldName).lookup("alpha")); +} + + +bool Foam::cloudSolution::semiImplicit(const word& fieldName) const +{ + return readBool(sourceTermDict().subDict(fieldName).lookup("semiImplicit")); +} + + +bool Foam::cloudSolution::solveThisStep() const +{ + return + active_ + && ( + mesh_.time().outputTime() + || (mesh_.time().timeIndex() % calcFrequency_ == 0) + ); +} + + +bool Foam::cloudSolution::canEvolve() +{ + // Set the calculation time step + if (transient_) + { + deltaT_ = mesh_.time().deltaTValue(); + } + else + { + deltaT_ = maxTrackTime_; + } + + return solveThisStep(); +} + + +bool Foam::cloudSolution::output() const +{ + return active_ && mesh_.time().outputTime(); +} + + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H new file mode 100644 index 0000000000..20e19783de --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolution.H @@ -0,0 +1,218 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 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 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::cloudSolution + +Description + - Stores all relevant solution info + +SourceFiles + cloudSolutionI.H + cloudSolution.C + +\*---------------------------------------------------------------------------*/ + +#ifndef cloudSolution_H +#define cloudSolution_H + +#include "fvMesh.H" +#include "Switch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class cloudSolution Declaration +\*---------------------------------------------------------------------------*/ + +class cloudSolution +{ + // Private Data + + //- Reference to the mesh + const fvMesh& mesh_; + + //- Dictionary used during construction + dictionary dict_; + + //- Cloud active flag + const Switch active_; + + //- Transient flag + Switch transient_; + + //- Calculation frequency - carrier steps per cloud step + // NOTE: Steady operation only + label calcFrequency_; + + //- Maximum particle Courant number + // Max fraction of current cell that can be traversed in a single + // step + scalar maxCo_; + + //- Current cloud iteration + label iter_; + + //- Cloud solution time step + scalar deltaT_; + + + // Run-time options + + //- Flag to indicate whether parcels are coupled to the carrier + // phase, i.e. whether or not to generate source terms for + // carrier phase + Switch coupled_; + + //- Flag to correct cell values with latest transfer information + // during the lagrangian timestep + Switch cellValueSourceCorrection_; + + //- Maximum particle track time [s] + scalar maxTrackTime_; + + //- Flag to indicate whether coupling source terms should be + // reset on start-up/first read + Switch resetSourcesOnStartup_; + + + // Private Member Functions + + //- Disallow default bitwise assignment + void operator=(const cloudSolution&); + + +public: + + // Constructors + + //- Construct null from mesh reference + cloudSolution(const fvMesh& mesh); + + //- Construct from mesh and dictionary + cloudSolution(const fvMesh& mesh, const dictionary& dict); + + //- Construct copy + cloudSolution(const cloudSolution& cs); + + + //- Destructor + virtual ~cloudSolution(); + + + // Member functions + + //- Read properties from dictionary + void read(); + + + // Access + + //- Return relaxation coefficient for field + scalar relaxCoeff(const word& fieldName) const; + + //- Return semi-implicit flag coefficient for field + bool semiImplicit(const word& fieldName) const; + + //- Return reference to the mesh + inline const fvMesh& mesh() const; + + //- Return const access to the dictionary + inline const dictionary& dict() const; + + //- Return the active flag + inline const Switch active() const; + + //- Return const access to the transient flag + inline const Switch transient() const; + + //- Return const access to the steady flag + inline const Switch steadyState() const; + + //- Return const access to the calculation frequency + inline label calcFrequency() const; + + //- Return const access to the max particle Courant number + inline scalar maxCo() const; + + //- Return const access to the current cloud iteration + inline label iter() const; + + //- Increment and return iter counter + inline label nextIter(); + + //- Return the time step + inline scalar deltaT() const; + + //- Return const access to the coupled flag + inline const Switch coupled() const; + + //- Return const access to the cell value correction flag + inline const Switch cellValueSourceCorrection() const; + + //- Return const access to the particle track time + inline scalar maxTrackTime() const; + + //- Return const access to the reset sources flag + inline const Switch resetSourcesOnStartup() const; + + //- Source terms dictionary + inline const dictionary& sourceTermDict() const; + + //- Interpolation schemes dictionary + inline const dictionary& interpolationSchemes() const; + + //- Integration schemes dictionary + inline const dictionary& integrationSchemes() const; + + + // Helper functions + + //- Returns true if performing a cloud iteration this calc step + bool solveThisStep() const; + + //- Returns true if possible to evolve the cloud and sets timestep + // parameters + bool canEvolve(); + + //- Returns true if writing this step + bool output() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "cloudSolutionI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolutionI.H b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolutionI.H new file mode 100644 index 0000000000..37aad4dbdf --- /dev/null +++ b/src/lagrangian/intermediate/clouds/Templates/KinematicCloud/cloudSolution/cloudSolutionI.H @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011-2011 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 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +inline const Foam::fvMesh& Foam::cloudSolution::mesh() const +{ + return mesh_; +} + + +inline const Foam::dictionary& Foam::cloudSolution::dict() const +{ + return dict_; +} + + +inline const Foam::Switch Foam::cloudSolution::active() const +{ + return active_; +} + + +inline const Foam::dictionary& Foam::cloudSolution::sourceTermDict() const +{ + return dict_.subDict("sourceTerms"); +} + + +inline const Foam::dictionary& Foam::cloudSolution::interpolationSchemes() const +{ + return dict_.subDict("interpolationSchemes"); +} + + +inline const Foam::dictionary& Foam::cloudSolution::integrationSchemes() const +{ + return dict_.subDict("integrationSchemes"); +} + + +inline const Foam::Switch Foam::cloudSolution::transient() const +{ + return transient_; +} + + +inline const Foam::Switch Foam::cloudSolution::steadyState() const +{ + return !transient_; +} + + +inline Foam::label Foam::cloudSolution::calcFrequency() const +{ + return calcFrequency_; +} + + +inline Foam::scalar Foam::cloudSolution::maxCo() const +{ + return maxCo_; +} + + +inline Foam::label Foam::cloudSolution::iter() const +{ + return iter_; +} + + +inline Foam::label Foam::cloudSolution::nextIter() +{ + return ++iter_; +} + + +inline Foam::scalar Foam::cloudSolution::deltaT() const +{ + return deltaT_; +} + + +inline const Foam::Switch Foam::cloudSolution::coupled() const +{ + return coupled_; +} + + +inline const Foam::Switch Foam::cloudSolution::cellValueSourceCorrection() const +{ + return cellValueSourceCorrection_; +} + + +inline Foam::scalar Foam::cloudSolution::maxTrackTime() const +{ + return maxTrackTime_; +} + + +inline const Foam::Switch Foam::cloudSolution::resetSourcesOnStartup() const +{ + return resetSourcesOnStartup_; +} + + +// ************************************************************************* //