Ignis
Loading...
Searching...
No Matches
streams.h
Go to the documentation of this file.
1#pragma once
2
3#include "cantera/base/Solution.h"
4#include "cantera/thermo.h"
5
6#include <vector>
7#include <memory>
8
19
20class streams {
21
22 public:
23
25
26 double h0;
27 double h1;
28 std::vector<double> y0;
29 std::vector<double> y1;
30
31 double P;
32
33 std::shared_ptr<Cantera::ThermoPhase> gas;
34
35 double mixfStoic;
36 int nspc;
37 double beta0;
38 double beta1;
39
40 std::vector<double> gCHON;
41
43
44 void getProdOfCompleteComb(const double mixf,
45 std::vector<double> &ypcc,
46 double &hpcc,
47 double &Tpcc);
48
49 void getEquilibrium_HP(const double mixf,
50 std::vector<double> &yeq,
51 double &heq,
52 double &Teq);
53
54 void getEquilibrium_TP(const double mixf,
55 double Teq,
56 std::vector<double> &yeq,
57 double &heq);
58
59 void getMixingState(const double mixf,
60 std::vector<double> &ymix,
61 double &hmix,
62 double &Tmix);
63
64 double getMixtureFraction(const double *y,
65 const bool doBeta01=false);
66
67 private:
68
69 void setStoicMixf();
70 std::vector<double> getElementMassFracs(const double *y);
71 std::vector<double> getElementMoleFracs(const double *y);
72 std::vector<double> getElementMoles(const double *x,
73 double &nOnotFromO2,
74 double &nHnotFromH2O,
75 double &nCnotFromCO2);
76
78
79 public:
80
82 streams(std::shared_ptr<Cantera::Solution> csol,
83 const double _P,
84 const double _h0,
85 const double _h1,
86 const std::vector<double> &_y0,
87 const std::vector<double> &_y1);
88
90
91};
92
93
94
std::vector< double > y1
stream mixf=1 composition vector
Definition streams.h:29
streams(std::shared_ptr< Cantera::Solution > csol, const double _P, const double _h0, const double _h1, const std::vector< double > &_y0, const std::vector< double > &_y1)
streams()
Definition streams.h:81
void setStoicMixf()
Definition streams.cc:238
double beta1
mixf = (beta-beta0) / (beta1-beta0)
Definition streams.h:38
std::vector< double > getElementMoles(const double *x, double &nOnotFromO2, double &nHnotFromH2O, double &nCnotFromCO2)
Definition streams.cc:295
double beta0
mixf = (beta-beta0) / (beta1-beta0)
Definition streams.h:37
double h1
stream mixf=1 enthalpy (J/kg)
Definition streams.h:27
std::vector< double > y0
stream mixf=0 composition vector
Definition streams.h:28
int nspc
number of species in gas mechanism
Definition streams.h:36
void getEquilibrium_HP(const double mixf, std::vector< double > &yeq, double &heq, double &Teq)
Definition streams.cc:76
~streams()
Definition streams.h:89
std::vector< double > getElementMoleFracs(const double *y)
double mixfStoic
stoichiometric mixture fraction
Definition streams.h:35
std::vector< double > gCHON
gammas, as in beta = sum_i (y_i*gamma_i)
Definition streams.h:40
std::vector< double > getElementMassFracs(const double *y)
Definition streams.cc:275
double h0
stream mixf=0 enthalpy (J/kg)
Definition streams.h:26
double P
Definition streams.h:31
double getMixtureFraction(const double *y, const bool doBeta01=false)
Definition streams.cc:337
void getProdOfCompleteComb(const double mixf, std::vector< double > &ypcc, double &hpcc, double &Tpcc)
Definition streams.cc:135
std::shared_ptr< Cantera::ThermoPhase > gas
Definition streams.h:33
void getMixingState(const double mixf, std::vector< double > &ymix, double &hmix, double &Tmix)
Definition streams.cc:53
void getEquilibrium_TP(const double mixf, double Teq, std::vector< double > &yeq, double &heq)
Definition streams.cc:106