secondaryPropertyFvScalarFieldSource.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) 2024-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::secondaryPropertyFvScalarFieldSource
26 
27 Description
28  Base class for source conditions of secondary properties of the size-groups
29  of a population balance model.
30 
31 SourceFiles
32  secondaryPropertyFvScalarFieldSource.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef secondaryPropertyFvScalarFieldSource_H
37 #define secondaryPropertyFvScalarFieldSource_H
38 
39 #include "volFields.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 // Forward declaration of classes
47 namespace diameterModels
48 {
49  class sizeGroup;
50 }
51 
52 /*---------------------------------------------------------------------------*\
53  Class secondaryPropertyFvScalarFieldSource Declaration
54 \*---------------------------------------------------------------------------*/
55 
57 {
58 private:
59 
60  // Private Data
61 
62  //- Reference to the internal field
63  const DimensionedField<scalar, volMesh>& internalField_;
64 
65  //- The index of this group
66  mutable label i_;
67 
68 
69 public:
70 
71  // Constructors
72 
73  //- Construct from internal field
75  (
77  );
78 
79 
80 public:
81 
82  // Member Functions
83 
84  //- Return the list of size-groups
86 
87  //- Return the index of this group
88  label i() const;
89 
90  //- Return a size-group
91  const diameterModels::sizeGroup& fi(const label deltai = 0) const;
92 
93  //- Return a secondary property field
94  template<class ModelType>
95  const volScalarField& fld(const label deltai = 0) const;
96 
97  //- Return a secondary property model
98  template<class ModelType>
99  const ModelType& model(const label deltai = 0) const;
100 };
101 
102 
103 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
104 
105 } // End namespace Foam
106 
107 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
108 
109 #ifdef NoRepository
111 #endif
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: UPtrList.H:66
Single size class fraction field representing a fixed particle volume as defined by the user through ...
Definition: sizeGroup.H:96
Base class for source conditions of secondary properties of the size-groups of a population balance m...
const UPtrList< diameterModels::sizeGroup > & fis() const
Return the list of size-groups.
label i() const
Return the index of this group.
const ModelType & model(const label deltai=0) const
Return a secondary property model.
const volScalarField & fld(const label deltai=0) const
Return a secondary property field.
secondaryPropertyFvScalarFieldSource(const DimensionedField< scalar, volMesh > &)
Construct from internal field.
const diameterModels::sizeGroup & fi(const label deltai=0) const
Return a size-group.
Namespace for OpenFOAM.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59