Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External transfer rates source term #3088

Open
wants to merge 88 commits into
base: develop
Choose a base branch
from

Conversation

church89
Copy link
Contributor

@church89 church89 commented Jul 19, 2024

Description

This is a follow up of the recent TransfeRates, adding a further external source term $S$ to the depletion solver:

$$\frac{dn_i(t)}{dt} = \sum_j \gamma_{j\rightarrow i} n_j\overline{\sigma_j\phi} - n_i \overline{\sigma_i \phi} + \sum_j \gamma_{j\rightarrow i} n_j\lambda_{i\rightarrow j} + \lambda_{j\rightarrow i}n_i - \epsilon_i \lambda_i n_i + S_i$$

The linear system can be easily homogenized adding the source vector to the Bateman matrix and a dummy nuclide vector as such:

$$Ax+s = \tilde{A}\tilde{x} = \begin{bmatrix} a_{1,1} & \cdots & a_{1,n} & S_1\\ \vdots & \ddots & \vdots & \vdots\\ a_{n,1} & \cdots & a_{n,n} & S_n\\ 0 & 0 & 0 & 0\\ \end{bmatrix} \begin{bmatrix} x_1\\ \vdots\\ x_n\\ 1 \end{bmatrix}$$

For reference see: Isotalo et al

This allows to input feed or removal fixed source rate during a depletion run, similar to the ORIGEN module of SCALE.

To set an external source rate, similar to a transfer rate, one can simply add to an integrator instance, as such:

integrator.add_external_source_rate('fuel', {'U235':1}, 1.0, external_source_rate_units='g/s',  timesteps=None)

with default units: $grams/sec$

In the same PR I've also included a time-dependency, both to this and TransferRates, allowing to specify specific depletion time-steps where to activate these modeling, adding a timesteps argument to the setter functions.

Verification

As a simple verification I've compared with a depletion case, where I manually modify the material composition between two depletion steps:

keff
u235

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

Merge Transfer rates source term into openmsr develop branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant