fixedMultiPhaseHeatFluxFvPatchScalarField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015-2020 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::fixedMultiPhaseHeatFluxFvPatchScalarField
28 
29 Description
30  Calculates a wall temperature that produces the specified overall wall heat
31  flux across all the phases in an Eulerian multi-phase simulation.
32 
33  Intended to be used with copiedFixedValue to ensure that phase wall
34  temperature are consistent:
35  - Set 'fixedMultiPhaseHeatFlux' boundary for one of the phases
36  - Use 'copiedFixedValue' for all the other phases.
37 
38 See also
39  Foam::fixedValueFvPatchField
40 
41 SourceFiles
42  fixedMultiPhaseHeatFluxFvPatchScalarField.C
43 
44 \*---------------------------------------------------------------------------*/
45 
46 #ifndef fixedMultiPhaseHeatFluxFvPatchScalarField_H
47 #define fixedMultiPhaseHeatFluxFvPatchScalarField_H
48 
50 
51 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
52 
53 namespace Foam
54 {
55 
56 /*---------------------------------------------------------------------------*\
57  Class fixedMultiPhaseHeatFluxFvPatchScalarField Declaration
58 \*---------------------------------------------------------------------------*/
59 
61 :
62  public fixedValueFvPatchScalarField
63 {
64  // Private Data
65 
66  //- Heat power [W] or flux [W/m2]
67  scalarField q_;
68 
69  //- Relaxation factor
70  scalar relax_;
71 
72  //- Minimum temperature limit [K]
73  scalar Tmin_;
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("fixedMultiPhaseHeatFlux");
80 
81 
82  // Constructors
83 
84  //- Construct from patch and internal field
86  (
87  const fvPatch&,
89  );
90 
91  //- Construct from patch, internal field and dictionary
93  (
94  const fvPatch&,
96  const dictionary&
97  );
98 
99  //- Construct by mapping given
100  // fixedMultiPhaseHeatFluxFvPatchScalarField
101  // onto a new patch
103  (
105  const fvPatch&,
107  const fvPatchFieldMapper&
108  );
109 
110  //- Construct as copy
112  (
114  );
115 
116  //- Construct and return a clone
117  virtual tmp<fvPatchScalarField> clone() const
118  {
120  (
122  );
123  }
124 
125  //- Construct as copy setting internal field reference
127  (
130  );
131 
132  //- Construct and return a clone setting internal field reference
134  (
136  ) const
137  {
139  (
141  );
142  }
143 
144 
145  // Member Functions
146 
147  // Mapping functions
148 
149  //- Map (and resize as needed) from self given a mapping object
150  // Used to update fields following mesh topology change
151  virtual void autoMap(const fvPatchFieldMapper&);
152 
153  //- Reverse map the given fvPatchField onto this fvPatchField
154  // Used to reconstruct fields
155  virtual void rmap(const fvPatchScalarField&, const labelList&);
156 
157 
158  // Evaluation Functions
159 
160  //- Update the coefficients associated with the patch field
161  virtual void updateCoeffs();
162 
163 
164  // I-O
165 
166  //- Write
167  virtual void write(Ostream&) const;
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 #endif
178 
179 // ************************************************************************* //
Foam::fvPatchField< scalar >
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: fixedMultiPhaseHeatFluxFvPatchScalarField.C:115
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::rmap
virtual void rmap(const fvPatchScalarField &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: fixedMultiPhaseHeatFluxFvPatchScalarField.C:182
Foam::Field< scalar >
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField
Calculates a wall temperature that produces the specified overall wall heat flux across all the phase...
Definition: fixedMultiPhaseHeatFluxFvPatchScalarField.H:59
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::clone
virtual tmp< fvPatchScalarField > clone() const
Construct and return a clone.
Definition: fixedMultiPhaseHeatFluxFvPatchScalarField.H:116
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::TypeName
TypeName("fixedMultiPhaseHeatFlux")
Runtime type information.
Foam::List< label >
fixedValueFvPatchFields.H
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: fixedMultiPhaseHeatFluxFvPatchScalarField.C:172
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::fixedMultiPhaseHeatFluxFvPatchScalarField
fixedMultiPhaseHeatFluxFvPatchScalarField(const fvPatch &, const DimensionedField< scalar, volMesh > &)
Construct from patch and internal field.
Definition: fixedMultiPhaseHeatFluxFvPatchScalarField.C:42
Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::write
virtual void write(Ostream &) const
Write.
Definition: fixedMultiPhaseHeatFluxFvPatchScalarField.C:196
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54