distributionSizeGroupFvPatchScalarField.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 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::distributionSizeGroupFvPatchScalarField
26 
27 Description
28  Boundary condition for size-group fractions that sets values corresponding
29  to a given distribution
30 
31 Usage
32  Example of the boundary condition specification:
33  \verbatim
34  <patchName>
35  {
36  type distributionSizeGroup;
37  distribution
38  {
39  type RosinRammler;
40  Q 0;
41  min 1 [mm];
42  max 15 [mm];
43  d 14 [mm];
44  n 2 [];
45  }
46  value $internalField;
47  }
48  \endverbatim
49 
50 SourceFiles
51  distributionSizeGroupFvPatchScalarField.C
52 
53 \*---------------------------------------------------------------------------*/
54 
55 #ifndef distributionSizeGroupFvPatchScalarField_H
56 #define distributionSizeGroupFvPatchScalarField_H
57 
59 #include "distribution.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class distributionSizeGroupFvPatchScalarField Declaration
68 \*---------------------------------------------------------------------------*/
69 
71 :
72  public fixedValueFvPatchScalarField
73 {
74  // Private Data
75 
76  //- Distribution
77  const autoPtr<distribution> distribution_;
78 
79  //- Cached allocation coefficient value. Calculated on demand.
80  mutable autoPtr<scalar> etaPtr_;
81 
82 
83 public:
84 
85  //- Runtime type information
86  TypeName("distributionSizeGroup");
87 
88 
89  // Constructors
90 
91  //- Construct from patch, internal field and dictionary
93  (
94  const fvPatch&,
96  const dictionary&
97  );
98 
99  //- Construct by mapping given fixedValueTypeFvPatchField
100  // onto a new patch
102  (
104  const fvPatch&,
106  const fieldMapper&
107  );
108 
109  //- Disallow copy without setting internal field reference
111  (
113  ) = delete;
114 
115  //- Copy constructor setting internal field reference
117  (
120  );
121 
122  //- Construct and return a clone setting internal field reference
124  (
126  ) const
127  {
129  (
131  (
132  *this,
133  iF
134  )
135  );
136  }
137 
138 
139  // Member Functions
140 
141  // Evaluation functions
142 
143  //- Update the coefficients associated with the patch field
144  virtual void updateCoeffs();
145 
146 
147  //- Write
148  virtual void write(Ostream&) const;
149 };
150 
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 } // End namespace Foam
155 
156 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
157 
158 
159 #endif
160 
161 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Boundary condition for size-group fractions that sets values corresponding to a given distribution.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
TypeName("distributionSizeGroup")
Runtime type information.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
distributionSizeGroupFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
Abstract base class for field mapping.
Definition: fieldMapper.H:48
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
Namespace for OpenFOAM.