Line data Source code
1 : // EnergyPlus, Copyright (c) 1996-2023, The Board of Trustees of the University of Illinois,
2 : // The Regents of the University of California, through Lawrence Berkeley National Laboratory
3 : // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge
4 : // National Laboratory, managed by UT-Battelle, Alliance for Sustainable Energy, LLC, and other
5 : // contributors. All rights reserved.
6 : //
7 : // NOTICE: This Software was developed under funding from the U.S. Department of Energy and the
8 : // U.S. Government consequently retains certain rights. As such, the U.S. Government has been
9 : // granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
10 : // worldwide license in the Software to reproduce, distribute copies to the public, prepare
11 : // derivative works, and perform publicly and display publicly, and to permit others to do so.
12 : //
13 : // Redistribution and use in source and binary forms, with or without modification, are permitted
14 : // provided that the following conditions are met:
15 : //
16 : // (1) Redistributions of source code must retain the above copyright notice, this list of
17 : // conditions and the following disclaimer.
18 : //
19 : // (2) Redistributions in binary form must reproduce the above copyright notice, this list of
20 : // conditions and the following disclaimer in the documentation and/or other materials
21 : // provided with the distribution.
22 : //
23 : // (3) Neither the name of the University of California, Lawrence Berkeley National Laboratory,
24 : // the University of Illinois, U.S. Dept. of Energy nor the names of its contributors may be
25 : // used to endorse or promote products derived from this software without specific prior
26 : // written permission.
27 : //
28 : // (4) Use of EnergyPlus(TM) Name. If Licensee (i) distributes the software in stand-alone form
29 : // without changes from the version obtained under this License, or (ii) Licensee makes a
30 : // reference solely to the software portion of its product, Licensee must refer to the
31 : // software as "EnergyPlus version X" software, where "X" is the version number Licensee
32 : // obtained under this License and may not use a different name for the software. Except as
33 : // specifically required in this Section (4), Licensee shall not use in a company name, a
34 : // product name, in advertising, publicity, or other promotional activities any name, trade
35 : // name, trademark, logo, or other designation of "EnergyPlus", "E+", "e+" or confusingly
36 : // similar designation, without the U.S. Department of Energy's prior written consent.
37 : //
38 : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
39 : // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
40 : // AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
41 : // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42 : // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
43 : // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
44 : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
45 : // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
46 : // POSSIBILITY OF SUCH DAMAGE.
47 :
48 : // C++ Headers
49 : #include <cmath>
50 : #include <string>
51 :
52 : // ObjexxFCL Headers
53 : #include <ObjexxFCL/Array.functions.hh>
54 : #include <ObjexxFCL/Array1D.hh>
55 :
56 : // EnergyPlus Headers
57 : #include <EnergyPlus/CurveManager.hh>
58 : #include <EnergyPlus/Data/EnergyPlusData.hh>
59 : #include <EnergyPlus/DataGenerators.hh>
60 : #include <EnergyPlus/DataIPShortCuts.hh>
61 : #include <EnergyPlus/DataLoopNode.hh>
62 : #include <EnergyPlus/General.hh>
63 : #include <EnergyPlus/GeneratorFuelSupply.hh>
64 : #include <EnergyPlus/InputProcessing/InputProcessor.hh>
65 : #include <EnergyPlus/NodeInputManager.hh>
66 : #include <EnergyPlus/ScheduleManager.hh>
67 : #include <EnergyPlus/UtilityRoutines.hh>
68 :
69 : namespace EnergyPlus {
70 :
71 : namespace GeneratorFuelSupply {
72 :
73 : //_______________________________________________
74 : // Utility modules used by other generators.
75 : //
76 : // GeneratorFuelSupply
77 : // reused among some generators to define gaseous fuel chemistry, optional compressor)
78 :
79 : // Module containing the routines dealing with the fuel supply for some generators
80 : // different generator modules can reuse the same fuel supply code, hence a seperate module
81 :
82 : // MODULE INFORMATION:
83 : // AUTHOR B Griffith
84 : // DATE WRITTEN July 2006
85 : // MODIFIED na
86 : // RE-ENGINEERED na
87 :
88 : // METHODOLOGY EMPLOYED:
89 : // data defined in DataGenerators.cc
90 : // this module only provides input and subroutines for other component simulations
91 : // no specific energyplus component is modeled here. it is used by other generators
92 :
93 : // REFERENCES:
94 : // Annex 42 documentation
95 :
96 : // Using/Aliasing
97 : using namespace DataGenerators;
98 :
99 4 : void GetGeneratorFuelSupplyInput(EnergyPlusData &state)
100 : {
101 :
102 : // SUBROUTINE INFORMATION:
103 : // AUTHOR B Griffith
104 : // DATE WRITTEN July 2006,
105 : // MODIFIED na
106 : // RE-ENGINEERED this module extracted from older SOFC module for
107 : // reuse with both Annex 42 models,
108 :
109 : // Using/Aliasing
110 : using Curve::GetCurveIndex;
111 : using DataLoopNode::ObjectIsNotParent;
112 : using NodeInputManager::GetOnlySingleNode;
113 : using ScheduleManager::GetScheduleIndex;
114 :
115 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
116 : // INTEGER :: GeneratorNum !Generator counter
117 : int NumAlphas; // Number of elements in the alpha array
118 : int NumNums; // Number of elements in the numeric array
119 : int IOStat; // IO Status when calling get input subroutine
120 8 : Array1D_string AlphArray(25); // character string data
121 8 : Array1D<Real64> NumArray(200); // numeric data TODO deal with allocatable for extensible
122 4 : bool ErrorsFound(false); // error flag
123 : int FuelSupNum;
124 8 : std::string ObjMSGName;
125 : int ConstitNum;
126 4 : auto &cCurrentModuleObject = state.dataIPShortCut->cCurrentModuleObject;
127 :
128 4 : if (state.dataGeneratorFuelSupply->MyOneTimeFlag) {
129 3 : cCurrentModuleObject = "Generator:FuelSupply";
130 3 : int NumGeneratorFuelSups = state.dataInputProcessing->inputProcessor->getNumObjectsFound(state, cCurrentModuleObject);
131 :
132 3 : if (NumGeneratorFuelSups <= 0) {
133 0 : ShowSevereError(state, "No " + cCurrentModuleObject + " equipment specified in input file");
134 0 : ErrorsFound = true;
135 : }
136 :
137 3 : state.dataGenerator->FuelSupply.allocate(NumGeneratorFuelSups);
138 :
139 7 : for (FuelSupNum = 1; FuelSupNum <= NumGeneratorFuelSups; ++FuelSupNum) {
140 12 : state.dataInputProcessing->inputProcessor->getObjectItem(state,
141 : cCurrentModuleObject,
142 : FuelSupNum,
143 : AlphArray,
144 : NumAlphas,
145 : NumArray,
146 : NumNums,
147 : IOStat,
148 : _,
149 : _,
150 4 : state.dataIPShortCut->cAlphaFieldNames,
151 4 : state.dataIPShortCut->cNumericFieldNames);
152 4 : UtilityRoutines::IsNameEmpty(state, AlphArray(1), cCurrentModuleObject, ErrorsFound);
153 :
154 4 : state.dataGenerator->FuelSupply(FuelSupNum).Name = AlphArray(1);
155 4 : ObjMSGName = cCurrentModuleObject + " Named " + AlphArray(1);
156 4 : if (UtilityRoutines::SameString("TemperatureFromAirNode", AlphArray(2))) {
157 4 : state.dataGenerator->FuelSupply(FuelSupNum).FuelTempMode = DataGenerators::FuelTemperatureMode::FuelInTempFromNode;
158 0 : } else if (UtilityRoutines::SameString("Scheduled", AlphArray(2))) {
159 0 : state.dataGenerator->FuelSupply(FuelSupNum).FuelTempMode = DataGenerators::FuelTemperatureMode::FuelInTempSchedule;
160 : } else {
161 0 : ShowSevereError(state, "Invalid, " + state.dataIPShortCut->cAlphaFieldNames(2) + " = " + AlphArray(2));
162 0 : ShowContinueError(state, "Entered in " + cCurrentModuleObject + '=' + AlphArray(1));
163 0 : ErrorsFound = true;
164 : }
165 :
166 4 : state.dataGenerator->FuelSupply(FuelSupNum).NodeName = AlphArray(3);
167 4 : state.dataGenerator->FuelSupply(FuelSupNum).NodeNum = GetOnlySingleNode(state,
168 4 : AlphArray(3),
169 : ErrorsFound,
170 : DataLoopNode::ConnectionObjectType::GeneratorFuelSupply,
171 4 : AlphArray(1),
172 : DataLoopNode::NodeFluidType::Air,
173 : DataLoopNode::ConnectionType::Sensor,
174 : NodeInputManager::CompFluidStream::Primary,
175 4 : ObjectIsNotParent);
176 :
177 4 : state.dataGenerator->FuelSupply(FuelSupNum).SchedNum = GetScheduleIndex(state, AlphArray(4));
178 8 : if ((state.dataGenerator->FuelSupply(FuelSupNum).SchedNum == 0) &&
179 4 : (state.dataGenerator->FuelSupply(FuelSupNum).FuelTempMode == DataGenerators::FuelTemperatureMode::FuelInTempSchedule)) {
180 0 : ShowSevereError(state, "Invalid, " + state.dataIPShortCut->cAlphaFieldNames(4) + " = " + AlphArray(4));
181 0 : ShowContinueError(state, "Entered in " + cCurrentModuleObject + '=' + AlphArray(1));
182 0 : ShowContinueError(state, "Schedule named was not found");
183 0 : ErrorsFound = true;
184 : }
185 :
186 4 : state.dataGenerator->FuelSupply(FuelSupNum).CompPowerCurveID = GetCurveIndex(state, AlphArray(5));
187 4 : if (state.dataGenerator->FuelSupply(FuelSupNum).CompPowerCurveID == 0) {
188 0 : ShowSevereError(state, "Invalid, " + state.dataIPShortCut->cAlphaFieldNames(5) + " = " + AlphArray(5));
189 0 : ShowContinueError(state, "Entered in " + cCurrentModuleObject + '=' + AlphArray(1));
190 0 : ShowContinueError(state, "Curve named was not found ");
191 0 : ErrorsFound = true;
192 : }
193 :
194 10 : for (auto &e : state.dataGenerator->FuelSupply)
195 6 : e.CompPowerLossFactor = NumArray(1);
196 :
197 4 : if (UtilityRoutines::SameString(AlphArray(6), "GaseousConstituents")) {
198 4 : state.dataGenerator->FuelSupply(FuelSupNum).FuelTypeMode = DataGenerators::FuelMode::GaseousConstituents;
199 0 : } else if (UtilityRoutines::SameString(AlphArray(6), "LiquidGeneric")) {
200 0 : state.dataGenerator->FuelSupply(FuelSupNum).FuelTypeMode = DataGenerators::FuelMode::GenericLiquid;
201 : } else {
202 0 : ShowSevereError(state, "Invalid, " + state.dataIPShortCut->cAlphaFieldNames(6) + " = " + AlphArray(6));
203 0 : ShowContinueError(state, "Entered in " + cCurrentModuleObject + '=' + AlphArray(1));
204 0 : ErrorsFound = true;
205 : }
206 :
207 4 : state.dataGenerator->FuelSupply(FuelSupNum).LHVliquid = NumArray(2) * 1000.0; // generic liquid LHV (kJ/kG input converted to J/kG )
208 4 : state.dataGenerator->FuelSupply(FuelSupNum).HHV = NumArray(3) * 1000.0; // generic liquid HHV (kJ/kG input converted to J/kG )
209 4 : state.dataGenerator->FuelSupply(FuelSupNum).MW = NumArray(4);
210 4 : state.dataGenerator->FuelSupply(FuelSupNum).eCO2 = NumArray(5);
211 :
212 4 : if (state.dataGenerator->FuelSupply(FuelSupNum).FuelTypeMode == DataGenerators::FuelMode::GaseousConstituents) {
213 4 : int NumFuelConstit = NumArray(6);
214 4 : state.dataGenerator->FuelSupply(FuelSupNum).NumConstituents = NumFuelConstit;
215 :
216 4 : if (NumFuelConstit > 12) {
217 0 : ShowSevereError(state, cCurrentModuleObject + " model not set up for more than 12 fuel constituents");
218 0 : ErrorsFound = true;
219 : }
220 4 : if (NumFuelConstit < 1) {
221 0 : ShowSevereError(state, cCurrentModuleObject + " model needs at least one fuel constituent");
222 0 : ErrorsFound = true;
223 : }
224 :
225 22 : for (ConstitNum = 1; ConstitNum <= NumFuelConstit; ++ConstitNum) {
226 18 : state.dataGenerator->FuelSupply(FuelSupNum).ConstitName(ConstitNum) = AlphArray(ConstitNum + 6);
227 18 : state.dataGenerator->FuelSupply(FuelSupNum).ConstitMolalFract(ConstitNum) = NumArray(ConstitNum + 6);
228 : }
229 :
230 : // check for molar fractions summing to 1.0.
231 4 : if (std::abs(sum(state.dataGenerator->FuelSupply(FuelSupNum).ConstitMolalFract) - 1.0) > 0.0001) {
232 0 : ShowSevereError(state, cCurrentModuleObject + " molar fractions do not sum to 1.0");
233 0 : ShowContinueError(state, format("Sum was={:.5R}", sum(state.dataGenerator->FuelSupply(FuelSupNum).ConstitMolalFract)));
234 0 : ShowContinueError(state, "Entered in " + cCurrentModuleObject + " = " + AlphArray(1));
235 0 : ErrorsFound = true;
236 : }
237 : }
238 : }
239 :
240 : // now make calls to Setup
241 :
242 7 : for (FuelSupNum = 1; FuelSupNum <= NumGeneratorFuelSups; ++FuelSupNum) {
243 4 : SetupFuelConstituentData(state, FuelSupNum, ErrorsFound);
244 : }
245 :
246 3 : if (ErrorsFound) {
247 0 : ShowFatalError(state, "Problem found processing input for " + cCurrentModuleObject);
248 : }
249 :
250 3 : state.dataGeneratorFuelSupply->MyOneTimeFlag = false;
251 : } // MyOneTimeFlag
252 4 : }
253 :
254 : //******************************************************************************
255 :
256 7 : void SetupFuelConstituentData(EnergyPlusData &state, int const FuelSupplyNum, bool &ErrorsFound)
257 : {
258 :
259 : // SUBROUTINE INFORMATION:
260 : // AUTHOR B Griffith
261 : // DATE WRITTEN Aug 2005,
262 : // MODIFIED na
263 : // RE-ENGINEERED July/Aug 2006, extracted to own module. added liquid fuel option
264 :
265 : // PURPOSE OF THIS SUBROUTINE:
266 : // Fill data structure for gas phase thermochemistry
267 :
268 : // METHODOLOGY EMPLOYED:
269 : // Hardcoded data from NIST is filled into data structure one time only
270 :
271 : // SUBROUTINE LOCAL VARIABLE DECLARATIONS:
272 : int NumHardCodedConstituents; // number of gases included in data
273 : Real64 LHVfuel; // lower heating value of fuel, working var
274 : Real64 HHVfuel; // higher heating value of fuel, working var
275 : Real64 O2Stoic; // stochiometric oxygen coef in chemical equation (15)
276 : Real64 CO2ProdStoic; // product gases carbon dioxide coeff
277 : Real64 H2OProdStoic; // product gases water coeff
278 : int i; // loop index
279 14 : std::string thisName; // working string var
280 : int thisGasID; // working index in Gas phase data structure
281 : int CO2dataID; // hard wired to CO2 index in gas data struct
282 : int WaterDataID; // hard wired to Water index in gas data struct
283 : Real64 LHVi; // working var for lower heating value calc
284 : Real64 HHVi; // working var for higher heating value calc
285 : // INTEGER :: thisConstituent
286 : Real64 MWfuel;
287 : // unused REAL(r64) :: DelfHfuel
288 : // unused REAL(r64) :: h_i
289 : // unused REAL(r64) :: LHV
290 :
291 7 : NumHardCodedConstituents = 14;
292 :
293 7 : if (!allocated(state.dataGenerator->GasPhaseThermoChemistryData)) {
294 3 : state.dataGenerator->GasPhaseThermoChemistryData.allocate(NumHardCodedConstituents);
295 : }
296 : // Carbon Dioxide (CO2) Temp K 298-1200 (Chase 1998)
297 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ConstituentName = "CarbonDioxide";
298 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ConstituentFormula = "CO2";
299 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).StdRefMolarEnthOfForm = -393.5224; // KJ/mol
300 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
301 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateA = 24.99735;
302 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateB = 55.18696;
303 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateC = -33.69137;
304 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateD = 7.948387;
305 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateE = -0.136638;
306 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateF = -403.6075;
307 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateG = 228.2431;
308 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).ShomateH = -393.5224;
309 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).NumCarbons = 1.0;
310 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).NumHydrogens = 0.0;
311 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).NumOxygens = 2.0;
312 7 : state.dataGenerator->GasPhaseThermoChemistryData(1).MolecularWeight = 44.01;
313 :
314 : // Nitrogen (N2) Temp (K) 298-6000
315 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ConstituentName = "Nitrogen";
316 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ConstituentFormula = "N2";
317 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).StdRefMolarEnthOfForm = 0.0;
318 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
319 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateA = 26.092;
320 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateB = 8.218801;
321 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateC = -1.976141;
322 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateD = 0.159274;
323 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateE = 0.044434;
324 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateF = -7.98923;
325 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateG = 221.02;
326 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).ShomateH = 0.000;
327 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).NumCarbons = 0.0;
328 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).NumHydrogens = 0.0;
329 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).NumOxygens = 0.0;
330 7 : state.dataGenerator->GasPhaseThermoChemistryData(2).MolecularWeight = 28.01;
331 :
332 : // Oxygen (O2) Temp (K) 298-6000
333 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ConstituentName = "Oxygen";
334 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ConstituentFormula = "O2";
335 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).StdRefMolarEnthOfForm = 0.0;
336 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
337 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateA = 29.659;
338 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateB = 6.137261;
339 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateC = -1.186521;
340 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateD = 0.095780;
341 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateE = -0.219663;
342 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateF = -9.861391;
343 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateG = 237.948;
344 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).ShomateH = 0.0;
345 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).NumCarbons = 0.0;
346 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).NumHydrogens = 0.0;
347 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).NumOxygens = 2.0;
348 7 : state.dataGenerator->GasPhaseThermoChemistryData(3).MolecularWeight = 32.00;
349 :
350 : // Water (H2O) Temp K 300-1700
351 : // need lower temperature range for Shomate coef for Water Vapor..
352 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ConstituentName = "Water";
353 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ConstituentFormula = "H2O";
354 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).StdRefMolarEnthOfForm = -241.8264; // KJ/mol
355 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
356 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateA = 29.0373;
357 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateB = 10.2573;
358 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateC = 2.81048;
359 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateD = -0.95914;
360 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateE = 0.11725;
361 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateF = -250.569;
362 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateG = 223.3967;
363 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).ShomateH = -241.8264;
364 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).NumCarbons = 0.0;
365 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).NumHydrogens = 2.0;
366 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).NumOxygens = 1.0;
367 7 : state.dataGenerator->GasPhaseThermoChemistryData(4).MolecularWeight = 18.02;
368 :
369 : // Argon (Ar) Temp K 298-600
370 :
371 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ConstituentName = "Argon";
372 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ConstituentFormula = "Ar";
373 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).StdRefMolarEnthOfForm = 0.0;
374 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
375 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateA = 20.786;
376 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateB = 2.825911e-07;
377 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateC = -1.464191e-07;
378 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateD = 1.092131e-08;
379 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateE = -3.661371e-08;
380 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateF = -6.19735;
381 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateG = 179.999;
382 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).ShomateH = 0.0;
383 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).NumCarbons = 0.0;
384 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).NumHydrogens = 0.0;
385 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).NumOxygens = 0.0;
386 7 : state.dataGenerator->GasPhaseThermoChemistryData(5).MolecularWeight = 39.95;
387 :
388 : // Hydrogen (H2) Temp K 298-1000
389 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ConstituentName = "Hydrogen";
390 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ConstituentFormula = "H2";
391 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).StdRefMolarEnthOfForm = 0.0;
392 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
393 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateA = 33.066178;
394 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateB = -11.363417;
395 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateC = 11.432816;
396 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateD = -2.772874;
397 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateE = -0.158558;
398 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateF = -9.980797;
399 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateG = 172.707974;
400 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).ShomateH = 0.0;
401 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).NumCarbons = 0.0;
402 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).NumHydrogens = 2.0;
403 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).NumOxygens = 0.0;
404 7 : state.dataGenerator->GasPhaseThermoChemistryData(6).MolecularWeight = 2.02;
405 :
406 : // Methane (CH4) Temp K 298-1300
407 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ConstituentName = "Methane";
408 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ConstituentFormula = "CH4";
409 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).StdRefMolarEnthOfForm = -74.8731; // KJ/mol (Chase 1998)
410 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
411 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateA = -0.703029;
412 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateB = 108.4773;
413 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateC = -42.52157;
414 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateD = 5.862788;
415 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateE = 0.678565;
416 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateF = -76.84376;
417 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateG = 158.7163;
418 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).ShomateH = -74.87310;
419 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).NumCarbons = 1.0;
420 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).NumHydrogens = 4.0;
421 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).NumOxygens = 0.0;
422 7 : state.dataGenerator->GasPhaseThermoChemistryData(7).MolecularWeight = 16.04;
423 :
424 : // Ethane (C2H6)
425 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ConstituentName = "Ethane";
426 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ConstituentFormula = "C2H6";
427 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).StdRefMolarEnthOfForm = -83.8605; // -83.8 !KJ/mol (Pittam and Pilcher 1972)
428 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
429 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateA = -3.03849;
430 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateB = 199.202;
431 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateC = -84.9812;
432 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateD = 11.0348;
433 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateE = 0.30348;
434 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateF = -90.0633;
435 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateG = -999.0;
436 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).ShomateH = -83.8605;
437 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NumCarbons = 2.0;
438 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NumHydrogens = 6.0;
439 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NumOxygens = 0.0;
440 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).MolecularWeight = 30.07;
441 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NASA_A1 = 0.14625388e+01;
442 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NASA_A2 = 0.15494667e-01;
443 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NASA_A3 = 0.05780507e-04;
444 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NASA_A4 = -0.12578319e-07;
445 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NASA_A5 = 0.04586267e-10;
446 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NASA_A6 = -0.11239176e+05;
447 7 : state.dataGenerator->GasPhaseThermoChemistryData(8).NASA_A7 = 0.14432295e+02;
448 :
449 : // Propane (C3H8)
450 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ConstituentName = "Propane";
451 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ConstituentFormula = "C3H8";
452 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).StdRefMolarEnthOfForm = -103.855; // -104.7 !kJ/mol (Pittam and Pilcher 1972)
453 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
454 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateA = -23.1747;
455 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateB = 363.742;
456 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateC = -222.981;
457 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateD = 56.253;
458 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateE = 0.61164;
459 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateF = -109.206;
460 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateG = -999.0;
461 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).ShomateH = -103.855;
462 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NumCarbons = 3.0;
463 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NumHydrogens = 8.0;
464 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NumOxygens = 0.0;
465 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).MolecularWeight = 44.10;
466 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NASA_A1 = 0.08969208e+01;
467 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NASA_A2 = 0.02668986e+00;
468 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NASA_A3 = 0.05431425e-04;
469 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NASA_A4 = -0.02126000e-06;
470 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NASA_A5 = 0.09243330e-10;
471 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NASA_A6 = -0.13954918e+05;
472 7 : state.dataGenerator->GasPhaseThermoChemistryData(9).NASA_A7 = 0.01935533e+03;
473 :
474 : // Butane (C4H10)
475 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ConstituentName = "Butane";
476 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ConstituentFormula = "C4H10";
477 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).StdRefMolarEnthOfForm = -133.218; // -125.6 !kJ/mol (Pittam and Pilcher 1972)
478 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
479 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateA = -5.24343;
480 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateB = 426.442;
481 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateC = -257.955;
482 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateD = 66.535;
483 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateE = -0.26994;
484 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateF = -149.365;
485 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateG = -999.0;
486 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).ShomateH = -133.218;
487 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NumCarbons = 4.0;
488 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NumHydrogens = 10.0;
489 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NumOxygens = 0.0;
490 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).MolecularWeight = 58.12;
491 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NASA_A1 = -0.02256618e+02;
492 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NASA_A2 = 0.05881732e+00;
493 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NASA_A3 = -0.04525782e-03;
494 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NASA_A4 = 0.02037115e-06;
495 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NASA_A5 = -0.04079458e-10;
496 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NASA_A6 = -0.01760233e+06;
497 7 : state.dataGenerator->GasPhaseThermoChemistryData(10).NASA_A7 = 0.03329595e+03;
498 :
499 : // Pentane (C5H12)
500 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ConstituentName = "Pentane";
501 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ConstituentFormula = "C5H12";
502 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).StdRefMolarEnthOfForm = -146.348; // -146.8 !kJ/mol (Good 1970)
503 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
504 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateA = -34.9431;
505 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateB = 576.777;
506 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateC = -338.353;
507 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateD = 76.8232;
508 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateE = 1.00948;
509 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateF = -155.348;
510 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateG = -999.0;
511 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).ShomateH = -146.348;
512 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NumCarbons = 5.0;
513 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NumHydrogens = 12.0;
514 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NumOxygens = 0.0;
515 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).MolecularWeight = 72.15;
516 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NASA_A1 = 0.01877907e+02;
517 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NASA_A2 = 0.04121645e+00;
518 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NASA_A3 = 0.12532337e-04;
519 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NASA_A4 = -0.03701536e-06;
520 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NASA_A5 = 0.15255685e-10;
521 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NASA_A6 = -0.02003815e+06;
522 7 : state.dataGenerator->GasPhaseThermoChemistryData(11).NASA_A7 = 0.01877256e+03;
523 :
524 : // Hexane (C6H14)
525 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ConstituentName = "Hexane";
526 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ConstituentFormula = "C6H14";
527 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).StdRefMolarEnthOfForm = -166.966; // -167.2 !kJ/mol (Prosen and Rossini 1945)
528 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
529 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateA = -46.7786;
530 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateB = 711.187;
531 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateC = -438.39;
532 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateD = 103.784;
533 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateE = 1.23887;
534 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateF = -176.813;
535 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateG = -999.0;
536 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).ShomateH = -166.966;
537 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NumCarbons = 6.0;
538 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NumHydrogens = 14.0;
539 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NumOxygens = 0.0;
540 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).MolecularWeight = 86.18;
541 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NASA_A1 = 0.01836174e+02;
542 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NASA_A2 = 0.05098461e+00;
543 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NASA_A3 = 0.12595857e-04;
544 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NASA_A4 = -0.04428362e-06;
545 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NASA_A5 = 0.01872237e-09;
546 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NASA_A6 = -0.02292749e+06;
547 7 : state.dataGenerator->GasPhaseThermoChemistryData(12).NASA_A7 = 0.02088145e+03;
548 :
549 : // Methanol (CH3OH)
550 : // No Shomate coefficients???
551 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ConstituentName = "Methanol";
552 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ConstituentFormula = "CH3OH";
553 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).StdRefMolarEnthOfForm = -201.102; // -201.0 !kJ/mol (Hine and Arata 1976)
554 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
555 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateA = 14.1952;
556 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateB = 97.7218;
557 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateC = -9.73279;
558 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateD = -12.8461;
559 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateE = 0.15819;
560 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateF = -209.037;
561 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateG = -999.0;
562 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).ShomateH = -201.102;
563 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NumCarbons = 1.0;
564 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NumHydrogens = 4.0;
565 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NumOxygens = 1.0;
566 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).MolecularWeight = 32.04;
567 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NASA_A1 = 0.02660115e+02;
568 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NASA_A2 = 0.07341508e-01;
569 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NASA_A3 = 0.07170050e-04;
570 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NASA_A4 = -0.08793194e-07;
571 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NASA_A5 = 0.02390570e-10;
572 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NASA_A6 = -0.02535348e+06;
573 7 : state.dataGenerator->GasPhaseThermoChemistryData(13).NASA_A7 = 0.11232631e+02;
574 :
575 : // Ethanol (C2H5OH)
576 : // No Shomate coefficients???
577 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ConstituentName = "Ethanol";
578 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ConstituentFormula = "C2H5OH";
579 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).StdRefMolarEnthOfForm = -234.441; // -235.3 !kJ/mol (Green 1960)
580 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ThermoMode = DataGenerators::ThermodynamicMode::NISTShomate;
581 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateA = -8.87256;
582 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateB = 282.389;
583 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateC = -178.85;
584 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateD = 46.3528;
585 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateE = 0.48364;
586 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateF = -241.239;
587 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateG = -999.0;
588 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).ShomateH = -234.441;
589 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NumCarbons = 2.0;
590 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NumHydrogens = 6.0;
591 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NumOxygens = 1.0;
592 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).MolecularWeight = 46.07;
593 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NASA_A1 = 0.18461027e+01;
594 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NASA_A2 = 0.20475008e-01;
595 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NASA_A3 = 0.39904089e-05;
596 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NASA_A4 = -0.16585986e-07;
597 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NASA_A5 = 0.73090440e-11;
598 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NASA_A6 = -0.29663086e+05;
599 7 : state.dataGenerator->GasPhaseThermoChemistryData(14).NASA_A7 = 0.17289993e+02;
600 :
601 7 : if (state.dataGenerator->FuelSupply(FuelSupplyNum).FuelTypeMode == DataGenerators::FuelMode::GaseousConstituents) {
602 : // now calculate LHV of fuel for entire simulation
603 :
604 : // sum over each constituent
605 7 : O2Stoic = 0.0;
606 7 : CO2ProdStoic = 0.0;
607 7 : H2OProdStoic = 0.0;
608 7 : CO2dataID = 1; // hard-coded above
609 7 : WaterDataID = 4; // hard-coded above
610 : // Loop over fuel constituents and do one-time setup
611 42 : for (i = 1; i <= state.dataGenerator->FuelSupply(FuelSupplyNum).NumConstituents; ++i) {
612 :
613 35 : thisName = state.dataGenerator->FuelSupply(FuelSupplyNum).ConstitName(i);
614 35 : thisGasID =
615 35 : UtilityRoutines::FindItem(thisName, state.dataGenerator->GasPhaseThermoChemistryData, &GasPropertyDataStruct::ConstituentName);
616 35 : state.dataGenerator->FuelSupply(FuelSupplyNum).GasLibID(i) = thisGasID;
617 :
618 35 : if (thisGasID == 0) {
619 0 : ShowSevereError(state, "Fuel constituent not found in thermochemistry data: " + thisName);
620 0 : ErrorsFound = true;
621 : }
622 :
623 : // for this fuel mixture, figure stoichiometric oxygen requirement
624 70 : O2Stoic += state.dataGenerator->FuelSupply(FuelSupplyNum).ConstitMolalFract(i) *
625 70 : (state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumCarbons +
626 70 : state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumHydrogens / 4.0 -
627 35 : state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumOxygens / 2.0);
628 : // for this fuel mixture, figure stoichiometric Carbon Dioxide in Product Gases
629 :
630 70 : CO2ProdStoic += state.dataGenerator->FuelSupply(FuelSupplyNum).ConstitMolalFract(i) *
631 35 : state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumCarbons;
632 :
633 105 : H2OProdStoic += state.dataGenerator->FuelSupply(FuelSupplyNum).ConstitMolalFract(i) *
634 70 : state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumHydrogens / 2.0;
635 : }
636 :
637 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).StoicOxygenRate = O2Stoic;
638 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).CO2ProductGasCoef = CO2ProdStoic;
639 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).H2OProductGasCoef = H2OProdStoic;
640 :
641 : // Calculate LHV for an NdotFuel of 1.0
642 7 : LHVfuel = 0.0;
643 42 : for (i = 1; i <= state.dataGenerator->FuelSupply(FuelSupplyNum).NumConstituents; ++i) {
644 35 : thisGasID = state.dataGenerator->FuelSupply(FuelSupplyNum).GasLibID(i);
645 35 : if (state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumHydrogens == 0.0) {
646 12 : LHVi = 0.0;
647 : } else {
648 69 : LHVi = state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).StdRefMolarEnthOfForm -
649 46 : state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumCarbons *
650 23 : state.dataGenerator->GasPhaseThermoChemistryData(CO2dataID).StdRefMolarEnthOfForm -
651 46 : (state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumHydrogens / 2.0) *
652 23 : state.dataGenerator->GasPhaseThermoChemistryData(WaterDataID).StdRefMolarEnthOfForm;
653 : }
654 35 : LHVfuel += LHVi * state.dataGenerator->FuelSupply(FuelSupplyNum).ConstitMolalFract(i);
655 : }
656 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).LHV = LHVfuel;
657 :
658 : // Calculate HHV for an NdotFuel of 1.0
659 7 : HHVfuel = 0.0;
660 42 : for (i = 1; i <= state.dataGenerator->FuelSupply(FuelSupplyNum).NumConstituents; ++i) {
661 35 : thisGasID = state.dataGenerator->FuelSupply(FuelSupplyNum).GasLibID(i);
662 35 : if (state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumHydrogens == 0.0) {
663 12 : HHVi = 0.0;
664 : } else {
665 69 : HHVi = state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).StdRefMolarEnthOfForm -
666 46 : state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumCarbons *
667 46 : state.dataGenerator->GasPhaseThermoChemistryData(CO2dataID).StdRefMolarEnthOfForm -
668 46 : (state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumHydrogens / 2.0) *
669 23 : state.dataGenerator->GasPhaseThermoChemistryData(WaterDataID).StdRefMolarEnthOfForm +
670 46 : (state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).NumHydrogens / 2.0) *
671 23 : (state.dataGenerator->GasPhaseThermoChemistryData(WaterDataID).StdRefMolarEnthOfForm + 285.8304);
672 : }
673 35 : HHVfuel += HHVi * state.dataGenerator->FuelSupply(FuelSupplyNum).ConstitMolalFract(i);
674 : }
675 :
676 : // Calculate Molecular Weight for this fuel
677 7 : MWfuel = 0.0;
678 42 : for (i = 1; i <= state.dataGenerator->FuelSupply(FuelSupplyNum).NumConstituents; ++i) {
679 35 : thisGasID = state.dataGenerator->FuelSupply(FuelSupplyNum).GasLibID(i);
680 70 : MWfuel += state.dataGenerator->FuelSupply(FuelSupplyNum).ConstitMolalFract(i) *
681 35 : state.dataGenerator->GasPhaseThermoChemistryData(thisGasID).MolecularWeight;
682 : }
683 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).MW = MWfuel;
684 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).KmolPerSecToKgPerSec = MWfuel; // TODO check this, guessing on conversion...
685 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).HHV = 1000000.0 * HHVfuel / MWfuel; // (1000/k) (1000/k) (kJ/mol)/(g/mol) = J/kg
686 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).LHVJperkg =
687 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).LHV * 1000000.0 / state.dataGenerator->FuelSupply(FuelSupplyNum).MW;
688 :
689 0 : } else if (state.dataGenerator->FuelSupply(FuelSupplyNum).FuelTypeMode == DataGenerators::FuelMode::GenericLiquid) {
690 0 : state.dataGenerator->FuelSupply(FuelSupplyNum).LHV = state.dataGenerator->FuelSupply(FuelSupplyNum).LHVliquid *
691 0 : state.dataGenerator->FuelSupply(FuelSupplyNum).MW /
692 : 1000000.0; // J/kg * g/mol (k/1000) (k/10000)
693 :
694 : } else {
695 : }
696 :
697 : // report Heating Values in EIO.
698 7 : print(state.files.eio,
699 : "! <Fuel Supply>, Fuel Supply Name, Lower Heating Value [J/kmol], Lower Heating Value [kJ/kg], Higher "
700 7 : "Heating Value [KJ/kg], Molecular Weight [g/mol] \n");
701 : static constexpr std::string_view Format_501(" Fuel Supply, {},{:13.6N},{:13.6N},{:13.6N},{:13.6N}\n");
702 14 : print(state.files.eio,
703 : Format_501,
704 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).Name,
705 14 : state.dataGenerator->FuelSupply(FuelSupplyNum).LHV * 1000000.0,
706 14 : state.dataGenerator->FuelSupply(FuelSupplyNum).LHVJperkg / 1000.0,
707 14 : state.dataGenerator->FuelSupply(FuelSupplyNum).HHV / 1000.0,
708 7 : state.dataGenerator->FuelSupply(FuelSupplyNum).MW);
709 7 : }
710 :
711 : } // namespace GeneratorFuelSupply
712 :
713 2313 : } // namespace EnergyPlus
|