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_nut = autoPtr<volScalarField>
62 (
63 new volScalarField
64 (
65 IOobject
66 (
67 "nut",
68 runTime.timeName(),
69 mesh,
70 IOobject::MUST_READ,
71 IOobject::AUTO_WRITE
72 ),
73 mesh
74 )
75 );
76
77#include "createPhi.H"
78
81setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), _pRefCell, _pRefValue);
82
83_laminarTransport = autoPtr<singlePhaseTransportModel>
84 (
85 new singlePhaseTransportModel( U, phi )
86 );
87singlePhaseTransportModel& laminarTransport = _laminarTransport();
88
89turbulence = autoPtr<incompressible::turbulenceModel>
90 (
91 incompressible::turbulenceModel::New(U, phi, laminarTransport)
92 );
93
94_MRF = autoPtr<IOMRFZoneList>
95 (
96 new IOMRFZoneList(mesh)
97 );
Foam::fvMesh & mesh
Definition createMesh.H:47
Foam::Time & runTime
Definition createTime.H:33
surfaceScalarField & phi
volVectorField & U
_nut
_pRefValue
_pRefCell
_laminarTransport
volScalarField & p
turbulence
singlePhaseTransportModel & laminarTransport
_MRF
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue)