Skip to content

Commit

Permalink
[GeoMechanicsApplication] Add reset displacement to interfaces (#12871)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfaasse authored Nov 29, 2024
1 parent 56ab70c commit 1d7ec51
Show file tree
Hide file tree
Showing 8 changed files with 451 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,18 @@ void LineInterfaceElement::Initialize(const ProcessInfo& rCurrentProcessInfo)
GeoElementUtilities::EvaluateShapeFunctionsAtIntegrationPoints(
mIntegrationScheme->GetIntegrationPoints(), GetGeometry());

mConstitutiveLaws.clear();
for (const auto& r_shape_function_values : shape_function_values_at_integration_points) {
mConstitutiveLaws.push_back(GetProperties()[CONSTITUTIVE_LAW]->Clone());
mConstitutiveLaws.back()->InitializeMaterial(GetProperties(), GetGeometry(), r_shape_function_values);
if (rCurrentProcessInfo[IS_RESTARTED] &&
mConstitutiveLaws.size() == shape_function_values_at_integration_points.size()) {
for (std::size_t i = 0; i < mConstitutiveLaws.size(); ++i) {
mConstitutiveLaws[i]->InitializeMaterial(
GetProperties(), GetGeometry(), shape_function_values_at_integration_points[i]);
}
} else {
mConstitutiveLaws.clear();
for (const auto& r_shape_function_values : shape_function_values_at_integration_points) {
mConstitutiveLaws.push_back(GetProperties()[CONSTITUTIVE_LAW]->Clone());
mConstitutiveLaws.back()->InitializeMaterial(GetProperties(), GetGeometry(), r_shape_function_values);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ void ResetDisplacementProcess::ExecuteInitialize()
std::vector<Vector> stresses_on_integration_points;
rElement.CalculateOnIntegrationPoints(PK2_STRESS_VECTOR, stresses_on_integration_points,
mrModelPart.GetProcessInfo());
if (stresses_on_integration_points.empty()) {
rElement.CalculateOnIntegrationPoints(
CAUCHY_STRESS_VECTOR, stresses_on_integration_points, mrModelPart.GetProcessInfo());
}
std::vector<ConstitutiveLaw::Pointer> constitutive_laws;
rElement.CalculateOnIntegrationPoints(CONSTITUTIVE_LAW, constitutive_laws, mrModelPart.GetProcessInfo());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"strategy_type": "newton_raphson",
"convergence_criterion": "residual_criterion",
"displacement_relative_tolerance": 1.0E-4,
"displacement_absolute_tolerance": 1.0E-4,
"displacement_absolute_tolerance": 1.0E-9,
"residual_relative_tolerance": 1.0E-4,
"residual_absolute_tolerance": 1.0E-9,
"min_iterations": 6,
Expand Down Expand Up @@ -129,23 +129,23 @@
"process_name": "ApplyNormalLoadTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.LoadedSide",
"fluid_pressure_type": "Uniform",
"variable_name": "NORMAL_CONTACT_STRESS",
"active": [true,false],
"value": [0.0,0.0],
"table": [2,0],
"fluid_pressure_type": "Uniform"
"table": [2,0]
}
},{
"python_module": "apply_normal_load_table_process",
"kratos_module": "KratosMultiphysics.GeoMechanicsApplication",
"process_name": "ApplyNormalLoadTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.LoadedSide",
"fluid_pressure_type": "Uniform",
"variable_name": "TANGENTIAL_CONTACT_STRESS",
"active": [false,true],
"value": [0.0,667.0],
"table": [0,1],
"fluid_pressure_type": "Uniform"
"value": [0.0,0.0],
"table": [0,1]
}
}]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"strategy_type": "newton_raphson",
"convergence_criterion": "residual_criterion",
"displacement_relative_tolerance": 1.0E-4,
"displacement_absolute_tolerance": 1.0E-4,
"displacement_absolute_tolerance": 1.0E-9,
"residual_relative_tolerance": 1.0E-4,
"residual_absolute_tolerance": 1.0E-9,
"min_iterations": 6,
Expand Down Expand Up @@ -128,23 +128,23 @@
"process_name": "ApplyNormalLoadTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.LoadedSide",
"fluid_pressure_type": "Uniform",
"variable_name": "NORMAL_CONTACT_STRESS",
"active": [true,false],
"value": [0.0,0.0],
"table": [2,0],
"fluid_pressure_type": "Uniform"
"table": [2,0]
}
},{
"python_module": "apply_normal_load_table_process",
"kratos_module": "KratosMultiphysics.GeoMechanicsApplication",
"process_name": "ApplyNormalLoadTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.LoadedSide",
"fluid_pressure_type": "Uniform",
"variable_name": "TANGENTIAL_CONTACT_STRESS",
"active": [false,true],
"value": [0.0,667.0],
"table": [0,1],
"fluid_pressure_type": "Uniform"
"value": [0.0,0.0],
"table": [0,1]
}
}]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Begin Table 1 TIME TANGENTIAL_LOAD
0.0 0.0
1.0 667.0
2.0 1334.0
3.0 1500.0
4.0 3000.0
End Table

