BUGFIX: Fixed CrankNicholson ddt scheme for moving meshes. Author: Hrvoje Jasak. Merge: Dominik Christ.
This commit is contained in:
commit
a9efac2492
1 changed files with 17 additions and 2 deletions
|
@ -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())
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in a new issue