30 #include "surfaceInterpolate.H"
42 namespace blendedInterfacialModel
45 template<
class GeoField>
60 template<
class ModelType>
79 template<
class ModelType>
87 const phaseModel& phase1 = interface_.phase1();
88 const phaseModel& phase2 = interface_.phase2();
90 const bool can1In2 = blending_->canBeContinuous(1);
91 const bool can2In1 = blending_->canBeContinuous(0);
92 const bool canS = blending_->canSegregate();
100 model1DispersedIn2_.valid()
106 <<
"A " << ModelType::typeName <<
" was provided for "
107 << dispersedPhaseInterface(phase1, phase2).name()
108 <<
" but the associated blending does not permit " << phase2.name()
109 <<
" to be continuous so this model will not be used" <<
endl;
116 model2DispersedIn1_.valid()
122 <<
"A " << ModelType::typeName <<
" was provided for "
123 << dispersedPhaseInterface(phase2, phase1).name()
124 <<
" but the associated blending does not permit " << phase1.name()
125 <<
" to be continuous so this model will not be used" <<
endl;
132 model1SegregatedWith2_.valid()
138 <<
"A " << ModelType::typeName <<
" was provided for "
139 << segregatedPhaseInterface(phase1, phase2).name()
140 <<
" but the associated blending does not permit segregation"
141 <<
" so this model will not be used" <<
endl;
146 modelGeneral_.valid()
147 && (can1In2 || can2In1 || canS)
148 && (!can1In2 || model1DispersedIn2_.valid())
149 && (!can2In1 || model2DispersedIn1_.valid())
150 && (!canS || model1SegregatedWith2_.valid())
154 <<
"A " << ModelType::typeName <<
" was provided for "
156 <<
" but other displaced and/or segregated models apply"
157 <<
" across the entire phase fraction space so this model"
158 <<
" will not be used" <<
endl;
161 forAll(interface_.fluid().phases(), phasei)
167 modelsGeneralDisplaced_.set(phasei)
168 && (can1In2 || can2In1 || canS)
169 && (!can1In2 || models1DispersedIn2Displaced_.set(phasei))
170 && (!can2In1 || models2DispersedIn1Displaced_.set(phasei))
171 && (!canS || models1SegregatedWith2Displaced_.set(phasei))
175 <<
"A " << ModelType::typeName <<
" was provided for "
177 <<
" but other displaced and/or segregated models apply"
178 <<
" across the entire phase fraction space so this model"
179 <<
" will not be used" <<
endl;
185 if (can1In2 && !modelGeneral_.valid() && !model1DispersedIn2_.valid())
188 <<
"Blending for " << ModelType::typeName <<
"s permits "
189 << phase2.name() <<
" to become continuous, but no model was "
190 <<
"provided for " << dispersedPhaseInterface(phase1, phase2).name()
191 <<
". Consider adding a model for this configuration (or for "
192 << phaseInterface(phase1, phase2).name() <<
"), or if no model is "
193 <<
"needed then add a \"none\" model to suppress this warning."
197 if (can2In1 && !modelGeneral_.valid() && !model2DispersedIn1_.valid())
200 <<
"Blending for " << ModelType::typeName <<
"s permits "
201 << phase1.name() <<
" to become continuous, but no model was "
203 <<
". Consider adding a model for this configuration (or for "
205 <<
"needed then add a \"none\" model to suppress this warning."
209 if (canS && !modelGeneral_.valid() && !model1SegregatedWith2_.valid())
212 <<
"Blending for " << ModelType::typeName <<
"s permits "
213 <<
"segregation but no model was provided for "
215 <<
". Consider adding a model for this configuration (or for "
217 <<
"needed then add a \"none\" model to suppress this warning."
223 template<
class ModelType>
224 template<
class GeoMesh>
227 const UPtrList<const volScalarField>& alphas,
228 tmp<GeometricField<scalar, GeoMesh>>& fG,
229 tmp<GeometricField<scalar, GeoMesh>>& f1D2,
230 tmp<GeometricField<scalar, GeoMesh>>& f2D1,
231 tmp<GeometricField<scalar, GeoMesh>>& fS,
232 PtrList<GeometricField<scalar, GeoMesh>>& fGD,
233 PtrList<GeometricField<scalar, GeoMesh>>& f1D2D,
234 PtrList<GeometricField<scalar, GeoMesh>>& f2D1D,
235 PtrList<GeometricField<scalar, GeoMesh>>& fSD
238 typedef GeometricField<scalar, GeoMesh> scalarGeoField;
241 auto constant = [&](
const scalar
k)
247 alphas.first().mesh(),
253 tmp<scalarGeoField> F1D2, F2D1;
256 model1DispersedIn2_.valid()
257 || model1SegregatedWith2_.valid()
263 blendedInterfacialModel::interpolate<scalarGeoField>
265 blending_->f1DispersedIn2(alphas)
270 model2DispersedIn1_.valid()
271 || model1SegregatedWith2_.valid()
277 blendedInterfacialModel::interpolate<scalarGeoField>
279 blending_->f2DispersedIn1(alphas)
285 if (model1DispersedIn2_.valid())
287 f1D2 = F1D2().clone();
290 if (model2DispersedIn1_.valid())
292 f2D1 = F2D1().clone();
295 if (model1SegregatedWith2_.valid())
298 if (f1D2.valid()) { fS.ref() -= f1D2(); }
299 if (f2D1.valid()) { fS.ref() -= f2D1(); }
302 if (modelGeneral_.valid())
305 if (f1D2.valid()) { fG.ref() -= f1D2(); }
306 if (f2D1.valid()) { fG.ref() -= f2D1(); }
307 if (fS.valid()) { fG.ref() -= fS(); }
312 tmp<scalarGeoField> FD;
322 blendedInterfacialModel::interpolate<scalarGeoField>
324 blending_->fDisplaced(alphas)
329 tmp<scalarGeoField> fDSum;
342 const phaseModel& phaseD = interface_.
fluid().
phases()[phasei];
344 if (interface_.contains(phaseD))
continue;
352 tmp<scalarGeoField>
alpha;
355 models1DispersedIn2Displaced_.set(phasei)
356 || models2DispersedIn1Displaced_.set(phasei)
357 || models1SegregatedWith2Displaced_.set(phasei)
358 || modelsGeneralDisplaced_.set(phasei)
362 blendedInterfacialModel::interpolate<scalarGeoField>
368 - alphas[interface_.phase1().index()]
369 - alphas[interface_.phase2().index()],
370 phaseD.residualAlpha()
375 if (models1DispersedIn2Displaced_.set(phasei))
377 f1D2D.set(phasei,
alpha()*FD()*F1D2());
378 fDSum.ref() += f1D2D[phasei];
381 if (models2DispersedIn1Displaced_.set(phasei))
383 f2D1D.set(phasei,
alpha()*FD()*F2D1());
384 fDSum.ref() += f2D1D[phasei];
387 if (models1SegregatedWith2Displaced_.set(phasei))
389 fSD.set(phasei,
alpha()*FD());
390 if (f1D2D.set(phasei)) fSD[phasei] -= f1D2D[phasei];
391 if (f2D1D.set(phasei)) fSD[phasei] -= f2D1D[phasei];
392 fDSum.ref() += fSD[phasei];
395 if (modelsGeneralDisplaced_.set(phasei))
397 fGD.set(phasei,
alpha()*FD());
398 if (f1D2D.set(phasei)) fGD[phasei] -= f1D2D[phasei];
399 if (f2D1D.set(phasei)) fGD[phasei] -= f2D1D[phasei];
400 if (fSD.set(phasei)) fGD[phasei] -= fSD[phasei];
401 fDSum.ref() += fGD[phasei];
409 if (f1D2.valid()) f1D2.ref() *= 1 - fDSum();
410 if (f2D1.valid()) f2D1.ref() *= 1 - fDSum();
411 if (fS.valid()) fS.ref() *= 1 - fDSum();
412 if (fG.valid()) fG.ref() *= 1 - fDSum();
417 template<
class ModelType>
423 using namespace constant::mathematical;
425 const phaseSystem& fluid = interface_.fluid();
426 const label nPhases = fluid.phases().size();
432 PtrList<scalarField>
fields(nPhases);
436 fieldNames[0] = fluid.phases()[0].volScalarField::name();
439 else if (nPhases == 2)
442 static const label nDivisions = 128;
444 fieldNames[0] = fluid.phases()[0].volScalarField::name();
445 fieldNames[1] = fluid.phases()[1].volScalarField::name();
461 List<point> phaseNodes(nPhases);
462 forAll(phaseNodes, phasei)
464 const scalar theta = 2*
pi*phasei/nPhases;
465 phaseNodes[phasei] =
point(
cos(theta),
sin(theta), 0);
469 static const label nDivisions = 32;
470 points.append(point::zero);
471 for (
label divi = 0; divi < nDivisions; ++ divi)
473 const scalar
s = scalar(divi + 1)/nDivisions;
475 forAll(phaseNodes, phasei)
477 for (
label i = 0; i < divi + 1; ++ i)
479 const scalar t = scalar(i)/(divi + 1);
483 s*(1 - t)*phaseNodes[phasei]
484 +
s*t*phaseNodes[(phasei + 1) % nPhases]
491 forAll(phaseNodes, phasei)
493 faces.append(
triFace(0, phasei + 1, (phasei + 1) % nPhases + 1));
495 for (
label divi = 1; divi < nDivisions; ++ divi)
497 const label pointi0 = nPhases*(divi - 1)*divi/2 + 1;
498 const label pointi1 = nPhases*divi*(divi + 1)/2 + 1;
500 forAll(phaseNodes, phasei)
502 for (
label i = 0; i < divi + 1; ++ i)
506 + ((phasei*divi + i) % (nPhases*divi));
509 + ((phasei*divi + i + 1) % (nPhases*divi));
512 + ((phasei*(divi + 1) + i) % (nPhases*(divi + 1)));
515 + ((phasei*(divi + 1) + i + 1) % (nPhases*(divi + 1)));
517 faces.append(
triFace({pi00, pi10, pi11}));
518 if (i < divi) faces.append(
triFace({pi00, pi11, pi01}));
524 forAll(fluid.phases(), phasei)
526 fieldNames[phasei] = fluid.phases()[phasei].volScalarField::name();
529 const label phasei0 = (phasei + nPhases - 1) % nPhases;
530 const label phasei1 = (phasei + 1) % nPhases;
532 const point& node0 = phaseNodes[phasei0];
533 const point& node = phaseNodes[phasei];
534 const point& node1 = phaseNodes[phasei1];
538 const scalar
A =
mag((node - node0) ^ (node1 - node0));
539 const scalar A0 =
mag((node - node0) ^ (
points[i] - node0));
540 const scalar A1 =
mag((node1 - node) ^ (
points[i] - node));
547 else if (A1 < rootSmall)
561 forAll(fluid.phases(), phasei)
565 forAll(fluid.phases(), phasei)
576 PtrList<volScalarField> alphas(nPhases);
577 forAll(fluid.phases(), phasei)
586 fluid.phases()[phasei].volScalarField::name(),
598 tmp<volScalarField> fG, f1D2, f2D1, fS;
599 PtrList<volScalarField> fGD(nPhases);
600 PtrList<volScalarField> f1D2D(nPhases);
601 PtrList<volScalarField> f2D1D(nPhases);
602 PtrList<volScalarField> fSD(nPhases);
603 calculateBlendingCoeffs
607 fGD, f1D2D, f2D1D, fSD
610 const phaseModel& phase1 = interface_.phase1();
611 const phaseModel& phase2 = interface_.phase2();
613 auto addField = [&](
const phaseInterface& interface)
621 addField(phaseInterface(phase1, phase2));
625 addField(dispersedPhaseInterface(phase1, phase2));
629 addField(dispersedPhaseInterface(phase2, phase1));
633 addField(segregatedPhaseInterface(phase2, phase1));
636 forAll(fluid.phases(), phasei)
638 const phaseModel& phaseD = fluid.phases()[phasei];
642 addField(displacedPhaseInterface(phase1, phase2, phaseD));
644 if (f1D2D.set(phasei))
648 dispersedDisplacedPhaseInterface
656 if (f2D1D.set(phasei))
660 dispersedDisplacedPhaseInterface
672 segregatedDisplacedPhaseInterface
686 forAll(fluid.phases(), phasei)
688 alphas[phasei] =
fields[phasei][i];
691 tmp<volScalarField> fG, f1D2, f2D1, fS;
692 PtrList<volScalarField> fGD(nPhases);
693 PtrList<volScalarField> f1D2D(nPhases);
694 PtrList<volScalarField> f2D1D(nPhases);
695 PtrList<volScalarField> fSD(nPhases);
696 calculateBlendingCoeffs
700 fGD, f1D2D, f2D1D, fSD
703 label fieldi = nPhases;
707 fields[fieldi ++][i] = fG()[0];
711 fields[fieldi ++][i] = f1D2()[0];
715 fields[fieldi ++][i] = f2D1()[0];
719 fields[fieldi ++][i] = fS()[0];
722 forAll(fluid.phases(), phasei)
726 fields[fieldi ++][i] = fGD[phasei][0];
728 if (f1D2D.set(phasei))
730 fields[fieldi ++][i] = f1D2D[phasei][0];
732 if (f2D1D.set(phasei))
734 fields[fieldi ++][i] = f2D1D[phasei][0];
738 fields[fieldi ++][i] = fSD[phasei][0];
745 const fileName path =
746 fluid.mesh().time().globalPath()
747 /functionObjects::writeFile::outputPrefix
748 /ModelType::typeName;
749 Info<<
"Writing blending coefficients to " << path/interface_.name()
754 const autoPtr<scalarField> field0 =
fields.set(0,
nullptr);
756 for (
label fieldi = 1; fieldi <
fields.size(); ++ fieldi)
758 fields.set(fieldi - 1,
fields.set(fieldi,
nullptr).ptr());
768 IOstream::UNCOMPRESSED
773 coordSet(
true, field0Name, field0),
784 IOstream::UNCOMPRESSED
801 template<
class ModelType>
802 template<
class Type,
class GeoMesh,
class ... Args>
818 const label nPhases = interface_.fluid().phases().size();
824 calculateBlendingCoeffs
826 interface_.fluid().phases()
827 .PtrList<
phaseModel>::convert<const volScalarField>(),
829 fGD, f1D2D, f2D1D, fSD
836 ModelType::typeName +
":"
837 + IOobject::groupName(
name, interface_.name()),
843 if (modelGeneral_.valid())
845 x.ref() += fG*(modelGeneral_().*method)(
args ...);
847 if (model1DispersedIn2_.valid())
849 x.ref() += f1D2*(model1DispersedIn2_().*method)(
args ...);
851 if (model2DispersedIn1_.valid())
853 x.ref() += f2D1*(model2DispersedIn1_().*method)(
args ...);
855 if (model1SegregatedWith2_.valid())
857 x.ref() += fS*(model1SegregatedWith2_().*method)(
args ...);
859 forAll(interface_.fluid().phases(), phasei)
861 if (modelsGeneralDisplaced_.set(phasei))
865 *(modelsGeneralDisplaced_[phasei].*method)(
args ...);
867 if (models1DispersedIn2Displaced_.set(phasei))
871 *(models1DispersedIn2Displaced_[phasei].*method)(
args ...);
873 if (models2DispersedIn1Displaced_.set(phasei))
877 *(models2DispersedIn1Displaced_[phasei].*method)(
args ...);
879 if (models1SegregatedWith2Displaced_.set(phasei))
883 *(models1SegregatedWith2Displaced_[phasei].*method)(
args ...);
891 template<
class ModelType>
892 template<
class Type,
class GeoMesh,
class ... Args>
897 (ModelType::*method)(Args ...)
const,
909 const label nPhases = interface_.fluid().phases().size();
915 calculateBlendingCoeffs
917 interface_.fluid().phases()
918 .PtrList<
phaseModel>::convert<const volScalarField>(),
920 fGD, f1D2D, f2D1D, fSD
929 const scalarGeoField&
f,
935 if (xs.
found(dxIter.key()))
937 *xs[dxIter.key()] +=
f**dxIter();
946 ModelType::typeName +
':'
947 + IOobject::groupName
949 IOobject::groupName(
name, dxIter.key()),
958 if (modelGeneral_.valid())
960 addToXs(fG, (modelGeneral_().*method)(
args ...));
962 if (model1DispersedIn2_.valid())
964 addToXs(f1D2, (model1DispersedIn2_().*method)(
args ...));
966 if (model2DispersedIn1_.valid())
968 addToXs(f2D1, (model2DispersedIn1_().*method)(
args ...));
970 if (model1SegregatedWith2_.valid())
972 addToXs(fS, (model1SegregatedWith2_().*method)(
args ...));
974 forAll(interface_.fluid().phases(), phasei)
976 if (modelsGeneralDisplaced_.set(phasei))
981 (modelsGeneralDisplaced_[phasei].*method)(
args ...)
984 if (models1DispersedIn2Displaced_.set(phasei))
989 (models1DispersedIn2Displaced_[phasei].*method)(
args ...)
992 if (models2DispersedIn1Displaced_.set(phasei))
997 (models2DispersedIn1Displaced_[phasei].*method)(
args ...)
1000 if (models1SegregatedWith2Displaced_.set(phasei))
1005 (models1SegregatedWith2Displaced_[phasei].*method)(
args ...)
1014 template<
class ModelType>
1015 template<
class ... Args>
1018 bool (ModelType::*method)(Args ...)
const,
1024 bool result =
false;
1026 if (modelGeneral_.valid())
1028 result = result || (modelGeneral_().*method)(
args ...);
1030 if (model1DispersedIn2_.valid())
1032 result = result || (model1DispersedIn2_().*method)(
args ...);
1034 if (model2DispersedIn1_.valid())
1036 result = result || (model2DispersedIn1_().*method)(
args ...);
1038 if (model1SegregatedWith2_.valid())
1040 result = result || (model1SegregatedWith2_().*method)(
args ...);
1043 forAll(interface_.fluid().phases(), phasei)
1045 if (modelsGeneralDisplaced_.set(phasei))
1049 || (modelsGeneralDisplaced_[phasei].*method)(
args ...);
1051 if (models1DispersedIn2Displaced_.set(phasei))
1055 || (models1DispersedIn2Displaced_[phasei].*method)(
args ...);
1057 if (models2DispersedIn1Displaced_.set(phasei))
1061 || (models2DispersedIn1Displaced_[phasei].*method)(
args ...);
1063 if (models1SegregatedWith2Displaced_.set(phasei))
1067 || (models1SegregatedWith2Displaced_[phasei].*method)(
args ...);
1075 template<
class ModelType>
1076 template<
class ... Args>
1087 if (modelGeneral_.valid())
1089 result.
append((modelGeneral_().*method)(
args ...));
1091 if (model1DispersedIn2_.valid())
1093 result.
append((model1DispersedIn2_().*method)(
args ...));
1095 if (model2DispersedIn1_.valid())
1097 result.
append((model2DispersedIn1_().*method)(
args ...));
1099 if (model1SegregatedWith2_.valid())
1101 result.
append((model1SegregatedWith2_().*method)(
args ...));
1104 forAll(interface_.fluid().phases(), phasei)
1106 if (modelsGeneralDisplaced_.set(phasei))
1110 (modelsGeneralDisplaced_[phasei].*method)(
args ...)
1113 if (models1DispersedIn2Displaced_.set(phasei))
1117 (models1DispersedIn2Displaced_[phasei].*method)(
args ...)
1120 if (models2DispersedIn1Displaced_.set(phasei))
1124 (models2DispersedIn1Displaced_[phasei].*method)(
args ...)
1127 if (models1SegregatedWith2Displaced_.set(phasei))
1131 (models1SegregatedWith2Displaced_[phasei].*method)(
args ...)
1142 template<
class ModelType>
1143 template<
class ... Args>
1149 const Args& ...
args
1157 interface.fluid().
mesh().time().
name(),
1158 interface.fluid().
mesh()
1161 interface_(interface),
1167 model1DispersedIn2_(),
1168 model2DispersedIn1_(),
1169 model1SegregatedWith2_(),
1170 modelsGeneralDisplaced_(interface.fluid().phases().size()),
1171 models1DispersedIn2Displaced_(interface.fluid().phases().size()),
1172 models2DispersedIn1Displaced_(interface.fluid().phases().size()),
1173 models1SegregatedWith2Displaced_(interface.fluid().phases().size()),
1208 if (isA<dispersedPhaseInterface>(
interface))
1211 refCast<const dispersedPhaseInterface>(
interface).dispersed();
1214 interface_.
index(dispersed) == 0
1215 ? &model1DispersedIn2_
1216 : &model2DispersedIn1_;
1218 interface_.
index(dispersed) == 0
1219 ? &models1DispersedIn2Displaced_
1220 : &models2DispersedIn1Displaced_;
1222 else if (isA<segregatedPhaseInterface>(
interface))
1224 modelPtrPtr = &model1SegregatedWith2_;
1225 modelPtrsPtr = &models1SegregatedWith2Displaced_;
1229 modelPtrPtr = &modelGeneral_;
1230 modelPtrsPtr = &modelsGeneralDisplaced_;
1233 if (!isA<displacedPhaseInterface>(
interface))
1235 *modelPtrPtr = models.
set(i,
nullptr);
1240 refCast<const displacedPhaseInterface>(
interface).displacing();
1242 modelPtrsPtr->
set(displacing.
index(), models.
set(i,
nullptr));
1255 (nPhases <= 2 &&
format != noSetWriter::typeName)
1256 || (nPhases > 2 &&
format != noSurfaceWriter::typeName)
1259 postProcessBlendingCoefficients(
format);
1267 template<
class ModelType>
1274 template<
class ModelType>
1282 template<
class ModelType>
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
Wrapper class for interfacial models for which multiple instances of the model are used for different...
BlendedInterfacialModel(const dictionary &dict, const phaseInterface &interface, const dictionary &blendingDict, const Args &... args)
Construct from a dictionary, an interface and a blending dictionary.
const phaseInterface & interface() const
Access the interface.
bool writeData(Ostream &os) const
Dummy write for regIOobject.
tmp< GeometricField< Type, GeoMesh > > evaluate(tmp< GeometricField< Type, GeoMesh >>(ModelType::*method)(Args ...) const, const word &name, const dimensionSet &dims, Args ... args) const
Return a blended field.
~BlendedInterfacialModel()
Destructor.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
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.
Abstract base class for functions that are used to combine interfacial sub-models according to the vo...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
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.
const word & name() const
Return const reference to name.
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.
const Time & time() const
Return the top-level database.
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.
const phaseSystem & fluid() const
Return the system to which this phase belongs.
label index() const
Return the index of the phase.
const phaseModelList & phases() const
Return the phase models.
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.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
volScalarField scalarField(fieldObject, mesh)
static List< word > fieldNames
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(lagrangian::Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), lagrangian::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.
static const coefficient A("A", dimPressure, 611.21)
void generateInterfacialModels(PtrList< phaseInterface > &interfaces, PtrList< ModelType > &models, const phaseSystem &fluid, const dictionary &dict, const wordHashSet &ignoreKeys, const phaseInterface &interface, const Args &... args)
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.
void addField(const label phasei, const word &name, tmp< GeoField > field, PtrList< GeoField > &fieldList)
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.
void mag(LagrangianPatchField< scalar > &f, const LagrangianPatchField< Type > &f1)
VolField< scalar > volScalarField
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
const dictionary & blendingDict(const phaseSystem &fluid, const dictionary &dict)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
HashSet wordHashSet
A HashSet with word keys.
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)