From b4c22cc0acd4740ab85d9ba643ab69bb01c868f8 Mon Sep 17 00:00:00 2001 From: william Date: Mon, 24 Mar 2014 10:30:41 +0000 Subject: [PATCH] ENH: twoPhaseEulerFoam: Added Johnson-Jackson slip and granular temperature BCs --- .../Make/files | 3 + ...sonJacksonParticleSlipFvPatchVectorField.C | 258 ++++++++++++++ ...sonJacksonParticleSlipFvPatchVectorField.H | 177 ++++++++++ ...onJacksonParticleThetaFvPatchScalarField.C | 320 ++++++++++++++++++ ...onJacksonParticleThetaFvPatchScalarField.H | 179 ++++++++++ 5 files changed, 937 insertions(+) create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C create mode 100644 applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/files b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/files index 96f9c63e..2a3a6a96 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/files +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/Make/files @@ -32,4 +32,7 @@ kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStr kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C +kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C +kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C + LIB = $(FOAM_LIBBIN)/libphaseIncompressibleTurbulenceModels diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C new file mode 100644 index 00000000..2a81a553 --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.C @@ -0,0 +1,258 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\/ 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 "JohnsonJacksonParticleSlipFvPatchVectorField.H" +#include "addToRunTimeSelectionTable.H" +#include "twoPhaseSystem.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchVectorField, + JohnsonJacksonParticleSlipFvPatchVectorField + ); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::JohnsonJacksonParticleSlipFvPatchVectorField:: +JohnsonJacksonParticleSlipFvPatchVectorField +( + const fvPatch& p, + const DimensionedField& iF +) +: + partialSlipFvPatchVectorField(p, iF), + specularityCoefficient_(p.size()) +{} + + +Foam::JohnsonJacksonParticleSlipFvPatchVectorField:: +JohnsonJacksonParticleSlipFvPatchVectorField +( + const JohnsonJacksonParticleSlipFvPatchVectorField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + partialSlipFvPatchVectorField(ptf, p, iF, mapper), + specularityCoefficient_(ptf.specularityCoefficient_) +{} + + +Foam::JohnsonJacksonParticleSlipFvPatchVectorField:: +JohnsonJacksonParticleSlipFvPatchVectorField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + partialSlipFvPatchVectorField(p, iF), + specularityCoefficient_ + ( + "specularityCoefficient", + dimless, + dict.lookup("specularityCoefficient") + ) +{ + if + ( + (specularityCoefficient_.value() < 0) + || (specularityCoefficient_.value() > 1) + ) + { + FatalErrorIn + ( + "(" + "Foam::JohnsonJacksonParticleSlipFvPatchVectorField::" + "JohnsonJacksonParticleSlipFvPatchVectorField" + "const fvPatch& p," + "const DimensionedField& iF," + "const dictionary& dict" + ")" + ) << "The specularity coefficient has to be between 0 and 1" + << abort(FatalError); + } + + if (dict.found("value")) + { + fvPatchVectorField::operator= + ( + vectorField("value", dict, p.size()) + ); + } + else + { + partialSlipFvPatchVectorField::evaluate(); + } +} + + +Foam::JohnsonJacksonParticleSlipFvPatchVectorField:: +JohnsonJacksonParticleSlipFvPatchVectorField +( + const JohnsonJacksonParticleSlipFvPatchVectorField& ptf +) +: + partialSlipFvPatchVectorField(ptf), + specularityCoefficient_(ptf.specularityCoefficient_) +{} + + +Foam::JohnsonJacksonParticleSlipFvPatchVectorField:: +JohnsonJacksonParticleSlipFvPatchVectorField +( + const JohnsonJacksonParticleSlipFvPatchVectorField& ptf, + const DimensionedField& iF +) +: + partialSlipFvPatchVectorField(ptf, iF), + specularityCoefficient_(ptf.specularityCoefficient_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::autoMap +( + const fvPatchFieldMapper& m +) +{ + partialSlipFvPatchVectorField::autoMap(m); +} + + +void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::rmap +( + const fvPatchVectorField& ptf, + const labelList& addr +) +{ + partialSlipFvPatchVectorField::rmap(ptf, addr); +} + + +void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::updateCoeffs() +{ + if (updated()) + { + return; + } + + // lookup the fluid model and the phase + const twoPhaseSystem& fluid = db().lookupObject + ( + "phaseProperties" + ); + + const phaseModel& phased + ( + fluid.phase1().name() == dimensionedInternalField().group() + ? fluid.phase1() + : fluid.phase2() + ); + + // lookup all the fields on this patch + const fvPatchScalarField& alpha + ( + patch().lookupPatchField + ( + phased.volScalarField::name() + ) + ); + + const fvPatchScalarField& gs0 + ( + patch().lookupPatchField + ( + IOobject::groupName("gs0", phased.name()) + ) + ); + + const scalarField nu + ( + phased.nu()->boundaryField()[patch().index()] + ); + + word ThetaName(IOobject::groupName("Theta", phased.name())); + + const fvPatchScalarField& Theta + ( + db().foundObject(ThetaName) + ? patch().lookupPatchField(ThetaName) + : alpha + ); + + // lookup the packed volume fraction + dimensionedScalar alphaMax + ( + "alphaMax", + dimless, + db() + .lookupObject + ( + IOobject::groupName("turbulenceProperties", phased.name()) + ) + .subDict("RAS") + .subDict("kineticTheoryCoeffs") + .lookup("alphaMax") + ); + + // calculate the slip value fraction + scalarField c + ( + constant::mathematical::pi + *alpha + *gs0 + *specularityCoefficient_.value() + *sqrt(3.0*Theta) + /max(6.0*nu*alphaMax.value(), SMALL) + ); + + this->valueFraction() = c/(c + patch().deltaCoeffs()); + + partialSlipFvPatchVectorField::updateCoeffs(); +} + + +void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::write +( + Ostream& os +) const +{ + partialSlipFvPatchVectorField::write(os); + os.writeKeyword("specularityCoefficient") + << specularityCoefficient_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H new file mode 100644 index 00000000..9d3bc14a --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleSlip/JohnsonJacksonParticleSlipFvPatchVectorField.H @@ -0,0 +1,177 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\/ 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::JohnsonJacksonParticleSlipFvPatchVectorField + +Description + Partial slip boundary condition for the particulate velocity. + + References: + \verbatim + "Multifluid Eulerian modeling of dense gas–solids fluidized bed + hydrodynamics: Influence of the dissipation parameters" + N Reuge + Chemical Engineering Science + Volume 63, Issue 22, Pages 5540-5551, November 2008 + \endverbatim + + \verbatim + "Frictional-collisional constitutive relations for granular materials, + with application to plane shearing" + P C Johnson and R Jackson + Journal of Fluid Mechanics + Volume 176, Pages 67-93, March 1987 + \endverbatim + +SourceFiles + JohnsonJacksonParticleSlipFvPatchVectorField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef JohnsonJacksonParticleSlipFvPatchVectorField_H +#define JohnsonJacksonParticleSlipFvPatchVectorField_H + +#include "partialSlipFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class JohnsonJacksonParticleSlipFvPatchVectorField Declaration +\*---------------------------------------------------------------------------*/ + +class JohnsonJacksonParticleSlipFvPatchVectorField +: + public partialSlipFvPatchVectorField +{ + // Private data + + //- Specularity coefficient + dimensionedScalar specularityCoefficient_; + + +public: + + //- Runtime type information + TypeName("JohnsonJacksonParticleSlip"); + + + // Constructors + + //- Construct from patch and internal field + JohnsonJacksonParticleSlipFvPatchVectorField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + JohnsonJacksonParticleSlipFvPatchVectorField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping onto a new patch + JohnsonJacksonParticleSlipFvPatchVectorField + ( + const JohnsonJacksonParticleSlipFvPatchVectorField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + JohnsonJacksonParticleSlipFvPatchVectorField + ( + const JohnsonJacksonParticleSlipFvPatchVectorField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new JohnsonJacksonParticleSlipFvPatchVectorField(*this) + ); + } + + //- Construct as copy setting internal field reference + JohnsonJacksonParticleSlipFvPatchVectorField + ( + const JohnsonJacksonParticleSlipFvPatchVectorField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new JohnsonJacksonParticleSlipFvPatchVectorField(*this, iF) + ); + } + + + // Member functions + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const fvPatchFieldMapper& + ); + + //- Reverse map the given fvPatchField onto this fvPatchField + virtual void rmap + ( + const fvPatchVectorField&, + const labelList& + ); + + //- Update the coefficients + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C new file mode 100644 index 00000000..73bc22a1 --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.C @@ -0,0 +1,320 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\/ 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 "JohnsonJacksonParticleThetaFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" +#include "twoPhaseSystem.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + JohnsonJacksonParticleThetaFvPatchScalarField + ); +} + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::JohnsonJacksonParticleThetaFvPatchScalarField:: +JohnsonJacksonParticleThetaFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + mixedFvPatchScalarField(p, iF), + restitutionCoefficient_(p.size()), + specularityCoefficient_(p.size()) +{} + + +Foam::JohnsonJacksonParticleThetaFvPatchScalarField:: +JohnsonJacksonParticleThetaFvPatchScalarField +( + const JohnsonJacksonParticleThetaFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + mixedFvPatchScalarField(ptf, p, iF, mapper), + restitutionCoefficient_(ptf.restitutionCoefficient_), + specularityCoefficient_(ptf.specularityCoefficient_) +{ +} + + +Foam::JohnsonJacksonParticleThetaFvPatchScalarField:: +JohnsonJacksonParticleThetaFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + mixedFvPatchScalarField(p, iF), + restitutionCoefficient_ + ( + "restitutionCoefficient", + dimless, + dict.lookup("restitutionCoefficient") + ), + specularityCoefficient_ + ( + "specularityCoefficient", + dimless, + dict.lookup("specularityCoefficient") + ) +{ + if + ( + (restitutionCoefficient_.value() < 0) + || (restitutionCoefficient_.value() > 1) + ) + { + FatalErrorIn + ( + "Foam::JohnsonJacksonParticleThetaFvPatchScalarField::" + "JohnsonJacksonParticleThetaFvPatchScalarField" + "(" + "const fvPatch& p," + "const DimensionedField& iF," + "const dictionary& dict" + ")" + ) << "The restitution coefficient has to be between 0 and 1" + << abort(FatalError); + } + + if + ( + (specularityCoefficient_.value() < 0) + || (specularityCoefficient_.value() > 1) + ) + { + FatalErrorIn + ( + "Foam::JohnsonJacksonParticleThetaFvPatchScalarField::" + "JohnsonJacksonParticleThetaFvPatchScalarField" + "(" + "const fvPatch& p," + "const DimensionedField& iF," + "const dictionary& dict" + ")" + ) << "The specularity coefficient has to be between 0 and 1" + << abort(FatalError); + } + + if (dict.found("value")) + { + fvPatchScalarField::operator= + ( + scalarField("value", dict, p.size()) + ); + } + else + { + evaluate(); + } +} + + +Foam::JohnsonJacksonParticleThetaFvPatchScalarField:: +JohnsonJacksonParticleThetaFvPatchScalarField +( + const JohnsonJacksonParticleThetaFvPatchScalarField& ptf +) +: + mixedFvPatchScalarField(ptf), + restitutionCoefficient_(ptf.restitutionCoefficient_), + specularityCoefficient_(ptf.specularityCoefficient_) +{} + + +Foam::JohnsonJacksonParticleThetaFvPatchScalarField:: +JohnsonJacksonParticleThetaFvPatchScalarField +( + const JohnsonJacksonParticleThetaFvPatchScalarField& ptf, + const DimensionedField& iF +) +: + mixedFvPatchScalarField(ptf, iF), + restitutionCoefficient_(ptf.restitutionCoefficient_), + specularityCoefficient_(ptf.specularityCoefficient_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::autoMap +( + const fvPatchFieldMapper& m +) +{ + mixedFvPatchScalarField::autoMap(m); +} + + +void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::rmap +( + const fvPatchScalarField& ptf, + const labelList& addr +) +{ + mixedFvPatchScalarField::rmap(ptf, addr); +} + + +void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + // lookup the fluid model and the phase + const twoPhaseSystem& fluid = db().lookupObject + ( + "phaseProperties" + ); + + const phaseModel& phased + ( + fluid.phase1().name() == dimensionedInternalField().group() + ? fluid.phase1() + : fluid.phase2() + ); + + // lookup all the fields on this patch + const fvPatchScalarField& alpha + ( + patch().lookupPatchField + ( + phased.volScalarField::name() + ) + ); + + const fvPatchVectorField& U + ( + patch().lookupPatchField + ( + IOobject::groupName("U", phased.name()) + ) + ); + + const fvPatchScalarField& gs0 + ( + patch().lookupPatchField + ( + IOobject::groupName("gs0", phased.name()) + ) + ); + + const fvPatchScalarField& kappa + ( + patch().lookupPatchField + ( + IOobject::groupName("kappa", phased.name()) + ) + ); + + const scalarField Theta(patchInternalField()); + + // lookup the packed volume fraction + dimensionedScalar alphaMax + ( + "alphaMax", + dimless, + db() + .lookupObject + ( + IOobject::groupName("turbulenceProperties", phased.name()) + ) + .subDict("RAS") + .subDict("kineticTheoryCoeffs") + .lookup("alphaMax") + ); + + // calculate the reference value and the value fraction + if (restitutionCoefficient_.value() != 1.0) + { + this->refValue() = + (2.0/3.0) + *specularityCoefficient_.value() + *magSqr(U) + /(scalar(1) - sqr(restitutionCoefficient_.value())); + + this->refGrad() = 0.0; + + scalarField c + ( + constant::mathematical::pi + *alpha + *gs0 + *(scalar(1) - sqr(restitutionCoefficient_.value())) + *sqrt(3.0*Theta) + /max(4.0*kappa*alphaMax.value(), SMALL) + ); + + this->valueFraction() = c/(c + patch().deltaCoeffs()); + } + + // for a restitution coefficient of 1, the boundary degenerates to a fixed + // gradient condition + else + { + this->refValue() = 0.0; + + this->refGrad() = + pos(alpha - SMALL) + *constant::mathematical::pi + *specularityCoefficient_.value() + *alpha + *gs0 + *sqrt(3.0*Theta) + *magSqr(U) + /max(6.0*kappa*alphaMax.value(), SMALL); + + this->valueFraction() = 0.0; + } + + mixedFvPatchScalarField::updateCoeffs(); +} + + +void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::write +( + Ostream& os +) const +{ + // ... + + mixedFvPatchScalarField::write(os); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H new file mode 100644 index 00000000..9c75efd9 --- /dev/null +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseIncompressibleTurbulenceModels/kineticTheoryModels/derivedFvPatchFields/JohnsonJacksonParticleTheta/JohnsonJacksonParticleThetaFvPatchScalarField.H @@ -0,0 +1,179 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\/ 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::JohnsonJacksonParticleThetaFvPatchScalarField + +Description + Robin condition for the particulate granular temperature. + + References: + \verbatim + "Multifluid Eulerian modeling of dense gas–solids fluidized bed + hydrodynamics: Influence of the dissipation parameters" + N Reuge + Chemical Engineering Science + Volume 63, Issue 22, Pages 5540-5551, November 2008 + \endverbatim + + \verbatim + "Frictional-collisional constitutive relations for granular materials, + with application to plane shearing" + P C Johnson and R Jackson + Journal of Fluid Mechanics + Volume 176, Pages 67-93, March 1987 + \endverbatim + +SourceFiles + JohnsonJacksonParticleThetaFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef JohnsonJacksonParticleThetaFvPatchScalarField_H +#define JohnsonJacksonParticleThetaFvPatchScalarField_H + +#include "mixedFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class JohnsonJacksonParticleThetaFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class JohnsonJacksonParticleThetaFvPatchScalarField +: + public mixedFvPatchScalarField +{ + // Private data + + //- Particle-wall restitution coefficient + dimensionedScalar restitutionCoefficient_; + + //- Specularity coefficient + dimensionedScalar specularityCoefficient_; + + +public: + + //- Runtime type information + TypeName("JohnsonJacksonParticleTheta"); + + + // Constructors + + //- Construct from patch and internal field + JohnsonJacksonParticleThetaFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + JohnsonJacksonParticleThetaFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping onto a new patch + JohnsonJacksonParticleThetaFvPatchScalarField + ( + const JohnsonJacksonParticleThetaFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + JohnsonJacksonParticleThetaFvPatchScalarField + ( + const JohnsonJacksonParticleThetaFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new JohnsonJacksonParticleThetaFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + JohnsonJacksonParticleThetaFvPatchScalarField + ( + const JohnsonJacksonParticleThetaFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new JohnsonJacksonParticleThetaFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + // Mapping functions + + //- Map (and resize as needed) from self given a mapping object + virtual void autoMap + ( + const fvPatchFieldMapper& + ); + + //- Reverse map the given fvPatchField onto this fvPatchField + virtual void rmap + ( + const fvPatchScalarField&, + const labelList& + ); + + //- Update the coefficients + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* //