Skip to content

Instantly share code, notes, and snippets.

View speth's full-sized avatar

Ray Speth speth

View GitHub Profile
@speth
speth / dummy_surf.py
Last active March 14, 2023 18:39
Test problem for reactor Jacobian with surface species
import cantera as ct
import numpy as np
np.set_printoptions(precision=2, linewidth=144)
surf = ct.Interface('dummysurf2.yml', 'surf')
surf2 = ct.Interface('dummysurf2.yml', 'surf2')
gas = surf.adjacent['gas']
gas.TPX = 1000, 2e5, 'A:0.6, B:0.3, C:0.2, D:0.1'
surf.coverages = 'A(S):0.1, B(S):0.2, C(S):0.3, D(S):0.2, (S):0.2'
@speth
speth / build-fc35-b4616ef321.txt
Created April 4, 2022 14:29
Cantera FC35 build logs
scons: Reading SConscript files ...
INFO: SCons is using the following Python interpreter: /usr/bin/python3
INFO: Building Cantera from git commit 'b4616ef32'
INFO: Configuration variables read from 'cantera.conf' and command line:
prefix = '/usr'
libdirname = 'lib64'
python_package = 'full'
f90_interface = 'y'
system_eigen = 'y'
system_fmt = 'y'
@speth
speth / sofc.yaml
Created March 12, 2019 18:46
YAML electrochemical surface mechanism
units: {length: cm, quantity: mol, activation-energy: kJ/mol}
phases:
- name: gas
thermo: ideal-gas
elements: [H, O, N]
species:
- gri30.yaml/species: [H2, H2O, N2, O2]
transport: mixture-averaged
state:
@speth
speth / ptcombust.yaml
Created March 12, 2019 18:45
YAML surface mechanism
units: {length: cm, quantity: mol, activation-energy: J/mol}
phases:
- name: gas
thermo: ideal-gas
elements: [O, H, C, N, Ar]
species:
- gri30.yaml/species: [H2, H, O, O2, OH, H2O, HO2, H2O2, C, CH, CH2, CH2(S),
CH3, CH4, CO, CO2, HCO, CH2O, CH2OH, CH3O, CH3OH, C2H, C2H2, C2H3,
C2H4, C2H5, C2H6, HCCO, CH2CO, HCCOH, AR, N2]
@speth
speth / RMG_PAH.yaml
Created March 12, 2019 18:42
YAML conversion of an RMG-generated mechanism
This file has been truncated, but you can view the full file.
units: {length: cm, time: s, quantity: mol, activation-energy: kcal/mol}
phases:
- name: gas
thermo: ideal-gas
elements: [H, D, T, C, Ci, O, Oi, N, Ne, Ar, He, Si, S, Cl]
species: [Ar, Ne, N2, He, O2, CO, CO2, CH4, C2H2-1, O, H, HO, HO2, H2,
H2O, H2O2, C, CH, CHO, CHO2-1, CHO2-2, CHO3, CHO4, CH2-1, CH2-2, CH2O,
CH2O2, CH3, CH3O-1, CH3O-2, CH3O2-1, CH3O2-2, CH4O, C2H, C2HO, C2HO2,
C2H2-2, C2H2O-1, C2H2O-2, C2H2O-3, C2H3, C2H3O-1, C2H3O-2, C2H3O-3,
@speth
speth / equation-of-state.yaml
Created March 9, 2019 22:00
Reorganization of YAML species entries to replace "standard-state" entry
PROPOSED: |
* a dedicated section for equation of state information
* This section is optional if the phase doesn't need this information, e.g.
the ideal gas phase which requires an ideal gas EOS for all species
example-species:
- name: KCl(s)
composition: {K: 1, Cl: 1}
thermo:
model: NASA7
@speth
speth / gri30.yaml
Last active August 20, 2022 13:23
description: |-
GRI-Mech Version 3.0 3/12/99 CHEMKIN-II format
See README30 file at anonymous FTP site unix.sri.com, directory gri;
WorldWideWeb home page http://www.me.berkeley.edu/gri_mech/ or
through http://www.gri.org , under 'Basic Research',
for additional information, contacts, and disclaimer
units: {length: cm, time: s, quantity: mol, activation-energy: cal/mol}
phases:
@speth
speth / jupyterhub
Last active August 17, 2018 19:48 — forked from kose-y/jupyterhub
Jupyterhub init.d script. Put this script in /etc/init.d
#!/bin/bash
### BEGIN INIT INFO
# Provides:
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start daemon at boot time
# Description: Enable service provided by daemon.
### END INIT INFO
@speth
speth / ch4_ion.cti
Created April 12, 2017 23:13
faster IonFlow test case
units(length='cm', time='s', quantity='mol', act_energy='cal/mol')
ideal_gas(name='gas',
elements='O H C N E',
species=['''gri30: H2 H O O2 OH H2O HO2
H2O2 C CH CH2 CH2(S) CH3 CH4
CO CO2 HCO CH2O CH3O N2''',
'HCO+ H3O+ E'],
reactions=['gri30: all', 'all'],
transport='Mix',
@speth
speth / 01 debug=stacktrace
Last active November 29, 2016 03:27
SCons MinGW Shared library issue
scons: Reading SConscript files ...
Traceback (most recent call last):
File "c:\src\Canopy\User\Lib\site-packages\scons-2.5.1\SCons\Script\Main.py", line 1346, in main
_exec_main(parser, values)
File "c:\src\Canopy\User\Lib\site-packages\scons-2.5.1\SCons\Script\Main.py", line 1309, in _exec_main
_main(parser)
File "c:\src\Canopy\User\Lib\site-packages\scons-2.5.1\SCons\Script\Main.py", line 994, in _main
SCons.Script._SConscript._SConscript(fs, script)
File "c:\src\Canopy\User\Lib\site-packages\scons-2.5.1\SCons\Script\SConscript.py", line 250, in _SConscript
exec _file_ in call_stack[-1].globals