InputParameters validParams<ContactAction>() { MooseEnum orders("CONSTANT FIRST SECOND THIRD FOURTH", "FIRST"); MooseEnum formulation("DEFAULT KINEMATIC PENALTY AUGMENTED_LAGRANGE", "DEFAULT"); MooseEnum system("DiracKernel Constraint", "DiracKernel"); InputParameters params = validParams<Action>(); params.addRequiredParam<BoundaryName>("master", "The master surface"); params.addRequiredParam<BoundaryName>("slave", "The slave surface"); params.addRequiredParam<NonlinearVariableName>("disp_x", "The x displacement"); params.addParam<NonlinearVariableName>("disp_y", "", "The y displacement"); params.addParam<NonlinearVariableName>("disp_z", "", "The z displacement"); params.addParam<Real>("penalty", 1e8, "The penalty to apply. This can vary depending on the stiffness of your materials"); params.addParam<Real>("friction_coefficient", 0, "The friction coefficient"); params.addParam<Real>("tension_release", 0.0, "Tension release threshold. A node in contact will not be released if its tensile load is below this value. No tension release if negative."); params.addParam<std::string>("model", "frictionless", "The contact model to use"); params.addParam<Real>("tangential_tolerance", "Tangential distance to extend edges of contact surfaces"); params.addParam<Real>("capture_tolerance", 0, "Normal distance from surface within which nodes are captured"); params.addParam<Real>("normal_smoothing_distance", "Distance from edge in parametric coordinates over which to smooth contact normal"); params.addParam<std::string>("normal_smoothing_method","Method to use to smooth normals (edge_based|nodal_normal_based)"); params.addParam<MooseEnum>("order", orders, "The finite element order: FIRST, SECOND, etc."); params.addParam<MooseEnum>("formulation", formulation, "The contact formulation: default, penalty, augmented_lagrange"); params.addParam<MooseEnum>("system", system, "System to use for constraint enforcement. Options are: " + system.getRawNames()); return params; }
ContactFormulation contactFormulation(const std::string & the_name) { ContactFormulation formulation(CF_INVALID); std::string name(the_name); std::transform(name.begin(), name.end(), name.begin(), ::tolower); if ("default" == name || "kinematic" == name) formulation = CF_DEFAULT; else if ("penalty" == name) formulation = CF_PENALTY; else if ("augmented_lagrange" == name) formulation = CF_AUGMENTED_LAGRANGE; else if ("tangential_penalty" == name) formulation = CF_TANGENTIAL_PENALTY; if (formulation == CF_INVALID) { std::string err("Invalid formulation found: "); err += name; mooseError( err ); } return formulation; }
InputParameters validParams<ContactAction>() { MooseEnum orders(AddVariableAction::getNonlinearVariableOrders()); MooseEnum formulation("DEFAULT KINEMATIC PENALTY AUGMENTED_LAGRANGE TANGENTIAL_PENALTY", "DEFAULT"); MooseEnum system("DiracKernel Constraint", "DiracKernel"); InputParameters params = validParams<Action>(); params.addRequiredParam<BoundaryName>("master", "The master surface"); params.addRequiredParam<BoundaryName>("slave", "The slave surface"); params.addParam<NonlinearVariableName>("disp_x", "The x displacement"); params.addParam<NonlinearVariableName>("disp_y", "The y displacement"); params.addParam<NonlinearVariableName>("disp_z", "The z displacement"); params.addParam<std::vector<NonlinearVariableName>>( "displacements", "The displacements appropriate for the simulation geometry and coordinate system"); params.addParam<Real>( "penalty", 1e8, "The penalty to apply. This can vary depending on the stiffness of your materials"); params.addParam<Real>("friction_coefficient", 0, "The friction coefficient"); params.addParam<Real>("tension_release", 0.0, "Tension release threshold. A node in contact " "will not be released if its tensile load is below " "this value. No tension release if negative."); params.addParam<std::string>("model", "frictionless", "The contact model to use"); params.addParam<Real>("tangential_tolerance", "Tangential distance to extend edges of contact surfaces"); params.addParam<Real>( "capture_tolerance", 0, "Normal distance from surface within which nodes are captured"); params.addParam<Real>( "normal_smoothing_distance", "Distance from edge in parametric coordinates over which to smooth contact normal"); params.addParam<std::string>("normal_smoothing_method", "Method to use to smooth normals (edge_based|nodal_normal_based)"); params.addParam<MooseEnum>("order", orders, "The finite element order: FIRST, SECOND, etc."); params.addParam<MooseEnum>( "formulation", formulation, "The contact formulation: default, penalty, augmented_lagrange, tangential_penalty"); params.addParam<MooseEnum>("system", system, "System to use for constraint enforcement. Options are: " + system.getRawNames()); params.addParam<bool>("normalize_penalty", false, "Whether to normalize the penalty parameter with the nodal area."); params.addParam<bool>("master_slave_jacobian", true, "Whether to include jacobian entries coupling master and slave nodes."); params.addParam<Real>("al_penetration_tolerance", "The tolerance of the penetration for augmented Lagrangian method."); params.addParam<Real>("al_incremental_slip_tolerance", "The tolerance of the incremental slip for augmented Lagrangian method."); params.addParam<Real>("al_frictional_force_tolerance", "The tolerance of the frictional force for augmented Lagrangian method."); return params; }