Skip to content

Commit 0f536f0

Browse files
committed
Add thermo_models.jl, refactor and fix bugs
1 parent e45b656 commit 0f536f0

27 files changed

+817
-174
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
runs-on: ubuntu-latest
4444
permissions:
4545
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
46+
pull-requests: read
4647
contents: write
4748
statuses: write
4849
steps:

.github/workflows/TagBot.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ on:
77
inputs:
88
lookback:
99
default: "3"
10-
permissions:
11-
actions: read
12-
checks: read
13-
contents: write
14-
deployments: read
15-
issues: read
16-
discussions: read
17-
packages: read
18-
pages: read
19-
pull-requests: read
20-
repository-projects: read
21-
security-events: read
22-
statuses: read
10+
# permissions:
11+
# actions: read
12+
# checks: read
13+
# contents: write
14+
# deployments: read
15+
# issues: read
16+
# discussions: read
17+
# packages: read
18+
# pages: read
19+
# pull-requests: read
20+
# repository-projects: read
21+
# security-events: read
22+
# statuses: read
2323
jobs:
2424
TagBot:
2525
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ aggregate_state: AS_AQUEOUS
141141
ΔfH⁰ = -1.417243319379807e6 - 104.60063934326T ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
142142
S⁰ = 616.8922592448816 - 104.60063934326log(T) ♢ unit=[m² kg s⁻² K⁻¹ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
143143
ΔfG⁰ = -1.27295402135706e6 - 721.4928985881417T + 104.60063934326T*log(T) ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
144-
Vm = 4.700633883476301e-6 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
144+
V⁰ = 4.700633883476301e-6 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
145145

146146
julia> Ca²⁺ = dict_species["Ca+2"]
147147
Species{Int64}
@@ -159,7 +159,7 @@ aggregate_state: AS_AQUEOUS
159159
ΔfH⁰ = -533849.4518936157 - 30.922515869141T ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
160160
S⁰ = 119.70002369348362 - 30.922515869141log(T) ♢ unit=[m² kg s⁻² K⁻¹ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
161161
ΔfG⁰ = -560411.1568393706 - 150.6225395626246T + 30.922515869141T*log(T) ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
162-
Vm = -1.8438742160797e-5 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
162+
V⁰ = -1.8438742160797e-5 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
163163

164164
julia> SO₄²⁻ = dict_species["SO4-2"]
165165
Species{Int64}
@@ -177,7 +177,7 @@ aggregate_state: AS_AQUEOUS
177177
ΔfH⁰ = -830362.0492202746 - 266.09072875977T ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
178178
S⁰ = 1534.9056613400478 - 266.09072875977log(T) ♢ unit=[m² kg s⁻² K⁻¹ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
179179
ΔfG⁰ = -659510.4812841403 - 1800.9963900998177T + 266.09072875977T*log(T) ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
180-
Vm = 1.2917655706406e-5 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
180+
V⁰ = 1.2917655706406e-5 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
181181

182182
julia> r = Reaction([CaSO₄, Ca²⁺, SO₄²⁻])
183183
equation: CaSO₄@ = Ca²⁺ + SO₄²⁻
@@ -188,7 +188,7 @@ properties: ΔrCp⁰ = -192.412605285651 ♢ unit=[m² kg s⁻² K⁻¹ mol⁻¹
188188
ΔrS⁰ = 1037.7134257886498 - 192.412605285651log(T) ♢ unit=[m² kg s⁻² K⁻¹ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
189189
ΔrH⁰ = 53031.81826591678 - 192.412605285651T ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
190190
ΔrG⁰ = 53032.38323354907 - 1230.1260310743007T + 192.412605285651T*log(T) ♢ unit=[m² kg s⁻² mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
191-
ΔrV = -1.02217203378673e-5 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
191+
ΔrV = -1.02217203378673e-5 ♢ unit=[m³ mol⁻¹] ♢ ref=[T=298.15 K, P=100000.0 m⁻¹ kg s⁻²]
192192
```
193193

194194
## Installation

data/aq17-thermofun.jls

75.1 KB
Binary file not shown.

data/cemdata18-merged.jls

121 KB
Binary file not shown.

data/psinagra-12-07-thermofun.jls

350 KB
Binary file not shown.

docs/pages.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ pages = [
99
"man/stoich_matrices.md",
1010
"man/reactions.md",
1111
],
12-
"Examples" => ["example/bogue_calculation.md",
13-
"example/example_stoich_matrix.md"],
12+
"Examples" => ["examples/bogue_calculation.md",
13+
"examples/example_stoich_matrix.md"],
1414
"API" => Any[
15+
"Thermodynamical functions" => "api/thermo_functions.md",
16+
"Thermodynamical models" => "api/thermo_models.md",
1517
"Element order" => "api/element_order.md",
1618
"Parsing tools" => "api/parsing_tools.md",
17-
"Thermodynamical functions" => "api/thermo_functions.md",
1819
"Formulas" => "api/formulas.md",
1920
"Species" => "api/species.md",
2021
"Stoichiometric Matrix" => "api/stoich_matrices.md",

docs/src/api/thermo_functions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ ThermoFunction(
1313
vars=[:T, :P, :t];
1414
ref=[:T => 298.15u"K", :P => 1u"bar", :t => 0u"s"],
1515
)
16-
thermo_function_library
1716
1817
1918
calculate_molar_mass

docs/src/api/thermo_models.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Thermodynamical models
2+
3+
```@index
4+
Pages = ["thermo_models.md"]
5+
```
6+
7+
```@docs
8+
dict_cp_ft_equation
9+
thermo_functions_cp_ft_equation
10+
thermo_functions_generic_cp_ft
11+
```

0 commit comments

Comments
 (0)