/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- Copyright (C) 2016-2019 OpenCFD Ltd ------------------------------------------------------------------------------- License 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 "eddyDissipationDiffusionModel.H" namespace Foam { namespace combustionModels { // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template eddyDissipationDiffusionModel:: eddyDissipationDiffusionModel ( const word& modelType, ReactionThermo& thermo, const compressibleTurbulenceModel& turb, const word& combustionProperties ) : eddyDissipationModelBase ( modelType, thermo, turb, combustionProperties ), Cd_(this->coeffs().getScalar("Cd")) {} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template eddyDissipationDiffusionModel:: ~eddyDissipationDiffusionModel() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // template Foam::tmp eddyDissipationDiffusionModel::timeScale() { return (max(this->rtTurb(), this->rtDiff())); } template Foam::tmp eddyDissipationDiffusionModel::rtDiff() const { tmp tdelta ( new volScalarField ( IOobject ( "tdelta", this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, IOobject::NO_WRITE ), this->mesh(), dimensionedScalar(dimLength, Zero), zeroGradientFvPatchScalarField::typeName ) ); volScalarField& delta = tdelta.ref(); delta.ref() = cbrt(this->mesh().V()); delta.correctBoundaryConditions(); // NOTE: Assume Prt = 1 return Cd_*this->turbulence().nuEff()/sqr(delta); } template bool eddyDissipationDiffusionModel::read() { if (eddyDissipationModelBase::read()) { this->coeffs().readEntry("Cd", Cd_); return true; } return false; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace combustionModels } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //