-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start on test_kpp_to_micm program. * Start on CMakeLists for test_kpp_to_micm. * Added kpp test subdir. * Renamed test. * Set config path relative to build dir. * Added kpp_to_micm.py generated JSON. * Copy kpp_to_micm JSON to builds/configs for testing. * Check ConfigParseStatus. * Include regression/RosenbrockChapman/chapman_ode_solver. * Instantiate micm::RosenbrockSolver. * Get solver state and initialize T and p. * Added initial concentrations for Chapman test from Seinfeld and Pandis. * Added solver.Solve iteration. * Added --to_si_units option to kpp_to_micm.py. * Updated Chapman reactions JSON to SI units. * Use SI units. * Use SI units. * Added print_state to test_kpp_to_micm. * Improved print_state format. * Made a KPP config for Chapman without NOx, for comparison to RosenbrockChapman. * Removed NOx from Chapman KPP test. * Added M to print_state. * Set photolysis rates. * Print custom param labels. * Use state.SetCustomRateParameter to set photolysis rates. * Use state.SetConcentration for each species. * Changed print precision to 3 decimal places. * Changed print precision to 3 decimal places. * Set initial O3 concentration to 0. * Cleaned up comments. * Change to SI conversion factor to (N_Avogradro 1e-6)^(N_reactants-1).
- Loading branch information
Showing
8 changed files
with
341 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#EQUATIONS { Small Stratospheric Mechanism } | ||
|
||
<R1> O2 + hv = 2O : (2.643E-10) * SUN*SUN*SUN; | ||
<R2> O + O2 = O3 : (8.018E-17); | ||
<R3> O3 + hv = O + O2 : (6.120E-04) * SUN; | ||
<R4> O + O3 = 2O2 : (1.576E-15); | ||
<R5> O3 + hv = O1D + O2 : (1.070E-03) * SUN*SUN; | ||
<R6> O1D + M = O + M : (7.110E-11); | ||
<R7> O1D + O3 = 2O2 : (1.200E-10); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#INCLUDE atoms.kpp | ||
|
||
#DEFVAR | ||
O = O; { Oxygen atomic ground state } | ||
O1D = O; { Oxygen atomic excited state } | ||
O3 = O + O + O; { Ozone } | ||
|
||
#DEFFIX | ||
M = O + O + N + N; { Atmospheric generic molecule } | ||
O2 = O + O; { Molecular oxygen } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
################################################################################ | ||
# Test utilities | ||
|
||
include(test_util) | ||
|
||
################################################################################ | ||
# Tests | ||
|
||
if(ENABLE_JSON) | ||
create_standard_test(NAME kpp_to_micm SOURCES test_kpp_to_micm.cpp) | ||
endif() | ||
|
||
################################################################################ | ||
|
||
################################################################################ | ||
# Copy test data | ||
|
||
add_custom_target(copy_kpp_configs ALL ${CMAKE_COMMAND} -E copy_directory | ||
${CMAKE_CURRENT_SOURCE_DIR}/configs ${CMAKE_BINARY_DIR}/configs) | ||
|
||
################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
{ | ||
"camp-data": [ | ||
{ | ||
"name": "Chapman", | ||
"type": "MECHANISM", | ||
"reactions": [ | ||
{ | ||
"type": "PHOTOLYSIS", | ||
"reactants": { | ||
"O2": {} | ||
}, | ||
"products": { | ||
"O": { | ||
"yield": 2.0 | ||
} | ||
}, | ||
"MUSICA name": "R1" | ||
}, | ||
{ | ||
"type": "ARRHENIUS", | ||
"A": 48.28552461368, | ||
"reactants": { | ||
"O": {}, | ||
"O2": {} | ||
}, | ||
"products": { | ||
"O3": {} | ||
}, | ||
"MUSICA name": "R2" | ||
}, | ||
{ | ||
"type": "PHOTOLYSIS", | ||
"reactants": { | ||
"O3": {} | ||
}, | ||
"products": { | ||
"O": {}, | ||
"O2": {} | ||
}, | ||
"MUSICA name": "R3" | ||
}, | ||
{ | ||
"type": "ARRHENIUS", | ||
"A": 949.089383776, | ||
"reactants": { | ||
"O": {}, | ||
"O3": {} | ||
}, | ||
"products": { | ||
"O2": { | ||
"yield": 2.0 | ||
} | ||
}, | ||
"MUSICA name": "R4" | ||
}, | ||
{ | ||
"type": "PHOTOLYSIS", | ||
"reactants": { | ||
"O3": {} | ||
}, | ||
"products": { | ||
"O1D": {}, | ||
"O2": {} | ||
}, | ||
"MUSICA name": "R5" | ||
}, | ||
{ | ||
"type": "ARRHENIUS", | ||
"A": 42817420.803600006, | ||
"reactants": { | ||
"O1D": {}, | ||
"M": {} | ||
}, | ||
"products": { | ||
"O": {}, | ||
"M": {} | ||
}, | ||
"MUSICA name": "R6" | ||
}, | ||
{ | ||
"type": "ARRHENIUS", | ||
"A": 72265689.12, | ||
"reactants": { | ||
"O1D": {}, | ||
"O3": {} | ||
}, | ||
"products": { | ||
"O2": { | ||
"yield": 2.0 | ||
} | ||
}, | ||
"MUSICA name": "R7" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"camp-data": [ | ||
{ | ||
"name": "M", | ||
"type": "CHEM_SPEC", | ||
"tracer type": "CONSTANT" | ||
}, | ||
{ | ||
"name": "O2", | ||
"type": "CHEM_SPEC", | ||
"tracer type": "CONSTANT" | ||
}, | ||
{ | ||
"name": "O", | ||
"type": "CHEM_SPEC", | ||
"absolute tolerance": 1e-12 | ||
}, | ||
{ | ||
"name": "O1D", | ||
"type": "CHEM_SPEC", | ||
"absolute tolerance": 1e-12 | ||
}, | ||
{ | ||
"name": "O3", | ||
"type": "CHEM_SPEC", | ||
"absolute tolerance": 1e-12 | ||
} | ||
] | ||
} |
Oops, something went wrong.