@@ -35,6 +35,8 @@ List<word> combModelNameLowMach(low
3535List < Switch > splittingLowMach (lowMachRegions .size ()) ;
3636List < scalar > SctLowMach (lowMachRegions .size ()) ;
3737
38+ PtrList < surfaceScalarField > UBlendingFactorLowMach (lowMachRegions .size ()) ;
39+
3840List < scalar > cumulativeContErrsLowMach (lowMachRegions .size (), scalar (0 )) ;
3941
4042// ---- Populate lowMach fields ----
@@ -51,7 +53,8 @@ forAll(lowMachRegions, i)
5153 thermoLowMach .set
5254 (
5355 i ,
54- new heRhoThermo < rhoThermo , CanteraMixture > (mesh , word ::null )
56+ //new heRhoThermo<rhoThermo, CanteraMixture>(mesh, word::null)
57+ new heRhoThermo < rhoThermo , dfSingleStepReactingMixture > (mesh , word ::null )
5558 );
5659 fluidThermo & thermo = thermoLowMach [i ];
5760
@@ -207,6 +210,66 @@ forAll(lowMachRegions, i)
207210
208211 initialMassLowMach [i ] = fvc ::domainIntegrate (rhoLowMach [i ]).value ();
209212
213+ // ---- localBlended scheme support (cf. dfLowMachFoam/createLocalBlend.H) ----
214+ {
215+ const dictionary & divSchemesDict =
216+ mesh .schemesDict ().subDict ("divSchemes" );
217+
218+ Switch foundLocalBlended = false;
219+
220+ wordList keys = divSchemesDict .toc ();
221+ forAll (keys , k )
222+ {
223+ const word & key = keys [k ];
224+ ITstream & is = divSchemesDict .lookup (key );
225+ OStringStream os ;
226+ os << is ;
227+ word schemeStr = os .str ();
228+
229+ if (schemeStr .find ("localBlended" ) != word ::npos )
230+ {
231+ foundLocalBlended = true;
232+ }
233+ }
234+
235+ if (foundLocalBlended )
236+ {
237+ Info << " Creating UBlendingFactor field for localBlended"
238+ << " schemes in region " << mesh .name () << endl ;
239+
240+ volScalarField UBlend
241+ (
242+ IOobject
243+ (
244+ "UBlend ",
245+ mesh .time ().timeName (),
246+ mesh ,
247+ IOobject ::MUST_READ ,
248+ IOobject ::AUTO_WRITE
249+ ),
250+ mesh
251+ );
252+
253+ UBlendingFactorLowMach .set
254+ (
255+ i ,
256+ new surfaceScalarField
257+ (
258+ IOobject
259+ (
260+ "UBlendingFactor" ,
261+ mesh .time ().timeName (),
262+ mesh ,
263+ IOobject ::READ_IF_PRESENT ,
264+ IOobject ::NO_WRITE ,
265+ true
266+ ),
267+ fvc ::interpolate (UBlend )
268+ )
269+ );
270+ }
271+ }
272+
210273 Info << " Adding to fieldsLowMach\n" << endl ;
211274 fieldsLowMach .set
212275 (
0 commit comments