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

Merge devel into master, bringing master up to date #295

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
1d67316
copy current saltproc PR and issue templates
yardasol Oct 25, 2021
a3aa5c7
update formatting
yardasol Oct 25, 2021
e44872d
update formatting
yardasol Oct 25, 2021
4960bbb
move pr template to where github can see it
yardasol Oct 25, 2021
c3a8ed0
Add Multi-Group diffusion theory to Moltres website
nglaser3 May 27, 2024
5d7dbd2
Add table captions and replaces   with \\ for standard markdown …
nglaser3 May 28, 2024
68add7d
Breaking apart paragraphs into sentences, so review comments are more…
nglaser3 May 29, 2024
1b682a4
Add Mark and Milne vacuum BCs
smpark7 May 30, 2024
be00726
Add xsdata for vacuum bc tests
smpark7 May 30, 2024
f402cfd
Address initial review comments
nglaser3 May 30, 2024
4d4cd74
Fix spelling errors from second round of review comments
nglaser3 May 31, 2024
9562efb
Move template code to fix macos errors
smpark7 May 24, 2024
5f18073
Merge pull request #268 from smpark7/macos-fix
nglaser3 May 31, 2024
06f7e00
Add more documentation and references for the Milne BC
smpark7 May 31, 2024
4b53cc3
Assign a protected variable name to the milne extrapolation coefficie…
smpark7 Jun 4, 2024
cde2f6a
Merge pull request #270 from nglaser3/add_doc
katyhuff Jun 5, 2024
6df5da7
Merge pull request #273 from smpark7/vacuum-bc
katyhuff Jun 11, 2024
ad373db
Address Issue #271, all tests pass
nglaser3 Jun 13, 2024
fb60165
Merge pull request #274 from nglaser3/issue_fixes
smpark7 Jun 14, 2024
5db4455
Add preliminary, brief documentation to NtAction
nglaser3 Jun 17, 2024
8fe92cc
Fix sample input location in md file
nglaser3 Jun 17, 2024
00ec023
Add reference to tutorial page
nglaser3 Jun 17, 2024
1cf202b
Address initial comments and feedback
nglaser3 Jun 18, 2024
f54db80
Fix line lengths to be under 100 characters
nglaser3 Jun 18, 2024
188b218
Fix line endings
nglaser3 Jun 18, 2024
ef4d1da
Merge pull request #275 from nglaser3/add_doc
smpark7 Jun 18, 2024
542a2ac
Change _use_exp_form default behavior to false
nglaser3 Jul 25, 2024
4ed4bce
Merge pull request #178 from yardasol/pr-iss-temps
katyhuff Aug 19, 2024
9cd82b8
Update MOOSE to Jul 24
smpark7 Aug 30, 2024
def8ecc
Add dependabot auto-update for moose
nglaser3 Sep 16, 2024
22564ff
add Reviewers to auto-PR
nglaser3 Sep 16, 2024
50257af
Merge pull request #279 from smpark7/update-moose-2024-07
nglaser3 Sep 16, 2024
c04cc19
Merge pull request #276 from nglaser3/issue_fixes
smpark7 Sep 16, 2024
7bcdf6a
Add PR and Commit Prefix
nglaser3 Sep 16, 2024
e685bd8
Merge branch 'arfc:devel' into add_dependabot
nglaser3 Sep 16, 2024
f424a00
Don't use std::norm for Euclidean norm
lindsayad Sep 18, 2024
0d3ed62
Merge pull request #284 from arfc/dont-use-std-norm
smpark7 Sep 18, 2024
fca3752
Set devel as target branch for MOOSE submodule
nglaser3 Sep 18, 2024
eebaa7a
Merge pull request #283 from nglaser3/add_dependabot
smpark7 Sep 23, 2024
68bbd01
Regold pre_loops.i
nglaser3 Oct 4, 2024
be48461
Regold pre_loop_ins
nglaser3 Oct 4, 2024
2e65b4d
Update MOOSE submodule
nglaser3 Oct 5, 2024
40d07bf
Merge pull request #287 from nglaser3/regold_pres
smpark7 Oct 5, 2024
d92eb96
auto_update_moose: bump moose from `9fb4f87` to `7ecca34`
dependabot[bot] Oct 7, 2024
a430a58
Merge pull request #288 from arfc/dependabot/submodules/moose-7ecca34
smpark7 Oct 10, 2024
6c0f97c
Update dependabot schedule to monthly
nglaser3 Oct 11, 2024
0b1991c
Merge pull request #289 from nglaser3/dependabot
smpark7 Oct 11, 2024
c7c24cc
auto_update_moose: bump moose from `7ecca34` to `c80f515`
dependabot[bot] Nov 1, 2024
0aa1770
Merge pull request #292 from arfc/dependabot/submodules/moose-c80f515
smpark7 Nov 21, 2024
eae40f1
auto_update_moose: bump moose from `c80f515` to `cedfd05`
dependabot[bot] Dec 1, 2024
fe1586c
Merge pull request #296 from arfc/dependabot/submodules/moose-cedfd05
smpark7 Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug report
about: Report software bugs
title: "[Bug]: "
labels: Type:Bug
assignees: ''

