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 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\*---------------------------------------------------------------------------*/
25Info << "Reading field p\n" << endl;
26_p = autoPtr<volScalarField>
27 (
28 new volScalarField
29 (
30 IOobject
31 (
32 "p",
33 runTime.timeName(),
34 mesh,
35 IOobject::MUST_READ,
36 IOobject::AUTO_WRITE
37 ),
38 mesh
39 )
40 );
41volScalarField& p = _p();
42
43Info << "Reading field U\n" << endl;
44_U = autoPtr<volVectorField>
45 (
46 new volVectorField
47 (
48 IOobject
49 (
50 "U",
51 runTime.timeName(),
52 mesh,
53 IOobject::MUST_READ,
54 IOobject::AUTO_WRITE
55 ),
56 mesh
57 )
58 );
59volVectorField& U = _U();
60
61
62volVectorField U0(U);
63
64_U0 = autoPtr<volVectorField>
65 (
66 new volVectorField(U0)
67 );
68
69volScalarField p0(p);
70
71_p0 = autoPtr<volScalarField>
72 (
73 new volScalarField(p0)
74 );
75
76volScalarField T0(p);
77
78_T0 = autoPtr<volScalarField>
79 (
80 new volScalarField(T0)
81 );
82
83Info << "Reading field T\n" << endl;
84_T = autoPtr<volScalarField>
85 (
86 new volScalarField
87 (
88 IOobject
89 (
90 "T",
91 runTime.timeName(),
92 mesh,
93 IOobject::MUST_READ,
94 IOobject::AUTO_WRITE
95 ),
96 mesh
97 )
98 );
99
101(
102 IOobject
103 (
104 "transportProperties",
105 runTime.constant(),
106 mesh,
107 IOobject::MUST_READ_IF_MODIFIED,
108 IOobject::NO_WRITE
109 )
110);
111
112_nu = autoPtr<dimensionedScalar>
113 (
114 new dimensionedScalar
115 (
116 "nu",
117 dimViscosity,
118 transportProperties.lookup("nu")
119 )
120 );
121#include "createPhi.H"
122
123label pRefCell = 0;
124scalar pRefValue = 0.0;
125setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
126mesh.setFluxRequired(p.name());
127
128_laminarTransport = autoPtr<singlePhaseTransportModel>
129 (
130 new singlePhaseTransportModel( U, phi )
131 );
132singlePhaseTransportModel& laminarTransport = _laminarTransport();
133
134turbulence = autoPtr<incompressible::turbulenceModel>
135 (
136 incompressible::turbulenceModel::New(U, phi, laminarTransport)
137 );
138_MRF = autoPtr<IOMRFZoneList>
139 (
140 new IOMRFZoneList(mesh)
141 );
142_DT = autoPtr<dimensionedScalar>
143 (
144 new dimensionedScalar
145 (
146 transportProperties.lookup("DT")
147 )
148 );
Foam::fvMesh & mesh
Definition createMesh.H:47
Foam::Time & runTime
Definition createTime.H:33
_T
Definition createT.H:30
surfaceScalarField & phi
_U0
volVectorField & U
volVectorField U0(U)
IOdictionary transportProperties(IOobject("transportProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE))
_nu
_laminarTransport
volScalarField & p
scalar pRefValue
_p0
turbulence
singlePhaseTransportModel & laminarTransport
_MRF
label pRefCell
volScalarField p0(p)
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue)
volScalarField T0(p)
_DT
_T0