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
financial
financialFoam
createFields.H
Go to the documentation of this file.
1
Info
<<
"Reading financial properties\n"
<<
endl
;
2
3
IOdictionary financialProperties
4
(
5
IOobject
6
(
7
"financialProperties"
,
8
runTime.constant(),
9
mesh
,
10
IOobject::MUST_READ,
11
IOobject::NO_WRITE
12
)
13
);
14
15
dimensionedScalar
strike
16
(
17
financialProperties.lookup(
"strike"
)
18
);
19
20
dimensionedScalar
r
21
(
22
financialProperties.lookup(
"r"
)
23
);
24
25
dimensionedScalar
sigma
26
(
27
financialProperties.lookup(
"sigma"
)
28
);
29
30
dimensionedScalar
sigmaSqr =
sqr
(sigma);
31
32
33
Info
<<
nl
<<
"Reading field V"
<<
endl
;
34
35
volScalarField
V
36
(
37
IOobject
38
(
39
"V"
,
40
runTime.timeName(),
41
mesh
,
42
IOobject::MUST_READ,
43
IOobject::AUTO_WRITE
44
),
45
mesh
46
);
47
48
49
surfaceVectorField
Pf
50
(
51
IOobject
52
(
53
"Pf"
,
54
runTime.timeName(),
55
mesh
,
56
IOobject::NO_READ,
57
IOobject::NO_WRITE
58
),
59
mesh
.Cf()
60
);
61
62
63
volVectorField
P
64
(
65
IOobject
66
(
67
"P"
,
68
runTime.timeName(),
69
mesh
,
70
IOobject::NO_READ,
71
IOobject::NO_WRITE
72
),
73
mesh
.C()
74
);
75
76
//- V == max(strike - P.x(), dimensionedScalar("0", V.dimensions(), 0.0));
77
V ==
max
78
(
79
P.component(
Foam::vector::X
) - strike,
80
dimensionedScalar
(
"0"
, V.dimensions(), 0.0)
81
);
82
83
84
volScalarField
delta
85
(
86
IOobject
87
(
88
"delta"
,
89
runTime.timeName(),
90
mesh
,
91
IOobject::NO_READ,
92
IOobject::AUTO_WRITE
93
),
94
fvc::grad
(V)().
component
(
Foam::vector::X
)
95
);
96
97
// ************************ vim: set sw=4 sts=4 et: ************************ //