31 #include "surfaceInterpolate.H"
43 namespace blendedInterfacialModel
46 template<
class GeoField>
61 template<
class ModelType>
80 template<
class ModelType>
88 const phaseModel& phase1 = interface_.phase1();
89 const phaseModel& phase2 = interface_.phase2();
91 const bool can1In2 = blending_->canBeContinuous(1);
92 const bool can2In1 = blending_->canBeContinuous(0);
93 const bool canS = blending_->canSegregate();
101 model1DispersedIn2_.valid()
107 <<
"A " << ModelType::typeName <<
" was provided for "
108 << dispersedPhaseInterface(phase1, phase2).name()
109 <<
" but the associated blending does not permit " << phase2.name()
110 <<
" to be continuous so this model will not be used" <<
endl;
117 model2DispersedIn1_.valid()
123 <<
"A " << ModelType::typeName <<
" was provided for "
124 << dispersedPhaseInterface(phase2, phase1).name()
125 <<
" but the associated blending does not permit " << phase1.name()
126 <<
" to be continuous so this model will not be used" <<
endl;
133 model1SegregatedWith2_.valid()
139 <<
"A " << ModelType::typeName <<
" was provided for "
140 << segregatedPhaseInterface(phase1, phase2).name()
141 <<
" but the associated blending does not permit segregation"
142 <<
" so this model will not be used" <<
endl;
147 modelGeneral_.valid()
148 && (can1In2 || can2In1 || canS)
149 && (!can1In2 || model1DispersedIn2_.valid())
150 && (!can2In1 || model2DispersedIn1_.valid())
151 && (!canS || model1SegregatedWith2_.valid())
155 <<
"A " << ModelType::typeName <<
" was provided for "
156 << phaseInterface(phase1, phase2).name()
157 <<
" but other displaced and/or segregated models apply"
158 <<
" across the entire phase fraction space so this model"
159 <<
" will not be used" <<
endl;
162 forAll(interface_.fluid().phases(), phasei)
164 const phaseModel& phaseD = interface_.fluid().phases()[phasei];
168 modelsGeneralDisplaced_.set(phasei)
169 && (can1In2 || can2In1 || canS)
170 && (!can1In2 || models1DispersedIn2Displaced_.set(phasei))
171 && (!can2In1 || models2DispersedIn1Displaced_.set(phasei))
172 && (!canS || models1SegregatedWith2Displaced_.set(phasei))
176 <<
"A " << ModelType::typeName <<
" was provided for "
178 <<
" but other displaced and/or segregated models apply"
179 <<
" across the entire phase fraction space so this model"
180 <<
" will not be used" <<
endl;
186 if (can1In2 && !modelGeneral_.valid() && !model1DispersedIn2_.valid())
189 <<
"Blending for " << ModelType::typeName <<
"s permits "
190 << phase2.name() <<
" to become continuous, but no model was "
192 <<
". Consider adding a model for this configuration (or for "
194 <<
"needed then add a \"none\" model to suppress this warning."
198 if (can2In1 && !modelGeneral_.valid() && !model2DispersedIn1_.valid())
201 <<
"Blending for " << ModelType::typeName <<
"s permits "
202 << phase1.name() <<
" to become continuous, but no model was "
204 <<
". Consider adding a model for this configuration (or for "
206 <<
"needed then add a \"none\" model to suppress this warning."
210 if (canS && !modelGeneral_.valid() && !model1SegregatedWith2_.valid())
213 <<
"Blending for " << ModelType::typeName <<
"s permits "
214 <<
"segregation but no model was provided for "
216 <<
". Consider adding a model for this configuration (or for "
218 <<
"needed then add a \"none\" model to suppress this warning."
224 template<
class ModelType>
225 template<
template<
class>
class PatchField,
class GeoMesh>
228 const UPtrList<const volScalarField>& alphas,
229 tmp<GeometricField<scalar, PatchField, GeoMesh>>& fG,
230 tmp<GeometricField<scalar, PatchField, GeoMesh>>& f1D2,
231 tmp<GeometricField<scalar, PatchField, GeoMesh>>& f2D1,
232 tmp<GeometricField<scalar, PatchField, GeoMesh>>& fS,
233 PtrList<GeometricField<scalar, PatchField, GeoMesh>>& fGD,
234 PtrList<GeometricField<scalar, PatchField, GeoMesh>>& f1D2D,
235 PtrList<GeometricField<scalar, PatchField, GeoMesh>>& f2D1D,
236 PtrList<GeometricField<scalar, PatchField, GeoMesh>>& fSD,
240 typedef GeometricField<scalar, PatchField, GeoMesh> scalarGeoField;
243 auto constant = [&](
const scalar
k)
249 alphas.first().mesh(),
255 tmp<scalarGeoField> F1D2, F2D1;
258 model1DispersedIn2_.valid()
259 || model1SegregatedWith2_.valid()
265 blendedInterfacialModel::interpolate<scalarGeoField>
267 blending_->f1DispersedIn2(alphas)
272 model2DispersedIn1_.valid()
273 || model1SegregatedWith2_.valid()
279 blendedInterfacialModel::interpolate<scalarGeoField>
281 blending_->f2DispersedIn1(alphas)
287 if (model1DispersedIn2_.valid())
289 f1D2 = F1D2().clone();
292 if (model2DispersedIn1_.valid())
294 f2D1 = F2D1().clone();
297 if (model1SegregatedWith2_.valid())
300 if (f1D2.valid()) { fS.ref() -= f1D2(); }
301 if (f2D1.valid()) { fS.ref() -= f2D1(); }
304 if (modelGeneral_.valid())
307 if (f1D2.valid()) { fG.ref() -= f1D2(); }
308 if (f2D1.valid()) { fG.ref() -= f2D1(); }
309 if (fS.valid()) { fG.ref() -= fS(); }
314 tmp<scalarGeoField> FD;
324 blendedInterfacialModel::interpolate<scalarGeoField>
326 blending_->fDisplaced(alphas)
331 tmp<scalarGeoField> fDSum;
344 const phaseModel& phaseD = interface_.fluid().phases()[phasei];
346 if (interface_.contains(phaseD))
continue;
354 tmp<scalarGeoField>
alpha;
357 models1DispersedIn2Displaced_.set(phasei)
358 || models2DispersedIn1Displaced_.set(phasei)
359 || models1SegregatedWith2Displaced_.set(phasei)
360 || modelsGeneralDisplaced_.set(phasei)
364 blendedInterfacialModel::interpolate<scalarGeoField>
370 - alphas[interface_.phase1().index()]
371 - alphas[interface_.phase2().index()],
372 phaseD.residualAlpha()
377 if (models1DispersedIn2Displaced_.set(phasei))
379 f1D2D.set(phasei,
alpha()*FD()*F1D2());
380 fDSum.ref() += f1D2D[phasei];
383 if (models2DispersedIn1Displaced_.set(phasei))
385 f2D1D.set(phasei,
alpha()*FD()*F2D1());
386 fDSum.ref() += f2D1D[phasei];
389 if (models1SegregatedWith2Displaced_.set(phasei))
391 fSD.set(phasei,
alpha()*FD());
392 if (f1D2D.set(phasei)) fSD[phasei] -= f1D2D[phasei];
393 if (f2D1D.set(phasei)) fSD[phasei] -= f2D1D[phasei];
394 fDSum.ref() += fSD[phasei];
397 if (modelsGeneralDisplaced_.set(phasei))
399 fGD.set(phasei,
alpha()*FD());
400 if (f1D2D.set(phasei)) fGD[phasei] -= f1D2D[phasei];
401 if (f2D1D.set(phasei)) fGD[phasei] -= f2D1D[phasei];
402 if (fSD.set(phasei)) fGD[phasei] -= fSD[phasei];
403 fDSum.ref() += fGD[phasei];
411 if (f1D2.valid()) f1D2.ref() *= 1 - fDSum();
412 if (f2D1.valid()) f2D1.ref() *= 1 - fDSum();
413 if (fS.valid()) fS.ref() *= 1 - fDSum();
414 if (fG.valid()) fG.ref() *= 1 - fDSum();
420 auto signedError = [
this](
const phaseInterface& interface)
423 <<
"A signed quantity was evaluated from the blended "
424 << ModelType::typeName <<
" for " << interface_.name()
425 <<
" but a model was provided for " << interface.name()
426 <<
". Signed quantities are only possible to evaluate for"
430 const phaseModel& phase1 = interface_.phase1();
431 const phaseModel& phase2 = interface_.phase2();
435 signedError(phaseInterface(phase1, phase2));
447 signedError(segregatedPhaseInterface(phase1, phase2));
452 const phaseModel& phaseD = interface_.fluid().phases()[phasei];
458 displacedPhaseInterface(phase1, phase2, phaseD)
461 if (f1D2D.set(phasei))
465 if (f2D1D.set(phasei))
473 segregatedDisplacedPhaseInterface(phase1, phase2, phaseD)
481 template<
class ModelType>
482 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
485 GeometricField<Type, PatchField, GeoMesh>& field
488 typedef GeometricField<Type, PatchField, GeoMesh> typeGeoField;
490 typename typeGeoField::Boundary& fieldBf = field.boundaryFieldRef();
497 !interface_.phase1().stationary()
498 && isA<fixedValueFvsPatchScalarField>
500 interface_.phase1().phi()().boundaryField()[
patchi]
504 !interface_.phase2().stationary()
505 && isA<fixedValueFvsPatchScalarField>
507 interface_.phase2().phi()().boundaryField()[
patchi]
518 template<
class ModelType>
524 using namespace constant::mathematical;
526 const phaseSystem& fluid = interface_.fluid();
527 const label nPhases = fluid.phases().size();
533 PtrList<scalarField>
fields(nPhases);
537 fieldNames[0] = fluid.phases()[0].volScalarField::name();
540 else if (nPhases == 2)
543 static const label nDivisions = 128;
545 fieldNames[0] = fluid.phases()[0].volScalarField::name();
546 fieldNames[1] = fluid.phases()[1].volScalarField::name();
562 List<point> phaseNodes(nPhases);
563 forAll(phaseNodes, phasei)
565 const scalar theta = 2*
pi*phasei/nPhases;
566 phaseNodes[phasei] =
point(
cos(theta),
sin(theta), 0);
570 static const label nDivisions = 32;
571 points.append(point::zero);
572 for (
label divi = 0; divi < nDivisions; ++ divi)
574 const scalar
s = scalar(divi + 1)/nDivisions;
576 forAll(phaseNodes, phasei)
578 for (
label i = 0; i < divi + 1; ++ i)
580 const scalar t = scalar(i)/(divi + 1);
584 s*(1 - t)*phaseNodes[phasei]
585 +
s*t*phaseNodes[(phasei + 1) % nPhases]
592 forAll(phaseNodes, phasei)
594 faces.append(
triFace(0, phasei + 1, (phasei + 1) % nPhases + 1));
596 for (
label divi = 1; divi < nDivisions; ++ divi)
598 const label pointi0 = nPhases*(divi - 1)*divi/2 + 1;
599 const label pointi1 = nPhases*divi*(divi + 1)/2 + 1;
601 forAll(phaseNodes, phasei)
603 for (
label i = 0; i < divi + 1; ++ i)
607 + ((phasei*divi + i) % (nPhases*divi));
610 + ((phasei*divi + i + 1) % (nPhases*divi));
613 + ((phasei*(divi + 1) + i) % (nPhases*(divi + 1)));
616 + ((phasei*(divi + 1) + i + 1) % (nPhases*(divi + 1)));
618 faces.append(
triFace({pi00, pi10, pi11}));
619 if (i < divi) faces.append(
triFace({pi00, pi11, pi01}));
625 forAll(fluid.phases(), phasei)
627 fieldNames[phasei] = fluid.phases()[phasei].volScalarField::name();
630 const label phasei0 = (phasei + nPhases - 1) % nPhases;
631 const label phasei1 = (phasei + 1) % nPhases;
633 const point& node0 = phaseNodes[phasei0];
634 const point& node = phaseNodes[phasei];
635 const point& node1 = phaseNodes[phasei1];
639 const scalar
A =
mag((node - node0) ^ (node1 - node0));
640 const scalar A0 =
mag((node - node0) ^ (
points[i] - node0));
641 const scalar A1 =
mag((node1 - node) ^ (
points[i] - node));
648 else if (A1 < rootSmall)
662 forAll(fluid.phases(), phasei)
666 forAll(fluid.phases(), phasei)
677 PtrList<volScalarField> alphas(nPhases);
678 forAll(fluid.phases(), phasei)
687 fluid.phases()[phasei].volScalarField::name(),
699 tmp<volScalarField> fG, f1D2, f2D1, fS;
700 PtrList<volScalarField> fGD(nPhases);
701 PtrList<volScalarField> f1D2D(nPhases);
702 PtrList<volScalarField> f2D1D(nPhases);
703 PtrList<volScalarField> fSD(nPhases);
704 calculateBlendingCoeffs
708 fGD, f1D2D, f2D1D, fSD,
712 const phaseModel& phase1 = interface_.phase1();
713 const phaseModel& phase2 = interface_.phase2();
715 auto addField = [&](
const phaseInterface& interface)
723 addField(phaseInterface(phase1, phase2));
727 addField(dispersedPhaseInterface(phase1, phase2));
731 addField(dispersedPhaseInterface(phase2, phase1));
735 addField(segregatedPhaseInterface(phase2, phase1));
738 forAll(fluid.phases(), phasei)
740 const phaseModel& phaseD = fluid.phases()[phasei];
744 addField(displacedPhaseInterface(phase1, phase2, phaseD));
746 if (f1D2D.set(phasei))
750 dispersedDisplacedPhaseInterface
758 if (f2D1D.set(phasei))
762 dispersedDisplacedPhaseInterface
774 segregatedDisplacedPhaseInterface
788 forAll(fluid.phases(), phasei)
790 alphas[phasei] =
fields[phasei][i];
793 tmp<volScalarField> fG, f1D2, f2D1, fS;
794 PtrList<volScalarField> fGD(nPhases);
795 PtrList<volScalarField> f1D2D(nPhases);
796 PtrList<volScalarField> f2D1D(nPhases);
797 PtrList<volScalarField> fSD(nPhases);
798 calculateBlendingCoeffs
802 fGD, f1D2D, f2D1D, fSD,
806 label fieldi = nPhases;
810 fields[fieldi ++][i] = fG()[0];
814 fields[fieldi ++][i] = f1D2()[0];
818 fields[fieldi ++][i] = f2D1()[0];
822 fields[fieldi ++][i] = fS()[0];
825 forAll(fluid.phases(), phasei)
829 fields[fieldi ++][i] = fGD[phasei][0];
831 if (f1D2D.set(phasei))
833 fields[fieldi ++][i] = f1D2D[phasei][0];
835 if (f2D1D.set(phasei))
837 fields[fieldi ++][i] = f2D1D[phasei][0];
841 fields[fieldi ++][i] = fSD[phasei][0];
848 const fileName path =
849 fluid.mesh().time().globalPath()
850 /functionObjects::writeFile::outputPrefix
851 /ModelType::typeName;
852 Info<<
"Writing blending coefficients to " << path/interface_.name()
857 const autoPtr<scalarField> field0 =
fields.set(0,
nullptr);
859 for (
label fieldi = 1; fieldi <
fields.size(); ++ fieldi)
861 fields.set(fieldi - 1,
fields.set(fieldi,
nullptr).ptr());
871 IOstream::UNCOMPRESSED
876 coordSet(
true, field0Name, field0),
887 IOstream::UNCOMPRESSED
904 template<
class ModelType>
908 template<
class>
class PatchField,
916 (ModelType::*method)(Args ...)
const,
929 const label nPhases = interface_.fluid().phases().
size();
935 calculateBlendingCoeffs
937 interface_.fluid().phases()
938 .PtrList<
phaseModel>::convert<const volScalarField>(),
940 fGD, f1D2D, f2D1D, fSD,
948 ModelType::typeName +
":"
949 + IOobject::groupName(
name, interface_.name()),
955 if (modelGeneral_.valid())
957 x.ref() += fG*(modelGeneral_().*method)(
args ...);
959 if (model1DispersedIn2_.valid())
961 x.ref() += f1D2*(model1DispersedIn2_().*method)(
args ...);
963 if (model2DispersedIn1_.valid())
965 x.ref() += f2D1*(model2DispersedIn1_().*method)(
args ...);
967 if (model1SegregatedWith2_.valid())
969 x.ref() += fS*(model1SegregatedWith2_().*method)(
args ...);
971 forAll(interface_.fluid().phases(), phasei)
973 if (modelsGeneralDisplaced_.set(phasei))
977 *(modelsGeneralDisplaced_[phasei].*method)(
args ...);
979 if (models1DispersedIn2Displaced_.set(phasei))
983 *(models1DispersedIn2Displaced_[phasei].*method)(
args ...);
985 if (models2DispersedIn1Displaced_.set(phasei))
989 *(models2DispersedIn1Displaced_[phasei].*method)(
args ...);
991 if (models1SegregatedWith2Displaced_.set(phasei))
995 *(models1SegregatedWith2Displaced_[phasei].*method)(
args ...);
1000 if (ModelType::correctFixedFluxBCs)
1002 correctFixedFluxBCs(
x.ref());
1009 template<
class ModelType>
1013 template<
class>
class PatchField,
1021 (ModelType::*method)(Args ...)
const,
1034 const label nPhases = interface_.fluid().phases().
size();
1040 calculateBlendingCoeffs
1042 interface_.fluid().phases()
1043 .PtrList<
phaseModel>::convert<const volScalarField>(),
1045 fGD, f1D2D, f2D1D, fSD,
1055 const scalarGeoField&
f,
1061 if (xs.
found(dxIter.key()))
1063 *xs[dxIter.key()] +=
f**dxIter();
1072 ModelType::typeName +
':'
1073 + IOobject::groupName
1075 IOobject::groupName(
name, dxIter.key()),
1084 if (modelGeneral_.valid())
1086 addToXs(fG, (modelGeneral_().*method)(
args ...));
1088 if (model1DispersedIn2_.valid())
1090 addToXs(f1D2, (model1DispersedIn2_().*method)(
args ...));
1092 if (model2DispersedIn1_.valid())
1094 addToXs(f2D1, (model2DispersedIn1_().*method)(
args ...));
1096 if (model1SegregatedWith2_.valid())
1098 addToXs(fS, (model1SegregatedWith2_().*method)(
args ...));
1100 forAll(interface_.fluid().phases(), phasei)
1102 if (modelsGeneralDisplaced_.set(phasei))
1107 (modelsGeneralDisplaced_[phasei].*method)(
args ...)
1110 if (models1DispersedIn2Displaced_.set(phasei))
1115 (models1DispersedIn2Displaced_[phasei].*method)(
args ...)
1118 if (models2DispersedIn1Displaced_.set(phasei))
1123 (models2DispersedIn1Displaced_[phasei].*method)(
args ...)
1126 if (models1SegregatedWith2Displaced_.set(phasei))
1131 (models1SegregatedWith2Displaced_[phasei].*method)(
args ...)
1137 if (ModelType::correctFixedFluxBCs)
1141 correctFixedFluxBCs(*xIter());
1149 template<
class ModelType>
1150 template<
class ... Args>
1153 bool (ModelType::*method)(Args ...)
const,
1159 bool result =
false;
1161 if (modelGeneral_.valid())
1163 result = result || (modelGeneral_().*method)(
args ...);
1165 if (model1DispersedIn2_.valid())
1167 result = result || (model1DispersedIn2_().*method)(
args ...);
1169 if (model2DispersedIn1_.valid())
1171 result = result || (model2DispersedIn1_().*method)(
args ...);
1173 if (model1SegregatedWith2_.valid())
1175 result = result || (model1SegregatedWith2_().*method)(
args ...);
1178 forAll(interface_.fluid().phases(), phasei)
1180 if (modelsGeneralDisplaced_.set(phasei))
1184 || (modelsGeneralDisplaced_[phasei].*method)(
args ...);
1186 if (models1DispersedIn2Displaced_.set(phasei))
1190 || (models1DispersedIn2Displaced_[phasei].*method)(
args ...);
1192 if (models2DispersedIn1Displaced_.set(phasei))
1196 || (models2DispersedIn1Displaced_[phasei].*method)(
args ...);
1198 if (models1SegregatedWith2Displaced_.set(phasei))
1202 || (models1SegregatedWith2Displaced_[phasei].*method)(
args ...);
1210 template<
class ModelType>
1211 template<
class ... Args>
1222 if (modelGeneral_.valid())
1224 result.
append((modelGeneral_().*method)(
args ...));
1226 if (model1DispersedIn2_.valid())
1228 result.
append((model1DispersedIn2_().*method)(
args ...));
1230 if (model2DispersedIn1_.valid())
1232 result.
append((model2DispersedIn1_().*method)(
args ...));
1234 if (model1SegregatedWith2_.valid())
1236 result.
append((model1SegregatedWith2_().*method)(
args ...));
1239 forAll(interface_.fluid().phases(), phasei)
1241 if (modelsGeneralDisplaced_.set(phasei))
1245 (modelsGeneralDisplaced_[phasei].*method)(
args ...)
1248 if (models1DispersedIn2Displaced_.set(phasei))
1252 (models1DispersedIn2Displaced_[phasei].*method)(
args ...)
1255 if (models2DispersedIn1Displaced_.set(phasei))
1259 (models2DispersedIn1Displaced_[phasei].*method)(
args ...)
1262 if (models1SegregatedWith2Displaced_.set(phasei))
1266 (models1SegregatedWith2Displaced_[phasei].*method)(
args ...)
1277 template<
class ModelType>
1289 interface.fluid().mesh().time().
name(),
1290 interface.fluid().mesh()
1293 interface_(interface),
1296 model1DispersedIn2_(),
1297 model2DispersedIn1_(),
1298 model1SegregatedWith2_(),
1299 modelsGeneralDisplaced_(interface.fluid().phases().size()),
1300 models1DispersedIn2Displaced_(interface.fluid().phases().size()),
1301 models2DispersedIn1Displaced_(interface.fluid().phases().size()),
1302 models1SegregatedWith2Displaced_(interface.fluid().phases().size()),
1310 ModelType::typeName,
1313 : blendingDict.
subDict(
"default"),
1346 if (isA<dispersedPhaseInterface>(
interface))
1349 refCast<const dispersedPhaseInterface>(
interface).dispersed();
1352 interface_.
index(dispersed) == 0
1353 ? &model1DispersedIn2_
1354 : &model2DispersedIn1_;
1356 interface_.
index(dispersed) == 0
1357 ? &models1DispersedIn2Displaced_
1358 : &models2DispersedIn1Displaced_;
1360 else if (isA<segregatedPhaseInterface>(
interface))
1362 modelPtrPtr = &model1SegregatedWith2_;
1363 modelPtrsPtr = &models1SegregatedWith2Displaced_;
1367 modelPtrPtr = &modelGeneral_;
1368 modelPtrsPtr = &modelsGeneralDisplaced_;
1371 if (!isA<displacedPhaseInterface>(
interface))
1373 *modelPtrPtr = models.
set(i,
nullptr);
1378 refCast<const displacedPhaseInterface>(
interface).displacing();
1380 modelPtrsPtr->
set(displacing.
index(), models.
set(i,
nullptr));
1385 if (blendingDict.
found(
"format"))
1393 (nPhases <= 2 &&
format != noSetWriter::typeName)
1394 || (nPhases > 2 &&
format != noSurfaceWriter::typeName)
1397 postProcessBlendingCoefficients(
format);
1405 template<
class ModelType>
1412 template<
class ModelType>
1420 template<
class ModelType>
static const Foam::dimensionedScalar A("A", Foam::dimPressure, 611.21)
#define forAll(list, i)
Loop across all elements in list.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
const phaseInterface & interface() const
Access the interface.
BlendedInterfacialModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
bool writeData(Ostream &os) const
Dummy write for regIOobject.
tmp< GeometricField< Type, PatchField, GeoMesh > > evaluate(tmp< GeometricField< Type, PatchField, GeoMesh >>(ModelType::*method)(Args ...) const, const word &name, const dimensionSet &dims, const bool subtract, Args ... args) const
Return a blended field.
~BlendedInterfacialModel()
Destructor.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Generic GeometricField class.
A HashTable specialisation for hashing pointers.
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
bool found(const Key &) const
Return true if hashedEntry is found in table.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
bool good() const
Return true if next operation might succeed.
void append(const T &)
Append an element at the end of the list.
void resize(const label)
Alias for setSize(const label)
void size(const label)
Override size to be inconsistent with allocated storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool set(const label) const
Is element set.
static autoPtr< blendingMethod > New(const word &modelTypeName, const dictionary &dict, const phaseInterface &interface)
A list of keyword definitions, which are a keyword followed by any number of values (e....
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
Dimension set for the base types.
Generic dimensioned Type class.
Class to represent a interface between phases where one phase is considered dispersed within the othe...
Class to represent a interface between phases where one phase is considered dispersed within the othe...
virtual word name() const
Name.
Class to represent an interface between phases which has been displaced to some extent by a third pha...
virtual word name() const
Name.
A wordList with hashed indices for faster lookup by name.
Class to represent an interface between phases. Derivations can further specify the configuration of ...
const phaseSystem & fluid() const
Return the phase system.
virtual word name() const
Name.
label index(const phaseModel &phase) const
Return the index of the given phase. Generates a FatalError if.
label index() const
Return the index of the phase.
void generateInterfacialModels(const dictionary &dict, const phaseInterface &interface, PtrList< phaseInterface > &interfaces, PtrList< ModelType > &models) const
Generate interfacial-model lists.
const phaseModelList & phases() const
Return the phase models.
word modelName() const
Return the model name. This is the same as the model's typename.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Class to represent a interface between phases where the two phases are considered to be segregated,...
Class to represent a interface between phases where the two phases are considered to be segregated; t...
virtual word name() const
Name.
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
volScalarField scalarField(fieldObject, mesh)
static List< word > fieldNames
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
#define WarningInFunction
Report a warning using Foam::Warning.
bool valid(const PtrList< ModelType > &l)
tmp< GeoField > interpolate(tmp< volScalarField > f)
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
static tmp< SurfaceField< Type > > interpolate(const VolField< Type > &tvf, const surfaceScalarField &faceFlux, Istream &schemeData)
Interpolate field onto faces using scheme given by Istream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< word > wordList
A List of words.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
void addField(const label phasei, const word &name, tmp< GeoField > field, PtrList< GeoField > &fieldList)
void subtract(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
const dimensionSet dimless
dimensionedScalar sin(const dimensionedScalar &ds)
vectorField pointField
pointField is a vectorField.
List< scalar > scalarList
A List of scalars.
vector point
Point is a vector.
VolField< scalar > volScalarField
dimensioned< scalar > mag(const dimensioned< Type > &)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
fvMesh zeroDimensionalFvMesh(const objectRegistry &db)
Construct a zero-dimensional unit-cube FV mesh.
dimensionedScalar cos(const dimensionedScalar &ds)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
word format(conversionProperties.lookup("format"))
Foam::argList args(argc, argv)