BUGFIX: Fixed CrankNicholson ddt scheme for moving meshes. Author: Hrvoje Jasak. Merge: Dominik Christ.

This commit is contained in:
Dominik Christ 2015-04-23 11:22:41 +01:00
commit a9efac2492

View file

@ -849,7 +849,7 @@ CrankNicholsonDdtScheme<Type>::fvmDdt
fvm.source() =
(
rDtCoef*rho.internalField()*vf.oldTime().internalField()
rDtCoef*rho.oldTime().internalField()*vf.oldTime().internalField()
+ offCentre_(ddt0.internalField())
)*mesh().V0();
}
@ -1185,7 +1185,22 @@ tmp<surfaceScalarField> CrankNicholsonDdtScheme<Type>::meshPhi
coef0_(meshPhi0)*mesh().phi().oldTime() - offCentre_(meshPhi0());
}
return coef_(meshPhi0)*mesh().phi() - offCentre_(meshPhi0());
return tmp<surfaceScalarField>
(
new surfaceScalarField
(
IOobject
(
mesh().phi().name(),
mesh().time().timeName(),
mesh(),
IOobject::NO_READ,
IOobject::NO_WRITE,
false
),
coef_(meshPhi0)*mesh().phi() - offCentre_(meshPhi0())
)
);
}