Account for fuel LHV in fuel enthalpy

Aperta
#46 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

No file or test paths are named in the issue. Start by locating the combustor code and its fuel-specific-enthalpy input, then review the existing regression tests that assume zero enthalpy. Done means computing fuel enthalpy from LHV data by default while preserving an option for those regression tests to retain zero enthalpy.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The current combustor code has an input for fuel specific enthalpy. The default value is 0, which is what has been used in just about everything.

This is not correct. There is a non-zero (usually negative) fuel enthalpy that needs to be computed relative the LHV of the fuel you are using. This can be computed...

Without breaking ALL of the existing regression test that rely on 0 fuel enthalpy ... we need to account for this.

Probably just add a helper function and some fuel-data somewhere, and add an option to use it or not. Then we can set all the reg tests to not use it ... default should probably be to have it turned on though.

Some NPSS calculations:

// CONSTANTS ===============================================================
real C_calToJoule = 4.184;    // J/cal, conversion constant
real C_lbmToGram = 453.59;    // g/lbm, conversion constant
real C_BTUtoCal = 252.16;     // cal/BTU, conversion constant
real C_BTUtoJoule = 1055.056; // J/BTU, conversion constant
real hof_CO2 = -393510.;     // heat of formation of CO2, J/mol
real hof_H2O = -241826.;     // heat of formation of water, J/mol
 
real MW_C = 12.0107;       // molar weight of Carbon, g/mol
real MW_H = 2.01588/2.;    // molar weight of Hydrogen, g/mol
real MW_O2 = 31.9988;      // molar weight of Oxygen, g/mol
real MW_N = 28.0134/2.;    // molar weight of Nitrogen, g/mol
 
real MW_air = 28.965116;   // molar weight of air
real fAir_O2 = 0.23141563; // fraction of air that is O2 by mass
 
 
// INPUTS ==================================================================
real Carbon = 1.;          // number of Carbon atoms in the fuel
real Hydrogen = 1.94;      // number of Hydrogen atoms in the fuel
real Oxygen = 0.;          // number of Oxygen atoms in the fuel
real Nitrogen = 0.;        // number of Nitrogen atoms in the fuel
real fuelHOF = -22723.;    // heat of formation of the fuel, J/mol e.g. -45940 J/mol for NH3
real effComb = 1.;         // combustion efficiency
 
 
// OUTPUTS =================================================================
real MW_fuel;              // molar weight of the fuel, g/mol
real mFuel;                // mass of fuel from stoichiometric reaction
real mO2;                  // mass of Oxygen from stoichiometric reaction
real OFratio;              // Oxygen-to-fuel mass ratio
real LHV;                  // fuel lower heating value, BTU/lbm
real FARstoich;            // stoichiometric fuel-to-air mass ratio
 
 
// air is defined by CEA on a molar basis as:
// 78.0840 mol N2    20.9476 mol O2    0.9365 mol Ar    0.0319 mol CO2
// uncomment the following lines if a different air composition is desired
//MW_air = (78.084*(MW_N*2.) + 20.9476*MW_O2 + 0.9365*39.948 + 0.0319*44.0095 )/100.;
//fAir_O2 = (20.9476*MW_O2/100. ) / MW_air;
 
// molar weight of fuel from input definition
MW_fuel = Carbon*MW_C + Hydrogen*MW_H + Nitrogen*MW_N + Oxygen*MW_O2/2.;
 
 
//  J/mol  cal/J  g/lbm  BTU/cal  mol/g = BTU/lbm
LHV = ( fuelHOF - Carbon*(hof_CO2) - Hydrogen*(hof_H2O)/2. )
   / C_calToJoule * C_lbmToGram / C_BTUtoCal / MW_fuel / effComb;
 
 
// assumed stoichiometric reaction, fuel is defined as CxHyNwOz
//  xC yH wN zO + qO2 --> xCO2 + (y/2)H2O + (w/2)N2    where q = x + y/4 - z/2
mFuel = Carbon*MW_C + Hydrogen*MW_H + Nitrogen*MW_N + Oxygen*MW_O2/2.;
mO2 = ( Carbon + Hydrogen/4. - Oxygen/2. )*MW_O2;
OFratio = mO2 / mFuel;
FARstoich = fAir_O2 / OFratio;
 
cout.precision = 8;
cout << "LHV = " << LHV << " BTU/lbm " << endl;
cout << "FAR stoich = " << FARstoich << endl;
Lingua principale
Python
Stelle
212
Fork
101
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenMDAO/pyCycle

Tutte le issue di OpenMDAO/pyCycle

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.