- MElement mass in amu
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Element mass in amu
- ZNuclear charge in e
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Nuclear charge in e
- pka_generatorList of PKA generating user objects
C++ Type:std::vector<UserObjectName>
Controllable:No
Description:List of PKA generating user objects
- varVariables to rasterize
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:Variables to rasterize
MyTRIMRasterizer
Providing isotopic species and concentrations
MyTRIMRasterizer
uses information of the isotopic composition in the domain provided by MooseVariables specified in parameter var
to prepare a rasterized domain on which binary collision Monte Carlo is performed. Rasterization is the process of averaging smoothly varying compositional data over each FEM mesh element.
The entries in of the var
, M
, and Z
parameters are paired; we index them as , , and , respectively. Loosely speaking represents the number density of isotope at point , is the atomic mass, and is the charge in units of .
The physical meaning of the var
argument is specified in the var_physical_meaning
parameter: it can be either number density (atoms / volume) or stoichiometric content (number of atoms in compound). The number density should be given in the rasterizer's length units specified by the length_unit
parameter (defaults to Angstrom). If the physical meaning of the var parameter is stoichiometric content site_volume
must be provided. site_volume
is a material property and can hence vary with space; it is denoted by and its physical meaning is the volume of the compound related to the stoichiometric specification in var, e.g. . Note that site_volume
must always be specified in nanometers regardless of length_unit
.
MyTRIM computes the mass density of the material by:
where is Avogadro's number. We identify as the number density defined as the number of atoms of species per unit volume. The following choices for may be usage of the site_volume
parameter:
where : if length_unit
is nanometer, if length_unit
is Angstrom, if length_unit
is micro-meter: so that the user should store number densities in the variables specified in var
. Note that site_volume
will be set automatically in this case.
: should be the stoichiometric content of species . Using the example: , .
Computing the PKA list
Before performing damage cascades, the rasterizer computes the number of primary knock-on atoms (PKA) for each mesh element , mass and atomic number by:
where is the current time step, indexes the PKAGenerator
objects provided in the pka_generator
parameter, is the probability that PKAGenerator
produces a PKA with mass and atomic number , and is the recoil rate of PKAGenerator
that may depend on space. is an integer number so it is rounded to the next higher value with a probability proportional to its truncated integer complement ( would be with a probability of , and with a probability of ). The total number of PKAs is given by .
Scaling PKA rates
The rasterizer provides two parameters for modifying the number of simulated PKAs without biasing the results. The parameter max_pka_count
limits the number of PKAs roughly to the provided integer number denoted by . If the number of computed PKAs is smaller than or equal to max_pka_count
, the parameter is ignored. If the number of PKAs is larger than max_pka_count
, PKAs are accepted with a probability of . The actual number of PKAs is usually not identical to and is denoted by . Any tallied result is, e.g. vacancy or interstitial densities or energy deposition, are multiplied by .
The parameter recoil_rate_scaling
is a real number that is multiplied to the recoil rate . All tallied results are divided by recoil_rate_scaling
.
Recombination
A simple model for recombination within damage cascades is currently implemented. A vacancy-interstitial pair is annihilated if their distance is less than r_rec
. Note that r_rec
must be given in Angstrom. Recombination within damage cascades typically occurs within thermal spike areas where sufficient energy has been deposited to displace virtually all contained atoms. In thermal spike areas the atoms are effectively in a liquid state. Recrystallization takes place when energy has been dissipated from the thermal spike area and most Frenkel pairs annihilate. Surviving Frenkel pairs have usually been transported out of the melted zone through collision sequences along closely packed directions. The current recombination model does not accurately describe this physics.
Periodic variables
If all variables in the var
parameters are auxiliary variables, the rasterizer has to be made aware of periodic boundaries. The user needs to provide a nonlinear variable that the desired periodic variable apply to in the periodic_var
parameter.
Input Parameters
- EbindBinding energy in eV
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Binding energy in eV
- EdispDisplacement threshold in eV
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Displacement threshold in eV
- MtolTolerance on mass number for tagging PKAs with var id.
C++ Type:std::vector<double>
Unit:(no unit assumed)
Controllable:No
Description:Tolerance on mass number for tagging PKAs with var id.
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- length_unitANGSTROMLength units of the MOOSE mesh. MyTRIM contains pretabulated crossection data with units so this option must be set correctly to obtain physical results.
Default:ANGSTROM
C++ Type:MooseEnum
Options:ANGSTROM, NANOMETER, MICROMETER
Controllable:No
Description:Length units of the MOOSE mesh. MyTRIM contains pretabulated crossection data with units so this option must be set correctly to obtain physical results.
- max_nrt_difference0.2The largest max-norm difference between number fractions for reusing existing polyatomic NRT.
Default:0.2
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:The largest max-norm difference between number fractions for reusing existing polyatomic NRT.
- periodic_varOptional variables that determines the periodicity. If not supplied the first argument of 'var' will be used.
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:Optional variables that determines the periodicity. If not supplied the first argument of 'var' will be used.
- recoil_rate_scaling1A factor to scale computed reaction rates in the the PKAGenerator objects. This is useful to avoid extremely large PKA lists.
Default:1
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:A factor to scale computed reaction rates in the the PKAGenerator objects. This is useful to avoid extremely large PKA lists.
- site_volumeLattice site volume in nm^3 (regardless of the chosen mesh units)
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:Lattice site volume in nm^3 (regardless of the chosen mesh units)
- trim_moduleCORETRIM Module to run for optional capabilities like energy deposition
Default:CORE
C++ Type:MooseEnum
Options:CORE, ENERGY_DEPOSITION
Controllable:No
Description:TRIM Module to run for optional capabilities like energy deposition
- var_physical_meaningSTOICHIOMETRYThe physical meaning of the rasterizer variables.
Default:STOICHIOMETRY
C++ Type:MooseEnum
Options:STOICHIOMETRY, NUMBER_DENSITY
Controllable:No
Description:The physical meaning of the rasterizer variables.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- execute_onTIMESTEP_BEGINThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:TIMESTEP_BEGIN
C++ Type:ExecFlagEnum
Options:NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, FINAL, CUSTOM
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
Execution Scheduling Parameters
- analytical_energy_cutoff0Energy cutoff in eV below which recoils are not followed explicitly but effects are calculated analytically.
Default:0
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Energy cutoff in eV below which recoils are not followed explicitly but effects are calculated analytically.
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- interval1The time step interval at which TRIM BCMC is run
Default:1
C++ Type:unsigned int
Controllable:No
Description:The time step interval at which TRIM BCMC is run
- max_pka_countDesired number of PKAs to be run during each invocation of mytrim
C++ Type:unsigned int
Controllable:No
Description:Desired number of PKAs to be run during each invocation of mytrim
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Material Property Retrieval Parameters
- r_recRecombination radius in Angstrom. Frenkel pairs with a separation distance lower than this will be removed from the cascade
C++ Type:double
Unit:(no unit assumed)
Controllable:No
Description:Recombination radius in Angstrom. Frenkel pairs with a separation distance lower than this will be removed from the cascade
Recombination Parameters
Input Files
- (tests/polyatomic_cascade/polyatomic_cascade.i)
- (tests/radiation_damage/coupled_fission_mockup/damage_sub.i)
- (tests/srim_comparison/incident_ion_homogeneous.i)
- (tests/vectorpostprocessors/dirac_energy_result.i)
- (tests/radiation_damage/coupled_fission_mockup/damage_sub_3D.i)
- (examples/grand_potential_magpie/GP_MAGPIE_density.i)
- (tests/polyatomic_cascade/tagging.i)
- (tests/energy_deposition/balance.i)
- (examples/truncated_cascade_TaO/truncated_cascade_TaO.i)
- (tests/userobjects/mytrim/cascade_function.i)
- (tests/meshes/cascade_quad.i)
- (tests/vectorpostprocessors/mytrimdiracresult.i)
- (examples/coarsen_example.i)
- (tests/userobjects/mytrim/cascade_recombine.i)
- (tests/energy_deposition/elemental.i)
- (tests/userobjects/mytrim/cascade_replace.i)
- (tests/2D_vs_3D/Cu_in_Cu_3D.i)
- (tests/vectorpostprocessors/pkastatistics.i)
- (tests/polyatomic_cascade/truncated_cascade_TaO.i)
- (tests/2D_vs_3D/Cu_in_Cu_2D.i)
- (tests/vectorpostprocessors/pkalist.i)
- (tests/polyatomic_cascade/carbon_block_number_dens.i)
- (tests/meshes/cascade_amr.i)
- (tests/vectorpostprocessors/pkaenergyhistogram.i)
- (tests/meshes/cascade_3d.i)
- (tests/radiation_damage/alpha_decay/alpha.i)
- (tests/auxkernels/mytrim/density.i)
- (tests/polyatomic_cascade/monoatomic_cascade.i)
- (tests/userobjects/mytrim/cascade_dirac.i)
- (tests/userobjects/mytrim/UO2_pellet_initial.i)
- (tests/userobjects/mytrim/cascade.i)
References
No citations exist within this document.(tests/polyatomic_cascade/polyatomic_cascade.i)
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./cC]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.5
[../]
[./cSi]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.5
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[UserObjects]
[./constant]
type = PKAConstant
E = 1000
Z = 14
m = 28
pka_rate = 0.001
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'cC cSi'
M = '12 28'
Z = '6 14'
site_volume = 0.0404
pka_generator = constant
periodic_var = dummy
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./total_vacancies]
type = ElementIntegralVariablePostprocessor
variable = vac
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/radiation_damage/coupled_fission_mockup/damage_sub.i)
# dimensions are in Angstrom (A = 1e-10 m)
# typical treat fuel particle is rf = 20 mu-m = 2e5 A
# typical distance between fuel particles is D = 0.893 * rf / cube_root(1/2571)
# D = 244 mu-m = 2.44e6 A.
# the typical fuel particle distance is much larger than the mfp so we cut the domain
# at 4 * rf = 80 mu-m = 8e5 A
#
# _NOTE_ this calculation is actually for 3D but this is a 2D setup to save
# runtime
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 200
ny = 200
xmin = -8.0e5
xmax = 8.0e5
ymin = -8.0e5
ymax = 8.0e5
elem_type = QUAD4
uniform_refine = 0
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[c]
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[AuxVariables]
[int_U]
order = CONSTANT
family = MONOMIAL
[]
[vac_U]
order = CONSTANT
family = MONOMIAL
[]
[int_O]
order = CONSTANT
family = MONOMIAL
[]
[vac_O]
order = CONSTANT
family = MONOMIAL
[]
[int_C]
order = CONSTANT
family = MONOMIAL
[]
[vac_C]
order = CONSTANT
family = MONOMIAL
[]
[c_U]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_U
[]
[]
[c_O]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_O
[]
[]
[c_C]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_C
[]
[]
[pka_count]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[int_U_aux]
variable = int_U
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[]
[vac_U_aux]
variable = vac_U
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[]
[int_O_aux]
variable = int_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = INT
[]
[vac_O_aux]
variable = vac_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = VAC
[]
[int_C_aux]
variable = int_C
type = MyTRIMElementResultAux
runner = runner
ivar = 2
defect = INT
[]
[vac_C_aux]
variable = vac_C
type = MyTRIMElementResultAux
runner = runner
ivar = 2
defect = VAC
[]
[]
[UserObjects]
[neutronics_fission_generator]
type = PKAFissionFragmentNeutronics
partial_reaction_rates = '2.0e-11 0 0'
[]
[rasterizer]
type = MyTRIMRasterizer
var = 'c_U c_O c_C'
M = '235 16 12'
Z = '92 8 6'
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = neutronics_fission_generator
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Postprocessors]
#[./pka_info]
# type = MyTRIMPKAInfo
# rasterizer = rasterizer
# value_type = TOTAL_ENERGY
#[../]
[int_U_pp]
type = ElementIntegralVariablePostprocessor
variable = int_U
execute_on = timestep_end
[]
[vac_U_pp]
type = ElementIntegralVariablePostprocessor
variable = vac_U
execute_on = timestep_end
[]
[int_O_pp]
type = ElementIntegralVariablePostprocessor
variable = int_O
execute_on = timestep_end
[]
[vac_O_pp]
type = ElementIntegralVariablePostprocessor
variable = vac_O
execute_on = timestep_end
[]
[int_C_pp]
type = ElementIntegralVariablePostprocessor
variable = int_C
execute_on = timestep_end
[]
[vac_C_pp]
type = ElementIntegralVariablePostprocessor
variable = vac_C
execute_on = timestep_end
[]
[n_pkas]
type = ElementIntegralVariablePostprocessor
variable = pka_count
execute_on = timestep_end
[]
[]
[Functions]
[func_c_U]
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e5 8 0 0.3333333'
[]
[func_c_O]
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e5 8 0 0.66666666'
[]
[func_c_C]
# ev computed as follows:
# rho_G = 1.72 g/cc (see Kun MO's paper)
# rho_UO2 = 10.963 g/cc
# MUO2 = 235 + 2*16 = 267
# MG = 12
# xG = rho_G / rho_UO2 * MUO2 / MG = 3.4908
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e5 8 3.4908 0'
[]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
[]
(tests/srim_comparison/incident_ion_homogeneous.i)
#
# ions incident on a homogeneous slab
#
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 11
ny = 11
nz = 11
xmin = 0
xmax = 100000
ymin = -50000
ymax = 50000
zmin = -50000
zmax = 50000
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./dummys]
[../]
[]
[AuxVariables]
[./cC]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[UserObjects]
[./constant]
type = PKAGun
E = 1e3
Z = 14
m = 28
num_pkas = 100
point = '0 0 0'
direction = '1 0 0'
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'cC'
M = '12'
Z = '6'
Edisp = '16.3'
site_volume = 0.0404
pka_generator = constant
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./total_vacancies]
type = ElementIntegralVariablePostprocessor
variable = vac
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/vectorpostprocessors/dirac_energy_result.i)
box_half_length = 50
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 10
ny = 10
nz = 10
xmin = -${box_half_length}
xmax = ${box_half_length}
ymin = -${box_half_length}
ymax = ${box_half_length}
zmin = -${box_half_length}
zmax = ${box_half_length}
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
[../]
[]
[AuxVariables]
# unit is atoms per nm^3
[./c]
initial_condition = 84.91232
[../]
[]
[UserObjects]
[./pka_gun]
type = PKAGun
m = 63.55
Z = 29
E = 50e3
direction = '1 0 0'
point = '0 0 0'
num_pkas = 1
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = '63.55'
Z = '29'
pka_generator = pka_gun
length_unit = NANOMETER
var_physical_meaning = NUMBER_DENSITY
trim_module = ENERGY_DEPOSITION
[../]
[./runner]
type = MyTRIMDiracRun
rasterizer = rasterizer
[../]
[]
[VectorPostprocessors]
[./dirac_energy]
type = MyTRIMDiracEnergyResult
runner = runner
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
hide = c
[]
(tests/radiation_damage/coupled_fission_mockup/damage_sub_3D.i)
# dimensions are in Angstrom (A = 1e-10 m)
# typical treat fuel particle is rf = 20 mu-m = 2e5 A
# typical distance between fuel particles is D = 0.893 * rf / cube_root(1/2571)
# D = 244 mu-m = 2.44e6 A.
# the typical fuel particle distance is much larger than the mfp so we cut the domain
# at 4 * rf = 80 mu-m = 8e5 A
#
# runtime
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 100
ny = 100
nz = 100
xmin = -4.0e5
xmax = 4.0e5
ymin = -4.0e5
ymax = 4.0e5
zmin = -4.0e5
zmax = 4.0e5
uniform_refine = 0
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[c]
[InitialCondition]
type = ConstantIC
value = 1
[]
[]
[]
[AuxVariables]
[int_U]
order = CONSTANT
family = MONOMIAL
[]
[vac_U]
order = CONSTANT
family = MONOMIAL
[]
[int_O]
order = CONSTANT
family = MONOMIAL
[]
[vac_O]
order = CONSTANT
family = MONOMIAL
[]
[int_C]
order = CONSTANT
family = MONOMIAL
[]
[vac_C]
order = CONSTANT
family = MONOMIAL
[]
[c_U]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_U
[]
[]
[c_O]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_O
[]
[]
[c_C]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_C
[]
[]
[pka_count]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[int_U_aux]
variable = int_U
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[]
[vac_U_aux]
variable = vac_U
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[]
[int_O_aux]
variable = int_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = INT
[]
[vac_O_aux]
variable = vac_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = VAC
[]
[int_C_aux]
variable = int_C
type = MyTRIMElementResultAux
runner = runner
ivar = 2
defect = INT
[]
[vac_C_aux]
variable = vac_C
type = MyTRIMElementResultAux
runner = runner
ivar = 2
defect = VAC
[]
[]
[UserObjects]
[neutronics_fission_generator]
type = PKAFissionFragmentNeutronics
relative_density = 1
partial_reaction_rates = '1.0e-14 0 0'
[]
[rasterizer]
type = MyTRIMRasterizer
var = 'c_U c_O c_C'
M = '235 16 12'
Z = '92 8 6'
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = neutronics_fission_generator
print_pka_statistics = true
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Postprocessors]
[int_U_pp]
type = ElementIntegralVariablePostprocessor
variable = int_U
execute_on = timestep_end
[]
[vac_U_pp]
type = ElementIntegralVariablePostprocessor
variable = vac_U
execute_on = timestep_end
[]
[int_O_pp]
type = ElementIntegralVariablePostprocessor
variable = int_O
execute_on = timestep_end
[]
[vac_O_pp]
type = ElementIntegralVariablePostprocessor
variable = vac_O
execute_on = timestep_end
[]
[int_C_pp]
type = ElementIntegralVariablePostprocessor
variable = int_C
execute_on = timestep_end
[]
[vac_C_pp]
type = ElementIntegralVariablePostprocessor
variable = vac_C
execute_on = timestep_end
[]
[n_pkas]
type = ElementIntegralVariablePostprocessor
variable = pka_count
execute_on = timestep_end
[]
[]
[Functions]
[func_c_U]
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y+z*z); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e5 8 0 0.3333333'
[]
[func_c_O]
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y+z*z); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e5 8 0 0.66666666'
[]
[func_c_C]
# ev computed as follows:
# rho_G = 1.72 g/cc (see Kun MO's paper)
# rho_UO2 = 10.963 g/cc
# MUO2 = 235 + 2*16 = 267
# MG = 12
# xG = rho_G / rho_UO2 * MUO2 / MG = 3.4908
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y+z*z); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e5 8 3.4908 0'
[]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
[]
(examples/grand_potential_magpie/GP_MAGPIE_density.i)
# This is based on Larry's grandpotential.i file in marmot-problems/Magpie/examples
# The domain is 2D 400 nm x 400 nm with a xenon bubble in the middle of UO2 matrix, radius = 44 nm
# The variables are chemical potentials of U vacancies and interstitials, Xe atoms
# This is solving the rate theory equation for wi, wv, wg
# It is using a source term from MAGPIE based on BCMC
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0
xmax = 400
ymin = 0
ymax = 400
# uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = etam
[]
[Variables]
# chemical potentials for vacancies, interstitials and gas atoms
[wv]
[]
[wi]
[]
[wg]
[]
# order parameters: etab0 is the bubble, etam0 is the grain, etam1 is currently not used
[etab0]
[]
[etam0]
[]
[etam1]
[]
[]
[AuxVariables]
# grain boundaries
[bnds]
order = FIRST
family = LAGRANGE
[]
# concentration of Xe
[c_Xe]
order = CONSTANT
family = MONOMIAL
initial_condition = 0
[]
# number density variables created for the rasterizer in Magpie
[rho_U235]
order = CONSTANT
family = MONOMIAL
[]
[rho_U238]
order = CONSTANT
family = MONOMIAL
[]
[rho_O]
order = CONSTANT
family = MONOMIAL
[]
[rhog_var]
order = CONSTANT
family = MONOMIAL
[]
# concentrations of (other) defects
# vacancies
[cv]
order = CONSTANT
family = MONOMIAL
[]
# interstitials
[ci]
order = CONSTANT
family = MONOMIAL
[]
# number density of interstitials for the rasterizer
[rhoi_var]
order = CONSTANT
family = MONOMIAL
[]
# number of defects generated each time step
[interstitial_rate_Xe]
order = CONSTANT
family = MONOMIAL
[]
[vacancy_rate_U]
order = CONSTANT
family = MONOMIAL
[]
[interstitial_rate_U]
order = CONSTANT
family = MONOMIAL
[]
[interstitial_rate_i]
order = CONSTANT
family = MONOMIAL
[]
# burnup in GWd/tHM
[burnup_var]
order = CONSTANT
family = MONOMIAL
[]
# temperature
[T]
initial_condition = 1200
[]
# rate of absorbed defects due to dislocations
[absorbed_int]
order = CONSTANT
family = MONOMIAL
[]
[absorbed_vac]
order = CONSTANT
family = MONOMIAL
[]
# Replacement atoms
[rep_in_235]
order = CONSTANT
family = MONOMIAL
[]
[rep_out_235]
order = CONSTANT
family = MONOMIAL
[]
[rep_in_238]
order = CONSTANT
family = MONOMIAL
[]
[rep_out_238]
order = CONSTANT
family = MONOMIAL
[]
# Total number of uranium atoms lost to dislocation sinks
[total_U_lost]
order = CONSTANT
family = MONOMIAL
[]
# UO2 matrix density
[UO2_density]
order = CONSTANT
family = MONOMIAL
[]
[relative_density]
order = CONSTANT
family = MONOMIAL
initial_condition = 1.0
[]
[]
[ICs]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etam0]
type = FunctionIC
variable = etam0
function = ic_func_etam0
[]
[IC_etam1]
type = FunctionIC
variable = etam1
function = ic_func_etam1
[]
[IC_wv]
type = ConstantIC
value = 0.0
variable = wv
[]
[IC_wi]
type = ConstantIC
value = 0.0
variable = wi
[]
[IC_wg]
type = ConstantIC
value = 0.0
variable = wg
[]
[]
[Functions]
# bubble IC
[ic_func_etab0]
type = ParsedFunction
symbol_names = 'kappa mu'
symbol_values = '0.5273 0.004688'
expression = 'r:=sqrt((x-200)^2+(y-200)^2);0.5*(1.0-tanh((r-44)*sqrt(mu/2.0/kappa)))'
[]
# grain IC
[ic_func_etam0]
type = ParsedFunction
symbol_names = 'kappa mu'
symbol_values = '0.5273 0.004688'
expression = 'r:=sqrt((x-200)^2+(y-200)^2);0.5*(1.0+tanh((r-44)*sqrt(mu/2.0/kappa)))'
[]
[ic_func_etam1]
type = ParsedFunction
symbol_names = 'kappa mu'
symbol_values = '0.5273 0.004688'
expression = '0'
[]
# burnup function
[fburnup] # in GWD/tHM
type = ParsedFunction
value = 'q*sigmaf_u235*flux*t*950'
symbol_names = 'q sigmaf_u235 flux'
expressionø = '0.045 5.906e-22 1.5e13'
[]
# function to define the total number of lost U atoms to dislocations with a postprocessor, in the auxvariable total_U_lost, to use it in the material property
[lost_U_func]
type = ParsedFunction
symbol_values = total_U_lost_pp
symbol_names = total_U_lost_pp
value = 'total_U_lost_pp'
[]
[]
[BCs]
[Periodic]
[All]
auto_direction = 'x y' # 2D
[]
[]
[]
[Kernels]
# Order parameter eta_b0 for bubble phase
[ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etam0 etam1'
gamma_names = 'gmm gmm'
[]
[ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegab omegam'
hj_names = 'hb hm'
coupled_variables = 'etam0 etam1 wv wi wg'
[]
[ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[]
[eb0_dot]
type = TimeDerivative
variable = etab0
[]
# Order parameter eta_m0 for matrix grain 1
[ACm0_bulk]
type = ACGrGrMulti
variable = etam0
v = 'etab0 etam1'
gamma_names = 'gmb gmm'
[]
[ACm0_sw]
type = ACSwitching
variable = etam0
Fj_names = 'omegab omegam'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam1 wv wi wg'
[]
[ACm0_int]
type = ACInterface
variable = etam0
kappa_name = kappa
[]
[em0_dot]
type = TimeDerivative
variable = etam0
[]
# Order parameter eta_m1 for matrix grain 2
[ACm1_bulk]
type = ACGrGrMulti
variable = etam1
v = 'etab0 etam0'
gamma_names = 'gmb gmm'
[]
[ACm1_sw]
type = ACSwitching
variable = etam1
Fj_names = 'omegab omegam'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 wv wi wg'
[]
[ACm1_int]
type = ACInterface
variable = etam1
kappa_name = kappa
[]
[em1_dot]
type = TimeDerivative
variable = etam1
[]
#Chemical potential for vacancies
[wv_dot]
type = SusceptibilityTimeDerivative
variable = wv
property_name = chiv
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[]
[Diffusion_v]
type = MatDiffusion
variable = wv
D_name = Dchiv
coupled_variables = ''
[]
[coupled_v_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etab0
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[coupled_v_etam0dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etam0
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[coupled_v_etam1dot]
type = CoupledSwitchingTimeDerivative
variable = wv
v = etam1
Fj_names = 'rhovbub rhovmatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[vac_source_U238] # Magpie source term for U238
type = MyTRIMElementSource
variable = wv
runner = runner
ivar = 1
defect = VAC
prefactor = 0.04092
[]
[vac_source_U235] # Magpie source term for U235
type = MyTRIMElementSource
variable = wv
runner = runner
ivar = 0
defect = VAC
prefactor = 0.04092
[]
[recombination_v] # Recombination term = Recombination rate * rhoi * rhov
type = GrandPotentialRecombination
variable = wv
rho = rhov
rho_r = rhoi
value = 1
D = Di
omega = 0.04092
a0 = 0.25
Z = 50
hm = hm
coupled_variables = 'wi etab0 etam0'
[]
[dislocation_sink_v] # Dislocation sink = sink strength * Diffusion coefficient * rho
type = GrandPotentialSink
variable = wv
rho = rhov
D = D
mask = hm
value = 1
sink_strength = dislocation_density
coupled_variables = 'etab0 etam0 etam1'
[]
# Chemical potential for interstitials (same as vacancy)
[wi_dot]
type = SusceptibilityTimeDerivative
variable = wi
property_name = chii
coupled_variables = ''
[]
[Diffusion_i]
type = MatDiffusion
variable = wi
D_name = Dchii
coupled_variables = ''
[]
[coupled_i_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = wi
v = etab0
Fj_names = 'rhoibub rhoimatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[coupled_i_etam0dot]
type = CoupledSwitchingTimeDerivative
variable = wi
v = etam0
Fj_names = 'rhoibub rhoimatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[coupled_i_etam1dot]
type = CoupledSwitchingTimeDerivative
variable = wi
v = etam1
Fj_names = 'rhoibub rhoimatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[source_i_U238]
type = MyTRIMElementSource
variable = wi
runner = runner
ivar = 1
defect = INT
prefactor = 0.04092
[]
[source_i_U235]
type = MyTRIMElementSource
variable = wi
runner = runner
ivar = 0
defect = INT
prefactor = 0.04092
[]
[source_i_i]
type = MyTRIMElementSource
variable = wi
runner = runner
ivar = 4
defect = INT
prefactor = 0.04092
[]
[source_i_v]
type = MyTRIMElementSource
variable = wi
runner = runner
ivar = 4
defect = VAC
prefactor = -0.04092
[]
[recombination_i]
type = GrandPotentialRecombination
variable = wi
rho = rhoi
rho_r = rhov
value = 1
D = Di
omega = 0.04092
a0 = 0.25
Z = 50
hm = hm
coupled_variables = 'wv etab0 etam0'
[]
[dislocation_sink_i]
type = GrandPotentialSink
variable = wi
rho = rhoi
mask = hm
D = Di
value = 1.02
sink_strength = dislocation_density
coupled_variables = 'etab0 etam0 etam1'
[]
#Chemical potential for gas atoms
[wg_dot]
type = SusceptibilityTimeDerivative
variable = wg
property_name = chig
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[]
[Diffusion_g]
type = MatDiffusion
variable = wg
D_name = Dchig
coupled_variables = ''
[]
[coupled_g_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etab0
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[coupled_g_etam0dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etam0
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[coupled_g_etam1dot]
type = CoupledSwitchingTimeDerivative
variable = wg
v = etam1
Fj_names = 'rhogbub rhogmatrix'
hj_names = 'hb hm'
coupled_variables = 'etab0 etam0 etam1'
[]
[source_g]
type = MyTRIMElementSource
variable = wg
runner = runner
ivar = 3
defect = INT
prefactor = 0.04092
[]
[]
[AuxKernels]
# Numbers of defects created each time step
[interstitial_rate_Xe]
type = MyTRIMElementResultAux
runner = runner
defect = INT
variable = interstitial_rate_Xe
ivar = 3
execute_on = timestep_end
[]
[vacancy_rate_U]
type = MyTRIMElementResultAux
runner = runner
defect = VAC
variable = vacancy_rate_U
ivar = 1
execute_on = timestep_end
[]
[interstitial_rate_U]
type = MyTRIMElementResultAux
runner = runner
defect = INT
variable = interstitial_rate_U
ivar = 1
execute_on = timestep_end
[]
[interstitial_rate_i]
type = MyTRIMElementResultAux
runner = runner
defect = INT
variable = interstitial_rate_i
ivar = 4
execute_on = timestep_end
[]
[rep_in_rate_235]
type = MyTRIMElementResultAux
runner = runner
defect = REPLACEMENT_IN
variable = rep_in_235
ivar = 0
execute_on = timestep_end
[]
[rep_out_rate_235]
type = MyTRIMElementResultAux
runner = runner
defect = REPLACEMENT_OUT
variable = rep_out_235
ivar = 0
execute_on = timestep_end
[]
[rep_in_rate_238]
type = MyTRIMElementResultAux
runner = runner
defect = REPLACEMENT_IN
variable = rep_in_238
ivar = 1
execute_on = timestep_end
[]
[rep_out_rate_238]
type = MyTRIMElementResultAux
runner = runner
defect = REPLACEMENT_OUT
variable = rep_out_238
ivar = 1
execute_on = timestep_end
[]
# Grain boundaries
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[]
# Number densities for different concentrations (U,O,Xe,Uint)
[rho_U235_aux] # U235
type = MaterialRealAux
property = rho_U235_matl
variable = rho_U235
execute_on = 'initial timestep_begin'
[]
[rho_U238_aux] # U238
type = MaterialRealAux
property = rho_U238_matl
variable = rho_U238
execute_on = 'initial timestep_begin'
[]
[rho_O] # Oxygen
type = MaterialRealAux
property = rho_O_matl
variable = rho_O
execute_on = 'initial timestep_begin'
[]
[rhog_aux] # Xenon
type = MaterialRealAux
property = rhog
variable = rhog_var
execute_on = 'initial timestep_begin'
[]
[rhoi_aux] # U interstitial
type = MaterialRealAux
property = rhoi
variable = rhoi_var
execute_on = 'initial timestep_begin'
[]
# Number fractions of point defects
[cv_aux]
type = MaterialRealAux
property = cv_mat
variable = cv
execute_on = 'initial timestep_begin'
[]
[ci_aux]
type = MaterialRealAux
property = ci_mat
variable = ci
execute_on = 'initial timestep_begin'
[]
[c_Xe]
type = MaterialRealAux
property = c_Xe_matl
variable = c_Xe
execute_on = 'initial timestep_begin'
[]
# U lost to dislocations
[lost_U_aux]
type = FunctionAux
variable = total_U_lost
function = lost_U_func
execute_on = timestep_end
[]
# Auxkernels for sink rates
# The value of absorbed_int/vac is integrated over the domain to get the total number of atoms absorbed (see postprocessor)
# It is also multiplied by the time step because the absorption rate is per second
[disloc_absorption_int]
type = SinkAbsorptionRate
variable = absorbed_int
rho = rhoi
D = Di
mask = hm
sink_strength = disloc_density_dt
[]
[disloc_absorption_vac]
type = SinkAbsorptionRate
variable = absorbed_vac
rho = rhov
D = D
mask = hm
sink_strength = disloc_density_dt
[]
# Burnup auxkernel defined by the function fburnup
[burnup_aux]
type = FunctionAux
function = fburnup
variable = burnup_var
[]
# UO2 density aukernel that defines the density from the material property
# Density is not required as an auxvariable, but it could make coupling easier
[UO2_density_aux]
type = MaterialRealAux
variable = UO2_density
property = UO2_density_matl
[]
[relative_density_aux]
type = MaterialRealAux
variable = relative_density
property = relative_density_matl
[]
[]
[Materials]
# Switching functions for bubble and matrix
[hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etab0 etam0 etam1'
phase_etas = 'etab0'
# outputs = exodus
[]
[hm]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hm
all_etas = 'etab0 etam0 etam1'
phase_etas = 'etam0 etam1'
outputs = exodus
[]
# Grand potential densities for bubble and matrix
[omegab]
type = DerivativeParsedMaterial
coupled_variables = 'wv wi wg'
property_name = omegab
material_property_names = 'Va kvbub cvbubeq kibub cibubeq kgbub cgbubeq f0'
expression = '-0.5*wv^2/Va^2/kvbub-wv/Va*cvbubeq-0.5*wi^2/Va^2/kibub-wi/Va*cibubeq-0.5*wg^2/Va^2/kgbub-wg/Va*cgbubeq+f0'
derivative_order = 2
#outputs = exodus
[]
[omegam]
type = DerivativeParsedMaterial
coupled_variables = 'wv wi wg'
property_name = omegam
material_property_names = 'Va kvmatrix cvmatrixeq kimatrix cimatrixeq kgmatrix cgmatrixeq'
expression = '-0.5*wv^2/Va^2/kvmatrix-wv/Va*cvmatrixeq-0.5*wi^2/Va^2/kimatrix-wi/Va*cimatrixeq-0.5*wg^2/Va^2/kgmatrix-wg/Va*cgmatrixeq'
derivative_order = 2
#outputs = exodus
[]
# Number densities defind in each phase for each defect (vacancy, interstitial, gas atoms)
[rhovbub]
type = DerivativeParsedMaterial
coupled_variables = 'wv'
property_name = rhovbub
material_property_names = 'Va kvbub cvbubeq'
expression = 'wv/Va^2/kvbub + cvbubeq/Va'
derivative_order = 2
# outputs = exodus
[]
[rhovmatrix]
type = DerivativeParsedMaterial
coupled_variables = 'wv'
property_name = rhovmatrix
material_property_names = 'Va kvmatrix cvmatrixeq'
expression = 'wv/Va^2/kvmatrix + cvmatrixeq/Va'
derivative_order = 2
# outputs = exodus
[]
[rhoibub]
type = DerivativeParsedMaterial
coupled_variables = 'wi'
property_name = rhoibub
material_property_names = 'Va kibub cibubeq'
expression = 'wi/Va^2/kibub + cibubeq/Va'
derivative_order = 2
#outputs = exodus
[]
[rhoimatrix]
type = DerivativeParsedMaterial
coupled_variables = 'wi'
property_name = rhoimatrix
material_property_names = 'Va kimatrix cimatrixeq'
expression = 'wi/Va^2/kimatrix + cimatrixeq/Va'
derivative_order = 2
#outputs = exodus
[]
[rhogbub]
type = DerivativeParsedMaterial
coupled_variables = 'wg'
property_name = rhogbub
material_property_names = 'Va kgbub cgbubeq'
expression = 'wg/Va^2/kgbub + cgbubeq/Va'
derivative_order = 2
#outputs = exodus
[]
[rhogmatrix]
type = DerivativeParsedMaterial
coupled_variables = 'wg'
property_name = rhogmatrix
material_property_names = 'Va kgmatrix cgmatrixeq'
expression = 'wg/Va^2/kgmatrix + cgmatrixeq/Va'
derivative_order = 2
#outputs = exodus
[]
# Total number densities in the whole domain for each defect
[rhov]
type = DerivativeParsedMaterial
coupled_variables = 'wv'
property_name = rhov
material_property_names = 'hm hb rhovmatrix(wv) rhovbub(wv)'
expression = 'hm * rhovmatrix + hb * rhovbub'
derivative_order = 2
# outputs = exodus
[]
[rhoi]
type = DerivativeParsedMaterial
coupled_variables = 'wi'
property_name = rhoi
material_property_names = 'hm hb rhoimatrix(wi) rhoibub(wi)'
expression = 'hm * rhoimatrix + hb * rhoibub'
derivative_order = 2
# outputs = exodus
[]
[rhog]
type = DerivativeParsedMaterial
coupled_variables = 'wg'
property_name = rhog
material_property_names = 'hm hb rhogmatrix(wg) rhogbub(wg)'
expression = 'hm * rhogmatrix + hb * rhogbub'
derivative_order = 2
# outputs = exodus
[]
# U and O number densities
[rho_U235_matl]
type = ParsedMaterial
material_property_names = c_U235_matl
property_name = rho_U235_matl
constant_names = Va
constant_expressions = 0.04092
expression = 'c_U235_matl/Va'
# outputs = exodus
[]
[rho_U238_matl]
type = ParsedMaterial
material_property_names = c_U238_matl
property_name = rho_U238_matl
constant_names = Va
constant_expressions = 0.04092
expression = 'c_U238_matl/Va'
# outputs = exodus
[]
[rho_O_matl]
type = ParsedMaterial
material_property_names = 'c_O_matl'
property_name = rho_O_matl
constant_names = Va
constant_expressions = 0.04092
expression = 'c_O_matl/Va/2'
# outputs = exodus
[]
# Constants
[const]
type = GenericConstantMaterial
prop_names = 'kappa mu L D Va cvbubeq cgbubeq cibubeq kgbub kvbub kibub gmb gmm T Efvbar Efgbar kTbar f0 tgrad_corr_mult kappa_c kappa_op gamma_asymm Di'
prop_values = '0.5273 0.004688 0.1 0.01 0.04092 0.5459 0.4541 0.0 1.41 1.41 1.41 0.9218 1.5 1200 7.505e-3 7.505e-3 2.588e-4 0.0 0.0 1.0 0.5273 1.5 1 '
[]
# Equilibrium concentrations of defects
[cvmatrixeq] #For values, see Li et al., Nuc. Inst. Methods in Phys. Res. B, 303, 62-27 (2013).
type = ParsedMaterial
property_name = cvmatrixeq
material_property_names = 'T'
constant_names = 'kB Efv'
constant_expressions = '8.6173324e-5 3.0'
expression = 'exp(-Efv/(kB*T))'
[]
[cimatrixeq]
type = ParsedMaterial
property_name = cimatrixeq
material_property_names = 'T'
constant_names = 'kB Efi'
constant_expressions = '8.6173324e-5 3.0'
expression = 'exp(-Efi/(kB*T))'
[]
[cgmatrixeq]
type = ParsedMaterial
property_name = cgmatrixeq
material_property_names = 'T'
constant_names = 'kB Efg'
constant_expressions = '8.6173324e-5 3.0'
expression = 'exp(-Efg/(kB*T))'
[]
# See free energy expression
[kvmatrix_parabola]
type = ParsedMaterial
property_name = kvmatrix
material_property_names = 'T cvmatrixeq'
constant_names = 'c0v c0g a1 a2'
constant_expressions = '0.01 0.01 0.178605-0.0030782*log(1-c0v)+0.0030782*log(c0v) 0.178605-0.00923461*log(1-c0v)+0.00923461*log(c0v)'
expression = '((-a2+3*a1)/(4*(c0v-cvmatrixeq))+(a2-a1)/(2400*(c0v-cvmatrixeq))*T)'
# outputs = exodus
[]
[kimatrix_parabola]
type = ParsedMaterial
property_name = kimatrix
material_property_names = 'kvmatrix'
expression = 'kvmatrix'
[]
[kgmatrix_parabola]
type = ParsedMaterial
property_name = kgmatrix
material_property_names = 'kvmatrix'
expression = 'kvmatrix'
[]
# Material properties to define the number fractions of U, O, Xe, U vacancy and interstitial
[c_U235_matl]
type = ParsedMaterial
property_name = c_U235_matl
material_property_names = 'hm'
expression = 'hm*0.01485'
outputs = exodus
[]
[c_U238_matl]
type = ParsedMaterial
property_name = c_U238_matl
material_property_names = 'hm'
expression = 'hm*0.31515'
outputs = exodus
[]
[c_O_matl]
type = ParsedMaterial
property_name = c_O_matl
material_property_names = 'hm'
expression = '0.66*hm'
outputs = exodus
[]
[c_Xe_matl]
type = ParsedMaterial
property_name = c_Xe_matl
material_property_names = 'hm hb Va rhogmatrix rhogbub'
expression = 'Va * (hm * rhogmatrix + hb * rhogbub)'
[]
[cv_mat]
type = ParsedMaterial
property_name = cv_mat
material_property_names = 'hm hb Va rhovmatrix rhovbub'
expression = 'Va * (hm * rhovmatrix + hb * rhovbub)'
outputs = exodus
[]
[ci_mat]
type = ParsedMaterial
property_name = ci_mat
material_property_names = 'hm hb Va rhoimatrix rhoibub'
expression = 'Va * (hm * rhoimatrix + hb * rhoibub)'
outputs = exodus
[]
# Mobilities for Grand Potential Model
[Mobility_v]
type = DerivativeParsedMaterial
property_name = Dchiv
material_property_names = 'D chiv'
expression = 'D*chiv'
derivative_order = 2
#outputs = exodus
[]
[Mobility_i]
type = DerivativeParsedMaterial
property_name = Dchii
material_property_names = 'Di chii'
expression = 'Di*chii'
derivative_order = 2
#outputs = exodus
[]
[Mobility_g]
type = DerivativeParsedMaterial
property_name = Dchig
material_property_names = 'Dtot chig'
expression = 'Dtot*chig'
derivative_order = 2
#outputs = exodus
[]
# Susceptibilities
[chiv]
type = DerivativeParsedMaterial
property_name = chiv
material_property_names = 'Va hb kvbub hm kvmatrix '
expression = '(hm/kvmatrix + hb/kvbub) / Va^2'
derivative_order = 2
# outputs = exodus
[]
[chii]
type = DerivativeParsedMaterial
property_name = chii
material_property_names = 'Va hb kibub hm kimatrix '
expression = '(hm/kimatrix + hb/kibub) / Va^2'
derivative_order = 2
# outputs = exodus
[]
[chig]
type = DerivativeParsedMaterial
property_name = chig
material_property_names = 'Va hb kgbub hm kgmatrix '
expression = '(hm/kgmatrix + hb/kgbub) / Va^2'
derivative_order = 2
# outputs = exodus
[]
# Dislocation density per nm2
[dislocation_density]
type = ParsedMaterial
property_name = dislocation_density
coupled_vars = 'burnup_var'
expression = '(10^(2.2e-2*burnup_var+13.8))*1e-18' #This is an empirical expression https://www.sciencedirect.com/science/article/pii/S002231151200637X
# outputs = exodus
[]
# Dislocation density per nm2 * time step in sec
[disloc_dens_dt]
type = ParsedMaterial
property_name = disloc_density_dt
material_property_names = 'dislocation_density dt'
function = 'dislocation_density * dt'
# outputs = exodus
[]
# Computes the difference between absorbed interstitials and vacancies only in the matrix (not in the interface nor the bubble phase)
[U_lost_mat]
type = ParsedMaterial
coupled_variables = 'absorbed_int absorbed_vac'
property_name = U_lost_mat
function = 'if(absorbed_int > absorbed_vac, absorbed_int - absorbed_vac, 0)'
[]
# Computes the change in the UO2 density in the matrix
[UO2_density_matl]
type = ParsedMaterial
coupled_variables = 'total_U_lost'
property_name = UO2_density_matl
material_property_names = 'hm'
constant_names = 'theo_dens initial_vol Va' # Va is the atomic volume
constant_expressions = '10.97 1.537735e+05 0.04092'
function = 'initial_vol * theo_dens/(initial_vol + Va*(total_U_lost))'
# outputs = exodus
[]
[relative_density_matl]
type = ParsedMaterial
property_name = relative_density_matl
material_property_names = 'UO2_density_matl hm'
constant_names = 'theo_dens' # Va is the atomic volume
constant_expressions = '10.97'
function = 'if(hm > 0.95, UO2_density_matl/theo_dens, 0.0)'
[]
# Time step material
[dt]
type = TimeStepMaterial
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
# total number of defects in each time step
[total_Xe_interstitial_production]
type = ElementIntegralVariablePostprocessor
variable = interstitial_rate_Xe
[]
[total_U_vacancy_production]
type = ElementIntegralVariablePostprocessor
variable = vacancy_rate_U
[]
[total_U_interstitial_production]
type = ElementIntegralVariablePostprocessor
variable = interstitial_rate_U
[]
[total_i_interstitial_production]
type = ElementIntegralVariablePostprocessor
variable = interstitial_rate_i
[]
#
# [./total_rep_in_235_production]
# type = ElementIntegralVariablePostprocessor
# variable = rep_in_235
# [../]
#
# [./total_rep_out_235_production]
# type = ElementIntegralVariablePostprocessor
# variable = rep_out_235
# [../]
#
# [./total_rep_in_238_production]
# type = ElementIntegralVariablePostprocessor
# variable = rep_in_238
# [../]
#
# [./total_rep_out_238_production]
# type = ElementIntegralVariablePostprocessor
# variable = rep_out_238
# [../]
# average number fraction of defect
[cv_average]
type = ElementAverageValue
variable = cv
[]
[ci_average]
type = ElementAverageValue
variable = ci
[]
[cg_average]
type = ElementAverageValue
variable = c_Xe
[]
# initial matrix volume
[UO2_volume]
type = ElementIntegralMaterialProperty
mat_prop = hm
execute_on = initial
[]
# time step
[dt]
type = TimestepSize
[]
# Total number of absorbed U atoms in each time step
[lost_U_pp]
type = ElementIntegralMaterialProperty
mat_prop = U_lost_mat
[]
# Cumulative number of absorbed u atoms at dislocations
[total_U_lost_pp]
type = CumulativeValuePostprocessor
postprocessor = lost_U_pp
[]
# Average UO2 density
[my_density]
type = ElementAverageValue
variable = UO2_density
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
# solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type'
petsc_options_value = 'asm 1 ilu'
l_max_its = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 1500
dtmax = 1e6
nl_abs_tol = 1e-10
[TimeStepper]
type = IterationAdaptiveDT
dt = 1000
optimal_iterations = 8
iteration_window = 2
[]
[]
[UserObjects]
active = 'rasterizer runner neutronics_fission_generator'
[neutronics_fission_generator]
type = PKAFissionFragmentEmpirical
relative_density = 'relative_density'
fission_rate = 1.5e-08
[]
[xenon]
type = PKAConstant
pka_rate = 3e-8
m = 131
Z = 54
E = 70e6
[]
[rasterizer]
type = MyTRIMRasterizer
var = 'rho_U235 rho_U238 rho_O rhog_var rhoi_var'
M = '235 238 16 135 238'
Z = '92 92 8 54 92'
site_volume = 1 # nm^3 per UO2 unit
periodic_var = wv
pka_generator = neutronics_fission_generator
length_unit = NANOMETER
max_pka_count = 1000
recoil_rate_scaling = 1e2
r_rec = 5.45
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Adaptivity]
marker = errorfrac
max_h_level = 2
[Indicators]
[error]
type = GradientJumpIndicator
variable = bnds
[]
[]
[Markers]
[errorfrac]
type = ErrorFractionMarker
coarsen = 0.1
indicator = error
refine = 0.7
[]
[]
[]
[Outputs]
exodus = true
csv = true
file_base = density
[]
(tests/polyatomic_cascade/tagging.i)
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./cC]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.5
[../]
[./cSi]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.5
[../]
[./cXe]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.0
[../]
[./int]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 2
defect = INT
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[UserObjects]
[./ffe]
type = PKAFissionFragmentEmpirical
fission_rate = 0.00001
relative_density = 1
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'cC cSi cXe'
M = '12 28 136'
Z = '6 14 54'
# MTol = '0.5 0.5 4'
site_volume = 0.0404
pka_generator = ffe
periodic_var = dummy
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./total_vacancies]
type = ElementIntegralVariablePostprocessor
variable = int
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/energy_deposition/balance.i)
#
# This input logs the total energy of all PKAs each timestep and compares
# it to the deposited electronic and nuclear energy (due to stopping) and
# the potential energy of the vacancies that are created.
# Epka - Estopping - Evac != 0 to ensure conservation of energy!
# The equation above only holds under periodic boundary conditions or if
# no recoil leaves the simulation box!
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 100
ymin = 0
ymax = 100
[]
[Functions]
[ebalance]
type = ParsedFunction
symbol_names = 'Edep Evac Epka'
symbol_values = 'Edep Evac Epka'
expression = 'Epka - Edep - Evac'
[]
[]
[Variables]
[c]
initial_condition = 1.0
[]
[]
[BCs]
# the composition field used by the rasterizer is marked as periodic
[Periodic]
[all]
variable = c
auto_direction = 'x y'
[]
[]
[]
[AuxVariables]
[edep]
# deposited energy density (electronic and nuclear stopping)
order = CONSTANT
family = MONOMIAL
[]
[vac]
# number density of vacancies created
order = CONSTANT
family = MONOMIAL
[]
[evac]
# potential energy density of the vacancies created
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[edep]
type = MyTRIMElementEnergyAux
variable = edep
runner = runner
execute_on = timestep_end
[]
[int]
type = MyTRIMElementResultAux
variable = vac
runner = runner
defect = VAC
ivar = 0
execute_on = timestep_end
[]
[evac]
type = ParsedAux
variable = evac
coupled_variables = vac
# binding energy is 3eV, so that is what we take as vacancy formation energy
expression = 3.0*vac
execute_on = timestep_end
[]
[]
[UserObjects]
[constant]
# fixed energy (10keV) model ions (approx Calcium)
type = PKAConstant
E = 10000
m = 40
Z = 20
pka_rate = 1e-3
[]
[rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per atom
pka_generator = constant
trim_module = ENERGY_DEPOSITION
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Postprocessors]
[Edep]
type = ElementIntegralVariablePostprocessor
variable = edep
execute_on = timestep_end
[]
[Evac]
type = ElementIntegralVariablePostprocessor
variable = evac
execute_on = timestep_end
[]
[Epka]
type = MyTRIMPKAInfo
rasterizer = rasterizer
value_type = TOTAL_ENERGY
[]
[Ebalance]
type = FunctionValuePostprocessor
function = ebalance
[]
[CountOctant]
type = MyTRIMPKAInConeInfo
cone_axis = '1 1 1'
# this corresponds to a solid angle of pi / 2 = one octant
opening_angle = 1.4454684
rasterizer = rasterizer
value_type = TOTAL_NUMBER
[]
[CountAll]
type = MyTRIMPKAInfo
rasterizer = rasterizer
value_type = TOTAL_NUMBER
[]
[]
[Problem]
kernel_coverage_check = false
solve = true
[]
[Executioner]
type = Transient
num_steps = 3
nl_abs_tol = 1e-10
[]
[Outputs]
csv = true
[]
(examples/truncated_cascade_TaO/truncated_cascade_TaO.i)
#
# Unit is Angstrom, N_Ta and N_O are number densities # / volume and the volume
# is in A^3. Total number density N = 0.048
#
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 50
ny = 50
nz = 50
xmin = 0
xmax = 1e5
ymin = 0
ymax = 1e5
zmin = 0
zmax = 1e5
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[dummy]
[]
[]
[AuxVariables]
[N_Ta]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = numd_Ta
[]
[]
[N_O]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = numd_O
[]
[]
[vac_Ta]
order = CONSTANT
family = MONOMIAL
[]
[vac_O]
order = CONSTANT
family = MONOMIAL
[]
[inter_Ta]
order = CONSTANT
family = MONOMIAL
[]
[inter_O]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[numd_Ta]
type = ParsedFunction
expression = 'N := 0.048; L := 1e5; N * x / L'
[]
[numd_O]
type = ParsedFunction
expression = 'N := 0.048; L := 1e5; N * (1 - x / L)'
[]
[]
[AuxKernels]
[vac_Ta]
variable = vac_Ta
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[]
[vac_O]
variable = vac_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = VAC
[]
[inter_Ta]
variable = inter_Ta
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[]
[inter_O]
variable = inter_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = INT
[]
[]
[UserObjects]
[constant]
type = PKAGun
Z = 8
m = 16
num_pkas = 10000
E = 5e5
point = '0.001 5e4 5e4'
direction = '1 0 0'
[]
[rasterizer]
type = MyTRIMRasterizer
var = 'N_Ta N_O'
M = '181 16'
Z = '73 8'
Ebind = '3 5'
Edisp = '60 40'
site_volume = 1
pka_generator = constant
# control NRT
max_nrt_difference = 0.25
analytical_energy_cutoff = 1e3
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Postprocessors]
[integral_vac_Ta]
type = ElementIntegralVariablePostprocessor
variable = vac_Ta
[]
[integral_vac_O]
type = ElementIntegralVariablePostprocessor
variable = vac_O
[]
[integral_inter_Ta]
type = ElementIntegralVariablePostprocessor
variable = inter_Ta
[]
[integral_inter_O]
type = ElementIntegralVariablePostprocessor
variable = inter_O
[]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/userobjects/mytrim/cascade_function.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -100
xmax = 100
ymin = -100
ymax = 100
[]
[Variables]
[./c_U]
initial_condition = 1.0
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = c_U
auto_direction = 'x y'
[../]
[../]
[]
[AuxVariables]
[./int]
order = CONSTANT
family = MONOMIAL
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[./c_O]
initial_condition = 2.0
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[AuxKernels]
[./int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[../]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[UserObjects]
[./func_pka]
type = PKAFunction
m = 238
Z = 54
E = '1000*10^t'
pka_rate = (0.6-t)*0.1
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'c_U c_O'
M = '235 16 '
Z = '92 8 '
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = func_pka
r_rec = 0
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./int]
type = ElementIntegralVariablePostprocessor
variable = int
execute_on = timestep_end
[../]
[./vac]
type = ElementIntegralVariablePostprocessor
variable = vac
execute_on = timestep_end
[../]
[./npka]
type = MyTRIMPKAInfo
rasterizer = rasterizer
value_type = TOTAL_NUMBER
[../]
[./E]
type = FunctionValuePostprocessor
function = '1000*10^t'
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 5
nl_abs_tol = 1e-10
[]
[Outputs]
csv = true
[]
(tests/meshes/cascade_quad.i)
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 60
ny = 60
xmin = 0
xmax = 200
ymin = -60
ymax = 140
elem_type = QUAD4
[]
[Variables]
[./c]
initial_condition = 1.0
[../]
[]
[AuxVariables]
[./int]
order = CONSTANT
family = MONOMIAL
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = c
[../]
[./diff]
type = Diffusion
variable = c
[../]
[]
[AuxKernels]
[./int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[../]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[UserObjects]
[./constant]
type = PKAConstant
E = 1000
Z = 60
m = 120
pka_rate = 0.01
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = constant
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/vectorpostprocessors/mytrimdiracresult.i)
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 60
ny = 60
xmin = -1000
xmax = 1000
ymin = 0
ymax = 2000
[]
[AuxVariables]
[./c]
initial_condition = 1.0
[../]
[]
[Variables]
[./u]
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[UserObjects]
[./thermal_fission]
type = PKAConstant
E = 200
Z = 40
m = 80
pka_rate = 2e-3
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[../]
[./runner]
type = MyTRIMDiracRun
rasterizer = rasterizer
[../]
[]
[VectorPostprocessors]
[./int]
type = MyTRIMDiracResult
runner = runner
defect = INT
ivar = 0
[../]
[./vac]
type = MyTRIMDiracResult
runner = runner
defect = VAC
ivar = 0
[../]
[./pka]
type = PKAList
rasterizer = rasterizer
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'TIMESTEP_END'
csv = true
[]
(examples/coarsen_example.i)
#
# Demonstarte how to use adaptive mesh coarsening to generate an output showing
# defect tracks at a desired detail level withthe least amount of mesh elements
#
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 8
ny = 8
xmin = -2e5
xmax = 2e5
ymin = -2e5
ymax = 2e5
zmin = -2e5
zmax = 2e5
uniform_refine = 4
[]
[Variables]
[v]
initial_condition = 0.0
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxVariables]
[int]
order = CONSTANT
family = MONOMIAL
[]
[vac]
order = CONSTANT
family = MONOMIAL
[]
[c_U]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_U
[]
[]
[c_O]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_O
[]
[]
[c_C]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = func_c_C
[]
[]
[c]
initial_condition = 1.0
[]
[]
[Kernels]
[dt]
type = TimeDerivative
variable = v
[]
[diff]
type = Diffusion
variable = v
[]
[src]
type = MyTRIMElementSource
variable = v
runner = runner
ivar = 2
defect = VAC
[]
[]
[AuxKernels]
[int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 2
defect = INT
[]
[vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 2
defect = VAC
[]
[]
[UserObjects]
[fision]
type = PKAFissionFragmentEmpirical
relative_density = 1
fission_rate = 4.0e-11
[]
[rasterizer]
type = MyTRIMRasterizer
var = 'c_U c_O c_C'
M = '235 16 12'
Z = '92 8 6'
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = fision
print_pka_statistics = true
interval = 2
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Adaptivity]
[Markers]
[marker]
type = ValueThresholdMarker
variable = v
coarsen = 1e-9
refine = 1e9
[]
[]
marker = marker
max_h_level = 4
start_time = 0.1
cycles_per_step = 4
[]
[Functions]
[func_c_U]
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e4 2 0 0.3333333'
[]
[func_c_O]
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e4 2 0 0.66666666'
[]
[func_c_C]
# ev computed as follows:
# rho_G = 1.72 g/cc (see Kun MO's paper)
# rho_UO2 = 10.963 g/cc
# MUO2 = 235 + 2*16 = 267
# MG = 12
# xG = rho_G / rho_UO2 * MUO2 / MG = 3.4908
type = ParsedFunction
expression = 'r := sqrt(x*x+y*y); rho := if(r/rf<1.0e-10,1.0e-10,r/rf); th := tanh(a*(rho-1/rho)); 0.5 * (1+th) * ev + 0.5 * (1-th) * iv'
symbol_names = 'rf a ev iv'
symbol_values = '2.0e4 2 3.4908 0'
[]
[]
[Executioner]
type = Transient
num_steps = 2
nl_abs_tol = 1e-10
[TimeStepper]
type = TimeSequenceStepper
time_sequence = '1 1.0001'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(tests/userobjects/mytrim/cascade_recombine.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -100
xmax = 100
ymin = -100
ymax = 100
[]
[Variables]
[./c]
initial_condition = 1.0
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = c
auto_direction = 'x y'
[../]
[../]
[]
[AuxVariables]
[./int]
order = CONSTANT
family = MONOMIAL
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[AuxKernels]
[./int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[../]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[UserObjects]
[./thermal_fission]
type = PKAFixedPointGenerator
m = 131
Z = 54
E = 100000 # 100keV
point = '0 0 0'
num_pkas = 10
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
r_rec = 5
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./int]
type = ElementIntegralVariablePostprocessor
variable = int
execute_on = timestep_end
[../]
[./vac]
type = ElementIntegralVariablePostprocessor
variable = vac
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
hide = c
[]
(tests/energy_deposition/elemental.i)
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 50
ny = 50
xmin = -100
xmax = 100
ymin = 0
ymax = 200
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./source]
type = MyTRIMElementHeatSource
variable = T
runner = runner
[../]
[./conduction]
type = Diffusion
variable = T
[../]
[./time]
type = TimeDerivative
variable = T
[../]
[]
[AuxVariables]
[./edep]
order = CONSTANT
family = MONOMIAL
[../]
[./c]
initial_condition = 1.0
[../]
[]
[AuxKernels]
[./edep]
variable = edep
type = MyTRIMElementEnergyAux
runner = runner
[../]
[]
[UserObjects]
[./thermal_fission]
type = PKAFissionFragmentEmpirical
relative_density = 1
fission_rate = 0.01
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
trim_module = ENERGY_DEPOSITION
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./E]
type = ElementIntegralVariablePostprocessor
variable = edep
execute_on = timestep_end
[../]
[./pka_total_E]
type = MyTRIMPKAInfo
rasterizer = rasterizer
value_type = TOTAL_ENERGY
[../]
[./pka_total_Z]
type = MyTRIMPKAInfo
rasterizer = rasterizer
value_type = TOTAL_CHARGE
[../]
[./pka_total_m]
type = MyTRIMPKAInfo
rasterizer = rasterizer
value_type = TOTAL_MASS
[../]
[./pka_total_num]
type = MyTRIMPKAInfo
rasterizer = rasterizer
value_type = TOTAL_NUMBER
[../]
[]
[Executioner]
type = Transient
num_steps = 3
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
hide = c
[]
(tests/userobjects/mytrim/cascade_replace.i)
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 20
ny = 20
xmin = -100
xmax = 100
ymin = 0
ymax = 200
[]
[Variables]
[./c0]
initial_condition = 0.5
[../]
[./c1]
initial_condition = 0.5
[../]
[]
[AuxVariables]
[./rep0_in]
order = CONSTANT
family = MONOMIAL
[../]
[./rep0_out]
order = CONSTANT
family = MONOMIAL
[../]
[./rep1_in]
order = CONSTANT
family = MONOMIAL
[../]
[./rep1_out]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[AuxKernels]
[./rep0_in]
variable = rep0_in
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = REPLACEMENT_IN
[../]
[./rep0_out]
variable = rep0_out
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = REPLACEMENT_OUT
[../]
[./rep1_in]
variable = rep1_in
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = REPLACEMENT_IN
[../]
[./rep1_out]
variable = rep1_out
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = REPLACEMENT_OUT
[../]
[]
[UserObjects]
[./thermal_fission]
type = PKAFissionFragmentEmpirical
relative_density = 1
fission_rate = 0.01
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'c0 c1'
M = '40 40'
Z = '20 20'
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
hide = 'c0 c1'
[]
(tests/2D_vs_3D/Cu_in_Cu_3D.i)
# Unit of length = Angstrom
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 8
ny = 8
nz = 8
xmin = 0
xmax = 1e3
ymin = 0
ymax = 1e3
zmin = 0
zmax = 1e3
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./Cu]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'z'
[../]
[../]
[]
[UserObjects]
[./constant]
type = PKAGun
E = 1.0e4
Z = 29
m = 63.546
point = '0 500 500'
direction = '0.6 0 0.8'
num_pkas = 500
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'Cu'
M = '63.546'
Z = '29'
Edisp = '33'
site_volume = 0.0118
pka_generator = constant
periodic_var = dummy
[../]
[./runner]
type = MyTRIMDiracRun
rasterizer = rasterizer
[../]
[]
[VectorPostprocessors]
[./vacancy_sites]
type = MyTRIMDiracResult
runner = runner
ivar = 0
defect = VAC
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
csv = true
[]
(tests/vectorpostprocessors/pkastatistics.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./c]
initial_condition = 1.0
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[UserObjects]
[./thermal_fission]
type = PKAFissionFragmentEmpirical
relative_density = 1
fission_rate = 1e5
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[../]
[]
[VectorPostprocessors]
[./mass]
type = MyTRIMPKAStatistics
rasterizer = rasterizer
execute_on = timestep_end
value_type = MASS
[../]
[./zaid]
type = MyTRIMPKAStatistics
rasterizer = rasterizer
execute_on = timestep_end
value_type = ZAID
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(tests/polyatomic_cascade/truncated_cascade_TaO.i)
#
# Unit is Angstrom, N_Ta and N_O are number densities # / volume and the volume
# is in A^3. Total number density N = 0.048
#
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 1e5
ymin = 0
ymax = 1e5
zmin = 0
zmax = 1e5
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[dummy]
[]
[]
[AuxVariables]
[N_Ta]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = numd_Ta
[]
[]
[N_O]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = numd_O
[]
[]
[vac_Ta]
order = CONSTANT
family = MONOMIAL
[]
[vac_O]
order = CONSTANT
family = MONOMIAL
[]
[inter_Ta]
order = CONSTANT
family = MONOMIAL
[]
[inter_O]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[numd_Ta]
type = ParsedFunction
expression = 'N := 0.048; L := 1e5; N * x / L'
[]
[numd_O]
type = ParsedFunction
expression = 'N := 0.048; L := 1e5; N * (1 - x / L)'
[]
[]
[AuxKernels]
[vac_Ta]
variable = vac_Ta
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[]
[vac_O]
variable = vac_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = VAC
[]
[inter_Ta]
variable = inter_Ta
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[]
[inter_O]
variable = inter_O
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = INT
[]
[]
[UserObjects]
[constant]
type = PKAGun
Z = 8
m = 16
num_pkas = 200
E = 5e5
point = '0.001 5e4 5e4'
direction = '1 0 0'
[]
[rasterizer]
type = MyTRIMRasterizer
var = 'N_Ta N_O'
M = '181 16'
Z = '73 8'
Ebind = '3 5'
Edisp = '60 40'
site_volume = 1
pka_generator = constant
# control NRT
max_nrt_difference = 0.4
analytical_energy_cutoff = 500
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Postprocessors]
[integral_vac_Ta]
type = ElementIntegralVariablePostprocessor
variable = vac_Ta
[]
[integral_vac_O]
type = ElementIntegralVariablePostprocessor
variable = vac_O
[]
[integral_inter_Ta]
type = ElementIntegralVariablePostprocessor
variable = inter_Ta
[]
[integral_inter_O]
type = ElementIntegralVariablePostprocessor
variable = inter_O
[]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/2D_vs_3D/Cu_in_Cu_2D.i)
# Unit of length = Angstrom
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 8
ny = 8
xmin = 0
xmax = 1e3
ymin = 0
ymax = 1e3
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./Cu]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[../]
[]
[UserObjects]
[./constant]
type = PKAGun
E = 1.0e4
Z = 29
m = 63.546
point = '0 500 0'
direction = '0.6 0 0.8'
num_pkas = 500
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'Cu'
M = '63.546'
Z = '29'
Edisp = '33'
site_volume = 0.0118
pka_generator = constant
periodic_var = dummy
[../]
[./runner]
type = MyTRIMDiracRun
rasterizer = rasterizer
[../]
[]
[VectorPostprocessors]
[./vacancy_sites]
type = MyTRIMDiracResult
runner = runner
ivar = 0
defect = VAC
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
csv = true
[]
(tests/vectorpostprocessors/pkalist.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = -100
xmax = 100
ymin = 0
ymax = 200
[]
[AuxVariables]
[./c]
initial_condition = 1.0
[../]
[]
[Variables]
[./u]
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[UserObjects]
[./thermal_fission]
type = PKAConstant
E = 200000
Z = 40
m = 80
pka_rate = 5e-4
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[../]
[]
[VectorPostprocessors]
[./pkas]
type = PKAList
rasterizer = rasterizer
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
execute_on = 'TIMESTEP_END'
csv = true
[]
(tests/polyatomic_cascade/carbon_block_number_dens.i)
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 1e5
ymin = 0
ymax = 1e5
zmin = 0
zmax = 1e5
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./cC]
order = CONSTANT
family = MONOMIAL
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[UserObjects]
[./constant]
type = PKAFixedPointGenerator
E = 1000
Z = 6
m = 12
point = '5e4 5e4 5e4'
num_pkas = 1000
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'cC'
M = '12'
Z = '6'
Edisp = '28'
pka_generator = constant
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./total_vacancies]
type = ElementIntegralVariablePostprocessor
variable = vac
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/meshes/cascade_amr.i)
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 10
ny = 10
xmin = -100
xmax = 100
ymin = -100
ymax = 100
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt(x^2+y^2)/40-1;if(r<0,1,if(r>1,0.5,cos(r*pi)/4+3/4))'
[../]
[../]
[]
[AuxVariables]
[./int]
order = CONSTANT
family = MONOMIAL
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = c
[../]
[./diff]
type = Diffusion
variable = c
[../]
[]
[AuxKernels]
[./int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[../]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[UserObjects]
[./constant]
type = PKAConstant
E = 1000
Z = 60
m = 120
pka_rate = 0.005
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = constant
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.4
coarsen_fraction = 0.8
max_h_level = 2
[../]
[]
[Outputs]
exodus = true
[]
(tests/vectorpostprocessors/pkaenergyhistogram.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./c]
initial_condition = 1.0
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[UserObjects]
[./thermal_fission]
type = PKAFissionFragmentEmpirical
relative_density = 1
fission_rate = 1e5
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[../]
[]
[VectorPostprocessors]
[./histo]
type = MyTRIMPKAEnergyHistogram
rasterizer = rasterizer
execute_on = timestep_end
channel_number = 80
channel_width = 2.5e+06
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(tests/meshes/cascade_3d.i)
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 4
ny = 4
nz = 4
xmax = 1000
ymax = 1000
zmax = 1000
uniform_refine = 2
[]
[Variables]
[./c]
[./InitialCondition]
type = FunctionIC
function = 0.3*((x/1000)+(y/1000)^2+(z/1000)^3)+0.1
[../]
[../]
[]
[AuxVariables]
[./int]
order = CONSTANT
family = MONOMIAL
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[../]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[UserObjects]
[./constant]
type = PKAConstant
E = 1000
Z = 60
m = 120
pka_rate = 1e-6
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = constant
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Outputs]
exodus = true
[]
(tests/radiation_damage/alpha_decay/alpha.i)
# dimensions are in Angstrom (A = 1e-10 m)
# dimensions here are 1 x 1 x 1 micro-meter
#
# _NOTE_ this calculation is actually for 3D but this is a 2D setup to save
# runtime
# This input is a good example on how to set periodicity when all concentration
# variables are AuxVariables
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 20
ny = 20
nz = 20
xmin = 0
xmax = 1.0e4
ymin = 0
ymax = 1.0e4
zmin = 0
zmax = 1.0e4
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./c]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[AuxVariables]
[./c_U238]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.6
[../]
[./c_O]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.2
[../]
[./c_Th222]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.02
[../]
[./c_He4]
order = CONSTANT
family = MONOMIAL
initial_condition = 0.0
[../]
[./int_Th222]
order = CONSTANT
family = MONOMIAL
[../]
[./vac_Th222]
order = CONSTANT
family = MONOMIAL
[../]
[./int_alpha]
order = CONSTANT
family = MONOMIAL
[../]
[./vac_alpha]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./int_U_aux]
variable = int_Th222
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = INT
[../]
[./vac_U_aux]
variable = vac_Th222
type = MyTRIMElementResultAux
runner = runner
ivar = 1
defect = VAC
[../]
[./int_alpha]
variable = int_alpha
type = MyTRIMElementResultAux
runner = runner
ivar = 3
defect = INT
[../]
[./vac_alpha]
variable = vac_alpha
type = MyTRIMElementResultAux
runner = runner
ivar = 3
defect = INT
[../]
[]
[UserObjects]
[./pka_alpha_generator]
type = PKAGeneratorAlphaDecay
ZAID = '922380 902220 80160 20040'
time_unit = microsecond
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'c_U238 c_Th222 c_O c_He4'
M = '238 222 16 4'
Z = '92 90 8 2'
site_volume = 0.0404 # nm^3 per UO2 unit
periodic_var = c
pka_generator = pka_alpha_generator
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./vac_Th222]
type = ElementIntegralVariablePostprocessor
variable = vac_Th222
execute_on = timestep_end
[../]
[./int_Th222]
type = ElementIntegralVariablePostprocessor
variable = int_Th222
execute_on = timestep_end
[../]
[./int_alpha]
type = ElementIntegralVariablePostprocessor
variable = int_alpha
execute_on = timestep_end
[../]
[./vac_alpha]
type = ElementIntegralVariablePostprocessor
variable = vac_alpha
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1.0e-5
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/auxkernels/mytrim/density.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[AuxVariables]
[./c_U]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./c_O2]
[./InitialCondition]
type = FunctionIC
function = 2*y
[../]
[../]
[./rho]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./rho]
type = MyTRIMDensityAux
variable = rho
rasterizer = rasterizer
[../]
[]
[UserObjects]
[./dummy]
type = PKAConstant
Z = 0
m = 0
E = 0
pka_rate = 0
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'c_U c_O2'
M = '235 16'
Z = '92 8'
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = dummy
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(tests/polyatomic_cascade/monoatomic_cascade.i)
[Mesh]
type = MyTRIMMesh
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./cC]
order = CONSTANT
family = MONOMIAL
initial_condition = 1
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[UserObjects]
[./constant]
type = PKAConstant
E = 1000
Z = 6
m = 12
pka_rate = 0.005
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = 'cC'
M = '12'
Z = '6'
Edisp = '16.3'
site_volume = 0.0404
pka_generator = constant
periodic_var = dummy
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./total_vacancies]
type = ElementIntegralVariablePostprocessor
variable = vac
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(tests/userobjects/mytrim/cascade_dirac.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -100
xmax = 100
ymin = 0
ymax = 200
[]
[AuxVariables]
[./c]
initial_condition = 1.0
[../]
[]
[Variables]
[./int]
[../]
[./vac]
[../]
[]
[Kernels]
[./int]
type = TimeDerivative
variable = int
[../]
[./vac]
type = TimeDerivative
variable = vac
[../]
[]
[DiracKernels]
[./int]
variable = int
type = MyTRIMDiracSource
runner = runner
ivar = 0
defect = INT
[../]
[./vac]
variable = vac
type = MyTRIMDiracSource
runner = runner
ivar = 0
defect = VAC
[../]
[]
[UserObjects]
[./thermal_fission]
type = PKAFissionFragmentEmpirical
relative_density = 1
fission_rate = 0.01
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
periodic_var = int
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[../]
[./runner]
type = MyTRIMDiracRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./int]
type = ElementIntegralVariablePostprocessor
variable = int
execute_on = timestep_end
[../]
[./vac]
type = ElementIntegralVariablePostprocessor
variable = vac
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
hide = c
[]
(tests/userobjects/mytrim/UO2_pellet_initial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = -100
xmax = 100
ymin = -100
ymax = 100
elem_type = QUAD4
uniform_refine = 0
[]
[Variables]
[c]
initial_condition = 1.0
[]
[]
[AuxVariables]
[int]
order = CONSTANT
family = MONOMIAL
[]
[vac]
order = CONSTANT
family = MONOMIAL
[]
[fuel_conc]
order = CONSTANT
family = MONOMIAL
[InitialCondition]
type = FunctionIC
function = U02_conc
[]
[]
[]
[Kernels]
[dt]
type = TimeDerivative
variable = c
[]
[diff]
type = Diffusion
variable = c
[]
[]
[AuxKernels]
[int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[]
[vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[]
[]
#[BCs]
# [./Periodic]
# [./all]
# auto_direction = 'x y'
# [../]
# [../]
#[]
[UserObjects]
[thermal_fission]
type = PKAFissionFragmentNeutronics
[]
[rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[]
[runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[]
[]
[Postprocessors]
[int]
type = ElementIntegralVariablePostprocessor
variable = int
execute_on = timestep_end
[]
[vac]
type = ElementIntegralVariablePostprocessor
variable = vac
execute_on = timestep_end
[]
[]
[Functions]
[U02_conc]
type = ParsedFunction
expression = 'r:=sqrt(x*x+y*y); Rlow:=low*R; Rhigh:=high*R; Z:= (r-high*R)/(r-low*R); if(r<Rlow,1,
if(r>Rhigh,0,
-(exp(2*Z)-1)/(exp(2*Z)+1)))'
#-(1/(high-low))*(r/R-1)+0.5))'
symbol_names = 'R low high'
symbol_values = '20 0.9 1.1'
[]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
[]
(tests/userobjects/mytrim/cascade.i)
[Mesh]
type = MyTRIMMesh
dim = 2
nx = 20
ny = 20
xmin = -100
xmax = 100
ymin = 0
ymax = 200
[]
[Variables]
[./c]
initial_condition = 1.0
[../]
[]
[AuxVariables]
[./int]
order = CONSTANT
family = MONOMIAL
[../]
[./vac]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[AuxKernels]
[./int]
variable = int
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = INT
[../]
[./vac]
variable = vac
type = MyTRIMElementResultAux
runner = runner
ivar = 0
defect = VAC
[../]
[]
[UserObjects]
[./thermal_fission]
type = PKAFissionFragmentEmpirical
relative_density = 1
fission_rate = 0.01
[../]
[./rasterizer]
type = MyTRIMRasterizer
var = c
M = 40
Z = 20
site_volume = 0.0404 # nm^3 per UO2 unit
pka_generator = thermal_fission
[../]
[./runner]
type = MyTRIMElementRun
rasterizer = rasterizer
[../]
[]
[Postprocessors]
[./int]
type = ElementIntegralVariablePostprocessor
variable = int
execute_on = timestep_end
[../]
[./vac]
type = ElementIntegralVariablePostprocessor
variable = vac
execute_on = timestep_end
[../]
[]
[Executioner]
type = Transient
num_steps = 1
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
csv = true
hide = c
[]