diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/BinghamPlastic/BinghamPlastic.H b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/BinghamPlastic/BinghamPlastic.H index c735537605..a36cc9ba9a 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/BinghamPlastic/BinghamPlastic.H +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/BinghamPlastic/BinghamPlastic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,7 +79,7 @@ public: //- Destructor - ~BinghamPlastic() + virtual ~BinghamPlastic() {} @@ -87,14 +87,14 @@ public: //- Return the mixture viscosity // given the viscosity of the continuous phase - tmp mu + virtual tmp mu ( const volScalarField& muc, const volVectorField& U ) const; //- Read phaseProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Make/files b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Make/files index 05d9a0efad..319aefa11a 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Make/files +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Make/files @@ -3,5 +3,6 @@ mixtureViscosityModel/mixtureViscosityModelNew.C plastic/plastic.C BinghamPlastic/BinghamPlastic.C slurry/slurry.C +Quemada/Quemada.C LIB = $(FOAM_LIBBIN)/libdriftFluxTransportModels diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Quemada/Quemada.C b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Quemada/Quemada.C new file mode 100644 index 0000000000..90f569a740 --- /dev/null +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Quemada/Quemada.C @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 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 "Quemada.H" +#include "volFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace mixtureViscosityModels +{ + defineTypeNameAndDebug(Quemada, 0); + + addToRunTimeSelectionTable + ( + mixtureViscosityModel, + Quemada, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::mixtureViscosityModels::Quemada::Quemada +( + const fvMesh& mesh, + const word& group +) +: + mixtureViscosityModel(mesh, group), + alphaMax_ + ( + "alphaMax", + dimless, + optionalSubDict(typeName + "Coeffs").lookup("alphaMax") + ), + q_(optionalSubDict(typeName + "Coeffs").lookupOrDefault("q", scalar(2))), + alpha_ + ( + mesh.lookupObject + ( + IOobject::groupName + ( + lookupOrDefault("alpha", "alpha"), + group + ) + ) + ) +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +Foam::tmp +Foam::mixtureViscosityModels::Quemada::mu +( + const volScalarField& muc, + const volVectorField& U +) const +{ + return muc*pow(1.0 - alpha_/alphaMax_, -q_); +} + + +bool Foam::mixtureViscosityModels::Quemada::read() +{ + if (mixtureViscosityModel::read()) + { + const dictionary& dict = optionalSubDict(typeName + "Coeffs"); + + dict.lookup("alphaMax") >> alphaMax_; + dict.lookup("q") >> q_; + + return true; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Quemada/Quemada.H b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Quemada/Quemada.H new file mode 100644 index 0000000000..0e85919abf --- /dev/null +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/Quemada/Quemada.H @@ -0,0 +1,129 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Copyright (C) 2022 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::mixtureViscosityModels::Quemada + +Description + Quemada viscosity model for for colloidal dispersions. + + References: + \verbatim + Quemada, D. (1998). + Rheological modelling of complex fluids. I. + The concept of effective volume fraction revisited. + The European Physical Journal-Applied Physics, 1(1), 119-127. + \endverbatim + +Usage + Example usage: + \verbatim + viscosityModel Quemada; + + alphaMax 0.6; // Maximum dispersed phase-fraction (packing fraction) + q 2; // Exponent, defaults to 2 + + rho 1996; + \endverbatim + +SourceFiles + Quemada.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Quemada_H +#define Quemada_H + +#include "mixtureViscosityModel.H" +#include "dimensionedScalar.H" +#include "volFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace mixtureViscosityModels +{ + +/*---------------------------------------------------------------------------*\ + Class Quemada Declaration +\*---------------------------------------------------------------------------*/ + +class Quemada +: + public mixtureViscosityModel +{ + // Private data + + //- Maximum dispersed phase-fraction (packing fraction) + dimensionedScalar alphaMax_; + + //- Exponent (defaults to 2) + scalar q_; + + //- Dispersed phase fraction + const volScalarField& alpha_; + + +public: + + //- Runtime type information + TypeName("Quemada"); + + + // Constructors + + //- Construct from components + Quemada(const fvMesh& mesh, const word& group); + + + //- Destructor + virtual ~Quemada() + {} + + + // Member Functions + + //- Return the mixture viscosity + // given the viscosity of the continuous phase + virtual tmp mu + ( + const volScalarField& muc, + const volVectorField& U + ) const; + + //- Read phaseProperties dictionary + virtual bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace mixtureViscosityModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.H b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.H index 43d99941ea..e14da41ffc 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.H +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/plastic/plastic.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -90,7 +90,7 @@ public: //- Destructor - ~plastic() + virtual ~plastic() {} @@ -98,14 +98,14 @@ public: //- Return the mixture viscosity // given the viscosity of the continuous phase - tmp mu + virtual tmp mu ( const volScalarField& muc, const volVectorField& U ) const; //- Read phaseProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.H b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.H index a078e1e0b6..49f63d082a 100644 --- a/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.H +++ b/applications/solvers/multiphase/driftFluxFoam/mixtureViscosityModels/slurry/slurry.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -85,7 +85,7 @@ public: //- Destructor - ~slurry() + virtual ~slurry() {} @@ -93,14 +93,14 @@ public: //- Return the mixture viscosity // given the viscosity of the continuous phase - tmp mu + virtual tmp mu ( const volScalarField& muc, const volVectorField& U ) const; //- Read phaseProperties dictionary - bool read(); + virtual bool read(); };