24 auto csol = Cantera::newSolution(
"../input/c2h4det.yaml");
25 auto gas = csol->thermo();
29 YAML::Node inputFile = YAML::LoadFile(
"../input/input_flamelet.yaml");
33 bool isFlamelet = inputFile[
"isFlamelet"].as<
bool>();
35 size_t ngrd = inputFile[
"ngrd"].as<
size_t>();
36 double nTauSS = inputFile[
"nTauSS"].as<
double>();
37 int nsaveSS = inputFile[
"nsaveSS"].as<
int>();
39 double chi0 = inputFile[
"chi0"].as<
double>();
42 for(
size_t i=0; i<inputFile[
"Ls"].size(); i++)
43 Ls.push_back(inputFile[
"Ls"][i].as<
double>());
47 double P = inputFile[
"P"].as<
double>();
49 double TLbc = inputFile[
"LBC"][
"TLbc"].as<
double>();
50 vector<double> yLbc(gas->nSpecies());
51 YAML::Node yy = inputFile[
"LBC"][
"comp"];
52 for(
auto it=yy.begin(); it!=yy.end(); it++)
53 yLbc[gas->speciesIndex(it->first.as<
string>())] = it->second.as<
double>();
55 double TRbc = inputFile[
"RBC"][
"TRbc"].as<
double>();
56 vector<double> yRbc(gas->nSpecies());
57 yy = inputFile[
"RBC"][
"comp"];
58 for(
auto it=yy.begin(); it!=yy.end(); it++)
59 yRbc[gas->speciesIndex(it->first.as<
string>())] = it->second.as<
double>();
63 bool doSoot = inputFile[
"doSoot"].as<
bool>();
64 size_t nsoot = doSoot ? inputFile[
"nsoot"].as<
size_t>() : 0;
66 shared_ptr<sootModel> SM;
67 shared_ptr<state> SMstate;
71 nucleationModel *nucl =
new soot::nucleationModel_LL();
72 growthModel *grow =
new soot::growthModel_LL();
73 oxidationModel *oxid =
new soot::oxidationModel_LL();
74 coagulationModel *coag =
new soot::coagulationModel_FM();
76 SM = make_shared<sootModel_QMOM>(nsoot, nucl, grow, oxid, coag);
78 SM->coag->set_FM_multiplier(9.0/2.2);
79 SMstate = make_shared<state>(nsoot);
84 string radType = inputFile[
"radType"] ? inputFile[
"radType"].as<
string>() :
"planckmean";
88 bool doEnergyEqn =
true;
89 bool isPremixed =
false;
94 ignis flm(isPremixed, doEnergyEqn, isFlamelet, doSoot,
95 ngrd, L, P, csol, radType,
96 yLbc, yRbc, TLbc, TRbc,
102 flm.
setIC(
"equilibrium");
108 stringstream ss; ss <<
"X_" << chi0 <<
"S_" << setfill(
'0') << setw(3) << 0 <<
".dat";
109 string fname = ss.str();