From 55bb185ef32ed0c38939e55d0fdda39edf1120f0 Mon Sep 17 00:00:00 2001 From: Thomas Lichtenegger Date: Tue, 27 Jun 2017 10:00:43 +0200 Subject: [PATCH 1/6] Cleaning up chemistry models. --- .../chemistryModel/noChemistry/noChemistry.C | 62 +++++-------------- .../chemistryModel/noChemistry/noChemistry.H | 9 --- .../chemistryModel/species/species.C | 9 +-- .../chemistryModel/species/species.H | 5 -- 4 files changed, 17 insertions(+), 68 deletions(-) diff --git a/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.C b/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.C index 5580e3c4..72ebcb35 100644 --- a/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.C +++ b/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.C @@ -59,84 +59,50 @@ noChemistry::~noChemistry() void noChemistry::execute() {} -void noChemistry::tryout(const label i) -{ - mi_.set - ( - i, - new volScalarField - ( - IOobject - ( - "empty1", - particleCloud_.mesh().time().timeName(), - particleCloud_.mesh(), - IOobject::NO_READ, - IOobject::NO_WRITE - ), - particleCloud_.mesh(), - dimensionedScalar("zero",dimless,0.0) - ) - ); -} tmp noChemistry ::Smi(const label i) const { - return tmp (mi_[i]); -} - - /* tmp mi_[i] + tmp smi ( new volScalarField ( IOobject ( - "empty1", + "dummy", particleCloud_.mesh().time().timeName(), particleCloud_.mesh(), IOobject::NO_READ, IOobject::NO_WRITE - ), - particleCloud_.mesh(), - dimensionedScalar - ( - "zero", - dimMass/dimTime,//dimensionSet(0,2,-1,0,0,0,0), - 0.0 - ) - ) + ), + particleCloud_.mesh(), + dimensionedScalar("zero",dimMass/(dimVol*dimTime),0.0) + ) ); - return mi_[i]; -}*/ + return smi; +} tmp noChemistry::Sm() const { - tmp sm_ + tmp sm ( new volScalarField ( IOobject ( - "empty2", + "dummy", particleCloud_.mesh().time().timeName(), particleCloud_.mesh(), IOobject::NO_READ, IOobject::NO_WRITE - ), - particleCloud_.mesh(), - dimensionedScalar("zero",dimless,0.0) + ), + particleCloud_.mesh(), + dimensionedScalar("zero",dimMass/(dimVol*dimTime), 0.0) ) ); - return sm_; + return sm; } - - -/*tmp noChemistry::Smi(const label i) const -tmp noChemistry::Sm() const*/ - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.H b/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.H index 6a98eaa5..861ad90e 100644 --- a/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.H +++ b/src/lagrangian/cfdemParticle/subModels/chemistryModel/noChemistry/noChemistry.H @@ -41,9 +41,6 @@ class noChemistry : public chemistryModel { -private: - PtrList mi_; - public: //- Runtime type information @@ -68,12 +65,6 @@ public: void execute(); -// tmp Smi(const label i) const; - -// tmp Sm() const; - - virtual void tryout(const label i); - tmp Smi(const label i) const; tmp Sm() const; diff --git a/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C b/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C index 905f95dd..58e0b8a3 100644 --- a/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C +++ b/src/lagrangian/cfdemParticle/subModels/chemistryModel/species/species.C @@ -101,7 +101,7 @@ species::species N_(sm.mesh().lookupObject(totalMoleFieldName_)), partMoleName_(propsDict_.lookup("partMoleName")), partN_(NULL), - loopCounter_(0), + loopCounter_(-1), Nevery_(propsDict_.lookupOrDefault