db7fac3f24
git-svn-id: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Core/OpenFOAM-1.5-dev@1731 e4e07f05-0c2f-0410-a05a-b8ba57e0c909
95 lines
1.7 KiB
C++
95 lines
1.7 KiB
C++
Info<< "Reading financial properties\n" << endl;
|
|
|
|
IOdictionary financialProperties
|
|
(
|
|
IOobject
|
|
(
|
|
"financialProperties",
|
|
runTime.constant(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::NO_WRITE
|
|
)
|
|
);
|
|
|
|
dimensionedScalar strike
|
|
(
|
|
financialProperties.lookup("strike")
|
|
);
|
|
|
|
dimensionedScalar r
|
|
(
|
|
financialProperties.lookup("r")
|
|
);
|
|
|
|
dimensionedScalar sigma
|
|
(
|
|
financialProperties.lookup("sigma")
|
|
);
|
|
|
|
dimensionedScalar sigmaSqr = sqr(sigma);
|
|
|
|
|
|
Info<< nl << "Reading field V" << endl;
|
|
|
|
volScalarField V
|
|
(
|
|
IOobject
|
|
(
|
|
"V",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
|
|
surfaceVectorField Pf
|
|
(
|
|
IOobject
|
|
(
|
|
"Pf",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mesh.Cf()
|
|
);
|
|
|
|
|
|
volVectorField P
|
|
(
|
|
IOobject
|
|
(
|
|
"P",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
mesh.C()
|
|
);
|
|
|
|
//- V == max(strike - P.x(), dimensionedScalar("0", V.dimensions(), 0.0));
|
|
V == max
|
|
(
|
|
P.component(Foam::vector::X) - strike,
|
|
dimensionedScalar("0", V.dimensions(), 0.0)
|
|
);
|
|
|
|
|
|
volScalarField delta
|
|
(
|
|
IOobject
|
|
(
|
|
"delta",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
fvc::grad(V)().component(Foam::vector::X)
|
|
);
|