16 #define QUOTE(macro) stringifyName(macro)
25 params.addRequiredParam<FileName>(
"plugin",
26 "The path to the compiled dynamic library for the "
27 "plugin you want to use (without -opt.plugin or "
29 params.addRequiredParam<Real>(
"youngs_modulus",
"Young's Modulus");
30 params.addRequiredParam<Real>(
"poissons_ratio",
"Poissons Ratio");
31 params.addRequiredParam<Real>(
"num_state_vars",
32 "The number of state variables this CREEP routine will use");
33 params.addRequiredParam<
unsigned int>(
34 "integration_flag",
"The creep integration method: Explicit = 0 and Implicit = 1");
35 params.addRequiredParam<
unsigned int>(
36 "solve_definition",
"Creep/Swell Explicit/Implicit Integration Definition to use: 1 - 5");
37 params.addParam<
unsigned int>(
"routine_flag",
39 "The flag determining when the routine is "
40 "called: Start of increment = 0 and End of "
47 _plugin(getParam<FileName>(
"plugin")),
48 _youngs_modulus(getParam<Real>(
"youngs_modulus")),
49 _poissons_ratio(getParam<Real>(
"poissons_ratio")),
50 _num_state_vars(getParam<Real>(
"num_state_vars")),
51 _integration_flag(getParam<unsigned int>(
"integration_flag")),
52 _solve_definition(getParam<unsigned int>(
"solve_definition")),
53 _routine_flag(getParam<unsigned int>(
"routine_flag")),
54 _state_var(declareProperty<std::vector<Real>>(
"state_var")),
55 _state_var_old(getMaterialPropertyOld<std::vector<Real>>(
"state_var")),
56 _trial_stress(declareProperty<
SymmTensor>(
"trial_stress")),
57 _trial_stress_old(getMaterialPropertyOld<
SymmTensor>(
"trial_stress")),
58 _dev_trial_stress(declareProperty<
SymmTensor>(
"dev_trial_stress")),
59 _dev_trial_stress_old(getMaterialPropertyOld<
SymmTensor>(
"dev_trial_stress")),
60 _ets(declareProperty<Real>(
"effective_trial_stress")),
61 _ets_old(getMaterialPropertyOld<Real>(
"effective_trial_stress")),
62 _stress(declareProperty<
SymmTensor>(
"stress")),
63 _stress_old(getMaterialPropertyOld<
SymmTensor>(
"stress")),
64 _creep_inc(declareProperty<Real>(
"creep_inc")),
65 _creep_inc_old(getMaterialPropertyOld<Real>(
"creep_inc")),
66 _total_creep(declareProperty<Real>(
"total_creep")),
67 _total_creep_old(getMaterialPropertyOld<Real>(
"total_creep")),
68 _swell_inc(declareProperty<Real>(
"swell_inc")),
69 _swell_inc_old(getMaterialPropertyOld<Real>(
"swell_inc")),
70 _total_swell(declareProperty<Real>(
"total_swell")),
71 _total_swell_old(getMaterialPropertyOld<Real>(
"total_swell"))
74 _plugin += std::string(
"-") + QUOTE(METHOD) +
".plugin";
100 std::ostringstream error;
101 error <<
"Cannot open library: " << dlerror() <<
'\n';
102 mooseError(error.str());
110 void * pointer = dlsym(
_handle,
"creep_");
111 _creep = *reinterpret_cast<creep_t *>(&pointer);
115 const char * dlsym_error = dlerror();
119 std::ostringstream error;
120 error <<
"Cannot load symbol 'creep_': " << dlsym_error <<
'\n';
121 mooseError(error.str());
135 for (
unsigned qp(0); qp < n_points; ++qp)
158 for (
unsigned int i = 0; i < 5; i++)
196 if (dts_squared >= 0.)
197 _ets[_qp] = std::sqrt(1.5 * dts_squared);
199 mooseError(
"Attempted to take square root of a negative number!\n");
207 Real grad_dts_potential[6];
208 for (
unsigned int i = 0; i < 6; i++)
211 grad_dts_potential[i] = 0.0;
213 grad_dts_potential[i] = delta_ets / delta_dts.
component(i);
217 grad_dts_potential[1],
218 grad_dts_potential[2],
219 grad_dts_potential[3],
220 grad_dts_potential[4],
221 grad_dts_potential[5]);
282 Real creep_inc_used = 0.0;
283 Real swell_inc_used = 0.0;
287 creep_inc_used =
_DECRA[0];
288 swell_inc_used =
_DESWA[0];
320 SymmTensor total_effects = (R * (swell_inc_used / 3.)) + (grad_dts * (creep_inc_used));