Home
Downloads
Documentation
Installation
User Guide
man-pages
API Documentation
README
Release Notes
Changes
License
Support
SourceForge Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
applications
solvers
electromagnetics
mhdFoam
createFields.H
Go to the documentation of this file.
1
Info
<<
"Reading transportProperties\n"
<<
endl
;
2
3
IOdictionary
transportProperties
4
(
5
IOobject
6
(
7
"transportProperties"
,
8
runTime.constant(),
9
mesh
,
10
IOobject::MUST_READ,
11
IOobject::NO_WRITE
12
)
13
);
14
15
dimensionedScalar
rho
16
(
17
transportProperties
.lookup(
"rho"
)
18
);
19
20
dimensionedScalar
nu
21
(
22
transportProperties
.lookup(
"nu"
)
23
);
24
25
dimensionedScalar
mu
26
(
27
transportProperties
.lookup(
"mu"
)
28
);
29
30
dimensionedScalar
sigma
31
(
32
transportProperties
.lookup(
"sigma"
)
33
);
34
35
Info
<<
"Reading field p\n"
<<
endl
;
36
volScalarField
p
37
(
38
IOobject
39
(
40
"p"
,
41
runTime.timeName(),
42
mesh
,
43
IOobject::MUST_READ,
44
IOobject::AUTO_WRITE
45
),
46
mesh
47
);
48
49
50
Info
<<
"Reading field U\n"
<<
endl
;
51
volVectorField
U
52
(
53
IOobject
54
(
55
"U"
,
56
runTime.timeName(),
57
mesh
,
58
IOobject::MUST_READ,
59
IOobject::AUTO_WRITE
60
),
61
mesh
62
);
63
64
#include <
finiteVolume/createPhi.H
>
65
66
Info
<<
"Reading field pB\n"
<<
endl
;
67
volScalarField
pB
68
(
69
IOobject
70
(
71
"pB"
,
72
runTime.timeName(),
73
mesh
,
74
IOobject::MUST_READ,
75
IOobject::AUTO_WRITE
76
),
77
mesh
78
);
79
80
81
Info
<<
"Reading field B\n"
<<
endl
;
82
volVectorField
B
83
(
84
IOobject
85
(
86
"B"
,
87
runTime.timeName(),
88
mesh
,
89
IOobject::MUST_READ,
90
IOobject::AUTO_WRITE
91
),
92
mesh
93
);
94
95
96
#include "
createPhiB.H
"
97
98
dimensionedScalar
DB = 1.0/(
mu
*sigma);
99
DB.
name
() =
"DB"
;
100
101
dimensionedScalar
DBU = 1.0/(2.0*
mu
*
rho
);
102
DBU.
name
() =
"DBU"
;
103
104
105
label
pRefCell
= 0;
106
scalar
pRefValue
= 0.0;
107
setRefCell
(
p
,
mesh
.solutionDict().subDict(
"PISO"
),
pRefCell
,
pRefValue
);
108
109
// ************************ vim: set sw=4 sts=4 et: ************************ //