---

## Expected behavior
A clear and concise description of what you expected to happen.

## Describe the bug
A clear and concise description of what the bug is.

## To Reproduce
Steps to reproduce the behavior:
1.
2.
3.
4.

## Screenshots/output
If applicable, add screenshots or program output to help explain your problem.

## System Specifications:
- Version:
- Platform:
- Subsystem:

## How can this issue be closed?
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature: '
labels: Status:1-New, Type:Feature
assignees: ''

---

## Background and motivation

## Description of idea

## Implementation details

## Potential snags
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
allow:
- dependency-name: "moose"
schedule:
interval: "monthly"
commit-message:
prefix: "auto_update_moose"
open-pull-requests-limit: 1
labels:
- "Comp:Core"
- "Priority:1-Critical"
reviewers:
- "smpark7"
- "nglaser3"
38 changes: 38 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Summary of changes
<!--- In one or more sentences, describe the PR you are submitting -->



## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)

## Required for Merging
- [ ] I have read the **CONTRIBUTING** document.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] CI tests pass
- [ ] Local tests pass (including Serpent2 integration tests)

## Associated Issues and PRs
<!--- Please note any issues or pull requests associated with this pull request -->

- Issue: #


## Associated Developers
<!--- Please mention any developers who should be alerted of this PR -->

- Dev: @


## Checklist for Reviewers

