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 dimensioned<typename GeoField::value_type>& dimType
74 GeoField(
io,
mesh, dimType),
80 template<
class GeoField>
81 label CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::startTimeIndex()
const 83 return startTimeIndex_;
88 template<
class GeoField>
89 GeoField& CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::operator()()
96 template<
class GeoField>
97 void CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::operator=
102 GeoField::operator=(gf);
107 template<
class GeoField>
115 if (!
mesh().objectRegistry::template foundObject<GeoField>(
name))
131 ).
template typeHeaderOk<DDt0Field<GeoField>>(
true)
136 new DDt0Field<GeoField>
154 new DDt0Field<GeoField>
175 DDt0Field<GeoField>& ddt0 =
static_cast<DDt0Field<GeoField>&
> 177 mesh().objectRegistry::template lookupObjectRef<GeoField>(
name)
185 template<
class GeoField>
186 bool CrankNicolsonDdtScheme<Type>::evaluate
188 DDt0Field<GeoField>& ddt0
191 bool evaluated = (ddt0.timeIndex() !=
mesh().time().timeIndex());
192 ddt0.timeIndex() =
mesh().time().timeIndex();
198 template<
class GeoField>
199 scalar CrankNicolsonDdtScheme<Type>::coef_
201 const DDt0Field<GeoField>& ddt0
216 template<
class GeoField>
217 scalar CrankNicolsonDdtScheme<Type>::coef0_
219 const DDt0Field<GeoField>& ddt0
234 template<
class GeoField>
237 const DDt0Field<GeoField>& ddt0
240 return coef_(ddt0)/
mesh().time().deltaT();
245 template<
class GeoField>
248 const DDt0Field<GeoField>& ddt0
251 return coef0_(ddt0)/
mesh().time().deltaT0();
256 template<
class GeoField>
257 tmp<GeoField> CrankNicolsonDdtScheme<Type>::offCentre_
274 const FieldField<fvPatchField, Type>&
ff 276 const FieldField<fvPatchField, Type>& bf
289 ocCoeff_(new Function1Types::Constant<scalar>(
"ocCoeff", 1))
301 CrankNicolsonDdtScheme<Type>::CrankNicolsonDdtScheme
307 ddtScheme<Type>(
mesh, is)
309 token firstToken(is);
314 if (ocCoeff < 0 || ocCoeff > 1)
317 <<
"Off-centreing coefficient = " <<
ocCoeff 318 <<
" should be >= 0 and <= 1" 324 new Function1Types::Constant<scalar>(
"ocCoeff",
ocCoeff)
331 ocCoeff_ = Function1<scalar>::New(
"ocCoeff",
dict, &
mesh);
352 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
353 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
355 "ddt0(" + dt.
name() +
')',
361 "ddt(" + dt.
name() +
')',
362 mesh().time().timeName(),
384 ddt0.internalFieldRef() =
386 (rDtCoef0*dt)*(
mesh().V0() -
mesh().V00())
387 -
mesh().V00()*offCentre_(ddt0.internalField())
391 tdtdt.ref().internalFieldRef() =
393 (rDtCoef*dt)*(
mesh().V() -
mesh().V0())
394 -
mesh().V0()*offCentre_(ddt0.internalField())
399 tdtdt.ref().boundaryFieldRef().
400 template evaluateCoupled<coupledFvPatch>();
414 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
415 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
417 "ddt0(" + vf.
name() +
')',
423 "ddt(" + vf.
name() +
')',
424 mesh().time().timeName(),
434 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
436 ddt0.primitiveFieldRef() =
441 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
442 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
445 ddt0.boundaryFieldRef() =
450 - vf.
oldTime().oldTime().boundaryField()
451 ) - offCentre_(
ff(ddt0.boundaryField()))
465 ) -
mesh().V0()*offCentre_(ddt0()())
470 ) - offCentre_(
ff(ddt0.boundaryField()))
476 tdtdt.
ref().boundaryFieldRef().
477 template evaluateCoupled<coupledFvPatch>();
486 - offCentre_(ddt0());
489 return tmp<GeometricField<Type, fvPatchField, volMesh>>
491 new GeometricField<Type, fvPatchField, volMesh>
494 rDtCoef*(vf - vf.
oldTime()) - offCentre_(ddt0())
509 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
510 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
512 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
518 "ddt(" +
rho.name() +
',' + vf.
name() +
')',
519 mesh().time().timeName(),
529 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
531 ddt0.primitiveFieldRef() =
533 rDtCoef0*
rho.value()*
536 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
537 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
540 ddt0.boundaryFieldRef() =
542 rDtCoef0*
rho.value()*
545 - vf.
oldTime().oldTime().boundaryField()
546 ) - offCentre_(
ff(ddt0.boundaryField()))
550 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
552 new GeometricField<Type, fvPatchField, volMesh>
558 rDtCoef.value()*
rho.value()*
562 ) -
mesh().V0()*offCentre_(ddt0.primitiveField())
564 rDtCoef.value()*
rho.value()*
567 ) - offCentre_(
ff(ddt0.boundaryField()))
573 tdtdt.ref().boundaryFieldRef().
574 template evaluateCoupled<coupledFvPatch>();
583 - offCentre_(ddt0());
586 return tmp<GeometricField<Type, fvPatchField, volMesh>>
588 new GeometricField<Type, fvPatchField, volMesh>
591 rDtCoef*
rho*(vf - vf.
oldTime()) - offCentre_(ddt0())
606 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
607 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
609 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
615 "ddt(" +
rho.name() +
',' + vf.
name() +
')',
616 mesh().time().timeName(),
626 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
628 ddt0.primitiveFieldRef() =
632 mesh().V0()*
rho.oldTime().primitiveField()
634 -
mesh().V00()*
rho.oldTime().oldTime().primitiveField()
635 *vf.
oldTime().oldTime().primitiveField()
636 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
639 ddt0.boundaryFieldRef() =
643 rho.oldTime().boundaryField()
645 -
rho.oldTime().oldTime().boundaryField()
646 *vf.
oldTime().oldTime().boundaryField()
647 ) - offCentre_(
ff(ddt0.boundaryField()))
651 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
653 new GeometricField<Type, fvPatchField, volMesh>
662 -
mesh().V0()*
rho.oldTime().primitiveField()
664 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
669 -
rho.oldTime().boundaryField()*vf.
oldTime().boundaryField()
670 ) - offCentre_(
ff(ddt0.boundaryField()))
676 tdtdt.ref().boundaryFieldRef().
677 template evaluateCoupled<coupledFvPatch>();
685 ddt0 = rDtCoef0_(ddt0)*
688 -
rho.oldTime().oldTime()*vf.
oldTime().oldTime()
689 ) - offCentre_(ddt0());
692 return tmp<GeometricField<Type, fvPatchField, volMesh>>
694 new GeometricField<Type, fvPatchField, volMesh>
714 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
715 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
724 mesh().time().timeName(),
734 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
736 ddt0.primitiveFieldRef() =
741 *
alpha.oldTime().primitiveField()
742 *
rho.oldTime().primitiveField()
746 *
alpha.oldTime().oldTime().primitiveField()
747 *
rho.oldTime().oldTime().primitiveField()
748 *vf.
oldTime().oldTime().primitiveField()
749 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
752 ddt0.boundaryFieldRef() =
756 alpha.oldTime().boundaryField()
757 *
rho.oldTime().boundaryField()
760 -
alpha.oldTime().oldTime().boundaryField()
761 *
rho.oldTime().oldTime().boundaryField()
762 *vf.
oldTime().oldTime().boundaryField()
763 ) - offCentre_(
ff(ddt0.boundaryField()))
767 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
769 new GeometricField<Type, fvPatchField, volMesh>
779 *
alpha.primitiveField()
780 *
rho.primitiveField()
784 *
alpha.oldTime().primitiveField()
785 *
rho.oldTime().primitiveField()
787 ) -
mesh().V00()*offCentre_(ddt0.primitiveField())
791 alpha.boundaryField()
795 -
alpha.oldTime().boundaryField()
796 *
rho.oldTime().boundaryField()
798 ) - offCentre_(
ff(ddt0.boundaryField()))
804 tdtdt.ref().boundaryFieldRef().
805 template evaluateCoupled<coupledFvPatch>();
813 ddt0 = rDtCoef0_(ddt0)*
819 -
alpha.oldTime().oldTime()
820 *
rho.oldTime().oldTime()
822 ) - offCentre_(ddt0());
825 return tmp<GeometricField<Type, fvPatchField, volMesh>>
827 new GeometricField<Type, fvPatchField, volMesh>
849 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
850 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
852 "ddt0(" + vf.
name() +
')',
867 const scalar rDtCoef = rDtCoef_(ddt0).value();
876 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
878 ddt0.primitiveFieldRef() =
883 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
885 -
mesh().V00()*offCentre_(ddt0.primitiveField())
888 ddt0.boundaryFieldRef() =
893 - vf.
oldTime().oldTime().boundaryField()
895 - offCentre_(
ff(ddt0.boundaryField()))
901 rDtCoef*vf.
oldTime().primitiveField()
902 + offCentre_(ddt0.primitiveField())
910 - offCentre_(ddt0());
916 rDtCoef*vf.
oldTime().primitiveField()
917 + offCentre_(ddt0.primitiveField())
933 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
934 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
936 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
950 const scalar rDtCoef = rDtCoef_(ddt0).value();
959 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
961 ddt0.primitiveFieldRef() =
963 rDtCoef0*
rho.value()*
966 -
mesh().V00()*vf.
oldTime().oldTime().primitiveField()
968 -
mesh().V00()*offCentre_(ddt0.primitiveField())
971 ddt0.boundaryFieldRef() =
973 rDtCoef0*
rho.value()*
976 - vf.
oldTime().oldTime().boundaryField()
978 - offCentre_(
ff(ddt0.boundaryField()))
984 rDtCoef*
rho.value()*vf.
oldTime().primitiveField()
985 + offCentre_(ddt0.primitiveField())
993 - offCentre_(ddt0());
998 rDtCoef*
rho.value()*vf.
oldTime().primitiveField()
999 + offCentre_(ddt0.primitiveField())
1007 template<
class Type>
1015 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1016 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1018 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
1032 const scalar rDtCoef = rDtCoef_(ddt0).value();
1033 fvm.
diag() = rDtCoef*
rho.primitiveField()*
mesh().V();
1036 rho.oldTime().oldTime();
1038 if (
mesh().moving())
1042 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
1044 ddt0.primitiveFieldRef() =
1048 mesh().V0()*
rho.oldTime().primitiveField()
1049 *vf.
oldTime().primitiveField()
1050 -
mesh().V00()*
rho.oldTime().oldTime().primitiveField()
1051 *vf.
oldTime().oldTime().primitiveField()
1053 -
mesh().V00()*offCentre_(ddt0.primitiveField())
1056 ddt0.boundaryFieldRef() =
1060 rho.oldTime().boundaryField()
1062 -
rho.oldTime().oldTime().boundaryField()
1063 *vf.
oldTime().oldTime().boundaryField()
1065 - offCentre_(
ff(ddt0.boundaryField()))
1071 rDtCoef*
rho.oldTime().primitiveField()*vf.
oldTime().primitiveField()
1072 + offCentre_(ddt0.primitiveField())
1079 ddt0 = rDtCoef0_(ddt0)*
1082 -
rho.oldTime().oldTime()*vf.
oldTime().oldTime()
1083 ) - offCentre_(ddt0());
1088 rDtCoef*
rho.oldTime().primitiveField()*vf.
oldTime().primitiveField()
1089 + offCentre_(ddt0.primitiveField())
1097 template<
class Type>
1106 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1107 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1123 const scalar rDtCoef = rDtCoef_(ddt0).value();
1124 fvm.
diag() = rDtCoef*
alpha.primitiveField()*
rho.primitiveField()*
mesh().V();
1127 alpha.oldTime().oldTime();
1128 rho.oldTime().oldTime();
1130 if (
mesh().moving())
1134 const scalar rDtCoef0 = rDtCoef0_(ddt0).value();
1136 ddt0.primitiveFieldRef() =
1141 *
alpha.oldTime().primitiveField()
1142 *
rho.oldTime().primitiveField()
1143 *vf.
oldTime().primitiveField()
1146 *
alpha.oldTime().oldTime().primitiveField()
1147 *
rho.oldTime().oldTime().primitiveField()
1148 *vf.
oldTime().oldTime().primitiveField()
1150 -
mesh().V00()*offCentre_(ddt0.primitiveField())
1153 ddt0.boundaryFieldRef() =
1157 alpha.oldTime().boundaryField()
1158 *
rho.oldTime().boundaryField()
1161 -
alpha.oldTime().oldTime().boundaryField()
1162 *
rho.oldTime().oldTime().boundaryField()
1163 *vf.
oldTime().oldTime().boundaryField()
1165 - offCentre_(
ff(ddt0.boundaryField()))
1172 *
alpha.oldTime().primitiveField()
1173 *
rho.oldTime().primitiveField()
1174 *vf.
oldTime().primitiveField()
1175 + offCentre_(ddt0.primitiveField())
1182 ddt0 = rDtCoef0_(ddt0)*
1188 -
alpha.oldTime().oldTime()
1189 *
rho.oldTime().oldTime()
1191 ) - offCentre_(ddt0());
1197 *
alpha.oldTime().primitiveField()
1198 *
rho.oldTime().primitiveField()
1199 *vf.
oldTime().primitiveField()
1200 + offCentre_(ddt0.primitiveField())
1208 template<
class Type>
1216 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1217 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1219 "ddtCorrDdt0(" +
U.name() +
')',
1223 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1224 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1226 "ddtCorrDdt0(" +
Uf.name() +
')',
1235 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1236 - offCentre_(ddt0());
1242 rDtCoef0_(dUfdt0)*(
Uf.oldTime() -
Uf.oldTime().oldTime())
1243 - offCentre_(dUfdt0());
1246 return tmp<fluxFieldType>
1252 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
1253 mesh().time().timeName(),
1256 this->fvcDdtPhiCoeff(
U.oldTime(),
mesh().Sf() &
Uf.oldTime())
1260 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1269 template<
class Type>
1274 const fluxFieldType&
phi 1277 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1278 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1280 "ddtCorrDdt0(" +
U.name() +
')',
1284 DDt0Field<fluxFieldType>& dphidt0 =
1285 ddt0_<fluxFieldType>
1287 "ddtCorrDdt0(" +
phi.name() +
')',
1290 dphidt0.setOriented();
1297 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1298 - offCentre_(ddt0());
1304 rDtCoef0_(dphidt0)*(
phi.oldTime() -
phi.oldTime().oldTime())
1305 - offCentre_(dphidt0());
1308 return tmp<fluxFieldType>
1314 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
1315 mesh().time().timeName(),
1318 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime())
1320 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1324 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1332 template<
class Type>
1347 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1348 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1350 "ddtCorrDdt0(" +
rho.name() +
',' +
U.name() +
')',
1351 rho.dimensions()*
U.dimensions()
1354 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1355 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1357 "ddtCorrDdt0(" +
Uf.name() +
')',
1365 rho.oldTime()*
U.oldTime()
1372 *(rhoU0 -
rho.oldTime().oldTime()*
U.oldTime().oldTime())
1373 - offCentre_(ddt0());
1380 *(
Uf.oldTime() -
Uf.oldTime().oldTime())
1381 - offCentre_(dUfdt0());
1391 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
1392 mesh().time().timeName(),
1395 this->fvcDdtPhiCoeff
1398 mesh().Sf() &
Uf.oldTime(),
1404 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1419 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1420 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1422 "ddtCorrDdt0(" +
U.name() +
')',
1426 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1427 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1429 "ddtCorrDdt0(" +
Uf.name() +
')',
1438 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1439 - offCentre_(ddt0());
1445 rDtCoef0_(dUfdt0)*(
Uf.oldTime() -
Uf.oldTime().oldTime())
1446 - offCentre_(dUfdt0());
1449 return tmp<fluxFieldType>
1455 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
1456 mesh().time().timeName(),
1459 this->fvcDdtPhiCoeff
1462 mesh().Sf() &
Uf.oldTime(),
1468 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1471 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1481 <<
"dimensions of Uf are not correct" 1484 return fluxFieldType::null();
1489 template<
class Type>
1495 const fluxFieldType&
phi 1504 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1505 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1507 "ddtCorrDdt0(" +
rho.name() +
',' +
U.name() +
')',
1508 rho.dimensions()*
U.dimensions()
1511 DDt0Field<fluxFieldType>& dphidt0 =
1512 ddt0_<fluxFieldType>
1514 "ddtCorrDdt0(" +
phi.name() +
')',
1522 rho.oldTime()*
U.oldTime()
1529 *(rhoU0 -
rho.oldTime().oldTime()*
U.oldTime().oldTime())
1530 - offCentre_(ddt0());
1537 *(
phi.oldTime() -
phi.oldTime().oldTime())
1538 - offCentre_(dphidt0());
1548 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
1549 mesh().time().timeName(),
1552 this->fvcDdtPhiCoeff(rhoU0,
phi.oldTime(),
rho.oldTime())
1554 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1558 rDtCoef*rhoU0 + offCentre_(ddt0())
1572 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1573 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1575 "ddtCorrDdt0(" +
U.name() +
')',
1579 DDt0Field<fluxFieldType>& dphidt0 =
1580 ddt0_<fluxFieldType>
1582 "ddtCorrDdt0(" +
phi.name() +
')',
1591 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1592 - offCentre_(ddt0());
1598 rDtCoef0_(dphidt0)*(
phi.oldTime() -
phi.oldTime().oldTime())
1599 - offCentre_(dphidt0());
1602 return tmp<fluxFieldType>
1608 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
1609 mesh().time().timeName(),
1612 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime(),
rho.oldTime())
1614 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1618 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1627 <<
"dimensions of phi are not correct" 1630 return fluxFieldType::null();
1635 template<
class Type>
1641 DDt0Field<surfaceScalarField>& meshPhi0 = ddt0_<surfaceScalarField>
1647 meshPhi0.setOriented();
1652 coef0_(meshPhi0)*
mesh().phi().oldTime() - offCentre_(meshPhi0());
1655 return tmp<surfaceScalarField>
1668 coef_(meshPhi0)*
mesh().
phi() - offCentre_(meshPhi0())
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
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. Only a single put back is permitted.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
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.
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 > &)
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.
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.
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...
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))
const dimensionSet & dimensions() const noexcept
Return dimensions.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)
const dimensionSet dimVelocity