30#include "surfaceInterpolate.H"
48template<
class GeoField>
49CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
66template<
class GeoField>
67CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::DDt0Field
71 const typename GeoField::value_type& value,
72 const dimensionSet& dims
75 GeoField(
io,
mesh, value, dims),
81template<
class GeoField>
82GeoField& CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::operator()()
89template<
class GeoField>
90void CrankNicolsonDdtScheme<Type>::DDt0Field<GeoField>::operator=
95 GeoField::operator=(gf);
100template<
class GeoField>
102CrankNicolsonDdtScheme<Type>::ddt0_
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)
175template<
class GeoField>
176bool CrankNicolsonDdtScheme<Type>::evaluate
178 DDt0Field<GeoField>& ddt0
181 bool evaluated = (ddt0.timeIndex() !=
mesh().time().
timeIndex());
182 ddt0.timeIndex() =
mesh().time().timeIndex();
188template<
class GeoField>
189scalar CrankNicolsonDdtScheme<Type>::coef_
191 const DDt0Field<GeoField>& ddt0
206template<
class GeoField>
207scalar CrankNicolsonDdtScheme<Type>::coef0_
209 const DDt0Field<GeoField>& ddt0
224template<
class GeoField>
227 const DDt0Field<GeoField>& ddt0
230 return coef_(ddt0)/
mesh().time().deltaT();
235template<
class GeoField>
238 const DDt0Field<GeoField>& ddt0
241 return coef0_(ddt0)/
mesh().time().deltaT0();
246template<
class GeoField>
247tmp<GeoField> CrankNicolsonDdtScheme<Type>::offCentre_
264const FieldField<fvPatchField, Type>&
ff
266 const FieldField<fvPatchField, Type>& bf
276CrankNicolsonDdtScheme<Type>::CrankNicolsonDdtScheme(
const fvMesh&
mesh)
291CrankNicolsonDdtScheme<Type>::CrankNicolsonDdtScheme
299 token firstToken(is);
307 <<
"Off-centreing coefficient = " <<
ocCoeff
308 <<
" should be >= 0 and <= 1"
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() +
')',
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() +
')',
413 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
417 "ddt(" + vf.
name() +
')',
431 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
433 ddt0.primitiveFieldRef() =
437 V0*vf.
oldTime().primitiveField()
438 - V00*vf.
oldTime().oldTime().primitiveField()
439 ) - V00*offCentre_(ddt0p)
442 ddt0.boundaryFieldRef() =
447 - vf.
oldTime().oldTime().boundaryField()
448 ) - offCentre_(
ff(ddt0.boundaryField()))
462 ) -
mesh().V0()*offCentre_(ddt0()())
467 ) - offCentre_(
ff(ddt0.boundaryField()))
473 tdtdt.
ref().boundaryFieldRef().
474 template evaluateCoupled<coupledFvPatch>();
483 - offCentre_(ddt0());
486 return tmp<GeometricField<Type, fvPatchField, volMesh>>
488 new GeometricField<Type, fvPatchField, volMesh>
491 rDtCoef*(vf - vf.
oldTime()) - offCentre_(ddt0())
506 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
507 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
509 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
514 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
518 "ddt(" +
rho.name() +
',' + vf.
name() +
')',
532 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
534 ddt0.primitiveFieldRef() =
536 rDtCoef0*
rho.value()*
538 V0*vf.
oldTime().primitiveField()
539 - V00*vf.
oldTime().oldTime().primitiveField()
540 ) - V00*offCentre_(ddt0p)
543 ddt0.boundaryFieldRef() =
545 rDtCoef0*
rho.value()*
548 - vf.
oldTime().oldTime().boundaryField()
549 ) - offCentre_(
ff(ddt0.boundaryField()))
553 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
555 new GeometricField<Type, fvPatchField, volMesh>
564 - V0*vf.
oldTime().primitiveField()
565 ) - V0*offCentre_(ddt0p)
570 ) - offCentre_(
ff(ddt0.boundaryField()))
576 tdtdt.ref().boundaryFieldRef().
577 template evaluateCoupled<coupledFvPatch>();
586 - offCentre_(ddt0());
589 return tmp<GeometricField<Type, fvPatchField, volMesh>>
591 new GeometricField<Type, fvPatchField, volMesh>
594 rDtCoef*
rho*(vf - vf.
oldTime()) - offCentre_(ddt0())
609 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
610 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
612 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
617 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
621 "ddt(" +
rho.name() +
',' + vf.
name() +
')',
635 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
637 ddt0.primitiveFieldRef() =
641 V0*
rho.oldTime().primitiveField()
643 - V00*
rho.oldTime().oldTime().primitiveField()
644 *vf.
oldTime().oldTime().primitiveField()
645 ) - V00*offCentre_(ddt0p)
648 ddt0.boundaryFieldRef() =
652 rho.oldTime().boundaryField()
654 -
rho.oldTime().oldTime().boundaryField()
655 *vf.
oldTime().oldTime().boundaryField()
656 ) - offCentre_(
ff(ddt0.boundaryField()))
660 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
662 new GeometricField<Type, fvPatchField, volMesh>
671 - V0*
rho.oldTime().primitiveField()
673 ) - V00*offCentre_(ddt0p)
678 -
rho.oldTime().boundaryField()*vf.
oldTime().boundaryField()
679 ) - offCentre_(
ff(ddt0.boundaryField()))
685 tdtdt.ref().boundaryFieldRef().
686 template evaluateCoupled<coupledFvPatch>();
694 ddt0 = rDtCoef0_(ddt0)*
697 -
rho.oldTime().oldTime()*vf.
oldTime().oldTime()
698 ) - offCentre_(ddt0());
701 return tmp<GeometricField<Type, fvPatchField, volMesh>>
703 new GeometricField<Type, fvPatchField, volMesh>
723 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
724 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
726 "ddt0(" +
alpha.name() +
',' +
rho.name() +
',' + vf.
name() +
')',
731 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
735 "ddt(" +
alpha.name() +
',' +
rho.name() +
',' + vf.
name() +
')',
749 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
751 ddt0.primitiveFieldRef() =
756 *
alpha.oldTime().primitiveField()
757 *
rho.oldTime().primitiveField()
761 *
alpha.oldTime().oldTime().primitiveField()
762 *
rho.oldTime().oldTime().primitiveField()
763 *vf.
oldTime().oldTime().primitiveField()
764 ) - V00*offCentre_(ddt0p)
767 ddt0.boundaryFieldRef() =
771 alpha.oldTime().boundaryField()
772 *
rho.oldTime().boundaryField()
775 -
alpha.oldTime().oldTime().boundaryField()
776 *
rho.oldTime().oldTime().boundaryField()
777 *vf.
oldTime().oldTime().boundaryField()
778 ) - offCentre_(
ff(ddt0.boundaryField()))
782 tmp<GeometricField<Type, fvPatchField, volMesh>> tdtdt
784 new GeometricField<Type, fvPatchField, volMesh>
794 *
alpha.primitiveField()
795 *
rho.primitiveField()
799 *
alpha.oldTime().primitiveField()
800 *
rho.oldTime().primitiveField()
802 ) - V00*offCentre_(ddt0p)
806 alpha.boundaryField()
810 -
alpha.oldTime().boundaryField()
811 *
rho.oldTime().boundaryField()
813 ) - offCentre_(
ff(ddt0.boundaryField()))
819 tdtdt.ref().boundaryFieldRef().
820 template evaluateCoupled<coupledFvPatch>();
828 ddt0 = rDtCoef0_(ddt0)*
834 -
alpha.oldTime().oldTime()
835 *
rho.oldTime().oldTime()
837 ) - offCentre_(ddt0());
840 return tmp<GeometricField<Type, fvPatchField, volMesh>>
842 new GeometricField<Type, fvPatchField, volMesh>
864 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
865 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
867 "ddt0(" + vf.
name() +
')',
872 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
885 const scalar rDtCoef = rDtCoef_(ddt0).
value();
886 fvm.diag() = rDtCoef*
mesh().V();
897 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
899 ddt0.primitiveFieldRef() =
903 V0*vf.
oldTime().primitiveField()
904 - V00*vf.
oldTime().oldTime().primitiveField()
906 - V00*offCentre_(ddt0p)
909 ddt0.boundaryFieldRef() =
914 - vf.
oldTime().oldTime().boundaryField()
916 - offCentre_(
ff(ddt0.boundaryField()))
922 rDtCoef*vf.
oldTime().primitiveField()
931 - offCentre_(ddt0());
937 rDtCoef*vf.
oldTime().primitiveField()
954 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
955 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
957 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
962 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
974 const scalar rDtCoef = rDtCoef_(ddt0).value();
986 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
988 ddt0.primitiveFieldRef() =
990 rDtCoef0*
rho.value()*
992 V0*vf.
oldTime().primitiveField()
993 - V00*vf.
oldTime().oldTime().primitiveField()
995 - V00*offCentre_(ddt0p)
998 ddt0.boundaryFieldRef() =
1000 rDtCoef0*
rho.value()*
1003 - vf.
oldTime().oldTime().boundaryField()
1005 - offCentre_(
ff(ddt0.boundaryField()))
1011 rDtCoef*
rho.value()*vf.
oldTime().primitiveField()
1020 - offCentre_(ddt0());
1025 rDtCoef*
rho.value()*vf.
oldTime().primitiveField()
1042 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1043 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1045 "ddt0(" +
rho.name() +
',' + vf.
name() +
')',
1050 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
1062 const scalar rDtCoef = rDtCoef_(ddt0).value();
1063 fvm.diag() = rDtCoef*
rho.primitiveField()*
mesh().V();
1066 rho.oldTime().oldTime();
1068 if (
mesh().moving())
1075 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
1077 ddt0.primitiveFieldRef() =
1081 V0*
rho.oldTime().primitiveField()
1082 *vf.
oldTime().primitiveField()
1083 - V00*
rho.oldTime().oldTime().primitiveField()
1084 *vf.
oldTime().oldTime().primitiveField()
1086 - V00*offCentre_(ddt0p)
1089 ddt0.boundaryFieldRef() =
1093 rho.oldTime().boundaryField()
1095 -
rho.oldTime().oldTime().boundaryField()
1096 *vf.
oldTime().oldTime().boundaryField()
1098 - offCentre_(
ff(ddt0.boundaryField()))
1104 rDtCoef*
rho.oldTime().primitiveField()*vf.
oldTime().primitiveField()
1112 ddt0 = rDtCoef0_(ddt0)*
1115 -
rho.oldTime().oldTime()*vf.
oldTime().oldTime()
1116 ) - offCentre_(ddt0());
1121 rDtCoef*
rho.oldTime().primitiveField()*vf.
oldTime().primitiveField()
1139 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1140 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1142 "ddt0(" +
alpha.name() +
',' +
rho.name() +
',' + vf.
name() +
')',
1147 const auto& ddt0p =
static_cast<const Field<Type>&
>(ddt0.primitiveField());
1159 const scalar rDtCoef = rDtCoef_(ddt0).value();
1160 fvm.diag() = rDtCoef*
alpha.primitiveField()*
rho.primitiveField()*
mesh().V();
1163 alpha.oldTime().oldTime();
1164 rho.oldTime().oldTime();
1166 if (
mesh().moving())
1173 const scalar rDtCoef0 = rDtCoef0_(ddt0).
value();
1175 ddt0.primitiveFieldRef() =
1180 *
alpha.oldTime().primitiveField()
1181 *
rho.oldTime().primitiveField()
1182 *vf.
oldTime().primitiveField()
1185 *
alpha.oldTime().oldTime().primitiveField()
1186 *
rho.oldTime().oldTime().primitiveField()
1187 *vf.
oldTime().oldTime().primitiveField()
1189 - V00*offCentre_(ddt0p)
1192 ddt0.boundaryFieldRef() =
1196 alpha.oldTime().boundaryField()
1197 *
rho.oldTime().boundaryField()
1200 -
alpha.oldTime().oldTime().boundaryField()
1201 *
rho.oldTime().oldTime().boundaryField()
1202 *vf.
oldTime().oldTime().boundaryField()
1204 - offCentre_(
ff(ddt0.boundaryField()))
1211 *
alpha.oldTime().primitiveField()
1212 *
rho.oldTime().primitiveField()
1213 *vf.
oldTime().primitiveField()
1221 ddt0 = rDtCoef0_(ddt0)*
1227 -
alpha.oldTime().oldTime()
1228 *
rho.oldTime().oldTime()
1230 ) - offCentre_(ddt0());
1236 *
alpha.oldTime().primitiveField()
1237 *
rho.oldTime().primitiveField()
1238 *vf.
oldTime().primitiveField()
1255 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1256 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1258 "ddtCorrDdt0(" +
U.name() +
')',
1262 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1263 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1265 "ddtCorrDdt0(" +
Uf.name() +
')',
1274 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1275 - offCentre_(ddt0());
1278 if (evaluate(dUfdt0))
1281 rDtCoef0_(dUfdt0)*(
Uf.oldTime() -
Uf.oldTime().oldTime())
1282 - offCentre_(dUfdt0());
1285 return tmp<fluxFieldType>
1291 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
1295 this->fvcDdtPhiCoeff(
U.oldTime(),
mesh().Sf() &
Uf.oldTime())
1299 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1316 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1317 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1319 "ddtCorrDdt0(" +
U.name() +
')',
1323 DDt0Field<fluxFieldType>& dphidt0 =
1324 ddt0_<fluxFieldType>
1326 "ddtCorrDdt0(" +
phi.name() +
')',
1329 dphidt0.setOriented();
1336 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1337 - offCentre_(ddt0());
1340 if (evaluate(dphidt0))
1343 rDtCoef0_(dphidt0)*(
phi.oldTime() -
phi.oldTime().oldTime())
1344 - offCentre_(dphidt0());
1347 return tmp<fluxFieldType>
1353 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
1357 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime())
1359 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1363 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1386 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1387 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1389 "ddtCorrDdt0(" +
rho.name() +
',' +
U.name() +
')',
1390 rho.dimensions()*
U.dimensions()
1393 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1394 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1396 "ddtCorrDdt0(" +
Uf.name() +
')',
1404 rho.oldTime()*
U.oldTime()
1411 *(rhoU0 -
rho.oldTime().
oldTime()*
U.oldTime().oldTime())
1412 - offCentre_(ddt0());
1415 if (evaluate(dUfdt0))
1419 *(
Uf.oldTime() -
Uf.oldTime().oldTime())
1420 - offCentre_(dUfdt0());
1423 tmp<fluxFieldType> ddtCorr
1430 +
rho.name() +
',' +
U.name() +
',' +
Uf.name() +
')',
1434 this->fvcDdtPhiCoeff
1437 mesh().Sf() &
Uf.oldTime(),
1443 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1458 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1459 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1461 "ddtCorrDdt0(" +
U.name() +
')',
1465 DDt0Field<GeometricField<Type, fvsPatchField, surfaceMesh>>& dUfdt0 =
1466 ddt0_<GeometricField<Type, fvsPatchField, surfaceMesh>>
1468 "ddtCorrDdt0(" +
Uf.name() +
')',
1477 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1478 - offCentre_(ddt0());
1484 rDtCoef0_(dUfdt0)*(
Uf.oldTime() -
Uf.oldTime().oldTime())
1485 - offCentre_(dUfdt0());
1488 return tmp<fluxFieldType>
1494 "ddtCorr(" +
U.name() +
',' +
Uf.name() +
')',
1498 this->fvcDdtPhiCoeff
1501 mesh().Sf() &
Uf.oldTime(),
1507 (rDtCoef*
Uf.oldTime() + offCentre_(dUfdt0()))
1510 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1520 <<
"dimensions of Uf are not correct"
1534 const fluxFieldType&
phi
1543 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1544 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1546 "ddtCorrDdt0(" +
rho.name() +
',' +
U.name() +
')',
1547 rho.dimensions()*
U.dimensions()
1550 DDt0Field<fluxFieldType>& dphidt0 =
1551 ddt0_<fluxFieldType>
1553 "ddtCorrDdt0(" +
phi.name() +
')',
1561 rho.oldTime()*
U.oldTime()
1568 *(rhoU0 -
rho.oldTime().
oldTime()*
U.oldTime().oldTime())
1569 - offCentre_(ddt0());
1572 if (evaluate(dphidt0))
1576 *(
phi.oldTime() -
phi.oldTime().oldTime())
1577 - offCentre_(dphidt0());
1587 +
rho.name() +
',' +
U.name() +
',' +
phi.name() +
')',
1591 this->fvcDdtPhiCoeff(rhoU0,
phi.oldTime(),
rho.oldTime())
1593 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1597 rDtCoef*rhoU0 + offCentre_(ddt0())
1611 DDt0Field<GeometricField<Type, fvPatchField, volMesh>>& ddt0 =
1612 ddt0_<GeometricField<Type, fvPatchField, volMesh>>
1614 "ddtCorrDdt0(" +
U.name() +
')',
1618 DDt0Field<fluxFieldType>& dphidt0 =
1619 ddt0_<fluxFieldType>
1621 "ddtCorrDdt0(" +
phi.name() +
')',
1630 rDtCoef0_(ddt0)*(
U.oldTime() -
U.oldTime().oldTime())
1631 - offCentre_(ddt0());
1637 rDtCoef0_(dphidt0)*(
phi.oldTime() -
phi.oldTime().oldTime())
1638 - offCentre_(dphidt0());
1641 return tmp<fluxFieldType>
1647 "ddtCorr(" +
U.name() +
',' +
phi.name() +
')',
1651 this->fvcDdtPhiCoeff(
U.oldTime(),
phi.oldTime(),
rho.oldTime())
1653 (rDtCoef*
phi.oldTime() + offCentre_(dphidt0()))
1657 rDtCoef*
U.oldTime() + offCentre_(ddt0())
1666 <<
"dimensions of phi are not correct"
1680 DDt0Field<surfaceScalarField>& meshPhi0 = ddt0_<surfaceScalarField>
1686 meshPhi0.setOriented();
1688 if (evaluate(meshPhi0))
1691 coef0_(meshPhi0)*
mesh().phi().oldTime() - offCentre_(meshPhi0());
1694 return tmp<surfaceScalarField>
1707 coef_(meshPhi0)*
mesh().
phi() - offCentre_(meshPhi0())
const dimensionSet & dimensions() const noexcept
Return dimensions.
A field of fields is a PtrList of fields with reference counting.
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Templated function that returns a constant value.
Generic GeometricField class.
static const this_type & null() noexcept
Return a null GeometricField (reference to a nullObject).
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.
const Boundary & boundaryField() const noexcept
Return const-reference to the boundary field.
@ NO_REGISTER
Do not request registration (bool: false).
@ REGISTER
Request registration (bool: true).
@ NO_READ
Nothing to be read.
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void putBack(const token &tok)
Put back a token (copy). Only a single put back is permitted.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Generic dimensioned Type class.
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
const word & name() const noexcept
Return const reference to name.
const Type & value() const noexcept
Return const reference to value.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Field< Type > & source() noexcept
Mesh data needed to do the Finite Volume discretisation.
Second-oder Crank-Nicolson implicit ddt using the current and previous time-step fields as well as th...
tmp< GeometricField< Type, fvPatchField, volMesh > > fvcDdt(const dimensioned< Type > &)
tmp< fluxFieldType > fvcDdtUfCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const GeometricField< Type, fvsPatchField, surfaceMesh > &Uf)
scalar ocCoeff() const
Return the current off-centreing coefficient.
tmp< fvMatrix< Type > > fvmDdt(const GeometricField< Type, fvPatchField, volMesh > &)
ddtScheme< Type >::fluxFieldType fluxFieldType
tmp< fluxFieldType > fvcDdtPhiCorr(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi)
const fvMesh & mesh() const
Return mesh reference.
tmp< surfaceScalarField > meshPhi(const GeometricField< Type, fvPatchField, volMesh > &)
Abstract base class for ddt schemes.
ddtScheme(const ddtScheme &)=delete
No copy construct.
tmp< surfaceScalarField > fvcDdtPhiCoeff(const GeometricField< Type, fvPatchField, volMesh > &U, const fluxFieldType &phi, const fluxFieldType &phiCorr)
bool store()
Register object with its registry and transfer ownership to the registry.
A class for managing temporary objects.
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A token holds an item read from Istream.
bool isNumber() const noexcept
Token is (signed/unsigned) integer type, FLOAT or DOUBLE.
scalar number() const
Return label, float or double value.
A class for handling words, derived from Foam::string.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Info<< "Creating field kinetic energy K\n"<< endl;volScalarField K("K", 0.5 *magSqr(U));if(U.nOldTimes()){ volVectorField *Uold=&U.oldTime();volScalarField *Kold=&K.oldTime(); *Kold==0.5 *magSqr(*Uold);while(Uold->nOldTimes()) { Uold=&Uold-> oldTime()
autoPtr< surfaceVectorField > Uf
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
Calculate the divergence of the given field.
Namespace for finite-volume.
const FieldField< fvPatchField, Type > & ff(const FieldField< fvPatchField, Type > &bf)
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.
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)
Namespace of functions to calculate implicit derivatives returning a matrix.
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.
const dimensionSet dimTime(0, 0, 1, 0, 0, 0, 0)
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimArea(sqr(dimLength))
const dimensionSet dimVelocity
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
const dimensionSet dimVolume(pow3(dimLength))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const dimensionSet dimVol(dimVolume)
Older spelling for dimVolume.