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
181 lines
3.3 KiB
C
181 lines
3.3 KiB
C
Info<< "Reading field alpha\n" << endl;
|
|
volScalarField alpha
|
|
(
|
|
IOobject
|
|
(
|
|
"alpha",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
volScalarField beta
|
|
(
|
|
IOobject
|
|
(
|
|
"beta",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::NO_WRITE
|
|
),
|
|
scalar(1) - alpha
|
|
//,alpha.boundaryField().types()
|
|
);
|
|
|
|
Info<< "Reading field p\n" << endl;
|
|
volScalarField p
|
|
(
|
|
IOobject
|
|
(
|
|
"p",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
Info<< "Reading field Ua\n" << endl;
|
|
volVectorField Ua
|
|
(
|
|
IOobject
|
|
(
|
|
"Ua",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
Info<< "Reading field Ub\n" << endl;
|
|
volVectorField Ub
|
|
(
|
|
IOobject
|
|
(
|
|
"Ub",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
mesh
|
|
);
|
|
|
|
volVectorField U
|
|
(
|
|
IOobject
|
|
(
|
|
"U",
|
|
runTime.timeName(),
|
|
mesh,
|
|
IOobject::NO_READ,
|
|
IOobject::AUTO_WRITE
|
|
),
|
|
alpha*Ua + beta*Ub
|
|
);
|
|
|
|
|
|
Info<< "Reading transportProperties\n" << endl;
|
|
|
|
IOdictionary transportProperties
|
|
(
|
|
IOobject
|
|
(
|
|
"transportProperties",
|
|
runTime.constant(),
|
|
mesh,
|
|
IOobject::MUST_READ,
|
|
IOobject::NO_WRITE
|
|
)
|
|
);
|
|
|
|
dimensionedScalar rhoa
|
|
(
|
|
transportProperties.lookup("rhoa")
|
|
);
|
|
|
|
dimensionedScalar rhob
|
|
(
|
|
transportProperties.lookup("rhob")
|
|
);
|
|
|
|
dimensionedScalar nua
|
|
(
|
|
transportProperties.lookup("nua")
|
|
);
|
|
|
|
dimensionedScalar nub
|
|
(
|
|
transportProperties.lookup("nub")
|
|
);
|
|
|
|
dimensionedScalar da
|
|
(
|
|
transportProperties.lookup("da")
|
|
);
|
|
|
|
dimensionedScalar db
|
|
(
|
|
transportProperties.lookup("db")
|
|
);
|
|
|
|
dimensionedScalar Cvm
|
|
(
|
|
transportProperties.lookup("Cvm")
|
|
);
|
|
|
|
dimensionedScalar Cl
|
|
(
|
|
transportProperties.lookup("Cl")
|
|
);
|
|
|
|
dimensionedScalar Ct
|
|
(
|
|
transportProperties.lookup("Ct")
|
|
);
|
|
|
|
# include "createPhia.H"
|
|
# include "createPhib.H"
|
|
|
|
surfaceScalarField phi
|
|
(
|
|
IOobject
|
|
(
|
|
"phi",
|
|
runTime.timeName(),
|
|
mesh
|
|
),
|
|
fvc::interpolate(alpha)*phia
|
|
+ fvc::interpolate(beta)*phib
|
|
);
|
|
|
|
|
|
# include "createRASTurbulence.H"
|
|
|
|
Info<< "Calculating field DDtUa and DDtUb\n" << endl;
|
|
|
|
volVectorField DDtUa =
|
|
fvc::ddt(Ua)
|
|
+ fvc::div(phia, Ua)
|
|
- fvc::div(phia)*Ua;
|
|
|
|
volVectorField DDtUb =
|
|
fvc::ddt(Ub)
|
|
+ fvc::div(phib, Ub)
|
|
- fvc::div(phib)*Ub;
|
|
|
|
|
|
Info<< "Calculating field g.h\n" << endl;
|
|
volScalarField gh("gh", g & mesh.C());
|
|
|
|
|
|
label pRefCell = 0;
|
|
scalar pRefValue = 0.0;
|
|
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|