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).
19const std::array<NASA7::SpeciesData, 7> species_data = {{
20 {"H2",
21 2.016e-3,
22 200.0,
23 1000.0,
24 3500.0,
25 {2.34433112,
26 7.98052075e-3,
27 -1.94781510e-5,
28 2.01572094e-8,
29 -7.37611761e-12,
30 -9.17935173e2,
31 6.83010238e-1},
32 {3.33727920,
33 -4.94024731e-5,
34 4.99456778e-7,
35 -1.79566394e-10,
36 2.00255376e-14,
37 -9.50158922e2,
38 -3.20502331}},
39 {"O2",
40 31.998e-3,
41 200.0,
42 1000.0,
43 3500.0,
44 {3.78245636,
45 -2.99673416e-3,
46 9.84730201e-6,
47 -9.68129509e-9,
48 3.24372837e-12,
49 -1.06394356e3,
50 3.65767573},
51 {3.28253784,
52 1.48308754e-3,
53 -7.57966669e-7,
54 2.09470555e-10,
55 -2.16717794e-14,
56 -1.08845772e3,
57 5.45323129}},
58 {"H2O",
59 18.015e-3,
60 200.0,
61 1000.0,
62 3500.0,
63 {4.19864056,
64 -2.03643410e-3,
65 6.52040211e-6,
66 -5.48797062e-9,
67 1.77197817e-12,
68 -3.02937267e4,
69 -8.49032208e-1},
70 {3.03399249,
71 2.17691804e-3,
72 -1.64072518e-7,
73 -9.70419870e-11,
74 1.68200992e-14,
75 -3.00042971e4,
76 4.96677010}},
77 {"CH4",
78 16.043e-3,
79 200.0,
80 1000.0,
81 3500.0,
82 {5.14987613,
83 -1.36709788e-2,
84 4.91800599e-5,
85 -4.84743026e-8,
86 1.66693956e-11,
87 -1.02466476e4,
88 -4.64130376},
89 {7.48514950e-2,
90 1.33909467e-2,
91 -5.73285809e-6,
92 1.22292535e-9,
93 -1.01815230e-13,
94 -9.46834459e3,
95 18.4373180}},
96 {"CO",
97 28.010e-3,
98 200.0,
99 1000.0,
100 3500.0,
101 {3.57953347,
102 -6.10353680e-4,
103 1.01681433e-6,
104 9.07005884e-10,
105 -9.04424499e-13,
106 -1.43440860e4,
107 3.50840928},
108 {2.71518561,
109 2.06252743e-3,
110 -9.98825771e-7,
111 2.30053008e-10,
112 -2.03647716e-14,
113 -1.41518724e4,
114 7.81868772}},
115 {"CO2",
116 44.009e-3,
117 200.0,
118 1000.0,
119 3500.0,
120 {2.35677352,
121 8.98459677e-3,
122 -7.12356269e-6,
123 2.45919022e-9,
124 -1.43699548e-13,
125 -4.83719697e4,
126 9.90105222},
127 {3.85746029,
128 4.41437026e-3,
129 -2.21481404e-6,
130 5.23490188e-10,
131 -4.72084164e-14,
132 -4.87591660e4,
133 2.27163806}},
134 {"N2",
135 28.014e-3,
136 300.0,
137 1000.0,
138 5000.0,
139 {3.29867700,
140 1.40824040e-3,
141 -3.96322200e-6,
142 5.64151500e-9,
143 -2.44485400e-12,
144 -1.02089990e3,
145 3.95037200},
146 {2.92664000,
147 1.48797680e-3,
148 -5.68476000e-7,
149 1.00970380e-10,
150 -6.75335100e-15,
151 -9.22797700e2,
152 5.98052800}},
153}};
154}
155
156namespace NASA7
157{
158const SpeciesData &
159speciesData(const std::string & name)
160{
161 for (const auto & data : species_data)
162 if (data.name == name)
163 return data;
164
165 mooseError("Unknown NASA-7 species '", name, "'.");
166}
167
168std::string
170{
171 std::vector<std::string> names;
172 for (const auto & data : species_data)
173 names.push_back(data.name);
174 return MooseUtils::join(names, " ");
175}
176}
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.