bXiKernelCorr.H
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) 2025 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 Class
25  Foam::fv::bXiKernelCorr
26 
27 Description
28  Early kernel propagation rate correction based on specified shape
29 
30 Usage
31  Example usage:
32  \verbatim
33  bXiKernelCorr1
34  {
35  type bXiKernelCorr;
36 
37  cellZone kernelCorrection;
38 
39  ignition ignition;
40 
41  duration 0.003;
42 
43  kernelShape
44  {
45  type spherical;
46  }
47  }
48  \endverbatim
49 
50  Where:
51  \table
52  Property | Description | Required | Default value
53  cellZone | Correction cellZone | yes |
54  ignition | Name of the ignition fvModel to correct | yes |
55  kernelShape | Kernel shape | yes |
56  duration | Maximum correction duration | yes |
57  bMin | Min b above which the correction is applied | no | \\
58  XiFluid::bMin/2
59  \endtable
60 
61  The correction is applied if \f$ min(b) > bMin \f$ and time of application
62  is less than the specified \c duration.
63 
64 See also
65  Foam::kernelShape
66  Foam::kernelShapes::planar
67  Foam::kernelShapes::cylindrical
68  Foam::kernelShapes::spherical
69 
70 SourceFiles
71  bXiKernelCorr.C
72 
73 \*---------------------------------------------------------------------------*/
74 
75 #ifndef bXiKernelCorr_H
76 #define bXiKernelCorr_H
77 
78 #include "bXiIgnition.H"
79 #include "kernelShape.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace fv
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class bXiKernelCorr Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 class bXiKernelCorr
93 :
94  public fvModel
95 {
96 
97 protected:
98 
99  // Protected Data
100 
101  //- The correction cellZone
102  fvCellZone zone_;
103 
104  autoPtr<kernelShape> kernelShape_;
105 
106  const fv::bXiIgnition& ignition_;
107 
108  //- Maximum correction duration
110 
111  //- Minimum b below which the Xi correction is not applied
112  // Must be less that XiFluid::bMin and defaults to XiFluid::bMin/2
114 
115 
116 private:
117 
118  // Private Member Functions
119 
120  //- Non-virtual read
121  void readCoeffs(const dictionary& dict);
122 
123  //- Kernel consumption rate distribution function
124  template<class Type>
125  inline auto bFunc(const Type& b, const Type& R) const;
126 
127 
128 public:
129 
130  //- Runtime type information
131  TypeName("bXiKernelCorr");
132 
133 
134  // Constructors
135 
136  //- Construct from explicit source name and mesh
138  (
139  const word& name,
140  const word& modelType,
141  const fvMesh& mesh,
142  const dictionary& dict
143  );
144 
145  //- Disallow default bitwise copy construction
147  (
148  const bXiKernelCorr&
149  ) = delete;
150 
151 
152  // Member Functions
153 
154  // Checks
155 
156  //- Return the list of fields for which the option adds source term
157  // to the transport equation
158  virtual wordList addSupFields() const;
159 
160 
161  // Add explicit and implicit contributions to compressible equation
162 
163  //- Add ignition contribution to b equation
164  virtual void addSup
165  (
166  const volScalarField& rho,
167  const volScalarField& b,
168  fvMatrix<scalar>& eqn
169  ) const;
170 
171 
172  // Mesh motion
173 
174  //- Update topology using the given map
175  virtual void topoChange(const polyTopoChangeMap&);
176 
177  //- Update from another mesh using the given map
178  virtual void mapMesh(const polyMeshMap&);
179 
180  //- Redistribute or update using the given distribution map
181  virtual void distribute(const polyDistributionMap&);
182 
183  //- Update for mesh motion
184  virtual bool movePoints();
185 
186 
187  // IO
188 
189  //- Read source dictionary
190  virtual bool read(const dictionary& dict);
191 
192 
193  // Member Operators
194 
195  //- Disallow default bitwise assignment
196  void operator=(const bXiKernelCorr&) = delete;
197 };
198 
199 
200 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201 
202 } // End namespace fv
203 } // End namespace Foam
204 
205 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
206 
207 #endif
208 
209 // ************************************************************************* //
Generic GeometricField class.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvModelI.H:69
const word & name() const
Return const access to the source name.
Definition: fvModelI.H:57
Early kernel propagation rate correction based on specified shape.
TypeName("bXiKernelCorr")
Runtime type information.
virtual bool movePoints()
Update for mesh motion.
virtual wordList addSupFields() const
Return the list of fields for which the option adds source term.
bXiKernelCorr(const word &name, const word &modelType, const fvMesh &mesh, const dictionary &dict)
Construct from explicit source name and mesh.
Definition: bXiKernelCorr.C:71
fvCellZone zone_
The correction cellZone.
dimensionedScalar duration_
Maximum correction duration.
virtual void topoChange(const polyTopoChangeMap &)
Update topology using the given map.
dimensionedScalar bMin_
Minimum b below which the Xi correction is not applied.
virtual void distribute(const polyDistributionMap &)
Redistribute or update using the given distribution map.
void operator=(const bXiKernelCorr &)=delete
Disallow default bitwise assignment.
virtual bool read(const dictionary &dict)
Read source dictionary.
autoPtr< kernelShape > kernelShape_
const fv::bXiIgnition & ignition_
virtual void mapMesh(const polyMeshMap &)
Update from another mesh using the given map.
virtual void addSup(const volScalarField &rho, const volScalarField &b, fvMatrix< scalar > &eqn) const
Add ignition contribution to b equation.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Definition: polyMeshMap.H:51
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
A class for handling words, derived from string.
Definition: word.H:63
volScalarField & b
Definition: createFields.H:27
rho
Definition: pEqn.H:1
Namespace for OpenFOAM.
static scalar R(const scalar a, const scalar x)
Definition: invIncGamma.C:102
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
labelList fv(nPoints)
dictionary dict