Lots of changes from Mark and my changes to ddtPhiCorr all mixed together

because I failed to work out how to merge Mark's stuff -- HELP!!!
This commit is contained in:
henry
2008-05-25 21:46:37 +01:00
parent a016fa314e
commit 4a2a23a710
60 changed files with 938 additions and 410 deletions

View File

@ -41,6 +41,7 @@ Description
#include "twoPhaseMixture.H"
#include "incompressible/turbulenceModel/turbulenceModel.H"
#include "probes.H"
#include "EulerDdtScheme.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -66,7 +67,6 @@ int main(int argc, char *argv[])
{
#include "readControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
runTime++;
@ -76,7 +76,7 @@ int main(int argc, char *argv[])
// Make the fluxes absolute
if (mesh.changing())
{
fvc::makeAbsolute(phi, U);
phi = fvc::interpolate(U) & mesh.Sf();
}
scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime();
@ -100,7 +100,7 @@ int main(int argc, char *argv[])
}
// Keep the absolute fluxes for use in ddtPhiCorr
surfaceScalarField phiAbs("phiAbs", phi);
surfaceScalarField phiAbs0("phiAbs0", phi);
// Make the fluxes relative to the mesh motion
if (mesh.changing())
@ -125,8 +125,6 @@ int main(int argc, char *argv[])
#include "pEqn.H"
}
#include "continuityErrs.H"
p = pd + rho*gh;
if (pd.needReference())

View File

@ -2,21 +2,42 @@
volScalarField rAU = 1.0/UEqn.A();
surfaceScalarField rAUf = fvc::interpolate(rAU);
volVectorField HU = UEqn.H();
U = rAU*HU;
U = rAU*UEqn.H();
surfaceScalarField phiU("phiU", (fvc::interpolate(U) & mesh.Sf()));
if (ddtPhiCorr)
{
phiU += fvc::ddtPhiCorr(rAU, rho, U, phiAbs);
//phiU += fvc::ddtPhiCorr(rAU, rho, U, phiAbs0);
dimensionedScalar rDeltaT = 1.0/mesh.time().deltaT();
volScalarField V0byV
(
IOobject
(
"V0byV",
mesh.time().timeName(),
mesh
),
mesh,
dimensionedScalar("V0byV", dimless, 1),
zeroGradientFvPatchScalarField::typeName
);
V0byV.dimensionedInternalField() = mesh.V0()/mesh.V();
V0byV.correctBoundaryConditions();
phiU += rDeltaT*
(
fvc::interpolate(rAU*rho.oldTime()*V0byV)*phiAbs0
- (fvc::interpolate(rAU*rho.oldTime()*V0byV*U.oldTime()) & mesh.Sf())
);
}
phi = phiU +
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
- ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf();
(
fvc::interpolate(interface.sigmaK())*fvc::snGrad(gamma)
- ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf();
if (pd.needReference())
{
@ -59,6 +80,8 @@
U += rAU*fvc::reconstruct((phi - phiU)/rAUf);
U.correctBoundaryConditions();
#include "continuityErrs.H"
// Make the fluxes relative to the mesh motion
fvc::makeRelative(phi, U);
}