Reviewers should use [this link](https://arfc.github.io/manual/guides/pull_requests) to get to the
Review Checklist before they begin their review.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
[submodule "moose"]
path = moose
url = ../../idaholab/moose
branch = devel
36 changes: 36 additions & 0 deletions doc/content/bib/references.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

@article{placzek_milnes_1947,
title = {Milne's {Problem} in {Transport} {Theory}},
volume = {72},
url = {https://link.aps.org/doi/10.1103/PhysRev.72.550},
doi = {10.1103/PhysRev.72.550},
abstract = {A modified derivation of the Wiener-Hopf solution of Milne's problem is given in a form suitable for application to problems in the theory of neutron diffusion.},
number = {7},
urldate = {2024-05-31},
journal = {Physical Review},
author = {Placzek, G. and Seidel, W.},
month = oct,
year = {1947},
note = {Publisher: American Physical Society},
pages = {550--555},
file = {APS Snapshot:C\:\\Users\\Sun Myung\\Zotero\\storage\\IJVWPMDS\\PhysRev.72.html:text/html;Full Text PDF:C\:\\Users\\Sun Myung\\Zotero\\storage\\TVUWZQ6J\\Placzek and Seidel - 1947 - Milne's Problem in Transport Theory.pdf:application/pdf},
}

@article{rulko_variational_1995,
title = {Variational {P1} {Approximations} of {General}-{Geometry} {Multigroup} {Transport} {Problems}},
volume = {121},
issn = {0029-5639},
url = {https://doi.org/10.13182/NSE121-393},
doi = {10.13182/NSE121-393},
abstract = {A variational approximation is developed for general-geometry multigroup transport problems with arbitrary anisotropic scattering. The variational principle is based on a functional that approximates a reaction rate in a subdomain of the system. In principle, approximations that result from this functional “optimally”determine such reaction rates. The functional contains an arbitrary parameter α and requires the approximate solutions of a forward and an adjoint transport problem. If the basis functions for the forward and adjoint solutions are chosen to be linear functions of the angular variable Ω, the functional yields the familiar multigroup P1 equations for all values of α. However, the boundary conditions that result from the functional depend on α. In particular, for problems with vacuum boundaries, one obtains the conventional mixed boundary condition, but with an extrapolation distance that depends continuously on α. The choice α = 0 yields a generalization of boundary conditions derived earlier by Federighi and Pomraning for a more limited class of problems. The choice α = 1 yields a generalization of boundary conditions derived previously by Davis for mono-energetic problems. Other boundary conditions are obtained by choosing different values of α. We discuss this indeterminancy of a in conjunction with numerical experiments.},
number = {3},
urldate = {2024-05-31},
journal = {Nuclear Science and Engineering},
author = {Rulko, Robert P. and Tomašević, Djordje and Larsen, Edward W.},
month = dec,
year = {1995},
note = {Publisher: Taylor \& Francis
\_eprint: https://doi.org/10.13182/NSE121-393},
pages = {393--404},
file = {Full Text PDF:C\:\\Users\\Sun Myung\\Zotero\\storage\\8NHDX7DM\\Rulko et al. - 1995 - Variational P1 Approximations of General-Geometry .pdf:application/pdf},
}
41 changes: 40 additions & 1 deletion doc/content/getting_started/theory.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,46 @@ the MOOSE finite element framework, enabling highly flexible and scalable reacto

## Multigroup Neutron Diffusion

More information to be added in future.
The neutron diffusion equation is an approximation to the Boltzmann transport equation, and is derived by taking the zeroth and first moment with respect to $\hat\Omega$, the direction of neutron travel.
A full derivation of the diffusion equation will not be presented here for conciseness. Importantly, when taking the first moment of the transport equation the angular flux is assumed to be linearly anisotropic.
The approximations reduce the phase space through the elimination of angular dependence, but the resulting equation also has reduced fidelity when compared to the transport equation, particularly in regions where the neutron flux has strong angular dependence.
A non-exhaustive list of regions in which the neutron flux strongly depends on angle is near material interfaces between materials with highly dissimilar neutronic properties, within strong absorbers, and within near-void regions.
As a deterministic method, the neutron diffusion method also requires discretization of the continuous energy dependence into energy groups consisting of non-overlapping, finite energy ranges across the entire energy spectrum.
This energy discretization creates a system of equations referred to as the multigroup neutron diffusion equations:

!equation
\frac{1}{v_g} \frac{\partial\phi_g}{\partial t}-\nabla \cdot D_g \nabla \phi_g +\Sigma^R_{g} \phi_g =\sum^G_{g \neq g'} {\Sigma^s_{g'\rightarrow g} \phi_{g'}}+ \chi^p_{g} \sum^G_{g'=1} {\left(1- \beta \right) \nu_{g'} \Sigma^f_{g'}\phi_{g'} }+\chi^d_{g} \sum^I_i {\lambda_i C_i}

The delayed neutron precursor distributions are governed by:

!equation
\frac{\partial C_i}{\partial t}=\sum^G_{g'=1}{\beta_i \nu \Sigma^f_{g'}\phi_{g'}}-\lambda_i C_i-\vec{u} \cdot \nabla C_i

Notably, there are two production terms of neutrons, the prompt fission source and delayed neutron precursor decay source.
The first term describes the neutrons immediately born from fission, and the second term describes the neutrons born from the radioactive decay of neutron-emitting radionuclides, commonly called delayed neutron precursors.
The multigroup neutron diffusion equations are generally impossible to solve analytically for realistic problems and are therefore typically solved with numerical methods.
Moltres utilizes the [Finite Element Method](https://mooseframework.inl.gov/help/faq/what_is_fem.html) (FEM) capabilities provided by the MOOSE framework.
In FEM, the spatial domain is discretized into finite mesh elements and the time dependence is modeled through discrete time steps and time integration methods.

!table id=diff_table caption= Terms in multi-group neutron diffusion equation and their associated kernels
|Term in Multi-Group Diffusion Equation | Associated Kernel |Definition of Term|
| - | - | - |
| [!eq](\frac{1}{v_g} \frac{\partial\phi_g}{\partial t}) | [NtTimeDerivative](NtTimeDerivative.md) | Time rate of change of energy group g |
| [!eq](- \nabla \cdot D_g \nabla \phi_g) | [GroupDiffusion](GroupDiffusion.md) | Streaming term of energy group g |
| [!eq](\Sigma^R_{g} \phi_g) | [SigmaR](SigmaR.md) | Removal from energy group g |
| [!eq](\sum^G_{g \neq g'} {\Sigma^s_{g'\rightarrow g} \phi_{g'}}) | [InScatter](InScatter.md) | In-scattering into energy group g |
| [!eq](\chi^p_{g} \sum^G_{g'=1} {\left[1- \beta \right] \nu_{g'} \Sigma^f_{g'}\phi_{g'} } ) | [CoupledFissionKernel](CoupledFissionKernel.md) | Prompt fission neutron source |
| [!eq](\chi^d_{g} \sum^I_i {\lambda_i C_i}) | [DelayedNeutronSource](DelayedNeutronSource.md) | Delayed fission neutron source |

!table id=prec_table caption= Terms in delayed neutron precursor equation and their associated kernels
| Term in Delayed Precursor Equation | Associated Kernel(s) | Definition of Term |
| - | - | - |
| [!eq](\frac{\partial C_i}{\partial t}) | [ScalarTransportTimeDerivative](ScalarTransportTimeDerivative.md) | Time rate of change of precursor population |
| [!eq](\sum^G_{g'=1}{\beta_i \nu \Sigma^f_{g'}\phi_{g'}}) | [PrecursorSource](PrecursorSource.md) | Production of precursor from fission
| [!eq](-\lambda_i C_i) | [PrecursorDecay](PrecursorDecay.md) | Loss of precusors due to radioactive decay |
| [!eq](-\vec{u} \cdot \nabla C_i) | [DGCoupledAdvection](DGCoupledAdvection.md), [DGFunctionConvection](DGFunctionConvection.md), [DGConvection](https://mooseframework.inl.gov/source/dgkernels/DGConvection.html) | Advection of the precursors |

For the advective term in the delayed neutron precursor equation, $-\vec{u}\cdot \nabla C_i$, there are three kernels. DGCoupledAdvection is used when the velocity is a variable in the simulation, DGFunctionConvection is used when the velocity is a function, and DGConvection is for when the velocity is constant.

## Heat Transfer and Fluid Flow

Expand Down
36 changes: 29 additions & 7 deletions doc/content/source/actions/NtAction.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
# NtAction

!alert construction title=Undocumented Action Class
The NtAction has not been documented. The content listed below should be used as a starting point for
documenting the class, which includes the typical automatic documentation associated with an Action;
however, what is contained is ultimately determined by what is necessary to make the documentation
clear for users.
!alert note
This action sets up ONLY the variables, kernels, and BCs for neutron diffusion,
NOT the variables, kernels, and BCs for precursor tracking.
To generate these, see [PrecursorAction](PrecursorAction.md).

!syntax description /Nt/NtAction

## Overview

!! Replace these lines with information regarding the NtAction action.
```NtAction``` greatly reduces input file length and complexity by automatically
setting up variables, kernels, and BCs for the neutron diffusion equations.
When including only the required input parameters, this action constructs the
neutron group variables and their associated kernels:
[SigmaR](SigmaR.md), [GroupDiffusion](GroupDiffusion.md),
[InScatter](InScatter.md), and [CoupledFissionKernel](CoupledFissionKernel.md).
With ```account_delayed``` set to ```True```,
[DelayedNeutronSource](DelayedNeutronSource.md) is also constructed,
otherwise this kernel is not constructed and the simulation does not consider
the delayed neutron precursor effects on the neutron flux distributions.

For more information regarding the use of ```NtAction``` please refer to the
tutorials located [here](tutorials.md), specifically the +Multiphysics Reactor
Simulations+ section.

## Example Input File Syntax

!! Describe and include an example of how to use the NtAction action.
An example input file without the ```NtAction```, showing only the portion
affected by the action:

!listing tutorial/eigenvalue/nts.i
start=Variables end=Materials remove=Precursors


And then the same information created with the ```NtAction```:

!listing tutorial/eigenvalue/nts-action.i
block=Nt

!syntax description /Nt/NtAction

Expand Down
17 changes: 15 additions & 2 deletions doc/content/source/bcs/VacuumConcBC.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@

## Overview

This object adds the $\frac{\phi}{4}-\frac{D_g}{2}\hat{n}\cdot\nabla\phi_g = 0$ vacuum boundary
This object adds the $\phi_g+\alpha D_g\hat{n}\cdot\nabla\phi_g = 0$ vacuum boundary
condition of the multigroup neutron diffusion equations. The weak form after applying integration
by parts to the neutron diffusion term ([GroupDiffusion](/GroupDiffusion.md)) is:

!equation
\int_{\partial V}\psi D_g\nabla\phi_g\cdot\hat{n}\ dS = \int_{\partial V}\psi\frac{\phi_g}{2}\ dS
-\int_{\partial V}\psi D_g\nabla\phi_g\cdot\hat{n}\ dS =
\int_{\partial V}\psi\frac{\phi_g}{\alpha}\ dS

The value of $\alpha$ varies depending on the BC type selected using the `vacuum_bc_type`
parameter. The available options are:

1. Marshak: $\alpha=2$
2. Mark: $\alpha=\sqrt{3}$
3. Milne: $\alpha=3\times 0.710446$

The Marshak and Mark BCs are derived from vacuum boundary condition approximations using
$P_1$ and $S_2$ transport methods, respectively. The Milne BC is derived from the exact analytical
solution of the Milne problem [!citep](placzek_milnes_1947) and has been proven to be accurate for
a wide range of diffusive problems [!citep](rulko_variational_1995).

## Example Input File Syntax

Expand Down
26 changes: 20 additions & 6 deletions include/bcs/VacuumConcBC.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
#include "ScalarTransportBase.h"

/**
* Implements a simple VacuumConc BC for neutron diffusion on the boundary.
* VacuumConc BC is defined as \f$ D\frac{du}{dn}+\frac{u}{2} = 0\f$, where u is neutron flux.
* Hence, \f$ D\frac{du}{dn}=-\frac{u}{2} \f$ and \f$ -\frac{u}{2} \f$ is substituted into
* the Neumann BC term produced from integrating the diffusion operator by parts.
* Implements a simple VacuumConc BC for neutron diffusion on vacuum boundaries.
* VacuumConc BC is defined as \f$ D\frac{du}{dn}+\frac{u}{\alpha} = 0\f$, where u is neutron flux.
* Hence, \f$ D\frac{du}{dn}=-\frac{u}{\alpha} \f$ and \f$ -\frac{u}{\alpha} \f$ is substituted
* into the Neumann BC term produced from integrating the diffusion operator by parts.
*
* The three types of vacuum BCs available are Marshak ($\alpha=2$), Mark ($\alpha=\sqrt{3}$), and
* Milne ($\alpha=3\times 0.710446$). VacuumConcBC defaults to Marshak if `bc_type` is not set.
*/
class VacuumConcBC : public IntegratedBC, public ScalarTransportBase
{
Expand All @@ -22,9 +25,20 @@ class VacuumConcBC : public IntegratedBC, public ScalarTransportBase

protected:
virtual Real computeQpResidual() override;

virtual Real computeQpJacobian() override;

/// Ratio of u to du/dn
enum BC_TYPE
{
MARSHAK,
MARK,
MILNE
};

// Ratio of u to du/dn
Real _alpha;

// Milne vacuum boundary extrapolation coefficient
// Derived from the exact analytical solution to the Milne problem. See MooseDocs-based
// documentation for more information.
Real _milne_extrapolation_coefficient = 3 * 0.710446;
};
2 changes: 1 addition & 1 deletion include/kernels/INSBoussinesqBodyForce.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class INSBoussinesqBodyForce : public Kernel
protected:
virtual Real computeQpResidual() override;
virtual Real computeQpJacobian() override;
virtual Real computeQpOffDiagJacobian(unsigned jvar);
virtual Real computeQpOffDiagJacobian(unsigned jvar) override;

// Parameters
const VariableValue & _T;
Expand Down
Loading
Loading