Skip to content

Commit

Permalink
updates to structure & output
Browse files Browse the repository at this point in the history
updates to structure & output
  • Loading branch information
DetlevCM committed Jul 3, 2015
1 parent 9951c83 commit 7c9bf2f
Show file tree
Hide file tree
Showing 26 changed files with 1,003 additions and 1,111 deletions.
3 changes: 2 additions & 1 deletion headers/Get_Input.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
#define INPUT_FUNCTIONS_


void Handle_Mechanism_Input(
//void Handle_Mechanism_Input(
bool Handle_Mechanism_Input(
string ,
vector< string >& ,
vector< ThermodynamicData >& ,
Expand Down
18 changes: 18 additions & 0 deletions headers/Global_Variables.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
* Global_Variables.hpp
*
* Created on: 02.07.2015
* Author: DetlevCM
*/

#ifndef SOURCE_GLOBAL_VARIABLES_HPP_
#define SOURCE_GLOBAL_VARIABLES_HPP_



// Shoddy implementation of PetroOxy logic
extern PetroOxyCalculation PetroOxyData;
extern int OxyGasSpeciesID;
// end PetroOxy Logic

#endif /* SOURCE_GLOBAL_VARIABLES_HPP_ */
12 changes: 12 additions & 0 deletions headers/MyFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,16 @@ vector< SingleReactionData > Make_Irreversible(
);


void Integrate(
string,
string,
string,
string,
vector< double >,
vector< string > ,
vector< SingleReactionData > &,
InitParam,
vector< double >&
);

#endif /* _MY_OTHER_FUNCTIONS_ */
2 changes: 2 additions & 0 deletions headers/MyHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ using std::istringstream;


#include <Structs.h>
#include <Namespaces.hpp>
#include <Global_Variables.hpp>

// Definitions of my functions
#include <Get_Input.h>
Expand Down
25 changes: 25 additions & 0 deletions headers/Namespaces.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Namespaces.hpp
*
* Created on: 02.07.2015
* Author: DetlevCM
*/

#ifndef SOURCE_NAMESPACES_HPP_
#define SOURCE_NAMESPACES_HPP_


namespace GlobalArrays{
// Key parameters that define the whole reaction scheme - used globally via namespaces
// Not sure if this is a good place to put it...
extern vector< vector < str_RatesAnalysis > > RatesAnalysisData;
extern vector< TrackSpecies > ProductsForRatesAnalysis;

}






#endif /* SOURCE_NAMESPACES_HPP_ */
6 changes: 4 additions & 2 deletions headers/Solver_Calculations.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ void Calculate_Rate_Constant(
vector< double >& ,
const double ,
const vector< ReactionParameter >& ,
const vector< vector< double > >& ,
//const vector< vector< double > >& ,
const vector< CalculatedThermodynamics >& ,
const vector< TrackSpecies >& ,
const vector< double >&
);
Expand All @@ -37,7 +38,8 @@ void CalculateReactionRates(


void Calculate_Thermodynamics(
vector< vector< double > >& ,
//vector< vector< double > >& ,
vector< CalculatedThermodynamics >& ,
const double& ,
const vector< ThermodynamicData >&
);
Expand Down
28 changes: 21 additions & 7 deletions headers/Structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ struct JacobianSpecies{
};

struct JacobianData {
int ColumnWiseArrayPosition;
bool IsForward;
bool IsProduction;
int ColumnWiseArrayPosition;
int ReactionID;
double coefficient;
vector< JacobianSpecies > Species;
Expand All @@ -34,22 +34,22 @@ struct JacobianData {


struct SingleReactionData {
vector<double> Reactants;
vector<double> Products;
bool Reversible;
bool IsDuplicate;
double paramA;
double paramN;
double paramEa;
bool Reversible;
bool IsDuplicate;
vector<double> Reactants;
vector<double> Products;
};
//*/

//*
struct ReactionParameter {
bool Reversible;
double paramA;
double paramN;
double paramEa;
bool Reversible;
};
//*/

Expand All @@ -71,6 +71,20 @@ struct InitSpecies {
};


struct ConstantInitRHSODE {
bool EnforceStability;
bool PetroOxy;
double temperature;
double PetroOxyTemperatureRise;
};

struct CalculatedThermodynamics {
double Hf;
double Cp;
double Cv;
double S;
};

struct InitParam {
bool irrev; // shoud be bool
bool PrintReacRates;
Expand Down Expand Up @@ -118,13 +132,13 @@ struct InitParam {


struct PetroOxyCalculation {
bool HenryLawDiffusionLimitSet;
double SampleSize ; // Old 0
double HeadSpaceGas ; // Old 4
double HeadSpaceGasMol; // Old 6
double HenryConstantk; // Old 10
double HeadSpaceGasPressure; // Old 7
double HeadSpaceSolventComponentPressure; // Old 8
bool HenryLawDiffusionLimitSet;
double HenryLawDiffusionLimit;
};

Expand Down
2 changes: 1 addition & 1 deletion headers/Write_Output.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void WriteReactions(

void Write_Stoichiometric_Matrix_For_Opt(
string ,
const vector< string >& ,
// const vector< string >& ,
const vector< SingleReactionData >&
);

Expand Down
Loading

0 comments on commit 7c9bf2f

Please sign in to comment.