Skip to content

Commit

Permalink
Merge pull request #237 from smpark7/eigen-prec-var
Browse files Browse the repository at this point in the history
Allow precursor variables to be eigen variables
  • Loading branch information
yardasol authored Sep 14, 2023
2 parents 2cb1480 + bc96de6 commit 2b36546
Show file tree
Hide file tree
Showing 49 changed files with 822 additions and 3,329 deletions.
23 changes: 0 additions & 23 deletions doc/content/source/kernels/DelayedNeutronEigenSource.md

This file was deleted.

18 changes: 18 additions & 0 deletions doc/content/source/kernels/PrecursorEigenSource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PrecursorSource

!syntax description /Kernels/PrecursorSource

## Overview

This object adds the $\frac{1}{k}\sum_{g'= 1}^G \beta_i \nu \Sigma_{g'}^f \phi_{g'}$ precursor
source term of the delayed neutron precursor equation for the $k$-eigenvalue problem.

## Example Input File Syntax

!! Describe and include an example of how to use the PrecursorSource object.

!syntax parameters /Kernels/PrecursorSource

!syntax inputs /Kernels/PrecursorSource

!syntax children /Kernels/PrecursorSource
29 changes: 0 additions & 29 deletions include/kernels/DelayedNeutronEigenSource.h

This file was deleted.

33 changes: 33 additions & 0 deletions include/kernels/PrecursorEigenSource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma once

#include "EigenKernel.h"
#include "ScalarTransportBase.h"

/**
* This object computes the residual and Jacobian contribution for the precursor source term in the
* delayed neutron precursor equation for k-eigenvalue problems.
*/
class PrecursorEigenSource : public EigenKernel, public ScalarTransportBase
{
public:
PrecursorEigenSource(const InputParameters & parameters);

static InputParameters validParams();

protected:
virtual Real computeQpResidual() override;
virtual Real computeQpJacobian() override;
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override;

const MaterialProperty<std::vector<Real>> & _nsf;
const MaterialProperty<std::vector<Real>> & _d_nsf_d_temp;
unsigned int _num_groups;
const MaterialProperty<std::vector<Real>> & _beta_eff;
const MaterialProperty<std::vector<Real>> & _d_beta_eff_d_temp;
unsigned int _precursor_group;
const VariableValue & _temp;
unsigned int _temp_id;
std::vector<const VariableValue *> _group_fluxes;
std::vector<unsigned int> _flux_ids;
Real _prec_scale;
};
18 changes: 18 additions & 0 deletions include/postprocessors/ElmIntegTotFissNtsPostprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,26 @@ class ElmIntegTotFissNtsPostprocessor : public ElementIntegralPostprocessor
protected:
virtual Real computeQpIntegral() override;

// The number of neutron energy groups.
int _num_groups;

// The number of precursor groups.
int _num_precursor_groups;

// Whether to account for delayed neutrons
bool _account_delayed;

// nu Sigma_f material property
const MaterialProperty<std::vector<Real>> & _nsf;

// Decay constant material property
const MaterialProperty<std::vector<Real>> & _decay_constant;

std::vector<MooseVariableFEBase *> _vars;

// Group flux variables
std::vector<const VariableValue *> _group_fluxes;

// Precursor concentration variables
std::vector<const VariableValue *> _pre_concs;
};
6 changes: 4 additions & 2 deletions problems/033117_nts_temp_pre_parsed_mat/3d_auto_diff_rho.i
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ offset=2.5
[Mesh]
[./file]
type = FileMeshGenerator
file = '3d_msre_29x29_136.msh'
# file = jac_test.msh
## Default to jac_test.msh for quicker syntax check tests.
## Switch to 3D mesh for actual simulations.
# file = '3d_msre_29x29_136.msh'
file = jac_test.msh
[../]
[./scale]
type = TransformGenerator
Expand Down
219 changes: 219 additions & 0 deletions problems/033117_nts_temp_pre_parsed_mat/jac_test.msh
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
$MeshFormat
4.1 0 8
$EndMeshFormat
$PhysicalNames
7
2 3 "moder_bottoms"
2 4 "moder_tops"
2 5 "fuel_bottoms"
2 6 "fuel_tops"
2 7 "moder_sides"
3 1 "moder"
3 2 "fuel"
$EndPhysicalNames
$Entities
16 24 12 2
1 -1.18585 -1.18585 0 0
2 1.18585 -1.18585 0 0
3 1.18585 1.18585 0 0
4 -1.18585 1.18585 0 0
5 -2.5 -2.5 0 0
6 -2.5 2.5 0 0
7 2.5 2.5 0 0
8 2.5 -2.5 0 0
9 -2.5 2.5 5 0
10 2.5 2.5 5 0
14 2.5 -2.5 5 0
18 -2.5 -2.5 5 0
25 1.18585 1.18585 5 0
26 1.18585 -1.18585 5 0
30 -1.18585 -1.18585 5 0
34 -1.18585 1.18585 5 0
1 -1.18585 -1.18585 0 -1.18585 1.18585 0 0 2 4 -1
2 -1.18585 -1.18585 0 1.18585 -1.18585 0 0 2 1 -2
3 1.18585 -1.18585 0 1.18585 1.18585 0 0 2 3 -2
4 -1.18585 1.18585 0 1.18585 1.18585 0 0 2 3 -4
5 -2.5 2.5 0 2.5 2.5 0 0 2 6 -7
6 2.5 -2.5 0 2.5 2.5 0 0 2 7 -8
7 -2.5 -2.5 0 2.5 -2.5 0 0 2 8 -5
8 -2.5 -2.5 0 -2.5 2.5 0 0 2 5 -6
14 -2.5 2.5 5 2.5 2.5 5 0 2 9 -10
15 2.5 -2.5 5 2.5 2.5 5 0 2 10 -14
16 -2.5 -2.5 5 2.5 -2.5 5 0 2 14 -18
17 -2.5 -2.5 5 -2.5 2.5 5 0 2 18 -9
18 1.18585 -1.18585 5 1.18585 1.18585 5 0 2 25 -26
19 -1.18585 -1.18585 5 1.18585 -1.18585 5 0 2 26 -30
20 -1.18585 -1.18585 5 -1.18585 1.18585 5 0 2 30 -34
21 -1.18585 1.18585 5 1.18585 1.18585 5 0 2 34 -25
23 -2.5 2.5 0 -2.5 2.5 5 0 2 6 -9
24 2.5 2.5 0 2.5 2.5 5 0 2 7 -10
28 2.5 -2.5 0 2.5 -2.5 5 0 2 8 -14
32 -2.5 -2.5 0 -2.5 -2.5 5 0 2 5 -18
39 1.18585 1.18585 0 1.18585 1.18585 5 0 2 3 -25
40 1.18585 -1.18585 0 1.18585 -1.18585 5 0 2 2 -26
44 -1.18585 -1.18585 0 -1.18585 -1.18585 5 0 2 1 -30
48 -1.18585 1.18585 0 -1.18585 1.18585 5 0 2 4 -34
11 -2.5 -2.5 0 2.5 2.5 0 1 3 8 5 6 7 8 3 -2 -1 -4
12 -1.18585 -1.18585 0 1.18585 1.18585 0 1 5 4 4 1 2 -3
25 -2.5 2.5 0 2.5 2.5 5 0 4 5 24 -14 -23
29 2.5 -2.5 0 2.5 2.5 5 0 4 6 28 -15 -24
33 -2.5 -2.5 0 2.5 -2.5 5 1 7 4 7 32 -16 -28
37 -2.5 -2.5 0 -2.5 2.5 5 1 7 4 8 23 -17 -32
41 1.18585 -1.18585 0 1.18585 1.18585 5 0 4 3 40 -18 -39
45 -1.18585 -1.18585 0 1.18585 -1.18585 5 0 4 -2 44 -19 -40
49 -1.18585 -1.18585 0 -1.18585 1.18585 5 0 4 -1 48 -20 -44
53 -1.18585 1.18585 0 1.18585 1.18585 5 0 4 -4 39 -21 -48
54 -2.5 -2.5 5 2.5 2.5 5 1 4 8 14 15 16 17 18 19 20 21
76 -1.18585 -1.18585 5 1.18585 1.18585 5 1 6 4 -21 -20 -19 -18
1 -2.5 -2.5 0 2.5 2.5 5 1 1 10 -11 54 25 29 33 37 41 -45 -49 -53
2 -1.18585 -1.18585 0 1.18585 1.18585 5 1 2 6 -12 76 53 49 45 -41
$EndEntities
$Nodes
24 16 1 16
0 1 0 1
1
-1.18585 -1.18585 0
0 2 0 1
2
1.18585 -1.18585 0
0 3 0 1
3
1.18585 1.18585 0
0 4 0 1
4
-1.18585 1.18585 0
0 5 0 1
5
-2.5 -2.5 0
0 6 0 1
6
-2.5 2.5 0
0 7 0 1
7
2.5 2.5 0
0 8 0 1
8
2.5 -2.5 0
0 9 0 1
9
-2.5 2.5 5
0 10 0 1
10
2.5 2.5 5
0 14 0 1
11
2.5 -2.5 5
0 18 0 1
12
-2.5 -2.5 5
0 25 0 1
13
1.18585 1.18585 5
0 26 0 1
14
1.18585 -1.18585 5
0 30 0 1
15
-1.18585 -1.18585 5
0 34 0 1
16
-1.18585 1.18585 5
2 11 0 0
2 12 0 0
2 33 0 0
2 37 0 0
2 54 0 0
2 76 0 0
3 1 0 0
3 2 0 0
$EndNodes
$Elements
8 17 1 17
2 11 3 4
1 4 1 5 6
2 2 8 5 1
3 3 7 8 2
4 3 4 6 7
2 12 3 1
5 3 4 1 2
2 33 3 1
6 8 5 12 11
2 37 3 1
7 5 6 9 12
2 54 3 4
8 16 15 12 9
9 14 11 12 15
10 13 10 11 14
11 13 16 9 10
2 76 3 1
12 16 15 14 13
3 1 5 4
13 5 1 4 6 12 15 16 9
14 5 8 2 1 12 11 14 15
15 8 7 3 2 11 10 13 14
16 6 4 3 7 9 16 13 10
3 2 5 1
17 3 4 1 2 13 16 15 14
$EndElements
$Periodic
17
0 9 6
0
1
9 6
0 10 7
0
1
10 7
0 14 8
0
1
11 8
0 18 5
0
1
12 5
0 25 3
0
1
13 3
0 26 2
0
1
14 2
0 30 1
0
1
15 1
0 34 4
0
1
16 4
1 14 5
0
0
1 15 6
0
0
1 16 7
0
0
1 17 8
0
0
1 18 3
0
0
1 19 2
0
0
1 20 1
0
0
1 21 4
0
0
2 54 11
0
0
$EndPeriodic
3 changes: 2 additions & 1 deletion problems/2017_annals_pub_msre_compare/2group_eigen.i
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
group_fluxes = 'group1 group2'
temperature = 922
sss2_input = true
pre_concs = 'pre1 pre2 pre3 pre4 pre5 pre6'
pre_concs = ''
account_delayed = false
[]

Expand Down Expand Up @@ -67,6 +67,7 @@
[Postprocessors]
[./bnorm]
type = ElmIntegTotFissNtsPostprocessor
block = 'fuel'
execute_on = 'nonlinear linear timestep_end'
[../]
[./group1diff]
Expand Down
Loading

0 comments on commit 2b36546

Please sign in to comment.