Bugfix: consistent steady intertial relaxation
This commit is contained in:
parent
4348876544
commit
5a42868d78
1 changed files with 36 additions and 35 deletions
|
@ -239,11 +239,11 @@ steadyInertialDdtScheme<Type>::fvcDdt
|
||||||
rDeltaT.internalField()*
|
rDeltaT.internalField()*
|
||||||
(
|
(
|
||||||
vf.internalField()
|
vf.internalField()
|
||||||
- vf.oldTime().internalField()*mesh().V0()/mesh().V()
|
- vf.prevIter().internalField()*mesh().V0()/mesh().V()
|
||||||
),
|
),
|
||||||
rDeltaT.boundaryField()*
|
rDeltaT.boundaryField()*
|
||||||
(
|
(
|
||||||
vf.boundaryField() - vf.oldTime().boundaryField()
|
vf.boundaryField() - vf.prevIter().boundaryField()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -255,7 +255,7 @@ steadyInertialDdtScheme<Type>::fvcDdt
|
||||||
new GeometricField<Type, fvPatchField, volMesh>
|
new GeometricField<Type, fvPatchField, volMesh>
|
||||||
(
|
(
|
||||||
ddtIOobject,
|
ddtIOobject,
|
||||||
rDeltaT*(vf - vf.oldTime())
|
rDeltaT*(vf - vf.prevIter())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -291,11 +291,11 @@ steadyInertialDdtScheme<Type>::fvcDdt
|
||||||
rDeltaT.internalField()*rho.value()*
|
rDeltaT.internalField()*rho.value()*
|
||||||
(
|
(
|
||||||
vf.internalField()
|
vf.internalField()
|
||||||
- vf.oldTime().internalField()*mesh().V0()/mesh().V()
|
- vf.prevIter().internalField()*mesh().V0()/mesh().V()
|
||||||
),
|
),
|
||||||
rDeltaT.boundaryField()*rho.value()*
|
rDeltaT.boundaryField()*rho.value()*
|
||||||
(
|
(
|
||||||
vf.boundaryField() - vf.oldTime().boundaryField()
|
vf.boundaryField() - vf.prevIter().boundaryField()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -307,7 +307,7 @@ steadyInertialDdtScheme<Type>::fvcDdt
|
||||||
new GeometricField<Type, fvPatchField, volMesh>
|
new GeometricField<Type, fvPatchField, volMesh>
|
||||||
(
|
(
|
||||||
ddtIOobject,
|
ddtIOobject,
|
||||||
rDeltaT*rho*(vf - vf.oldTime())
|
rDeltaT*rho*(vf - vf.prevIter())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -343,14 +343,14 @@ steadyInertialDdtScheme<Type>::fvcDdt
|
||||||
rDeltaT.internalField()*
|
rDeltaT.internalField()*
|
||||||
(
|
(
|
||||||
rho.internalField()*vf.internalField()
|
rho.internalField()*vf.internalField()
|
||||||
- rho.oldTime().internalField()
|
- rho.internalField()
|
||||||
*vf.oldTime().internalField()*mesh().V0()/mesh().V()
|
*vf.prevIter().internalField()*mesh().V0()/mesh().V()
|
||||||
),
|
),
|
||||||
rDeltaT.boundaryField()*
|
rDeltaT.boundaryField()*
|
||||||
(
|
(
|
||||||
rho.boundaryField()*vf.boundaryField()
|
rho.boundaryField()*vf.boundaryField()
|
||||||
- rho.oldTime().boundaryField()
|
- rho.boundaryField()
|
||||||
*vf.oldTime().boundaryField()
|
*vf.prevIter().boundaryField()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -362,7 +362,7 @@ steadyInertialDdtScheme<Type>::fvcDdt
|
||||||
new GeometricField<Type, fvPatchField, volMesh>
|
new GeometricField<Type, fvPatchField, volMesh>
|
||||||
(
|
(
|
||||||
ddtIOobject,
|
ddtIOobject,
|
||||||
rDeltaT*(rho*vf - rho.oldTime()*vf.oldTime())
|
rDeltaT*rho*(vf - vf.prevIter())
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -393,11 +393,11 @@ steadyInertialDdtScheme<Type>::fvmDdt
|
||||||
|
|
||||||
if (mesh().moving())
|
if (mesh().moving())
|
||||||
{
|
{
|
||||||
fvm.source() = rDeltaT*vf.oldTime().internalField()*mesh().V0();
|
fvm.source() = rDeltaT*vf.prevIter().internalField()*mesh().V0();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fvm.source() = rDeltaT*vf.oldTime().internalField()*mesh().V();
|
fvm.source() = rDeltaT*vf.prevIter().internalField()*mesh().V();
|
||||||
}
|
}
|
||||||
|
|
||||||
return tfvm;
|
return tfvm;
|
||||||
|
@ -429,12 +429,12 @@ steadyInertialDdtScheme<Type>::fvmDdt
|
||||||
if (mesh().moving())
|
if (mesh().moving())
|
||||||
{
|
{
|
||||||
fvm.source() = rDeltaT
|
fvm.source() = rDeltaT
|
||||||
*rho.value()*vf.oldTime().internalField()*mesh().V0();
|
*rho.value()*vf.prevIter().internalField()*mesh().V0();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fvm.source() = rDeltaT
|
fvm.source() = rDeltaT
|
||||||
*rho.value()*vf.oldTime().internalField()*mesh().V();
|
*rho.value()*vf.prevIter().internalField()*mesh().V();
|
||||||
}
|
}
|
||||||
|
|
||||||
return tfvm;
|
return tfvm;
|
||||||
|
@ -466,14 +466,14 @@ steadyInertialDdtScheme<Type>::fvmDdt
|
||||||
if (mesh().moving())
|
if (mesh().moving())
|
||||||
{
|
{
|
||||||
fvm.source() = rDeltaT
|
fvm.source() = rDeltaT
|
||||||
*rho.oldTime().internalField()
|
*rho.internalField()
|
||||||
*vf.oldTime().internalField()*mesh().V0();
|
*vf.prevIter().internalField()*mesh().V0();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fvm.source() = rDeltaT
|
fvm.source() = rDeltaT
|
||||||
*rho.oldTime().internalField()
|
*rho.internalField()
|
||||||
*vf.oldTime().internalField()*mesh().V();
|
*vf.prevIter().internalField()*mesh().V();
|
||||||
}
|
}
|
||||||
|
|
||||||
return tfvm;
|
return tfvm;
|
||||||
|
@ -522,10 +522,10 @@ steadyInertialDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
new fluxFieldType
|
new fluxFieldType
|
||||||
(
|
(
|
||||||
ddtIOobject,
|
ddtIOobject,
|
||||||
this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())*
|
this->fvcDdtPhiCoeff(U, phi)*
|
||||||
(
|
(
|
||||||
fvc::interpolate(rDeltaT*rA)*phi.oldTime()
|
fvc::interpolate(rDeltaT*rA)*phi
|
||||||
- (fvc::interpolate(rDeltaT*rA*U.oldTime()) & mesh().Sf())
|
- (fvc::interpolate(rDeltaT*rA*U.prevIter()) & mesh().Sf())
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -583,11 +583,12 @@ steadyInertialDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
new fluxFieldType
|
new fluxFieldType
|
||||||
(
|
(
|
||||||
ddtIOobject,
|
ddtIOobject,
|
||||||
this->fvcDdtPhiCoeff(U.oldTime(), phi.oldTime())
|
this->fvcDdtPhiCoeff(U, phi)
|
||||||
*(
|
*(
|
||||||
fvc::interpolate(rDeltaT*rA*rho.oldTime())*
|
fvc::interpolate(rDeltaT*rA*rho)*phi
|
||||||
phi.oldTime()
|
- (
|
||||||
- (fvc::interpolate(rDeltaT*rA*rho.oldTime()*U.oldTime())
|
fvc::interpolate(rDeltaT*rA*rho*U.prevIter()
|
||||||
|
)
|
||||||
& mesh().Sf())
|
& mesh().Sf())
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -606,16 +607,16 @@ steadyInertialDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
ddtIOobject,
|
ddtIOobject,
|
||||||
this->fvcDdtPhiCoeff
|
this->fvcDdtPhiCoeff
|
||||||
(
|
(
|
||||||
U.oldTime(),
|
U.prevIter(),
|
||||||
phi.oldTime()/fvc::interpolate(rho.oldTime())
|
phi/fvc::interpolate(rho)
|
||||||
)
|
)
|
||||||
*(
|
*(
|
||||||
fvc::interpolate(rDeltaT*rA*rho.oldTime())
|
fvc::interpolate(rDeltaT*rA*rho)
|
||||||
*phi.oldTime()/fvc::interpolate(rho.oldTime())
|
*phi/fvc::interpolate(rho)
|
||||||
- (
|
- (
|
||||||
fvc::interpolate
|
fvc::interpolate
|
||||||
(
|
(
|
||||||
rDeltaT*rA*rho.oldTime()*U.oldTime()
|
rDeltaT*rA*rho*U.prevIter()
|
||||||
) & mesh().Sf()
|
) & mesh().Sf()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -633,11 +634,11 @@ steadyInertialDdtScheme<Type>::fvcDdtPhiCorr
|
||||||
new fluxFieldType
|
new fluxFieldType
|
||||||
(
|
(
|
||||||
ddtIOobject,
|
ddtIOobject,
|
||||||
this->fvcDdtPhiCoeff(rho.oldTime(), U.oldTime(), phi.oldTime())
|
this->fvcDdtPhiCoeff(rho, U, phi)*
|
||||||
*(
|
(
|
||||||
fvc::interpolate(rDeltaT*rA)*phi.oldTime()
|
fvc::interpolate(rDeltaT*rA)*phi
|
||||||
- (
|
- (
|
||||||
fvc::interpolate(rDeltaT*rA*U.oldTime())&mesh().Sf()
|
fvc::interpolate(rDeltaT*rA*U.prevIter()) & mesh().Sf()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
Reference in a new issue