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\*---------------------------------------------------------------------------*/
25
26Info << "Reading field U\n" << endl;
27_U = autoPtr<volVectorField>
28 (
29 new volVectorField
30 (
31 IOobject
32 (
33 "U",
34 runTime.timeName(),
35 mesh,
36 IOobject::MUST_READ,
37 IOobject::NO_WRITE
38 ),
39 mesh
40 )
41 );
42volVectorField& U = _U();
43
44volVectorField U0(U);
45
46_U0 = autoPtr<volVectorField>
47 (
48 new volVectorField(U0)
49 );
50
51Info << "Reading/calculating face flux field phi\n" << endl;
52
53_phi = autoPtr<surfaceScalarField>
54 (
55 new surfaceScalarField
56 (
57 IOobject
58 (
59 "phi",
60 runTime.timeName(),
61 mesh,
62 IOobject::READ_IF_PRESENT,
63 IOobject::NO_WRITE
64 ),
65 linearInterpolate(U) & mesh.Sf()
66 )
67 );
68surfaceScalarField& phi = _phi();
69surfaceScalarField phi0(phi);
70
71_phi0 = autoPtr<surfaceScalarField>
72 (
73 new surfaceScalarField(phi0)
74 );
75
76Info << "Reading transportProperties\n" << endl;
77
78_transportProperties = autoPtr<IOdictionary>
79 (
80 new IOdictionary
81 (
82 IOobject
83 (
84 "transportProperties",
85 runTime.constant(),
86 mesh,
87 IOobject::MUST_READ_IF_MODIFIED,
88 IOobject::NO_WRITE
89 )
90 )
91 );
92
93Info << "Reading viscosity nu\n" << endl;
94
95_nu = autoPtr<dimensionedScalar>
96 (
97 new dimensionedScalar
98 (
99 _transportProperties().lookup("nu")
100 )
101 );
Foam::fvMesh & mesh
Definition createMesh.H:47
Foam::Time & runTime
Definition createTime.H:33
surfaceScalarField & phi
surfaceScalarField phi0(phi)
_U0
volVectorField & U
volVectorField U0(U)
_phi0
_phi
_nu