moltres
Loading...
Searching...
No Matches
NuclearMaterial.h
Go to the documentation of this file.
1#pragma once
2
3#include "GenericConstantMaterial.h"
4#include "SplineInterpolation.h"
5#include "BicubicSplineInterpolation.h"
6#include "MonotoneCubicInterpolation.h"
7#include "LinearInterpolation.h"
8#include "json.h"
9
33class NuclearMaterial : public GenericConstantMaterial
34{
35public:
36 NuclearMaterial(const InputParameters & parameters);
37
38 static InputParameters validParams();
39
40 // correspond to descriptions above
50
51 // returns a MooseEnum corresponding to the above enum
52 static MooseEnum interpTypes()
53 {
54 return MooseEnum("bicubic=0 spline=1"
55 " monotone_cubic=2 linear=3 none=4 least_squares=5");
56 }
57
58protected:
59 virtual void dummyComputeQpProperties();
60 virtual void splineComputeQpProperties();
62 virtual void linearComputeQpProperties();
63 virtual void preComputeQpProperties();
64
65 const VariableValue & _temperature;
66
67 // Number of neutron groups
68 unsigned int _num_groups;
69
70 // Number of precursor groups
72
73 // Group constant MaterialProperty(s)
74 MaterialProperty<std::vector<Real>> & _remxs;
75 MaterialProperty<std::vector<Real>> & _fissxs;
76 MaterialProperty<std::vector<Real>> & _nsf;
77 MaterialProperty<std::vector<Real>> & _fisse;
78 MaterialProperty<std::vector<Real>> & _diffcoef;
79 MaterialProperty<std::vector<Real>> & _recipvel;
80 MaterialProperty<std::vector<Real>> & _chi_t;
81 MaterialProperty<std::vector<Real>> & _chi_p;
82 MaterialProperty<std::vector<Real>> & _chi_d;
83 MaterialProperty<std::vector<Real>> & _gtransfxs;
84 MaterialProperty<std::vector<Real>> & _beta_eff;
85 MaterialProperty<Real> & _beta;
86 MaterialProperty<std::vector<Real>> & _decay_constant;
87 MaterialProperty<std::vector<Real>> & _d_remxs_d_temp;
88 MaterialProperty<std::vector<Real>> & _d_fissxs_d_temp;
89 MaterialProperty<std::vector<Real>> & _d_nsf_d_temp;
90 MaterialProperty<std::vector<Real>> & _d_fisse_d_temp;
91 MaterialProperty<std::vector<Real>> & _d_diffcoef_d_temp;
92 MaterialProperty<std::vector<Real>> & _d_recipvel_d_temp;
93 MaterialProperty<std::vector<Real>> & _d_chi_t_d_temp;
94 MaterialProperty<std::vector<Real>> & _d_chi_p_d_temp;
95 MaterialProperty<std::vector<Real>> & _d_chi_d_d_temp;
96 MaterialProperty<std::vector<Real>> & _d_gtransfxs_d_temp;
97 MaterialProperty<std::vector<Real>> & _d_beta_eff_d_temp;
98 MaterialProperty<Real> & _d_beta_d_temp;
99 MaterialProperty<std::vector<Real>> & _d_decay_constant_d_temp;
100
101 // Group constant interpolation type
102 MooseEnum _interp_type;
103
104 // Vector of group constant names
105 std::vector<std::string> _xsec_names{"REMXS",
106 "FISSXS",
107 "NSF",
108 "FISSE",
109 "DIFFCOEF",
110 "RECIPVEL",
111 "CHI_T",
112 "CHI_P",
113 "CHI_D",
114 "GTRANSFXS",
115 "BETA_EFF",
116 "DECAY_CONSTANT"};
117
118 // Map of group constant names to group constant values
119 std::map<std::string, std::vector<std::vector<Real>>> _xsec_map;
120
121 // Group constant interpolators
122 std::map<std::string, std::vector<SplineInterpolation>> _xsec_spline_interpolators;
123 std::map<std::string, std::vector<MonotoneCubicInterpolation>> _xsec_monotone_cubic_interpolators;
124 std::map<std::string, std::vector<LinearInterpolation>> _xsec_linear_interpolators;
125 std::map<std::string, std::vector<BicubicSplineInterpolation>> _xsec_bicubic_spline_interpolators;
126
127 // Map of group constant names to number of neutron/precursor groups
128 std::map<std::string, int> _vec_lengths;
129
130 // Vector of temperature values
131 std::vector<double> _XsTemperature;
132
133 std::vector<std::vector<Real>> _remxs_consts = std::vector<std::vector<Real>>(2);
134 std::vector<std::vector<Real>> _fissxs_consts = std::vector<std::vector<Real>>(2);
135 std::vector<std::vector<Real>> _nubar_consts = std::vector<std::vector<Real>>(2);
136 std::vector<std::vector<Real>> _nsf_consts = std::vector<std::vector<Real>>(2);
137 std::vector<std::vector<Real>> _fisse_consts = std::vector<std::vector<Real>>(2);
138 std::vector<std::vector<Real>> _diffcoeff_consts = std::vector<std::vector<Real>>(2);
139 std::vector<std::vector<Real>> _recipvel_consts = std::vector<std::vector<Real>>(2);
140 std::vector<std::vector<Real>> _chi_t_consts = std::vector<std::vector<Real>>(2);
141 std::vector<std::vector<Real>> _chi_p_consts = std::vector<std::vector<Real>>(2);
142 std::vector<std::vector<Real>> _chi_d_consts = std::vector<std::vector<Real>>(2);
143 std::vector<std::vector<Real>> _gtransfxs_consts = std::vector<std::vector<Real>>(2);
144 std::vector<std::vector<Real>> _beta_eff_consts = std::vector<std::vector<Real>>(2);
145 std::vector<std::vector<Real>> _decay_constants_consts = std::vector<std::vector<Real>>(2);
146};
Definition NuclearMaterial.h:34
MaterialProperty< std::vector< Real > > & _d_fisse_d_temp
Definition NuclearMaterial.h:90
MaterialProperty< std::vector< Real > > & _d_gtransfxs_d_temp
Definition NuclearMaterial.h:96
MaterialProperty< std::vector< Real > > & _d_diffcoef_d_temp
Definition NuclearMaterial.h:91
MaterialProperty< std::vector< Real > > & _nsf
Definition NuclearMaterial.h:76
MaterialProperty< std::vector< Real > > & _beta_eff
Definition NuclearMaterial.h:84
MaterialProperty< std::vector< Real > > & _chi_t
Definition NuclearMaterial.h:80
MaterialProperty< std::vector< Real > > & _decay_constant
Definition NuclearMaterial.h:86
std::vector< std::vector< Real > > _decay_constants_consts
Definition NuclearMaterial.h:145
MaterialProperty< Real > & _beta
Definition NuclearMaterial.h:85
MaterialProperty< std::vector< Real > > & _chi_d
Definition NuclearMaterial.h:82
MaterialProperty< std::vector< Real > > & _fissxs
Definition NuclearMaterial.h:75
std::map< std::string, std::vector< std::vector< Real > > > _xsec_map
Definition NuclearMaterial.h:119
std::vector< std::vector< Real > > _diffcoeff_consts
Definition NuclearMaterial.h:138
MooseEnum _interp_type
Definition NuclearMaterial.h:102
MaterialProperty< std::vector< Real > > & _remxs
Definition NuclearMaterial.h:74
MaterialProperty< std::vector< Real > > & _d_remxs_d_temp
Definition NuclearMaterial.h:87
virtual void dummyComputeQpProperties()
Definition NuclearMaterial.C:76
static InputParameters validParams()
Definition NuclearMaterial.C:8
std::vector< std::vector< Real > > _nsf_consts
Definition NuclearMaterial.h:136
MaterialProperty< std::vector< Real > > & _recipvel
Definition NuclearMaterial.h:79
static MooseEnum interpTypes()
Definition NuclearMaterial.h:52
unsigned int _num_groups
Definition NuclearMaterial.h:68
MaterialProperty< std::vector< Real > > & _d_decay_constant_d_temp
Definition NuclearMaterial.h:99
INTERPOLATOR
Definition NuclearMaterial.h:42
@ NONE
Definition NuclearMaterial.h:47
@ MONOTONE_CUBIC
Definition NuclearMaterial.h:45
@ LSQ
Definition NuclearMaterial.h:48
@ BICUBIC
Definition NuclearMaterial.h:43
@ SPLINE
Definition NuclearMaterial.h:44
@ LINEAR
Definition NuclearMaterial.h:46
MaterialProperty< std::vector< Real > > & _d_chi_d_d_temp
Definition NuclearMaterial.h:95
MaterialProperty< std::vector< Real > > & _d_recipvel_d_temp
Definition NuclearMaterial.h:92
MaterialProperty< std::vector< Real > > & _fisse
Definition NuclearMaterial.h:77
virtual void monotoneCubicComputeQpProperties()
Definition NuclearMaterial.C:175
MaterialProperty< std::vector< Real > > & _d_fissxs_d_temp
Definition NuclearMaterial.h:88
std::map< std::string, std::vector< MonotoneCubicInterpolation > > _xsec_monotone_cubic_interpolators
Definition NuclearMaterial.h:123
std::vector< std::vector< Real > > _recipvel_consts
Definition NuclearMaterial.h:139
std::vector< std::vector< Real > > _fissxs_consts
Definition NuclearMaterial.h:134
virtual void splineComputeQpProperties()
Definition NuclearMaterial.C:118
unsigned int _num_precursor_groups
Definition NuclearMaterial.h:71
std::vector< std::vector< Real > > _gtransfxs_consts
Definition NuclearMaterial.h:143
MaterialProperty< std::vector< Real > > & _d_nsf_d_temp
Definition NuclearMaterial.h:89
std::vector< std::vector< Real > > _chi_p_consts
Definition NuclearMaterial.h:141
virtual void linearComputeQpProperties()
Definition NuclearMaterial.C:233
std::vector< std::vector< Real > > _chi_d_consts
Definition NuclearMaterial.h:142
MaterialProperty< std::vector< Real > > & _d_chi_p_d_temp
Definition NuclearMaterial.h:94
std::vector< std::vector< Real > > _chi_t_consts
Definition NuclearMaterial.h:140
MaterialProperty< std::vector< Real > > & _gtransfxs
Definition NuclearMaterial.h:83
std::vector< std::string > _xsec_names
Definition NuclearMaterial.h:105
std::map< std::string, std::vector< LinearInterpolation > > _xsec_linear_interpolators
Definition NuclearMaterial.h:124
MaterialProperty< std::vector< Real > > & _d_beta_eff_d_temp
Definition NuclearMaterial.h:97
MaterialProperty< std::vector< Real > > & _d_chi_t_d_temp
Definition NuclearMaterial.h:93
std::map< std::string, std::vector< BicubicSplineInterpolation > > _xsec_bicubic_spline_interpolators
Definition NuclearMaterial.h:125
std::vector< std::vector< Real > > _beta_eff_consts
Definition NuclearMaterial.h:144
const VariableValue & _temperature
Definition NuclearMaterial.h:65
std::vector< double > _XsTemperature
Definition NuclearMaterial.h:131
MaterialProperty< std::vector< Real > > & _chi_p
Definition NuclearMaterial.h:81
MaterialProperty< std::vector< Real > > & _diffcoef
Definition NuclearMaterial.h:78
std::vector< std::vector< Real > > _remxs_consts
Definition NuclearMaterial.h:133
std::vector< std::vector< Real > > _nubar_consts
Definition NuclearMaterial.h:135
MaterialProperty< Real > & _d_beta_d_temp
Definition NuclearMaterial.h:98
virtual void preComputeQpProperties()
Definition NuclearMaterial.C:290
std::vector< std::vector< Real > > _fisse_consts
Definition NuclearMaterial.h:137
std::map< std::string, std::vector< SplineInterpolation > > _xsec_spline_interpolators
Definition NuclearMaterial.h:122
std::map< std::string, int > _vec_lengths
Definition NuclearMaterial.h:128