Skip to content

Commit

Permalink
Merge pull request #92 from clazaro/bathe-cantilever
Browse files Browse the repository at this point in the history
[Examples][StructuralMechanics] Adding new beam validation example - Bathe cantilever
  • Loading branch information
clazaro authored Nov 21, 2021
2 parents 342353a + 390120f commit 679434b
Show file tree
Hide file tree
Showing 9 changed files with 362 additions and 0 deletions.
1 change: 1 addition & 0 deletions structural_mechanics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ The Examples are continously updated and extended
## Validation
- [Beam Eigenvalue Analysis](validation/beam_eigenvalue_analysis/README.md)
- [Beam Non-Linear Cantilever](validation/beam_nonlinear_cantilever/README.md)
- [Beam Non-Linear 3D Cantilever (Bathe & Bolourchi)](validation/beam_nonlinear_cantilever3D_bathe/README.md)
- [Beam Shallow-angled Structure](validation/beam_shallow_angled_structure/README.md)
- [Beam Roll Up](validation/beam_roll_up/README.md)
- [Truss Two-Bar-Truss Snapthrough](validation/truss_snap_through/README.md)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Non-Linear cantilever beam (Bathe & Bolourchi)

**Author:** Carlos Lázaro

**Kratos version:** 8.1

**Source files:** [Beam Non-Linear Cantilever 3D Bathe](https://github.com/KratosMultiphysics/Examples/tree/master/structural_mechanics/validation/beam_nonlinear_cantilever3D_bathe/source)

## Problem definition

This is a classical test for coupled 3D bending, torsion and traction of a curved cantilever subjected to a transverse load. The cantilever has circular shape of radius 100 and spans 45 deg. The cross section is square (1 x 1).
The transverse end load _F_ increases up to a magnitude of 600. The load has fixed direction throughout the whole process.

<img src="data/initial_configuration.png" width="500">

_Bathe & Bolourchi cantilever: static system_

According to [1], _E_ = 1.0 E+07, _ν_ = 0 and _A_ = 1.0
_Iy_ = _Iz_ = 0.0833333
The value of _It_ is not given in the original article. The best approximation to the results of the article is achieved taking _It_ = _I0_ = 0.1666667

## Results

The 8-element discretization follows the original example in reference [1]. The load is applied in 60 steps with a load-control strategy. The following figure shows the (non-scaled) final configuration corresponding to the load of magnitude 600.

<img src="data/deformed_configuration.png" width="500">

_Bathe & Bolourchi cantilever: Non-scaled deformed shape for the total load (8 elements, tip load F = 600 applied in 60 steps)_

The equilibrium paths corresponding to the tip displacements are plotted following the style of [1]:

<img src="data/displacement_graph.png" width="500">

_Bathe & Bolourchi cantilever: Equilibrium paths for each component of the tip displacement in non-dimensional coordinates_

The comparison between the computed displacements of the tip and those given in [1] is:

| | Computed | Reference [1]
|--|----------|---------------
|u | -13.4890 | -13.4
|v | -23.5318 | -23.5
|w | 53.4998 | 53.4

## References

[1] K.-J. Bathe, S. Bolourchi. Large displacement analysis of three-dimensional beam structures. _International Journal for Numerical Methods in Engineering_, 1979, vol. 14, pp. 961-986.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
Begin ModelPartData
// VARIABLE_NAME value
End ModelPartData

Begin Properties 0
End Properties
Begin Nodes
1 29.2893218813 70.7106781187 0.0000000000
2 22.6989546637 63.4393284164 0.0000000000
3 16.8530387697 55.5570233020 0.0000000000
4 11.8078735652 47.1396736826 0.0000000000
5 7.6120467489 38.2683432365 0.0000000000
6 4.3059664268 29.0284677254 0.0000000000
7 1.9214719597 19.5090322016 0.0000000000
8 0.4815273328 9.8017140330 0.0000000000
9 0.0000000000 0.0000000000 0.0000000000
End Nodes


Begin Elements CrBeamElement3D2N// GUI group identifier: Cantilever
1 0 9 8
2 0 8 7
3 0 7 6
4 0 6 5
5 0 5 4
6 0 4 3
7 0 3 2
8 0 2 1
End Elements

Begin ElementalData LOCAL_AXIS_2 // Groups: Cantilever
1 [3]( -0.9987954592, 0.0490676131, -0.0000000000)
2 [3]( -0.9891765692, 0.1467300751, -0.0000000000)
3 [3]( -0.9700312575, 0.2429801629, -0.0000000000)
4 [3]( -0.9415439701, 0.3368901193, -0.0000000000)
5 [3]( -0.9039894139, 0.4275548382, -0.0000000000)
6 [3]( -0.8577286010, 0.5141027592, -0.0000000000)
7 [3]( -0.8032072910, 0.5956996287, -0.0000000000)
8 [3]( -0.7409510842, 0.6715590003, -0.0000000000)
End ElementalData

Begin Conditions PointLoadCondition3D1N// GUI group identifier: End
1 0 1
End Conditions

Begin SubModelPart Parts_Beam_Cantilever // Group Cantilever // Subtree Parts_Beam
Begin SubModelPartNodes
1
2
3
4
6
7
8
9
End SubModelPartNodes
Begin SubModelPartElements
1
2
3
4
5
6
7
8
End SubModelPartElements
Begin SubModelPartConditions
End SubModelPartConditions
End SubModelPart
Begin SubModelPart DISPLACEMENT_Support // Group Support // Subtree DISPLACEMENT
Begin SubModelPartNodes
9
End SubModelPartNodes
Begin SubModelPartElements
End SubModelPartElements
Begin SubModelPartConditions
End SubModelPartConditions
End SubModelPart
Begin SubModelPart ROTATION_Support // Group Support // Subtree ROTATION
Begin SubModelPartNodes
9
End SubModelPartNodes
Begin SubModelPartElements
End SubModelPartElements
Begin SubModelPartConditions
End SubModelPartConditions
End SubModelPart
Begin SubModelPart PointLoad3D_End // Group End // Subtree PointLoad3D
Begin SubModelPartNodes
1
End SubModelPartNodes
Begin SubModelPartElements
End SubModelPartElements
Begin SubModelPartConditions
1
End SubModelPartConditions
End SubModelPart
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import sys
import time

import KratosMultiphysics
from KratosMultiphysics.StructuralMechanicsApplication.structural_mechanics_analysis import StructuralMechanicsAnalysis

"""
For user-scripting it is intended that a new class is derived
from StructuralMechanicsAnalysis to do modifications
"""

class StructuralMechanicsAnalysisWithFlush(StructuralMechanicsAnalysis):

def __init__(self, model, project_parameters, flush_frequency=10.0):
super().__init__(model, project_parameters)
self.flush_frequency = flush_frequency
self.last_flush = time.time()
sys.stdout.flush()

### Output options ###
######################

# Printing displacements
self.output_displacements_flag = True
self.output_displacement_model_part_names = ["Structure.PointLoad3D_End"]

def Initialize(self):
super().Initialize()
sys.stdout.flush()
KratosMultiphysics.Logger.Flush()

def FinalizeSolutionStep(self):
super().FinalizeSolutionStep()

if self.parallel_type == "OpenMP":
now = time.time()
if now - self.last_flush > self.flush_frequency:
sys.stdout.flush()
self.last_flush = now

def Finalize(self):
super().Finalize()

# Printing nodal displacements
if self.output_displacements_flag:
print('')
print('*********************')
for sub_model_part_name in self.output_displacement_model_part_names:
print("MODEL PART: {0}".format(sub_model_part_name))
print('NODAL DISPLACEMENTS')
for node in self.model[sub_model_part_name].Nodes:
displacement = node.GetSolutionStepValue(KratosMultiphysics.DISPLACEMENT)
DX = displacement[0]
DY = displacement[1]
DZ = displacement[2]
print ("Node {0}: DX = {1:.4f} DY = {2:.4f} DZ = {3:.4f}".format(node.Id, DX, DY, DZ))
print('*********************')
else:
pass


if __name__ == "__main__":

with open("ProjectParameters.json", 'r') as parameter_file:
parameters = KratosMultiphysics.Parameters(parameter_file.read())

global_model = KratosMultiphysics.Model()
simulation = StructuralMechanicsAnalysisWithFlush(global_model, parameters)
simulation.Run()
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{
"problem_data" : {
"problem_name" : "Bathe_cantilever",
"parallel_type" : "OpenMP",
"echo_level" : 1,
"start_time" : 0.0,
"end_time" : 1.0
},
"solver_settings" : {
"solver_type" : "Static",
"model_part_name" : "Structure",
"domain_size" : 3,
"echo_level" : 0,
"analysis_type" : "non_linear",
"model_import_settings" : {
"input_type" : "mdpa",
"input_filename" : "Bathe_cantilever"
},
"material_import_settings" : {
"materials_filename" : "StructuralMaterials.json"
},
"time_stepping" : {
"time_step" : 0.0166666667
},
"line_search" : false,
"convergence_criterion" : "residual_criterion",
"displacement_relative_tolerance" : 0.0001,
"displacement_absolute_tolerance" : 1e-6,
"residual_relative_tolerance" : 0.0001,
"residual_absolute_tolerance" : 1e-6,
"max_iteration" : 10,
"rotation_dofs" : true,
"volumetric_strain_dofs" : false
},
"processes" : {
"constraints_process_list" : [{
"python_module" : "assign_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "AssignVectorVariableProcess",
"Parameters" : {
"model_part_name" : "Structure.DISPLACEMENT_Support",
"variable_name" : "DISPLACEMENT",
"interval" : [0.0,"End"],
"constrained" : [true,true,true],
"value" : [0.0,0.0,0.0]
}
},{
"python_module" : "assign_vector_variable_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "AssignVectorVariableProcess",
"Parameters" : {
"model_part_name" : "Structure.ROTATION_Support",
"variable_name" : "ROTATION",
"interval" : [0.0,"End"],
"constrained" : [true,true,true],
"value" : [0.0,0.0,0.0]
}
}],
"loads_process_list" : [{
"python_module" : "assign_vector_by_direction_to_condition_process",
"kratos_module" : "KratosMultiphysics",
"check" : "DirectorVectorNonZero direction",
"process_name" : "AssignVectorByDirectionToConditionProcess",
"Parameters" : {
"model_part_name" : "Structure.PointLoad3D_End",
"variable_name" : "POINT_LOAD",
"interval" : [0.0,"End"],
"modulus" : "600*t",
"direction" : [0.0,0.0,1.0]
}
}],
"list_other_processes" : []
},
"output_processes" : {
"gid_output" : [{
"python_module" : "gid_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "GiDOutputProcess",
"help" : "This process writes postprocessing files for GiD",
"Parameters" : {
"model_part_name" : "Structure",
"output_name" : "Bathe_cantilever",
"postprocess_parameters" : {
"result_file_configuration" : {
"gidpost_flags" : {
"GiDPostMode" : "GiD_PostBinary",
"WriteDeformedMeshFlag" : "WriteDeformed",
"WriteConditionsFlag" : "WriteConditions",
"MultiFileFlag" : "SingleFile"
},
"file_label" : "step",
"output_control_type" : "step",
"output_interval" : 1,
"body_output" : true,
"node_output" : false,
"skin_output" : false,
"plane_output" : [],
"nodal_results" : ["DISPLACEMENT","REACTION","ROTATION","REACTION_MOMENT"],
"gauss_point_results" : ["FORCE","MOMENT"],
"nodal_nonhistorical_results" : []
},
"point_data_configuration" : []
}
}
}],
"vtk_output" : [{
"python_module" : "vtk_output_process",
"kratos_module" : "KratosMultiphysics",
"process_name" : "VtkOutputProcess",
"help" : "This process writes postprocessing files for Paraview",
"Parameters" : {
"model_part_name" : "Structure",
"output_control_type" : "step",
"output_interval" : 1,
"file_format" : "ascii",
"output_precision" : 7,
"output_sub_model_parts" : false,
"output_path" : "vtk_output",
"save_output_files_in_folder" : true,
"nodal_solution_step_data_variables" : ["DISPLACEMENT","REACTION","ROTATION","REACTION_MOMENT"],
"nodal_data_value_variables" : [],
"element_data_value_variables" : [],
"condition_data_value_variables" : [],
"gauss_point_variables_extrapolated_to_nodes" : ["FORCE","MOMENT"]
}
}]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"properties" : [{
"model_part_name" : "Structure.Parts_Beam_Cantilever",
"properties_id" : 1,
"Material" : {
"constitutive_law" : {
"name" : "BeamConstitutiveLaw"
},
"Variables" : {
"DENSITY" : 7850.0,
"YOUNG_MODULUS" : 10000000.0,
"POISSON_RATIO" : 0.0,
"CROSS_AREA" : 1.0,
"TORSIONAL_INERTIA" : 0.1666666666666667,
"I22" : 0.0833333333333333,
"I33" : 0.0833333333333333
},
"Tables" : {}
}
}]
}

0 comments on commit 679434b

Please sign in to comment.