PDRparams.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) 2016 Shell Research Ltd.
9  Copyright (C) 2018-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::PDRparams
29 
30 Description
31  Parameters for PDRsetFields
32 
33 SourceFiles
34  PDRparams.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef PDRparams_H
39 #define PDRparams_H
40 
41 #include "labelList.H"
42 #include "scalarList.H"
43 #include "wordList.H"
44 #include "fileNameList.H"
45 #include "dictionary.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class PDRparams Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class PDRparams
57 {
58 public:
59 
60  // Data Members
61 
65 
66  //- The name for the "ground" patch
68 
69  //- The name for the "outer" patch
71 
72  string UPatchBc;
73 
74  bool legacyMeshSpec{false};
75  bool legacyObsSpec{false};
76 
77  bool two_d{false};
78  bool yCyclic{false};
79  bool ySymmetry{false};
80  bool deluge{false};
81  bool new_fields{true};
82  bool noIntersectN{true};
83  bool blockedFacesWallFn{false};
84  bool ignoreGratings{false};
85  bool outer_orthog{false};
86 
87  int debugLevel{0};
88 
89  //- Min number of blocked cell faces
90  //- for a cell to be marked as blocked
91  int nFacesToBlockC{6};
92 
93  //- Min number of blocked cell face pairs (on opposite faces of a cell)
94  //- for a cell to be marked as blocked
95  int nPairsToBlockC{3};
96 
97  //- Flag to control which overlap calculations are performed
98  int overlaps{0x7};
99 
100  scalar gridPointTol{0.02};
101 
102  scalar cb_r{0.035};
103  scalar cb_s{0.08};
104 
105  scalar cd_r{1.2};
106  scalar cd_s{2.0};
108  scalar cong_max_betav{1.0};
109 
110  scalar min_overlap_vol{0};
111  scalar min_overlap_area{0};
112 
113  //- Ignore obstacles with second dimension (or diameter) less than this
114  scalar min_width{0.001};
116  //- Lobs in empty cell is this * cube root of cell volume
117  scalar empty_lobs_fac{1.0};
118 
119  //- Value for outer region
120  scalar outerCombFac{1.0};
122  scalar obs_expand{0};
123 
124  //- Default slat thickness grating
125  scalar def_grating_slat_w{0.005};
127  //- Cells with porosity less than this are blocked
128  scalar blockedCellPoros{0.05};
129 
130  //- Faces with area blockage greater than this are blocked
131  scalar blockedFacePar{0.95};
132 
133  //- Upper limit on CR (CT also gets limited)
134  scalar maxCR{1e30};
135 
136  //- If a single obstacle blocks a cell by more than this,
137  //- then no CT in that direction
138  scalar blockageNoCT{0.95};
139 
140  //- Overall scale factor
141  scalar scale{1.0};
142 
144  // Constructors
145 
146  //- Default construct
147  PDRparams() = default;
149 
150  // Member Functions
151 
152  //- Set or read defaults from dictionary.
153  // Can also be used with an empty dictionary
154  void readDefaults(const dictionary& dict);
155 
156  //- Read program parameters from dictionary
157  void read(const dictionary& dict);
158 };
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 extern Foam::PDRparams pars;
165 } // End namespace Foam
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 #endif
171 
172 // ************************************************************************* //
word outerPatchName
The name for the "outer" patch.
Definition: PDRparams.H:69
scalar blockedFacePar
Faces with area blockage greater than this are blocked.
Definition: PDRparams.H:148
dictionary dict
bool legacyObsSpec
Definition: PDRparams.H:74
bool ignoreGratings
Definition: PDRparams.H:83
A class for handling file names.
Definition: fileName.H:71
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
bool legacyMeshSpec
Definition: PDRparams.H:73
scalar blockageNoCT
If a single obstacle blocks a cell by more than this, then no CT in that direction.
Definition: PDRparams.H:159
void read(const dictionary &dict)
Read program parameters from dictionary.
scalar def_grating_slat_w
Default slat thickness grating.
Definition: PDRparams.H:138
scalar obs_expand
Definition: PDRparams.H:133
scalar maxCR
Upper limit on CR (CT also gets limited)
Definition: PDRparams.H:153
scalar min_width
Ignore obstacles with second dimension (or diameter) less than this.
Definition: PDRparams.H:121
bool noIntersectN
Definition: PDRparams.H:81
word groundPatchName
The name for the "ground" patch.
Definition: PDRparams.H:64
A class for handling words, derived from Foam::string.
Definition: word.H:63
int overlaps
Flag to control which overlap calculations are performed.
Definition: PDRparams.H:103
scalar min_overlap_vol
Definition: PDRparams.H:115
scalar outerCombFac
Value for outer region.
Definition: PDRparams.H:131
string UPatchBc
"fixedValue;value uniform (0 0 0)"
Definition: PDRparams.H:71
int nPairsToBlockC
Min number of blocked cell face pairs (on opposite faces of a cell) for a cell to be marked as blocke...
Definition: PDRparams.H:98
scalar min_overlap_area
Definition: PDRparams.H:116
PDRparams()=default
Default construct.
Parameters for PDRsetFields.
Definition: PDRparams.H:51
Foam::PDRparams pars
Globals for program parameters (ugly hack)
scalar cong_max_betav
Definition: PDRparams.H:113
bool outer_orthog
Definition: PDRparams.H:84
bool blockedFacesWallFn
Definition: PDRparams.H:82
fileName obsfile_dir
Definition: PDRparams.H:57
scalar empty_lobs_fac
Lobs in empty cell is this * cube root of cell volume.
Definition: PDRparams.H:126
int nFacesToBlockC
Min number of blocked cell faces for a cell to be marked as blocked.
Definition: PDRparams.H:92
scalar scale
Overall scale factor.
Definition: PDRparams.H:164
scalar gridPointTol
Definition: PDRparams.H:105
scalar blockedCellPoros
Cells with porosity less than this are blocked.
Definition: PDRparams.H:143
Namespace for OpenFOAM.
void readDefaults(const dictionary &dict)
Set or read defaults from dictionary.
wordList obsfile_names
Definition: PDRparams.H:58