Loading...
Searching...
No Matches
createFields.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ██╗████████╗██╗ ██╗ █████╗ ██████╗ █████╗ ███████╗██╗ ██╗
3 ██║╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗ ██╔════╝██║ ██║
4 ██║ ██║ ███████║███████║██║ ███████║█████╗█████╗ ██║ ██║
5 ██║ ██║ ██╔══██║██╔══██║██║ ██╔══██║╚════╝██╔══╝ ╚██╗ ██╔╝
6 ██║ ██║ ██║ ██║██║ ██║╚██████╗██║ ██║ ██║ ╚████╔╝
7 ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═══╝
8
9 * In real Time Highly Advanced Computational Applications for Finite Volumes
10 * Copyright (C) 2017 by the ITHACA-FV authors
11-------------------------------------------------------------------------------
12
13 License
14 This file is part of ITHACA-FV
15
16 ITHACA-FV is free software: you can redistribute it and/or modify
17 it under the terms of the GNU Lesser General Public License as published by
18 the Free Software Foundation, either version 3 of the License, or
19 (at your option) any later version.
20
21 ITHACA-FV is distributed in the hope that it will be useful,
22 but WITHOUT ANY WARRANTY; without even the implied warranty of
23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 GNU Lesser General Public License for more details.
25
26 You should have received a copy of the GNU Lesser General Public License
27 along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
28
29 \*---------------------------------------------------------------------------*/
30
32(
33 IOobject
34 (
35 "transportProperties",
36 runTime.constant(),
37 mesh,
38 IOobject::MUST_READ_IF_MODIFIED,
39 IOobject::NO_WRITE
40 )
41);
42
43Info << "Reading field p\n" << endl;
44_p = autoPtr<volScalarField>
45 (
46 new volScalarField
47 (
48 IOobject
49 (
50 "p",
51 runTime.timeName(),
52 mesh,
53 IOobject::MUST_READ,
54 IOobject::AUTO_WRITE
55 ),
56 mesh
57 )
58 );
59volScalarField& p = _p();
60
61Info << "Reading field U\n" << endl;
62_U = autoPtr<volVectorField>
63 (
64 new volVectorField
65 (
66 IOobject
67 (
68 "U",
69 runTime.timeName(),
70 mesh,
71 IOobject::MUST_READ,
72 IOobject::AUTO_WRITE
73 ),
74 mesh
75 )
76 );
77volVectorField& U = _U();
78
79Info << "Reading field T\n" << endl;
80_T = autoPtr<volScalarField>
81 (
82 new volScalarField
83 (
84 IOobject
85 (
86 "T",
87 runTime.timeName(),
88 mesh,
89 IOobject::MUST_READ,
90 IOobject::AUTO_WRITE
91 ),
92 mesh
93 )
94 );
95
96Info << "Reading field alphat\n" << endl;
97_alphat = autoPtr<volScalarField>
98 (
99 new volScalarField
100 (
101 IOobject
102 (
103 "alphat",
104 runTime.timeName(),
105 mesh,
106 IOobject::MUST_READ,
107 IOobject::AUTO_WRITE
108 ),
109 mesh
110 )
111 );
112volScalarField& alphat = _alphat();
113
114_nut = autoPtr<volScalarField>
115 (
116 new volScalarField
117 (
118 IOobject
119 (
120 "nut",
121 runTime.timeName(),
122 mesh,
123 IOobject::MUST_READ,
124 IOobject::AUTO_WRITE
125 ),
126 mesh
127 )
128 );
129volScalarField& nut = _nut();
130
131_nu = autoPtr<dimensionedScalar>
132 (
133 new dimensionedScalar
134 (
135 "nu",
136 dimViscosity,
137 transportProperties.lookup("nu")
138 )
139 );
140
141
142#include "createPhi.H"
143_DT = autoPtr<dimensionedScalar>
144 (
145 new dimensionedScalar
146 (
147 transportProperties.lookup("DT")
148 )
149 );
150
151label pRefCell = 0;
152scalar pRefValue = 0.0;
153setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
154
155_laminarTransport = autoPtr<singlePhaseTransportModel>
156 (
157 new singlePhaseTransportModel( U, phi )
158 );
159singlePhaseTransportModel& laminarTransport = _laminarTransport();
160
161turbulence = autoPtr<incompressible::turbulenceModel>
162 (
163 incompressible::turbulenceModel::New(U, phi, laminarTransport)
164 );
165
166_Pr = autoPtr<dimensionedScalar>
167 (
168 new dimensionedScalar
169 (
170 transportProperties.lookup("Pr")
171 )
172 );
173
174_Prt = autoPtr<dimensionedScalar>
175 (
176 new dimensionedScalar
177 (
178 transportProperties.lookup("Prt")
179 )
180 );
181_MRF = autoPtr<IOMRFZoneList>
182 (
183 new IOMRFZoneList(mesh)
184 );
Foam::fvMesh & mesh
Definition createMesh.H:47
Foam::Time & runTime
Definition createTime.H:33
_T
Definition createT.H:30
surfaceScalarField & phi
volVectorField & U
_nut
_Pr
volScalarField & nut
volScalarField & alphat
_Prt
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE))
_nu
_laminarTransport
volScalarField & p
scalar pRefValue
turbulence
singlePhaseTransportModel & laminarTransport
_MRF
label pRefCell
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue)
_DT