Begin Table 2 TIME NORMAL_LOAD
0.0 0.0
1.0 333.0
2.0 666.0
3.0 999.0
4.0 1332.0
End Table

Begin Properties 1
End Properties

Begin Properties 2
End Properties

Begin Nodes
1 2.0000000000 0.0000000000 0.0000000000
2 4.5000000000 0.0000000000 0.0000000000
3 7.0000000000 0.0000000000 0.0000000000
11 2.0000000000 0.0000000000 0.0000000000
12 4.5000000000 0.0000000000 0.0000000000
13 7.0000000000 0.0000000000 0.0000000000
End Nodes

Begin Elements Geo_ULineInterfacePlaneStrainElement3Plus3N
1 1 1 3 2 11 13 12
End Elements

Begin Conditions UPwNormalFaceLoadCondition2D3N
1 2 13 11 12
End Conditions

Begin SubModelPart Interfaces
Begin SubModelPartNodes
1
2
3
11
12
13
End SubModelPartNodes
Begin SubModelPartElements
1
End SubModelPartElements
End SubModelPart

Begin SubModelPart FixedNodes
Begin SubModelPartNodes
1
2
3
End SubModelPartNodes
End SubModelPart

Begin SubModelPart LoadedSide
Begin SubModelPartNodes
11
12
13
End SubModelPartNodes
Begin SubModelPartConditions
1
End SubModelPartConditions
Begin SubModelPartTables
1
2
End SubModelPartTables
End SubModelPart

