Skip to content
Permalink
Browse files

Merge pull request #13204 from bwspenc/fix_sm_param_handling

Fix handling of parameters in SolidModel::CreateConstitutiveModel
  • Loading branch information...
dschwen committed Apr 10, 2019
2 parents 4708f0d + 4361481 commit 9248be2e33c299fa4dbc9d05c2f254ff17cef744
@@ -18,38 +18,6 @@ InputParameters
validParams<ElasticModel>()
{
InputParameters params = validParams<ConstitutiveModel>();

// These parameters are a hack to get around the fact that SolidModel::createConstitutiveModel
// function is used to create ElasticModel objects by injecting other parameters into it
// (which it doesn't understand). This is an ugly hack to get around this behavior which MOOSE
// will no longer allow.
params.addCoupledVar("X_Pu", 0, "Coupled plutonium atom fraction");
params.addCoupledVar("X_Zr", 0, "Coupled zirconium atom fraction");
params.addParam<bool>("calc_youngs", true, "Flag to calculate Youngs Modulus or use given value");
params.addParam<bool>(
"calc_poissons", true, "Flag to calculate Poissons ratio or use given value");
params.addParam<bool>("model_creep", true, "Flag for creep model");
params.addParam<std::vector<std::string>>("volumetric_models", "Volumetric models to apply");
params.addParam<Real>("A_U", 0.2380289, "Atomic weight of uranium [kg/mol]");
params.addParam<Real>("A_Pu", 0.244, "Atomic weight of plutonium [kg/mol]");
params.addParam<Real>("A_Zr", 0.091224, "Atomic weight of zirconium [kg/mol]");
params.addParam<bool>("absolute_tolerance", "dummy");
params.addParam<bool>("acceptable_multiplier", "dummy");
params.addParam<bool>("compute_material_timestep_limit", "dummy");
params.addParam<bool>("fission_rate", "dummy");
params.addParam<bool>("fission_rate_material", "dummy");
params.addParam<bool>("gamma_transition", "dummy");
params.addParam<bool>("hydrostatic_stress", "dummy");
params.addParam<bool>("max_inelastic_increment", "dummy");
params.addParam<bool>("max_its", "dummy");
params.addParam<bool>("open_pore_compressibility_factor", "dummy");
params.addParam<MooseEnum>("internal_solve_output_on", MooseEnum("dummy"), "dummy");
params.addParam<bool>("internal_solve_full_iteration_history", "dummy");
params.addParam<bool>("plenum_pressure", "dummy");
params.addParam<bool>("porosity", "dummy");
params.addParam<bool>("relative_tolerance", "dummy");
params.addParam<bool>("use_material_fission_rate", "dummy");

return params;
}

@@ -26,7 +26,6 @@ validParams<PowerLawCreepModel>()
params.addRequiredParam<Real>("activation_energy", "Activation energy");
params.addParam<Real>("gas_constant", 8.3143, "Universal gas constant");
params.addParam<Real>("start_time", 0, "Start time (if not zero)");
params.addCoupledVar("temp", "Coupled Temperature");

return params;
}
@@ -1594,7 +1594,8 @@ SolidModel::createConstitutiveModel(const std::string & cm_name)
Factory & factory = _app.getFactory();
InputParameters params = factory.getValidParams(cm_name);

params += parameters();
params.applyParameters(parameters());
params.set<SubProblem *>("_subproblem") = &_subproblem;
MooseSharedPointer<ConstitutiveModel> cm =
factory.create<ConstitutiveModel>(cm_name, name() + "Model", params, _tid);

0 comments on commit 9248be2

Please sign in to comment.
You can’t perform that action at this time.