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_IF_MODIFIED,
11  IOobject::NO_WRITE
12  )
13 );
14 
15 const dimensionedScalar strike("strike", dimLength, financialProperties);
16 const dimensionedScalar r("r", dimless/dimTime, financialProperties);
17 
19 (
20  "sigma",
21  dimensionSet(0, 0, -0.5, 0, 0),
22  financialProperties
23 );
24 
25 const dimensionedScalar sigmaSqr = sqr(sigma);
26 
27 
28 Info<< nl << "Reading field V" << endl;
29 
31 (
32  IOobject
33  (
34  "V",
35  runTime.name(),
36  mesh,
37  IOobject::MUST_READ,
38  IOobject::AUTO_WRITE
39  ),
40  mesh
41 );
42 
43 
45 (
46  IOobject
47  (
48  "Pf",
49  runTime.name(),
50  mesh,
51  IOobject::NO_READ,
52  IOobject::NO_WRITE
53  ),
54  mesh.Cf()
55 );
56 
57 
59 (
60  IOobject
61  (
62  "P",
63  runTime.name(),
64  mesh,
65  IOobject::NO_READ,
66  IOobject::NO_WRITE
67  ),
68  mesh.C()
69 );
70 
71 V == max
72 (
73  P.component(Foam::vector::X) - strike,
74  dimensionedScalar(V.dimensions(), 0)
75 );
76 
78 (
79  IOobject
80  (
81  "delta",
82  runTime.name(),
83  mesh,
84  IOobject::NO_READ,
85  IOobject::AUTO_WRITE
86  ),
87  fvc::grad(V)().component(Foam::vector::X)
88 );
scalar delta
const volVectorField & C() const
Return cell centres.
const surfaceVectorField & Cf() const
Return face centres.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
const dimensionedScalar sigma
Stefan-Boltzmann constant: default SI units: [W/m^2/K^4].
const dimensionSet dimless
tmp< VolField< typename outerProduct< vector, Type >::type > > grad(const SurfaceField< Type > &ssf)
Definition: fvcGrad.C:46
VolField< vector > volVectorField
Definition: volFieldsFwd.H:63
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:288
const dimensionSet & dimLength
Definition: dimensions.C:276
messageStream Info
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimTime
Definition: dimensions.C:277
VolField< scalar > volScalarField
Definition: volFieldsFwd.H:62
SurfaceField< vector > surfaceVectorField
static const char nl
Definition: Ostream.H:297
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.