Begin SubModelPart AllNodes
Begin SubModelPartNodes
1
2
3
11
12
13
End SubModelPartNodes
End SubModelPart
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"problem_data": {
"problem_name": "Neumann_multi_stage",
"start_time": 0.0,
"end_time": 2.0,
"echo_level": 1,
"parallel_type": "OpenMP",
"number_of_threads": 1
},
"solver_settings": {
"solver_type": "U_Pw",
"model_part_name": "PorousDomain",
"domain_size": 2,
"model_import_settings": {
"input_type": "mdpa",
"input_filename": "3+3_line"
},
"material_import_settings": {
"materials_filename": "../common/MaterialParameters.json"
},
"time_stepping": {
"time_step": 1.0
},
"buffer_size": 2,
"echo_level": 1,
"clear_storage": false,
"compute_reactions": false,
"move_mesh_flag": false,
"reform_dofs_at_each_step": false,
"nodal_smoothing": false,
"block_builder": false,
"solution_type": "Quasi-Static",
"scheme_type": "Newmark",
"reset_displacements": false,
"newmark_beta": 0.25,
"newmark_gamma": 0.5,
"newmark_theta": 0.5,
"rayleigh_m": 0.0,
"rayleigh_k": 0.0,
"strategy_type": "newton_raphson",
"convergence_criterion": "residual_criterion",
"displacement_relative_tolerance": 1.0E-4,
"displacement_absolute_tolerance": 1.0E-9,
"residual_relative_tolerance": 1.0E-4,
"residual_absolute_tolerance": 1.0E-9,
"min_iterations": 6,
"max_iterations": 15,
"number_cycles": 1,
"reduction_factor": 1.0,
"increase_factor": 1.0,
"desired_iterations": 4,
"max_radius_factor": 10.0,
"min_radius_factor": 0.1,
"calculate_reactions": false,
"max_line_search_iterations": 5,
"first_alpha_value": 0.5,
"second_alpha_value": 1.0,
"min_alpha": 0.1,
"max_alpha": 2.0,
"line_search_tolerance": 0.5,
"rotation_dofs": false,
"linear_solver_settings": {
"solver_type": "LinearSolversApplication.sparse_lu"
},
"problem_domain_sub_model_part_list": ["Interfaces"],
"processes_sub_model_part_list": ["FixedNodes","AllNodes","LoadedSide"],
"body_domain_sub_model_part_list": ["Interfaces"]
},
"output_processes": {
"gid_output": [{
"python_module": "gid_output_process",
"kratos_module": "KratosMultiphysics",
"process_name": "GiDOutputProcess",
"Parameters": {
"model_part_name": "PorousDomain.porous_computational_model_part",
"output_name": "Neumann_multi_stage",
"postprocess_parameters": {
"result_file_configuration": {
"gidpost_flags": {
"WriteDeformedMeshFlag": "WriteUndeformed",
"WriteConditionsFlag": "WriteElementsOnly",
"GiDPostMode": "GiD_PostAscii",
"MultiFileFlag": "SingleFile"
},
"file_label": "step",
"output_control_type": "step",
"output_interval": 1,
"body_output": true,
"node_output": true,
"skin_output": false,
"plane_output": [],
"nodal_results": ["DISPLACEMENT"],
"gauss_point_results": []
},
"point_data_configuration": []
}
}
}]
},
"processes": {
"constraints_process_list": [{
"python_module": "apply_vector_constraint_table_process",
"kratos_module": "KratosMultiphysics.GeoMechanicsApplication",
"process_name": "ApplyVectorConstraintTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.FixedNodes",
"variable_name": "DISPLACEMENT",
"active": [true,true,false],
"is_fixed": [true,true,true],
"value": [0.0,0.0,0.0],
"table": [0,0,0]
}
},{
"python_module": "apply_scalar_constraint_table_process",
"kratos_module": "KratosMultiphysics.GeoMechanicsApplication",
"process_name": "ApplyScalarConstraintTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.AllNodes",
"variable_name": "WATER_PRESSURE",
"active": true,
"is_fixed": true,
"value": 0.0,
"table": 0
}
}],
"loads_process_list": [{
"python_module": "apply_normal_load_table_process",
"kratos_module": "KratosMultiphysics.GeoMechanicsApplication",
"process_name": "ApplyNormalLoadTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.LoadedSide",
"fluid_pressure_type": "Uniform",
"variable_name": "NORMAL_CONTACT_STRESS",
"active": [true,false],
"value": [0.0,0.0],
"table": [2,0]
}
},{
"python_module": "apply_normal_load_table_process",
"kratos_module": "KratosMultiphysics.GeoMechanicsApplication",
"process_name": "ApplyNormalLoadTableProcess",
"Parameters": {
"model_part_name": "PorousDomain.LoadedSide",
"fluid_pressure_type": "Uniform",
"variable_name": "TANGENTIAL_CONTACT_STRESS",
"active": [false,true],
"value": [0.0,0.0],
"table": [0,1]
}
}]
}
}
Loading

0 comments on commit 1d7ec51

Please sign in to comment.