30 #include "surfaceInterpolate.H" 48 template<
class GeoField>
49 CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
61 this->
timeIndex() = mesh.time().startTimeIndex();
66 template<
class GeoField>
67 CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
71 const typename GeoField::value_type& value,
72 const dimensionSet& dims
75 GeoField(
io,
mesh, value, dims),
81 template<
class GeoField>
82 GeoField& CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::operator()()
89 template<
class GeoField>
90 void CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::operator=
95 GeoField::operator=(gf);
100 template<
class GeoField>
108 if (!
mesh().objectRegistry::template foundObject<GeoField>(
name))
124 ).
template typeHeaderOk<DDt0Field<GeoField>>(
true)
129 new DDt0Field<GeoField>
148 new DDt0Field<GeoField>
167 return static_cast<DDt0Field<GeoField>&
> 169 mesh().objectRegistry::template lookupObjectRef<GeoField>(
name)
175 template<
class GeoField>
176 bool CrankNicolsonDdtScheme<Type>::evaluate
178 DDt0Field<GeoField>& ddt0
181 bool evaluated = (ddt0.timeIndex() !=
mesh().time().timeIndex());
182 ddt0.timeIndex() =
mesh().time().timeIndex();
188 template<
class GeoField>
189 scalar CrankNicolsonDdtScheme<Type>::coef_
191 const DDt0Field<GeoField>& ddt0
206 template<
class GeoField>
207 scalar CrankNicolsonDdtScheme<Type>::coef0_
209 const DDt0Field<GeoField>& ddt0
224 template<
class GeoField>
227 const DDt0Field<GeoField>& ddt0
230 return coef_(ddt0)/
mesh().time().deltaT();
235 template<
class GeoField>
238 const DDt0Field<GeoField>& ddt0
241 return coef0_(ddt0)/
mesh().time().deltaT0();
246 template<
class GeoField>
247 tmp<GeoField> CrankNicolsonDdtScheme<Type>::offCentre_
264 const FieldField<fvPatchField, Type>&
ff 266 const FieldField<fvPatchField, Type>& bf
279 ocCoeff_(new Function1Types::Constant<scalar>(
"ocCoeff", 1))
291 CrankNicolsonDdtScheme<Type>::CrankNicolsonDdtScheme
297 ddtScheme<Type>(
mesh, is)
299 token firstToken(is);
304 if (ocCoeff < 0 || ocCoeff > 1)
307 <<
"Off-centreing coefficient = " <<
ocCoeff 308 <<
" should be >= 0 and <= 1" 314 new Function1Types::Constant<scalar>(
"ocCoeff",
ocCoeff)
321 ocCoeff_ = Function1<scalar>::New(
"ocCoeff",
dict, &
mesh);
342 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
343 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
345 "ddt0(" + dt.
name() +
')',
351 "ddt(" + dt.
name() +
')',
352 mesh().time().timeName(),
375 ddt0.internalFieldRef() =
377 (rDtCoef0*dt)*(
mesh().V0() -
mesh().V00())
378 -
mesh().V00()*offCentre_(ddt0.internalField())
382 tdtdt.ref().internalFieldRef() =
384 (rDtCoef*dt)*(
mesh().V() -
mesh().V0())
385 -
mesh().V0()*offCentre_(ddt0.internalField())
390 tdtdt.ref().boundaryFieldRef().
391 template evaluateCoupled<coupledFvPatch>();
405 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
406 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
408 "ddt0(" + vf.
name() +
')',
414 "ddt(" + vf.
name() +
')',
415 mesh().time().timeName(),
425 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
427 ddt0.primitiveFieldRef() =
432 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
433 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
436 ddt0.boundaryFieldRef() =
441 - vf.
oldTime().oldTime().boundaryField()
442 ) - offCentre_(
ff(ddt0.boundaryField()))
456 ) -
mesh().V0()*offCentre_(ddt0()())
461 ) - offCentre_(
ff(ddt0.boundaryField()))
467 tdtdt.
ref().boundaryFieldRef().
468 template evaluateCoupled<coupledFvPatch>();
477 - offCentre_(ddt0());
480 return tmp<GeometricField<Type, fvPatchField, volMesh>>
482 new GeometricField<Type, fvPatchField, volMesh>
485 rDtCoef*(vf - vf.
oldTime()) - offCentre_(ddt0())
500 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
501 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
503 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
509 "ddt(" +
rho.name() +
',' + vf.
name() +
')',
510 mesh().time().timeName(),
520 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
522 ddt0.primitiveFieldRef() =
524 rDtCoef0*
rho.value()*
527 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
528 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
531 ddt0.boundaryFieldRef() =
533 rDtCoef0*
rho.value()*
536 - vf.
oldTime().oldTime().boundaryField()
537 ) - offCentre_(
ff(ddt0.boundaryField()))
541 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
543 new GeometricField<Type, fvPatchField, volMesh>
549 rDtCoef.value()*
rho.value()*
553 ) -
mesh().V0()*offCentre_(ddt0.primitiveField())
555 rDtCoef.value()*
rho.value()*
558 ) - offCentre_(
ff(ddt0.boundaryField()))
564 tdtdt.ref().boundaryFieldRef().
565 template evaluateCoupled<coupledFvPatch>();
574 - offCentre_(ddt0());
577 return tmp<GeometricField<Type, fvPatchField, volMesh>>
579 new GeometricField<Type, fvPatchField, volMesh>
582 rDtCoef*
rho*(vf - vf.
oldTime()) - offCentre_(ddt0())
597 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
598 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
600 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
606 "ddt(" +
rho.name() +
',' + vf.
name() +
')',
607 mesh().time().timeName(),
617 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
619 ddt0.primitiveFieldRef() =
623 mesh().V0()*
rho.oldTime().primitiveField()
625 -
mesh().V00()*
rho.oldTime().oldTime().primitiveField()
626 *vf.
oldTime().oldTime().primitiveField()
627 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
630 ddt0.boundaryFieldRef() =
634 rho.oldTime().boundaryField()
636 -
rho.oldTime().oldTime().boundaryField()
637 *vf.
oldTime().oldTime().boundaryField()
638 ) - offCentre_(
ff(ddt0.boundaryField()))
642 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
644 new GeometricField<Type, fvPatchField, volMesh>
653 -
mesh().V0()*
rho.oldTime().primitiveField()
655 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
660 -
rho.oldTime().boundaryField()*vf.
oldTime().boundaryField()
661 ) - offCentre_(
ff(ddt0.boundaryField()))
667 tdtdt.ref().boundaryFieldRef().
668 template evaluateCoupled<coupledFvPatch>();
676 ddt0 = rDtCoef0_(ddt0)*
679 -
rho.oldTime().oldTime()*vf.
oldTime().oldTime()
680 ) - offCentre_(ddt0());
683 return tmp<GeometricField<Type, fvPatchField, volMesh>>
685 new GeometricField<Type, fvPatchField, volMesh>
705 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
706 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
715 mesh().time().timeName(),
725 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
727 ddt0.primitiveFieldRef() =
732 *
alpha.oldTime().primitiveField()
733 *
rho.oldTime().primitiveField()
737 *
alpha.oldTime().oldTime().primitiveField()
738 *
rho.oldTime().oldTime().primitiveField()
739 *vf.
oldTime().oldTime().primitiveField()
740 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
743 ddt0.boundaryFieldRef() =
747 alpha.oldTime().boundaryField()
748 *
rho.oldTime().boundaryField()
751 -
alpha.oldTime().oldTime().boundaryField()
752 *
rho.oldTime().oldTime().boundaryField()
753 *vf.
oldTime().oldTime().boundaryField()
754 ) - offCentre_(
ff(ddt0.boundaryField()))
758 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
760 new GeometricField<Type, fvPatchField, volMesh>
770 *
alpha.primitiveField()
771 *
rho.primitiveField()
775 *
alpha.oldTime().primitiveField()
776 *
rho.oldTime().primitiveField()
778 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
782 alpha.boundaryField()
786 -
alpha.oldTime().boundaryField()
787 *
rho.oldTime().boundaryField()
789 ) - offCentre_(
ff(ddt0.boundaryField()))
795 tdtdt.ref().boundaryFieldRef().
796 template evaluateCoupled<coupledFvPatch>();
804 ddt0 = rDtCoef0_(ddt0)*
810 -
alpha.oldTime().oldTime()
811 *
rho.oldTime().oldTime()
813 ) - offCentre_(ddt0());
816 return tmp<GeometricField<Type, fvPatchField, volMesh>>
818 new GeometricField<Type, fvPatchField, volMesh>
840 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
841 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
843 "ddt0(" + vf.
name() +
')',
858 const scalar rDtCoef = rDtCoef_(ddt0).value();
867 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
869 ddt0.primitiveFieldRef() =
874 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
876 -
mesh().V00()*offCentre_(ddt0.primitiveField())
879 ddt0.boundaryFieldRef() =
884 - vf.
oldTime().oldTime().boundaryField()
886 - offCentre_(
ff(ddt0.boundaryField()))
892 rDtCoef*vf.
oldTime().primitiveField()
893 + offCentre_(ddt0.primitiveField())
901 - offCentre_(ddt0());
907 rDtCoef*vf.
oldTime().primitiveField()
908 + offCentre_(ddt0.primitiveField())
924 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
925 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
927 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
941 const scalar rDtCoef = rDtCoef_(ddt0).value();
950 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
952 ddt0.primitiveFieldRef() =
954 rDtCoef0*
rho.value()*
957 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
959 -
mesh().V00()*offCentre_(ddt0.primitiveField())
962 ddt0.boundaryFieldRef() =
964 rDtCoef0*
rho.value()*
967 - vf.
oldTime().oldTime().boundaryField()
969 - offCentre_(
ff(ddt0.boundaryField()))
975 rDtCoef*
rho.value()*vf.
oldTime().primitiveField()
976 + offCentre_(ddt0.primitiveField())
984 - offCentre_(ddt0());
989 rDtCoef*
rho.value()*vf.
oldTime().primitiveField()
990 + offCentre_(ddt0.primitiveField())
1006 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1007 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1009 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
1023 const scalar rDtCoef = rDtCoef_(ddt0).value();
1024 fvm.
diag() = rDtCoef*
rho.primitiveField()*
mesh().V();
1027 rho.oldTime().oldTime();
1029 if (
mesh().moving())
1033 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
1035 ddt0.primitiveFieldRef() =
1039 mesh().V0()*
rho.oldTime().primitiveField()
1040 *vf.
oldTime().primitiveField()
1041 -
mesh().V00()*
rho.oldTime().oldTime().primitiveField()
1042 *vf.
oldTime().oldTime().primitiveField()
1044 -
mesh().V00()*offCentre_(ddt0.primitiveField())
1047 ddt0.boundaryFieldRef() =
1051 rho.oldTime().boundaryField()
1053 -
rho.oldTime().oldTime().boundaryField()
1054 *vf.
oldTime().oldTime().boundaryField()
1056 - offCentre_(
ff(ddt0.boundaryField()))
1062 rDtCoef*
rho.oldTime().primitiveField()*vf.
oldTime().primitiveField()
1063 + offCentre_(ddt0.primitiveField())
1070 ddt0 = rDtCoef0_(ddt0)*
1073 -
rho.oldTime().oldTime()*vf.
oldTime().oldTime()
1074 ) - offCentre_(ddt0());
1079 rDtCoef*
rho.oldTime().primitiveField()*vf.
oldTime().primitiveField()
1080 + offCentre_(ddt0.primitiveField())
1088 template<
class Type>
1097 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1098 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1114 const scalar rDtCoef = rDtCoef_(ddt0).value();
1115 fvm.
diag() = rDtCoef*
alpha.primitiveField()*
rho.primitiveField()*
mesh().V();
1118 alpha.oldTime().oldTime();
1119 rho.oldTime().oldTime();
1121 if (
mesh().moving())
1125 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
1127 ddt0.primitiveFieldRef() =
1132 *
alpha.oldTime().primitiveField()
1133 *
rho.oldTime().primitiveField()
1134 *vf.
oldTime().primitiveField()
1137 *
alpha.oldTime().oldTime().primitiveField()
1138 *
rho.oldTime().oldTime().primitiveField()
1139 *vf.
oldTime().oldTime().primitiveField()
1141 -
mesh().V00()*offCentre_(ddt0.primitiveField())
1144 ddt0.boundaryFieldRef() =
1148 alpha.oldTime().boundaryField()
1149 *
rho.oldTime().boundaryField()
1152 -
alpha.oldTime().oldTime().boundaryField()
1153 *
rho.oldTime().oldTime().boundaryField()
1154 *vf.
oldTime().oldTime().boundaryField()
1156 - offCentre_(
ff(ddt0.boundaryField()))
1163 *
alpha.oldTime().primitiveField()
1164 *
rho.oldTime().primitiveField()
1165 *vf.
oldTime().primitiveField()
1166 + offCentre_(ddt0.primitiveField())
1173 ddt0 = rDtCoef0_(ddt0)*
1179 -
alpha.oldTime().oldTime()
1180 *
rho.oldTime().oldTime()
1182 ) - offCentre_(ddt0());
1188 *
alpha.oldTime().primitiveField()
1189 *
rho.oldTime().primitiveField()
1190 *vf.
oldTime().primitiveField()
1191 + offCentre_(ddt0.primitiveField())
1199 template<
class Type>
1207 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1208 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1210 "ddtCorrDdt0(" +
U.name() +
')',
1214 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1215 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1217 "ddtCorrDdt0(" +
Uf.name() +
')',
1226 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1227 - offCentre_(ddt0());
1233 rDtCoef0_(dUfdt0)*(
Uf.oldTime() -
Uf.oldTime().oldTime())
1234 - offCentre_(dUfdt0());
1237 return tmp<fluxFieldType>
1243 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
1244 mesh().time().timeName(),
1247 this->fvcDdtPhiCoeff(
U.oldTime(),
mesh().Sf() &
Uf.oldTime())
1251 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1260 template<
class Type>
1265 const fluxFieldType&
phi 1268 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1269 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1271 "ddtCorrDdt0(" +
U.name() +
')',
1275 DDt0Field<fluxFieldType>& dphidt0 =
1276 ddt0_<fluxFieldType>
1278 "ddtCorrDdt0(" +
phi.name() +
')',
1281 dphidt0.setOriented();
1288 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1289 - offCentre_(ddt0());
1295 rDtCoef0_(dphidt0)*(
phi.oldTime() -
phi.oldTime().oldTime())
1296 - offCentre_(dphidt0());
1299 return tmp<fluxFieldType>
1305 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
1306 mesh().time().timeName(),
1309 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime())
1311 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1315 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1323 template<
class Type>
1338 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1339 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1341 "ddtCorrDdt0(" +
rho.name() +
',' +
U.name() +
')',
1342 rho.dimensions()*
U.dimensions()
1345 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1346 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1348 "ddtCorrDdt0(" +
Uf.name() +
')',
1356 rho.oldTime()*
U.oldTime()
1363 *(rhoU0 -
rho.oldTime().oldTime()*
U.oldTime().oldTime())
1364 - offCentre_(ddt0());
1371 *(
Uf.oldTime() -
Uf.oldTime().oldTime())
1372 - offCentre_(dUfdt0());
1382 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
1383 mesh().time().timeName(),
1386 this->fvcDdtPhiCoeff
1389 mesh().Sf() &
Uf.oldTime(),
1395 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1410 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1411 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1413 "ddtCorrDdt0(" +
U.name() +
')',
1417 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1418 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1420 "ddtCorrDdt0(" +
Uf.name() +
')',
1429 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1430 - offCentre_(ddt0());
1436 rDtCoef0_(dUfdt0)*(
Uf.oldTime() -
Uf.oldTime().oldTime())
1437 - offCentre_(dUfdt0());
1440 return tmp<fluxFieldType>
1446 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
1447 mesh().time().timeName(),
1450 this->fvcDdtPhiCoeff
1453 mesh().Sf() &
Uf.oldTime(),
1459 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1462 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1472 <<
"dimensions of Uf are not correct" 1475 return fluxFieldType::null();
1480 template<
class Type>
1486 const fluxFieldType&
phi 1495 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1496 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1498 "ddtCorrDdt0(" +
rho.name() +
',' +
U.name() +
')',
1499 rho.dimensions()*
U.dimensions()
1502 DDt0Field<fluxFieldType>& dphidt0 =
1503 ddt0_<fluxFieldType>
1505 "ddtCorrDdt0(" +
phi.name() +
')',
1513 rho.oldTime()*
U.oldTime()
1520 *(rhoU0 -
rho.oldTime().oldTime()*
U.oldTime().oldTime())
1521 - offCentre_(ddt0());
1528 *(
phi.oldTime() -
phi.oldTime().oldTime())
1529 - offCentre_(dphidt0());
1539 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
1540 mesh().time().timeName(),
1543 this->fvcDdtPhiCoeff(rhoU0,
phi.oldTime(),
rho.oldTime())
1545 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1549 rDtCoef*rhoU0 + offCentre_(ddt0())
1563 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1564 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1566 "ddtCorrDdt0(" +
U.name() +
')',
1570 DDt0Field<fluxFieldType>& dphidt0 =
1571 ddt0_<fluxFieldType>
1573 "ddtCorrDdt0(" +
phi.name() +
')',
1582 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1583 - offCentre_(ddt0());
1589 rDtCoef0_(dphidt0)*(
phi.oldTime() -
phi.oldTime().oldTime())
1590 - offCentre_(dphidt0());
1593 return tmp<fluxFieldType>
1599 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
1600 mesh().time().timeName(),
1603 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime(),
rho.oldTime())
1605 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1609 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1618 <<
"dimensions of phi are not correct" 1621 return fluxFieldType::null();
1626 template<
class Type>
1632 DDt0Field<surfaceScalarField>& meshPhi0 = ddt0_<surfaceScalarField>
1638 meshPhi0.setOriented();
1643 coef0_(meshPhi0)*
mesh().phi().oldTime() - offCentre_(meshPhi0());
1646 return tmp<surfaceScalarField>
1659 coef_(meshPhi0)*
mesh().
phi() - offCentre_(meshPhi0())
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
const scalarField & diag() const
const fvMesh & mesh() const
Return mesh reference.
Second-oder Crank-Nicolson implicit ddt using the current and previous time-step fields as well as th...
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word & name() const noexcept
Return the object name.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
scalar number() const
Return label, float or double value.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
scalar ocCoeff() const
Return the current off-centreing coefficient.
A token holds an item read from Istream.
static tmp< GeometricField< typename innerProduct< vector, Type >::type, fvsPatchField, surfaceMesh > > dotInterpolate(const surfaceVectorField &Sf, const GeometricField< Type, fvPatchField, volMesh > &tvf)
Interpolate field onto faces.
tmp< GeometricField< typename flux< Type >::type, fvsPatchField, surfaceMesh > > ddtCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.
const DimensionedField< scalar, volMesh > & V00() const
Return old-old-time cell volumes.
bool store()
Register object with its registry and transfer ownership to the registry.
Generic GeometricField class.
Generic dimensioned Type class.
Ignore writing from objectRegistry::writeObject()
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Abstract base class for ddt schemes.
const dimensionSet dimVolume(pow3(dimLength))
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
void putBack(const token &tok)
Put back a token (copy). Only a single put back is permitted.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
autoPtr< surfaceVectorField > Uf
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
errorManip< error > abort(error &err)
Calculate the divergence of the given field.
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
const dimensionSet & dimensions() const noexcept
Return dimensions.
static tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > interpolate(const GeometricField< Type, fvPatchField, volMesh > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
const word & name() const noexcept
Return const reference to name.
Field< Type > & source() noexcept
bool moving() const noexcept
Is mesh moving.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
Mesh data needed to do the Finite Volume discretisation.
Automatically write from objectRegistry::writeObject()
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
A special matrix type and solver, designed for finite volume solutions of scalar equations.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
bool isNumber() const noexcept
Token is LABEL, FLOAT or DOUBLE.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Request registration (bool: true)
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
Do not request registration (bool: false)
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
const dimensionSet dimArea(sqr(dimLength))
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
const dimensionSet dimVelocity