https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NASA7Polynomials.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#include "NASA7Polynomials.h"
11#include "MooseError.h"
12#include "MooseUtils.h"
13
14namespace
15{
16// GRI-Mech 3.0 data as distributed with Cantera 3.2.0 (gri30.yaml), with the source precision and
17// temperature ranges. The molar masses are the ones Cantera computes from its atomic weights
18// (H 1.008, C 12.011, N 14.007, O 15.999 g/mol).
19//
20// GRI-Mech 3.0 has no He, Kr, or Xe, so the noble gases take the data of McBride et al. (1993) as
21// distributed with Cantera 3.2.0 (nasa_gas.yaml), with Cantera's atomic weights as molar masses.
22// Their heat capacity is cp/R = 5/2, except for small corrections for Xe. He, Ar, and Kr have a
23// single polynomial, given here for both ranges. That data has a reference pressure of 1 bar, so
24// ln(1.01325) is subtracted from the entropy constants to refer them to reference_pressure.
25const std::array<NASA7::SpeciesData, 11> species_data = {{
26 {"H2",
27 2.016e-3,
28 200.0,
29 1000.0,
30 3500.0,
31 {2.34433112,
32 7.98052075e-3,
33 -1.94781510e-5,
34 2.01572094e-8,
35 -7.37611761e-12,
36 -9.17935173e2,
37 6.83010238e-1},
38 {3.33727920,
39 -4.94024731e-5,
40 4.99456778e-7,
41 -1.79566394e-10,
42 2.00255376e-14,
43 -9.50158922e2,
44 -3.20502331}},
45 {"O2",
46 31.998e-3,
47 200.0,
48 1000.0,
49 3500.0,
50 {3.78245636,
51 -2.99673416e-3,
52 9.84730201e-6,
53 -9.68129509e-9,
54 3.24372837e-12,
55 -1.06394356e3,
56 3.65767573},
57 {3.28253784,
58 1.48308754e-3,
59 -7.57966669e-7,
60 2.09470555e-10,
61 -2.16717794e-14,
62 -1.08845772e3,
63 5.45323129}},
64 {"H2O",
65 18.015e-3,
66 200.0,
67 1000.0,
68 3500.0,
69 {4.19864056,
70 -2.03643410e-3,
71 6.52040211e-6,
72 -5.48797062e-9,
73 1.77197817e-12,
74 -3.02937267e4,
75 -8.49032208e-1},
76 {3.03399249,
77 2.17691804e-3,
78 -1.64072518e-7,
79 -9.70419870e-11,
80 1.68200992e-14,
81 -3.00042971e4,
82 4.96677010}},
83 {"CH4",
84 16.043e-3,
85 200.0,
86 1000.0,
87 3500.0,
88 {5.14987613,
89 -1.36709788e-2,
90 4.91800599e-5,
91 -4.84743026e-8,
92 1.66693956e-11,
93 -1.02466476e4,
94 -4.64130376},
95 {7.48514950e-2,
96 1.33909467e-2,
97 -5.73285809e-6,
98 1.22292535e-9,
99 -1.01815230e-13,
100 -9.46834459e3,
101 18.4373180}},
102 {"CO",
103 28.010e-3,
104 200.0,
105 1000.0,
106 3500.0,
107 {3.57953347,
108 -6.10353680e-4,
109 1.01681433e-6,
110 9.07005884e-10,
111 -9.04424499e-13,
112 -1.43440860e4,
113 3.50840928},
114 {2.71518561,
115 2.06252743e-3,
116 -9.98825771e-7,
117 2.30053008e-10,
118 -2.03647716e-14,
119 -1.41518724e4,
120 7.81868772}},
121 {"CO2",
122 44.009e-3,
123 200.0,
124 1000.0,
125 3500.0,
126 {2.35677352,
127 8.98459677e-3,
128 -7.12356269e-6,
129 2.45919022e-9,
130 -1.43699548e-13,
131 -4.83719697e4,
132 9.90105222},
133 {3.85746029,
134 4.41437026e-3,
135 -2.21481404e-6,
136 5.23490188e-10,
137 -4.72084164e-14,
138 -4.87591660e4,
139 2.27163806}},
140 {"N2",
141 28.014e-3,
142 300.0,
143 1000.0,
144 5000.0,
145 {3.29867700,
146 1.40824040e-3,
147 -3.96322200e-6,
148 5.64151500e-9,
149 -2.44485400e-12,
150 -1.02089990e3,
151 3.95037200},
152 {2.92664000,
153 1.48797680e-3,
154 -5.68476000e-7,
155 1.00970380e-10,
156 -6.75335100e-15,
157 -9.22797700e2,
158 5.98052800}},
159 {"He",
160 4.002602e-3,
161 200.0,
162 1000.0,
163 6000.0,
164 {2.5, 0.0, 0.0, 0.0, 0.0, -745.375, 0.915561737},
165 {2.5, 0.0, 0.0, 0.0, 0.0, -745.375, 0.915561737}},
166 {"Ar",
167 39.95e-3,
168 200.0,
169 1000.0,
170 6000.0,
171 {2.5, 0.0, 0.0, 0.0, 0.0, -745.375, 4.36651192},
172 {2.5, 0.0, 0.0, 0.0, 0.0, -745.375, 4.36651192}},
173 {"Kr",
174 83.798e-3,
175 200.0,
176 1000.0,
177 6000.0,
178 {2.5, 0.0, 0.0, 0.0, 0.0, -745.375, 5.47779352},
179 {2.5, 0.0, 0.0, 0.0, 0.0, -745.375, 5.47779352}},
180 {"Xe",
181 131.293e-3,
182 200.0,
183 1000.0,
184 6000.0,
185 {2.5, -8.9914133e-14, 2.5219686e-16, -2.92186662e-19, 1.18949218e-22, -745.375, 6.15125694},
186 {2.50005322,
187 -1.05136544e-7,
188 6.75326897e-11,
189 -1.70944909e-14,
190 1.47681049e-18,
191 -745.394186,
192 6.15096599}},
193}};
194}
195
196namespace NASA7
197{
198const SpeciesData &
199speciesData(const std::string & name)
200{
201 for (const auto & data : species_data)
202 if (data.name == name)
203 return data;
204
205 mooseError("Unknown NASA-7 species '", name, "'.");
206}
207
208std::string
210{
211 std::vector<std::string> names;
212 for (const auto & data : species_data)
213 names.push_back(data.name);
214 return MooseUtils::join(names, " ");
215}
216}
void mooseError(Args &&... args)
const std::string name
Definition Setup.h:21
Standard-state thermodynamic properties of ideal-gas species from NASA 7-coefficient polynomials.
const SpeciesData & speciesData(const std::string &name)
Data of a built-in species.
std::string speciesNames()
Names of the built-in species, separated by spaces.