OF-POSTECH-1/solvers_post/LagrangianCMCSprayFoam/readSLFMlib.H

37 lines
840 B
C

IFstream SLFMlibFile
(
SLFMlib
);
scalar NumofEta_SLFM(0);
SLFMlibFile>>NumofEta_SLFM;
scalarField etaValue_SLFM(NumofEta_SLFM, 0.0);
for(label j=0 ; j<NumofEta_SLFM ; j++)
{
SLFMlibFile>>etaValue_SLFM[j];
}
scalarField Y_SLFM_temp(Nspecies*(NumofEta_SLFM)*NumofNst, 0);
scalarField W_SLFM_temp(Nspecies*(NumofEta_SLFM)*NumofNst, 0);
for(label m=0 ; m<NumofNst ; m++)
{
SLFMlibFile>>Nst[m];
for(label i=0 ; i<Nspecies ; i++)
{
for(label j=0 ; j<NumofEta_SLFM ; j++)
{
SLFMlibFile>>Y_SLFM_temp[(m*(NumofEta_SLFM)+j)*Nspecies+i];
}
for(label j=0 ; j<NumofEta_SLFM ; j++)
{
SLFMlibFile>>W_SLFM_temp[(m*(NumofEta_SLFM)+j)*Nspecies+i];
}
}
}
Interpolation(etaValue, etaValue_SLFM, NumofNst, Nspecies, Y_SLFM_temp, Y_SLFM);
Interpolation(etaValue, etaValue_SLFM, NumofNst, Nspecies, W_SLFM_temp, W_SLFM);