primaryRadiation.C
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) 2012-2020 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 \*---------------------------------------------------------------------------*/
25 
26 #include "primaryRadiation.H"
28 
29 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace regionModels
34 {
35 namespace surfaceFilmModels
36 {
37 
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 
40 defineTypeNameAndDebug(primaryRadiation, 0);
41 
43 (
44  radiationModel,
45  primaryRadiation,
46  dictionary
47 );
48 
49 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
50 
52 (
54  const dictionary& dict
55 )
56 :
57  radiationModel(typeName, film, dict),
58  qinFilm_
59  (
60  IOobject
61  (
62  "qin",
63  film.time().timeName(),
64  film.regionMesh(),
67  ),
68  film.regionMesh(),
70  )
71 {
72  correct();
73 }
74 
75 
76 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
77 
79 {}
80 
81 
82 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
83 
85 {
86  const volScalarField& qinPrimary
87  (
88  film().primaryMesh().lookupObject<volScalarField>("qin")
89  );
90 
91  // Map the primary-side radiative flux to the region internal field
92  film().toRegion(qinFilm_, qinPrimary.boundaryField());
93 }
94 
95 
97 {
99  (
100  IOobject::modelName("Shs", typeName),
101  qinFilm_*filmModel_.coverage()
102  );
103 }
104 
105 
106 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
107 
108 } // End namespace surfaceFilmModels
109 } // End namespace regionModels
110 } // End namespace Foam
111 
112 // ************************************************************************* //
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &)
Return a temporary field constructed from name, mesh.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Info<< "Predicted p max-min : "<< max(p).value()<< " "<< min(p).value()<< endl;rho==max(rho0+psi *p, rhoMin);# 1 "/home/ubuntu/OpenFOAM-10/applications/solvers/multiphase/cavitatingFoam/alphavPsi.H" 1{ alphav=max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0));alphal=1.0 - alphav;Info<< "max-min alphav: "<< max(alphav).value()<< " "<< min(alphav).value()<< endl;psiModel-> correct()
Definition: pEqn.H:68
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const Time & time() const
Return the reference to the time database.
Definition: regionModelI.H:37
virtual tmp< volScalarField::Internal > Shs()
Return the radiation sensible enthalpy source.
Macros for easy insertion into run-time selection tables.
const surfaceFilmRegionModel & film() const
Return const access to the film surface film model.
addToRunTimeSelectionTable(ejectionModel, BrunDrippingEjection, dictionary)
const dimensionSet dimTime
static word timeName(const scalar, const int precision=curPrecision_)
Return time name of given scalar time.
Definition: Time.C:666
const fvMesh & regionMesh() const
Return the region mesh database.
Definition: regionModelI.H:55
const dimensionSet dimMass
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
surfaceFilmRegionModel & filmModel_
Reference to the film surface film model.
void toRegion(const label regionPatchi, List< Type > &primaryFieldField) const
Convert a primary region field to the local region.
virtual const volScalarField & coverage() const =0
Return the film coverage, 1 = covered, 0 = uncovered / [].
primaryRadiation(surfaceFilmRegionModel &film, const dictionary &dict)
Construct from surface film model and dictionary.
static word modelName(Name name, const word &model)
Return the name of the object within the given model.
A class for managing temporary objects.
Definition: PtrList.H:53
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:98
defineTypeNameAndDebug(kinematicSingleLayer, 0)
Namespace for OpenFOAM.