diff --git a/solvers_post/SLFMFoam/createFields.H b/solvers_post/SLFMFoam/createFields.H index 11368f1..b195457 100644 --- a/solvers_post/SLFMFoam/createFields.H +++ b/solvers_post/SLFMFoam/createFields.H @@ -295,8 +295,8 @@ IOdictionary SLFMdict //SLFM properties dictionary ) ); -label Ysize = Y.size(); -wordList postSpecieNames(SLFMdict.lookup("postSpecieNames")); +const label Ysize = Y.size(); +const wordList postSpecieNames(SLFMdict.lookup("postSpecieNames")); labelList postSpecieIndices(postSpecieNames.size(),-1); forAll(postSpecieNames, i) { diff --git a/solvers_post/SLFMFoam/readSLFMlib.H b/solvers_post/SLFMFoam/readSLFMlib.H index f58e724..d8746a5 100644 --- a/solvers_post/SLFMFoam/readSLFMlib.H +++ b/solvers_post/SLFMFoam/readSLFMlib.H @@ -30,6 +30,16 @@ scalarFieldArray2d W_SLFM //reaction rate [1/sec] scalarField(etamax+1,0) ) ); +scalarFieldArray1d T_SLFM //Temperature [-] +( + NstList.size(), + scalarField(etamax+1,0) +); +scalarFieldArray1d Q_SLFM //Heat source [1/sec] +( + NstList.size(), + scalarField(etamax+1,0) +); scalarFieldArray1d rho_SLFM //density [g/cm3] ( NstList.size(), @@ -54,7 +64,7 @@ for(label n=0 ; n>etamax_SLFM>>NoSpecies; - etamax_SLFM = etamax_SLFM-1; //blank line fin.getLine(gbg); @@ -79,8 +88,8 @@ for(label n=0 ; n>etaValue_SLFM[j]; } @@ -91,25 +100,32 @@ for(label n=0 ; n> spName; + const label spI (composition.species()[spName]); + // Info<>Y_temp[j]; + scalar Yj = 0.0; + fin >> Yj; + Y_temp[j] = max(0.0, Yj); } - Y_temp = max(0.0, Y_temp); - Y_SLFM[n][i] = interpolateXY(etaValue, etaValue_SLFM, Y_temp); + Y_SLFM[n][spI] = interpolateXY(etaValue, etaValue_SLFM, Y_temp); //read reaction rate (from SLFM library) - for(label j=0 ; j<=etamax_SLFM ; j++) + for(label j=0 ; j>W_temp[j]; } @@ -120,12 +136,39 @@ for(label n=0 ; n> Yj; + Y_temp[j] = max(0.0, Yj); + } + + Y_SLFM[n].last() = interpolateXY(etaValue, etaValue_SLFM, Y_temp); + + //read heat source + for(label j=0 ; j>W_temp[j]; + } + + W_SLFM[n].last() = interpolateXY(etaValue, etaValue_SLFM, W_temp); + + //blank line + fin.getLine(gbg); + } + //DENSITY... fin.getLine(gbg); //read density (from SLFM library) - scalarField rho_temp(etamax_SLFM+1, 0.0); - for(label j=0 ; j<=etamax_SLFM ; j++) + scalarField rho_temp(etamax_SLFM, 0.0); + for(label j=0 ; j>rho_temp[j]; } @@ -140,8 +183,8 @@ for(label n=0 ; n>h_temp[j]; }