23 auto csol = Cantera::newSolution(
"gri30.yaml");
24 auto gas = csol->thermo();
28 YAML::Node inputFile = YAML::LoadFile(
"../input/input_diffusion.yaml");
32 size_t ngrd = inputFile[
"ngrd"].as<
size_t>();
33 double L = inputFile[
"L"].as<
double>();
34 double nTauSS = inputFile[
"nTauSS"].as<
double>();
35 int nsaveSS = inputFile[
"nsaveSS"].as<
int>();
38 for(
size_t i=0; i<inputFile[
"Ls"].size(); i++)
39 Ls.push_back(inputFile[
"Ls"][i].as<
double>());
43 double P = inputFile[
"P"].as<
double>();
45 double TLbc = inputFile[
"LBC"][
"TLbc"].as<
double>();
46 vector<double> yLbc(gas->nSpecies());
47 YAML::Node yy = inputFile[
"LBC"][
"comp"];
48 for(
auto it=yy.begin(); it!=yy.end(); it++)
49 yLbc[gas->speciesIndex(it->first.as<
string>())] = it->second.as<
double>();
51 double TRbc = inputFile[
"RBC"][
"TRbc"].as<
double>();
52 vector<double> yRbc(gas->nSpecies());
53 yy = inputFile[
"RBC"][
"comp"];
54 for(
auto it=yy.begin(); it!=yy.end(); it++)
55 yRbc[gas->speciesIndex(it->first.as<
string>())] = it->second.as<
double>();
59 bool doSoot = inputFile[
"doSoot"].as<
bool>();
60 size_t nsoot = doSoot ? inputFile[
"nsoot"].as<
size_t>() : 0;
62 shared_ptr<sootModel> SM;
63 shared_ptr<state> SMstate;
67 nucleationModel *nucl =
new soot::nucleationModel_LIN();
68 growthModel *grow =
new soot::growthModel_LIN();
69 oxidationModel *oxid =
new soot::oxidationModel_LL();
70 coagulationModel *coag =
new soot::coagulationModel_FM();
72 SM = make_shared<sootModel_QMOM>(nsoot, nucl, grow, oxid, coag);
73 SM->coag->set_FM_multiplier(9.0/2.0/2.2);
74 SMstate = make_shared<state>(nsoot);
78 string radType = inputFile[
"radType"] ? inputFile[
"radType"].as<
string>() :
"planckmean";
79 bool doRadiation = inputFile[
"doRadiation"].as<
bool>();
82 bool doEnergyEqn =
true;
83 bool isFlamelet =
false;
84 bool isPremixed =
false;
88 ignis flm(isPremixed, doEnergyEqn, isFlamelet, doSoot,
89 ngrd, L, P, csol, radType,
90 yLbc, yRbc, TLbc, TRbc,
95 flm.
setIC(
"equilibrium");
101 stringstream ss; ss <<
"L_" << L <<
"S_" << setfill(
'0') << setw(3) << 0 <<
".dat";
102 string fname = ss.str();