forked from idaholab/magpie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Schunert
committed
Jan 13, 2020
1 parent
51a2c34
commit 9364e06
Showing
2 changed files
with
402 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/**********************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* MAGPIE - Mesoscale Atomistic Glue Program for Integrated Execution */ | ||
/* */ | ||
/* Copyright 2017 Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/**********************************************************************/ | ||
#ifdef GSL_ENABLED | ||
|
||
#pragma once | ||
|
||
#include "ParkinCoulterBase.h" | ||
|
||
class DPAUserObject; | ||
|
||
template <> | ||
InputParameters validParams<DPAUserObject>(); | ||
|
||
class DPAUserObject : public ParkinCoulterBase | ||
{ | ||
public: | ||
DPAUserObject(const InputParameters & parameters); | ||
void finalize() override; | ||
void execute() override; | ||
void initialSetup() override; | ||
|
||
protected: | ||
virtual void initDamageFunctions() override; | ||
virtual std::vector<unsigned int> atomicNumbers() const override; | ||
virtual std::vector<Real> massNumbers() const override; | ||
virtual std::vector<Real> numberFractions() const override; | ||
virtual Real maxEnergy() const override; | ||
|
||
/// determines if an update of the displacement function is required | ||
bool recomputeDisplacementFunction() const; | ||
|
||
/// a helper function that sets _ns and checks consistency of A, Z, N | ||
void initAZNHelper(); | ||
|
||
/// a helper function that computes the neutron damage efficiency | ||
Real | ||
neutronDamageEfficiency(unsigned int i, unsigned int j, unsigned int g, unsigned int x) const; | ||
|
||
/// tolerance for recomputing the displacement function | ||
Real _tol = 1e-10; | ||
|
||
/// the computed dose rates | ||
Real _dpa = 0; | ||
|
||
/// is damage accumulated during a transient or computed for steady state | ||
bool _is_transient_irradiation; | ||
|
||
/// irradiation_time used when dpa is estimated from steady-state calculations | ||
Real _irradiation_time; | ||
|
||
/// the neutron reaction types considered for computing dpa | ||
MultiMooseEnum _neutron_reaction_types; | ||
|
||
/// convenience copy of this parameter | ||
std::vector<std::vector<std::string>> _xs_names; | ||
|
||
///@{ data used for computing dpa value | ||
const VectorPostprocessorValue & _atomic_numbers; | ||
const VectorPostprocessorValue & _mass_numbers; | ||
const VectorPostprocessorValue & _number_densities; | ||
const VectorPostprocessorValue & _energy_group_boundaries; | ||
const VectorPostprocessorValue & _scalar_flux; | ||
std::vector<std::vector<const VectorPostprocessorValue *>> _cross_sections; | ||
///@} | ||
|
||
///@{ the "old" versions of the data; used for determining if disp function update is required | ||
std::vector<Real> _atomic_numbers_old; | ||
std::vector<Real> _mass_numbers_old; | ||
std::vector<Real> _number_densities_old; | ||
///@} | ||
|
||
/// number of neutron energy groups | ||
unsigned int _ng; | ||
|
||
/// number of reaction types creating radiation damage | ||
unsigned int _nr; | ||
}; | ||
|
||
#endif // GSL_ENABLED |
Oops, something went wrong.