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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::PDRparams
29
30Description
31 Parameters for PDRsetFields
32
33SourceFiles
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
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class PDRparams Declaration
54\*---------------------------------------------------------------------------*/
56class PDRparams
57{
58public:
59
60 // Data Members
65
66 //- The name for the "ground" patch
68
69 //- The name for the "outer" patch
72 string UPatchBc;
74 bool legacyMeshSpec{false};
75 bool legacyObsSpec{false};
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};
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};
100 scalar gridPointTol{0.02};
102 scalar cb_r{0.035};
103 scalar cb_s{0.08};
105 scalar cd_r{1.2};
106 scalar cd_s{2.0};
108 scalar cong_max_betav{1.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};
115
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};
126
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
143
144 // Constructors
145
146 //- Default construct
147 PDRparams() = default;
148
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};
159
160
161// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162
163extern Foam::PDRparams pars;
164
165} // End namespace Foam
166
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#endif
171
172// ************************************************************************* //
Parameters for PDRsetFields.
Definition: PDRparams.H:56
scalar def_grating_slat_w
Default slat thickness grating.
Definition: PDRparams.H:124
string UPatchBc
"fixedValue;value uniform (0 0 0)"
Definition: PDRparams.H:71
wordList obsfile_names
Definition: PDRparams.H:62
scalar blockedFacePar
Faces with area blockage greater than this are blocked.
Definition: PDRparams.H:130
bool legacyObsSpec
Definition: PDRparams.H:74
void read(const dictionary &dict)
Read program parameters from dictionary.
scalar gridPointTol
Definition: PDRparams.H:99
scalar scale
Overall scale factor.
Definition: PDRparams.H:140
scalar empty_lobs_fac
Lobs in empty cell is this * cube root of cell volume.
Definition: PDRparams.H:116
scalar maxCR
Upper limit on CR (CT also gets limited)
Definition: PDRparams.H:133
bool outer_orthog
Definition: PDRparams.H:84
word groundPatchName
The name for the "ground" patch.
Definition: PDRparams.H:66
scalar min_overlap_vol
Definition: PDRparams.H:109
bool noIntersectN
Definition: PDRparams.H:81
PDRparams()=default
Default construct.
int overlaps
Flag to control which overlap calculations are performed.
Definition: PDRparams.H:97
scalar obs_expand
Definition: PDRparams.H:121
scalar min_overlap_area
Definition: PDRparams.H:110
fileName obsfile_dir
Definition: PDRparams.H:61
bool blockedFacesWallFn
Definition: PDRparams.H:82
scalar blockedCellPoros
Cells with porosity less than this are blocked.
Definition: PDRparams.H:127
scalar blockageNoCT
Definition: PDRparams.H:137
bool ignoreGratings
Definition: PDRparams.H:83
int nPairsToBlockC
Definition: PDRparams.H:94
scalar outerCombFac
Value for outer region.
Definition: PDRparams.H:119
bool legacyMeshSpec
Definition: PDRparams.H:73
int nFacesToBlockC
Definition: PDRparams.H:90
word outerPatchName
The name for the "outer" patch.
Definition: PDRparams.H:69
scalar min_width
Ignore obstacles with second dimension (or diameter) less than this.
Definition: PDRparams.H:113
void readDefaults(const dictionary &dict)
Set or read defaults from dictionary.
scalar cong_max_betav
Definition: PDRparams.H:107
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
A class for handling file names.
Definition: fileName.H:76
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.
Foam::PDRparams pars
Globals for program parameters (ugly hack)
dictionary dict