Skip to content

Commit 589bc3b

Browse files
committed
added example info; swapped legacy CLI example
1 parent 781f8b8 commit 589bc3b

File tree

5 files changed

+36
-403
lines changed

5 files changed

+36
-403
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ with:
105105
The Python binding to CEA has been successfully compiled and executed on macOS,
106106
Linux, and Windows systems.
107107

108+
## Examples
109+
110+
Legacy CLI (classic `.inp` deck - run this from the `build/source` directory):
111+
112+
./cea ../samples/example1
113+
114+
Python example (runs the H2/O2 case after installing the Python bindings):
115+
116+
python source/bind/python/cea/samples/h2_02.py
117+
108118

109119
## Manual Database Generation
110120
CEA requires thermodynamic and transport property databases. When using the

samples/example1.inp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EXAMPLE 1:
2+
# (a) Assigned-temperature-and-pressure problem (tp).
3+
# (b) Reactants are H2 and Air. Since "exploded" formulas are not given,
4+
# these formulas will be taken from the thermodynamic data library,
5+
# thermo.lib.
6+
# (c) Calculations are for two equivalence ratios (r,eq.ratio =1,1.5).
7+
# (d) Assigned pressures are 1, 0.1, and 0.01 atm (p(atm)=1,.1,.01).
8+
# (e) Assigned temperatures are 3000 and 2000 K (t(k)=3000,2000).
9+
# (f) 'only' dataset is used to restrict possible products.
10+
# (g) Energy units in the final tables are in calories (calories).
11+
12+
# 'problem' dataset:
13+
problem case=Example-1 tp p(atm)=1,.1,.01,t(k)=3000,2000,
14+
r,eq.ratio=1,1.5
15+
# 'reactants' dataset:
16+
reac
17+
fuel= H2 moles = 1.
18+
oxid= Air moles = 1.
19+
# 'only' dataset:
20+
only Ar C CO CO2 H H2 H2O HNO HO2 HNO2 HNO3 N NH
21+
NO N2 N2O3 O O2 OH O3
22+
# 'output' dataset:
23+
output calories
24+
# 'end' dataset
25+
end

0 commit comments

Comments
 (0)