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
43volScalarField p0(p);
44
45_p0 = autoPtr<volScalarField>
46 (
47 new volScalarField(p0)
48 );
49
50Info << "Reading field U\n" << endl;
51_U = autoPtr<volVectorField>
52 (
53 new volVectorField
54 (
55 IOobject
56 (
57 "U",
58 runTime.timeName(),
59 mesh,
60 IOobject::MUST_READ,
61 IOobject::AUTO_WRITE
62 ),
63 mesh
64 )
65 );
66volVectorField& U = _U();
67
68volVectorField U0(U);
69
70_U0 = autoPtr<volVectorField>
71 (
72 new volVectorField(U0)
73 );
74
75#include "createPhi.H"
76
77
78label pRefCell = 0;
79scalar pRefValue = 0.0;
80setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue);
81
82_laminarTransport = autoPtr<singlePhaseTransportModel>
83 (
84 new singlePhaseTransportModel( U, phi )
85 );
86singlePhaseTransportModel& laminarTransport = _laminarTransport();
87
88turbulence = autoPtr<incompressible::turbulenceModel>
89 (
90 incompressible::turbulenceModel::New(U, phi, laminarTransport)
91 );
92
93_MRF = autoPtr<IOMRFZoneList>
94 (
95 new IOMRFZoneList(mesh)
96 );
Foam::fvMesh & mesh
Definition createMesh.H:47
Foam::Time & runTime
Definition createTime.H:33
surfaceScalarField & phi
_U0
volVectorField & U
volVectorField U0(U)
_laminarTransport
volScalarField & p
scalar pRefValue
_p0
turbulence
singlePhaseTransportModel & laminarTransport
_MRF
label pRefCell
volScalarField p0(p)
setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue)