Loading...
Searching...
No Matches
createFields.H
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 License
13 This file is part of ITHACA-FV
14 ITHACA-FV is free software: you can redistribute it and/or modify
15 it under the terms of the GNU Lesser 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 ITHACA-FV is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU Lesser General Public License for more details.
22 You should have received a copy of the GNU Lesser General Public License
23 along with ITHACA-FV. If not, see <http://www.gnu.org/licenses/>.
24\*---------------------------------------------------------------------------*/
25
26Info << "Reading field T\n" << endl;
27_T = autoPtr<volScalarField>
28 (
29 new volScalarField
30 (
31 IOobject
32 (
33 "T",
34 runTime.timeName(),
35 mesh,
36 IOobject::MUST_READ,
37 IOobject::NO_WRITE
38 ),
39 mesh
40 )
41 );
42volScalarField& T = _T();
43
44volScalarField T0(T);
45
46_T0 = autoPtr<volScalarField>
47 (
48 new volScalarField(T0)
49 );
50
51
52_U = autoPtr<volVectorField>
53 (
54 new volVectorField
55 (
56 IOobject
57 (
58 "U",
59 runTime.timeName(),
60 mesh,
61 IOobject::MUST_READ,
62 IOobject::NO_WRITE
63 ),
64 mesh
65 )
66 );
67volVectorField& U = _U();
68
69Info << "Reading/calculating face flux field phi\n" << endl;
70
71_phi = autoPtr<surfaceScalarField>
72 (
73 new surfaceScalarField
74 (
75 IOobject
76 (
77 "phi",
78 runTime.timeName(),
79 mesh,
80 IOobject::READ_IF_PRESENT,
81 IOobject::NO_WRITE
82 ),
83 linearInterpolate(U) & mesh.Sf()
84 )
85 );
86surfaceScalarField& phi = _phi();
87surfaceScalarField phi0(phi);
88
89_phi0 = autoPtr<surfaceScalarField>
90 (
91 new surfaceScalarField(phi0)
92 );
93
94Info << "Reading transportProperties\n" << endl;
95
96_transportProperties = autoPtr<IOdictionary>
97 (
98 new IOdictionary
99 (
100 IOobject
101 (
102 "transportProperties",
103 runTime.constant(),
104 mesh,
105 IOobject::MUST_READ_IF_MODIFIED,
106 IOobject::NO_WRITE
107 )
108 )
109 );
110
111Info << "Reading viscosity nu\n" << endl;
112
113_nu = autoPtr<dimensionedScalar>
114 (
115 new dimensionedScalar
116 (
117 _transportProperties().lookup("DT")
118 )
119 );