Inputs

From orch
Revision as of 18:55, 11 December 2017 by Seltz (Talk | contribs)

Jump to: navigation, search

General keywords

Every key words are contained in the file "condition.cpp", this is where you specify the characteristics of your flame and the ORCh step you want to run.

First, you choose the studied combustion regime (premixed flame, auto-ignition ou multiple Inlet regime)

configuration = "studied regime";

Then, the ORCh step you want to perform (DRGEP_species, DRGEP_reactions, ComputeTrajectories, computeQSSCriteria, getQSSfile, getQSSfileFORTRAN, Optimisation, or Lumping)

step = "chosen step";

The reference chemical scheme (by default it is the scheme "mech" from which the user begins the step)

mech_ref = "mechanims/reference scheme in xml";

and his associated trajectory file

trajectory_ref = "";

Note that mech_ref and trajectory_ref are optional and useful only if the user wants to plot and calculate the fitness with other reference schemes than the default one.

The reference scheme of the current step, and the mechanism description (the mech_desc doesn't change through the ORCh steps) :

mech = "mechanims/current chemical scheme in xml"; mech_desc = "mechanism description";

The level of debug wanted (generally 1)

debug = 1;

The species trajectories and/or the temperature and the flame speed (in Premixed configuration) the user wants to vizualise during the step :

speciesToPlot.push_back("O2") ;
speciesToPlot.push_back("CO2") ;
etc ..

plot_T = true or false; //temperature plot
plot_U = true or false; //flame speed plot 

Then you define your target species  :

listTargets.push_back("species 1"); 
listTargets.push_back("species 2");
listTargets.push_back("species 3");
...

Premixed flame

If you want to reduce schemes for premix flames, firstly you will run a flame with the following inputs :


configuration = "PremixedFlames";


listFlames.push_back(new PremixedFlames( fuel temperature, oxider temperature, pressure, ratio, Yf, Xf, Yo, Xo, path of the reference flame, path of the new flame));


In order to converge faster, you have to indicate a reference flame with characteristics close to the ones you want to run


Multiple Inlet

Concerning this regime, as many inlets as needed can be added with the following characteristics :


  //Inlet i
  listInlets.push_back(new MultipleInlet(
               "Temperature",
               "Pressure",
               "Mass flow rate",
               "Xk",
               "Yk",
               /*evaporationModel*/ true or false,
               /*DropletDiameter*/,
               /*Tau_vj (characteristic time of evaporation)*/,
               /*liquidDensity*/,
               /*EvaporationlatentHeat*/));

Coupled with the inlet of burned gases :

  //BurnedGases
  listInlets.push_back(new MultipleInlet(
               "Temperature",
               "Pressure",
               "Mass flow rate",
               "Xk",
               "Yk",
               /*evaporationModel*/ false,
               /*DropletDiameter*/0.0,
               /*Tau_vj (characteristic time of evaporation)*/0.0,
               /*liquidDensity*/0.0,
               /*EvaporationlatentHeat*/ 0.0,
               /*tau_t (mixing time)*/,
               /*delta_t (time step)*/0.0,
               /*nbIterations*/0.0,
               /*BurnedGases*/ true ));


One last parameter is necessary :


new_mixing = "true or false"


which determine if the mixing of the fluid particles is new or set from a previous mixing. For the first step of the analysis, this parameter is set to true, and false for all the other steps of the study, so the random mixing of the first step is re-used for the other ones.

QSS and optimisation key words

Concerning the QSS part, the user have to fill a vector with the species put in QSS assumption. The user can test several scenarios (definition of multiple vectors)

  //------QSS Scenarios------//
   string array1[17] {"species1", "species2"};
   vector<string> vec(array1, array1 + sizeof(array1) /sizeof(array1[0]));
   listQSSscenarios.push_back(new QSSscenario(vec));
 
   ...


For the optimisation step, the user must indicate the size of the population at each generation, the number of generation that will be calculated, the number of the best solutions to copy generation to generation, the cross and mutation rate (best let to 0.75 and 0.02) and finally the allowed variation on the Arrhenius factors.

   //------Optimisation------//
   //MAKE SURE THE "listQSSscenarios" THAT IS PUSHED FIRST, IS THE SCENARIO YOU WANT TO OPTIMISE
    int PopSize = 22;
    int MaxAllowableGenerations = 10;
    int NbElitism = 1;
    double CrossoverRate = 0.75;
    double MutationRate = 0.02;
    double AllowedVariation_A = 0.005;
    double AllowedVariation_b = 0;
    double AllowedVariation_E = 0;
    listOptimScenarios = new OptimScenario(PopSize, MaxAllowableGenerations, NbElitism, CrossoverRate, MutationRate, AllowedVariation_A, AllowedVariation_b, AllowedVariation_E);