uniformFixedMultiphaseHeatFluxFvPatchScalarField.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) 2015-2023 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::uniformFixedMultiphaseHeatFluxFvPatchScalarField
26 
27 Description
28  Uniform fixed heat flux boundary condition for Eulerian multi-phase cases.
29  Constructs a mixed constraint which portions the heat flux between the
30  phases in such a way as to keep the boundary temperature uniform across all
31  phases. The heat flux can be specified as a time-varying function, and an
32  under-relaxation factor can be supplied if this is necessary to maintain
33  stability.
34 
35 Usage
36  \table
37  Property | Description | Required | Default value
38  q | Heat flux [w/m^2] | yes |
39  relax | Relaxation factor | no | 1
40  \endtable
41 
42  Example of the boundary condition specification:
43  \verbatim
44  <patchName>
45  {
46  type uniformFixedMultiphaseHeatFlux;
47  q 1000;
48  relax 0.3;
49  value $internalField;
50  }
51  \endverbatim
52 
53 SourceFiles
54  uniformFixedMultiphaseHeatFluxFvPatchScalarField.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 #ifndef uniformFixedMultiphaseHeatFluxFvPatchScalarField_H
59 #define uniformFixedMultiphaseHeatFluxFvPatchScalarField_H
60 
61 #include "mixedFvPatchFields.H"
62 #include "Function1.H"
63 
64 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
65 
66 namespace Foam
67 {
68 
69 /*---------------------------------------------------------------------------*\
70  Class uniformFixedMultiphaseHeatFluxFvPatchScalarField Declaration
71 \*---------------------------------------------------------------------------*/
72 
73 class uniformFixedMultiphaseHeatFluxFvPatchScalarField
74 :
75  public mixedFvPatchScalarField
76 {
77  // Private Data
78 
79  //- Heat flux [W/m^2]
80  autoPtr<Function1<scalar>> q_;
81 
82  //- Relaxation factor
83  scalar relax_;
84 
85 
86 public:
87 
88  //- Runtime type information
89  TypeName("uniformFixedMultiphaseHeatFlux");
90 
91 
92  // Constructors
93 
94  //- Construct from patch, internal field and dictionary
96  (
97  const fvPatch&,
99  const dictionary&
100  );
101 
102  //- Construct by mapping given
103  // uniformFixedMultiphaseHeatFluxFvPatchScalarField
104  // onto a new patch
106  (
108  const fvPatch&,
110  const fvPatchFieldMapper&
111  );
112 
113  //- Disallow copy without setting internal field reference
115  (
117  ) = delete;
118 
119  //- Copy constructor setting internal field reference
121  (
124  );
125 
126  //- Construct and return a clone setting internal field reference
128  (
130  ) const
131  {
133  (
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  // I-O
148 
149  //- Write
150  virtual void write(Ostream&) const;
151 };
152 
153 
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
155 
156 } // End namespace Foam
157 
158 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159 
160 #endif
161 
162 // ************************************************************************* //
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
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Foam::fvPatchFieldMapper.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:64
A class for managing temporary objects.
Definition: tmp.H:55
Uniform fixed heat flux boundary condition for Eulerian multi-phase cases. Constructs a mixed constra...
uniformFixedMultiphaseHeatFluxFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &, const dictionary &)
Construct from patch, internal field and dictionary.
virtual tmp< fvPatchScalarField > clone(const DimensionedField< scalar, volMesh > &iF) const
Construct and return a clone setting internal field reference.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName("uniformFixedMultiphaseHeatFlux")
Runtime type information.
Namespace for OpenFOAM.