Clean-up and formatting
This commit is contained in:
parent
297f63cce2
commit
bd5604c100
3 changed files with 68 additions and 73 deletions
|
@ -14,15 +14,12 @@
|
||||||
+ fvm::div(phi, T)
|
+ fvm::div(phi, T)
|
||||||
)
|
)
|
||||||
- fvm::laplacian(kappaEff, T)
|
- fvm::laplacian(kappaEff, T)
|
||||||
==
|
==
|
||||||
radiation->Ru()
|
radiation->Ru()
|
||||||
- fvm::Sp(4.0*radiation->Rp()*pow3(T), T)
|
- fvm::Sp(4.0*radiation->Rp()*pow3(T), T)
|
||||||
+ 3.0*radiation->Rp()*pow4(T)
|
+ 3.0*radiation->Rp()*pow4(T)
|
||||||
);
|
);
|
||||||
|
|
||||||
//Done automatically in 1.6.1-ext
|
|
||||||
//TFluidEqn->boundaryManipulate(T.boundaryField());
|
|
||||||
|
|
||||||
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
fvScalarMatrix* TSolidEqn = new fvScalarMatrix
|
||||||
(
|
(
|
||||||
fvm::ddt(rhoCpsolid, Tsolid)
|
fvm::ddt(rhoCpsolid, Tsolid)
|
||||||
|
@ -30,10 +27,6 @@
|
||||||
+ fvm::SuSp(-solidThermo.S()/Tsolid, Tsolid)
|
+ fvm::SuSp(-solidThermo.S()/Tsolid, Tsolid)
|
||||||
);
|
);
|
||||||
|
|
||||||
//Done automatically in 1.6.1-ext
|
|
||||||
//TSolidEqn->boundaryManipulate(Tsolid.boundaryField());
|
|
||||||
|
|
||||||
|
|
||||||
// Add fluid equation
|
// Add fluid equation
|
||||||
TEqns.set(0, TFluidEqn);
|
TEqns.set(0, TFluidEqn);
|
||||||
|
|
||||||
|
|
|
@ -1,69 +1,71 @@
|
||||||
Info << "Reading field p\n" << endl;
|
Info << "Reading field p\n" << endl;
|
||||||
volScalarField p
|
volScalarField p
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
(
|
||||||
"p",
|
IOobject
|
||||||
runTime.timeName(),
|
(
|
||||||
|
"p",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
Info << "Reading field U\n" << endl;
|
||||||
|
volVectorField U
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"U",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::MUST_READ,
|
||||||
|
IOobject::AUTO_WRITE
|
||||||
|
),
|
||||||
|
mesh
|
||||||
|
);
|
||||||
|
|
||||||
|
# include "createPhi.H"
|
||||||
|
|
||||||
|
singlePhaseTransportModel laminarTransport(U, phi);
|
||||||
|
|
||||||
|
autoPtr<incompressible::RASModel> turbulence
|
||||||
|
(
|
||||||
|
incompressible::RASModel::New(U, phi, laminarTransport)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Block vector field for velocity (first entry) and pressure (second
|
||||||
|
// entry).
|
||||||
|
Info << "Creating field Up\n" << endl;
|
||||||
|
volVector4Field Up
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"Up",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
dimensionedVector4("zero", dimless, vector4::zero)
|
||||||
IOobject::AUTO_WRITE
|
);
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
Info << "Reading field U\n" << endl;
|
Info<< "Creating field rAU\n" << endl;
|
||||||
volVectorField U
|
volScalarField rAU
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
(
|
||||||
"U",
|
IOobject
|
||||||
runTime.timeName(),
|
(
|
||||||
|
"rAU",
|
||||||
|
runTime.timeName(),
|
||||||
|
mesh,
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE
|
||||||
|
),
|
||||||
mesh,
|
mesh,
|
||||||
IOobject::MUST_READ,
|
runTime.deltaT()
|
||||||
IOobject::AUTO_WRITE
|
);
|
||||||
),
|
|
||||||
mesh
|
|
||||||
);
|
|
||||||
|
|
||||||
#include "createPhi.H"
|
mesh.schemesDict().setFluxRequired(p.name());
|
||||||
|
mesh.schemesDict().setFluxRequired("pcorr");
|
||||||
singlePhaseTransportModel laminarTransport(U, phi);
|
|
||||||
autoPtr<incompressible::RASModel> turbulence
|
|
||||||
(
|
|
||||||
incompressible::RASModel::New(U, phi, laminarTransport)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Block vector field for velocity (first entry) and pressure (second
|
|
||||||
// entry).
|
|
||||||
Info << "Creating field Up\n" << endl;
|
|
||||||
volVector4Field Up
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"Up",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
dimensionedVector4("zero", dimless, vector4::zero)
|
|
||||||
);
|
|
||||||
|
|
||||||
Info<< "Creating field rAU\n" << endl;
|
|
||||||
volScalarField rAU
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"rAU",
|
|
||||||
runTime.timeName(),
|
|
||||||
mesh,
|
|
||||||
IOobject::NO_READ,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
),
|
|
||||||
mesh,
|
|
||||||
runTime.deltaT()
|
|
||||||
);
|
|
||||||
|
|
||||||
mesh.schemesDict().setFluxRequired(p.name());
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
// Prepare clean 1/Ap without contribution from under-relaxation
|
// Prepare clean 1/Ap without contribution from under-relaxation
|
||||||
// HJ, 26/Oct/2015
|
// HJ, 26/Oct/2015
|
||||||
volScalarField rUA
|
volScalarField rAU
|
||||||
(
|
(
|
||||||
"(1|A(U))",
|
"(1|A(U))",
|
||||||
1/HUEqn().A()
|
1/HUEqn().A()
|
||||||
|
@ -13,7 +13,7 @@
|
||||||
// the flux precursor
|
// the flux precursor
|
||||||
U.storePrevIter();
|
U.storePrevIter();
|
||||||
|
|
||||||
U = rUA*HUEqn().H();
|
U = rAU*HUEqn().H();
|
||||||
HUEqn.clear();
|
HUEqn.clear();
|
||||||
|
|
||||||
phi = fvc::interpolate(U) & mesh.Sf();
|
phi = fvc::interpolate(U) & mesh.Sf();
|
||||||
|
|
Reference in a new issue