From 83f311c628a2be0ef0ae74e52f1137e2d6ea0d41 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 19 Nov 2012 09:54:14 +0000 Subject: [PATCH] ENH: Removed hard-coded film coupling from pyrolysis models --- .../pyrolysisModel/pyrolysisModel.C | 80 ++----------------- .../pyrolysisModel/pyrolysisModel.H | 28 ++----- 2 files changed, 10 insertions(+), 98 deletions(-) diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C index b64afa0be6..cfa52c3e80 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,61 +42,11 @@ defineTypeNameAndDebug(pyrolysisModel, 0); defineRunTimeSelectionTable(pyrolysisModel, mesh); defineRunTimeSelectionTable(pyrolysisModel, dictionary); -// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // - -void pyrolysisModel::constructMeshObjects() -{ - // construct filmDelta field if coupled to film model - if (filmCoupled_) - { - filmDeltaPtr_.reset - ( - new volScalarField - ( - IOobject - ( - "filmDelta", - time_.timeName(), - regionMesh(), - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - regionMesh() - ) - ); - - const volScalarField& filmDelta = filmDeltaPtr_(); - - bool foundCoupledPatch = false; - forAll(filmDelta.boundaryField(), patchI) - { - const fvPatchField& fvp = filmDelta.boundaryField()[patchI]; - if (isA >(fvp)) - { - foundCoupledPatch = true; - break; - } - } - - if (!foundCoupledPatch) - { - WarningIn("void pyrolysisModels::constructMeshObjects()") - << "filmCoupled flag set to true, but no " - << mappedFieldFvPatchField::typeName - << " patches found on " << filmDelta.name() << " field" - << endl; - } - } -} - - // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // void pyrolysisModel::readPyrolysisControls() { - filmCoupled_ = readBool(coeffs_.lookup("filmCoupled")); - reactionDeltaMin_ = - coeffs_.lookupOrDefault("reactionDeltaMin", 0.0); + // do nothing } @@ -132,24 +82,17 @@ bool pyrolysisModel::read(const dictionary& dict) pyrolysisModel::pyrolysisModel(const fvMesh& mesh) : - regionModel1D(mesh), - filmCoupled_(false), - filmDeltaPtr_(NULL), - reactionDeltaMin_(0.0) + regionModel1D(mesh) {} pyrolysisModel::pyrolysisModel(const word& modelType, const fvMesh& mesh) : - regionModel1D(mesh, "pyrolysis", modelType), - filmCoupled_(false), - filmDeltaPtr_(NULL), - reactionDeltaMin_(0.0) + regionModel1D(mesh, "pyrolysis", modelType) { if (active_) { read(); - constructMeshObjects(); } } @@ -161,15 +104,11 @@ pyrolysisModel::pyrolysisModel const dictionary& dict ) : - regionModel1D(mesh, "pyrolysis", modelType, dict), - filmCoupled_(false), - filmDeltaPtr_(NULL), - reactionDeltaMin_(0.0) + regionModel1D(mesh, "pyrolysis", modelType, dict) { if (active_) { read(dict); - constructMeshObjects(); } } @@ -192,15 +131,6 @@ scalar pyrolysisModel::addMassSources } -void pyrolysisModel::preEvolveRegion() -{ - if (filmCoupled_) - { - filmDeltaPtr_->correctBoundaryConditions(); - } -} - - scalar pyrolysisModel::solidRegionDiffNo() const { return -GREAT; diff --git a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H index 57d8caa3c4..98da338d9a 100644 --- a/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H +++ b/src/regionModels/pyrolysisModels/pyrolysisModel/pyrolysisModel.H @@ -80,18 +80,6 @@ private: protected: - // Protected Data - - //- Flag to indicate whether pyrolysis region coupled to a film region - bool filmCoupled_; - - //- Pointer to film thickness field - autoPtr filmDeltaPtr_; - - //- Film height below which reactions can occur [m] - scalar reactionDeltaMin_; - - // Protected Member Functions //- Read control parameters @@ -115,8 +103,8 @@ public: pyrolysisModel, mesh, ( - const word& modelType, - const fvMesh& mesh + const word& modelType, + const fvMesh& mesh ), (modelType, mesh) ); @@ -127,9 +115,9 @@ public: pyrolysisModel, dictionary, ( - const word& modelType, - const fvMesh& mesh, - const dictionary& dict + const word& modelType, + const fvMesh& mesh, + const dictionary& dict ), (modelType, mesh, dict) ); @@ -234,12 +222,6 @@ public: ); - // Evolution - - //- Pre-evolve region - virtual void preEvolveRegion(); - - // Helper function //- Mean diffusion number of the solid region