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 p\n" << endl;
27_p = autoPtr<volScalarField>
28 (
29 new volScalarField
30 (
31 IOobject
32 (
33 "p",
34 runTime.timeName(),
35 mesh,
36 IOobject::MUST_READ,
37 IOobject::AUTO_WRITE
38 ),
39 mesh
40 )
41 );
42volScalarField& p = _p();
43
44Info << "Reading field U\n" << endl;
45_U = autoPtr<volVectorField>
46 (
47 new volVectorField
48 (
49 IOobject
50 (
51 "U",
52 runTime.timeName(),
53 mesh,
54 IOobject::MUST_READ,
55 IOobject::AUTO_WRITE
56 ),
57 mesh
58 )
59 );
60volVectorField& U = _U();
61
62#include "createPhi.H"
63
64
68
69_laminarTransport = autoPtr<singlePhaseTransportModel>
70 (
71 new singlePhaseTransportModel( U, phi )
72 );
73singlePhaseTransportModel& laminarTransport = _laminarTransport();
74
75turbulence = autoPtr<incompressible::turbulenceModel>
76 (
77 incompressible::turbulenceModel::New(U, phi, laminarTransport)
78 );
79
80_MRF = autoPtr<IOMRFZoneList>
81 (
82 new IOMRFZoneList(mesh)
83 );
Foam::fvMesh & mesh
Definition createMesh.H:47
Foam::Time & runTime
Definition createTime.H:33
simpleControl simple(mesh)
surfaceScalarField & phi
volVectorField & U
_laminarTransport
volScalarField & p
scalar pRefValue
turbulence
singlePhaseTransportModel & laminarTransport
_MRF
label pRefCell
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue)