Skip to content

Commit

Permalink
simplifying LEQI docstring math and removing unnecessary operations (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
eepeterson authored Sep 25, 2023
1 parent f4183b0 commit 0f429e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion openmc/deplete/_matrix_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,4 @@ def leqi_f4(chain, inputs, fission_yields=None):
return (-dt ** 2 / (12 * dt_l * (dt + dt_l)) * f1
+ (dt ** 2 + 2 * dt * dt_l + dt_l ** 2)
/ (12 * dt_l * (dt + dt_l)) * f2
+ (4 * dt * dt_l + 5 * dt_l ** 2) / (12 * dt_l * (dt + dt_l)) * f3)
+ (4 * dt + 5 * dt_l) / (12 * (dt + dt_l)) * f3)
3 changes: 1 addition & 2 deletions openmc/deplete/integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,7 @@ class LEQIIntegrator(Integrator):
h_i)} \mathbf{A}_0 + \frac{h_{i-1}}{12 (h_{i-1} + h_i)} \mathbf{A}_1 \\
\mathbf{F}_4 &= \frac{-h_i^2}{12 h_{i-1} (h_{i-1} + h_i)} \mathbf{A}_{-1} +
\frac{h_{i-1}^2 + 2 h_i h_{i-1} + h_i^2}{12 h_{i-1} (h_{i-1} + h_i)}
\mathbf{A}_0 + \frac{5 h_{i-1}^2 + 4 h_i h_{i-1}}{12 h_{i-1}
(h_{i-1} + h_i)} \mathbf{A}_1 \\
\mathbf{A}_0 + \frac{5 h_{i-1} + 4 h_i}{12 (h_{i-1} + h_i)} \mathbf{A}_1 \\
\mathbf{n}_{i+1} &= \exp(h_i \mathbf{F}_4) \exp(h_i \mathbf{F}_3) \mathbf{n}_i
\end{aligned}
Expand Down

0 comments on commit 0f429e7

Please sign in to comment.