Quemada.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "Quemada.H"
27 #include "volFields.H"
29 
30 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 namespace mixtureViscosityModels
35 {
36  defineTypeNameAndDebug(Quemada, 0);
37 
39  (
40  mixtureViscosityModel,
41  Quemada,
42  dictionary
43  );
44 }
45 }
46 
47 
48 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
49 
51 (
52  const incompressibleTwoPhaseInteractingMixture& mixture
53 )
54 :
55  mixtureViscosityModel(mixture),
56  q_(optionalSubDict(typeName + "Coeffs").lookupOrDefault("q", scalar(2))),
57  muMax_
58  (
59  "muMax",
61  optionalSubDict(typeName + "Coeffs").lookup("muMax")
62  )
63 {}
64 
65 
66 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
67 
70 (
71  const volScalarField& muc,
72  const volVectorField& U
73 ) const
74 {
75  return min
76  (
77  muc*pow(max(1 - mixture_.alphad()/mixture_.alphaMax(), small), -q_),
78  muMax_
79  );
80 }
81 
82 
84 {
86  {
87  const dictionary& dict = optionalSubDict(typeName + "Coeffs");
88 
89  dict.lookup("q") >> q_;
90  dict.lookup("muMax") >> muMax_;
91 
92  return true;
93  }
94  else
95  {
96  return false;
97  }
98 }
99 
100 
101 // ************************************************************************* //
virtual bool read()
Read phaseProperties dictionary.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const volScalarField & alphad() const
Return const-access to the dispersed phase-fraction.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Definition: volFieldsFwd.H:59
Macros for easy insertion into run-time selection tables.
scalar alphaMax() const
Optional maximum phase-fraction (e.g. packing limit)
virtual bool read()=0
Read physicalProperties dictionary.
dictionary()
Construct top-level dictionary null.
Definition: dictionary.C:440
GeometricField< scalar, fvPatchField, volMesh > volScalarField
Definition: volFieldsFwd.H:58
stressControl lookup("compactNormalStress") >> compactNormalStress
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
Definition: dictionary.C:1060
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
const dimensionSet dimDynamicViscosity
const incompressibleTwoPhaseInteractingMixture & mixture_
Mixture properties.
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
virtual tmp< volScalarField > mu(const volScalarField &muc, const volVectorField &U) const
Return the mixture viscosity.
A class for managing temporary objects.
Definition: PtrList.H:53
Quemada(const incompressibleTwoPhaseInteractingMixture &mixture)
Construct from mixture.
dimensionedScalar muMax_
Maximum viscosity.
Definition: plastic.H:73
Namespace for OpenFOAM.