-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Structural] Anoeta stadium truss eigenvalue analysis #129
Merged
rubenzorrilla
merged 2 commits into
master
from
structure/anoeta-stadium-truss-eigenvalues
Oct 4, 2023
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Anoeta stadium truss eigenvalue analysis | ||
|
||
**Author:** Jon Arambarri Rumayor - Rubén Zorrilla Martínez | ||
|
||
**Kratos version:** Current Head | ||
|
||
**Source files:** [Anoeta stadium truss eigenvalue analysis](https://github.com/KratosMultiphysics/Examples/tree/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/source) | ||
|
||
## Problem definition | ||
|
||
This example presents an eigenvalue analysis of the [Anoeta stadium](https://en.wikipedia.org/wiki/Anoeta_Stadium) in San Sebastián. | ||
More specifically, the example focuses on the truss structure that supports the plastic canopy that covers the tiers (see the figures below). | ||
|
||
<p align="center"> | ||
<img src="https://github.com/KratosMultiphysics/Examples/blob/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/data/anoeta_truss_1.png?raw=true" alt="Anoeta stadium [1]" style="width: 600px;"/> | ||
</p> | ||
|
||
<p align="center"> | ||
<img src="https://github.com/KratosMultiphysics/Examples/blob/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/data/anoeta_truss_2.jpeg?raw=true" alt="Anoeta stadium [2]" style="width: 600px;"/> | ||
</p> | ||
|
||
The roof structure is conformed by two curved trusses of almost 200m aligned with the touch lines and two straight trusses of around 155m aligned with the goal lines. | ||
The side trusses intersect the goal ones so the structure can be defined a spatial 3D truss. | ||
While different cross-section areas are used, all the members are made of the same steel, which material properties are | ||
- $E = 206.9$ GPa | ||
- $\rho = 7850.0$ Kg/m^3^ | ||
|
||
Each member is meshed with a single truss element. | ||
On top of these, nodal concentrated mass elements have been added in addition to the truss ones (see the [MainKratos.py](https://github.com/KratosMultiphysics/Examples/tree/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/source/MainKratos.py) file) in order to account for the weight of the plastic canopy. | ||
|
||
Current settings include the calculation of the first five eigenvalues. | ||
If a different number is required, modify the *number_of_eigenvalues* field in the [ProjectParameters.json](https://github.com/KratosMultiphysics/Examples/tree/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/source/ProjectParameters.json). | ||
Last but not least, it is important to mention that the use of the elimination builder and solver needs to be activated to avoid the singularity of the eigenvalue problem by keeping *use_block_builder* option as false in the builder and solver settings section. | ||
|
||
## Results | ||
|
||
By running the [MainKratos.py](https://github.com/KratosMultiphysics/Examples/tree/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/source/MainKratos.py) script the terminal outputs the fist five eigenvalues, which value is | ||
|
||
- $\lambda_{1} = 49.6942$ | ||
- $\lambda_{2} = 54.461$ | ||
- $\lambda_{3} = 66.1036$ | ||
- $\lambda_{4} = 96.0785$ | ||
- $\lambda_{5} = 112.096$ | ||
|
||
corresponding to the frequencies | ||
|
||
- $\f_{1} = 1.3813$ Hz | ||
- $\f_{2} = 1.4374$ Hz | ||
- $\f_{3} = 1.6349$ Hz | ||
- $\f_{4} = 2.012$ Hz | ||
- $\f_{5} = 2.0932$ Hz | ||
|
||
Complementary, a folder with the postprocess of the eigenmodes is also created. | ||
The animation of the first three ones is shown below. | ||
|
||
<p align="center"> | ||
<img src="https://github.com/KratosMultiphysics/Examples/blob/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/data/anoeta_stadium_truss_eigenmode_1?raw=true" alt="1st eigenmode animation." style="width: 600px;"/> | ||
</p> | ||
|
||
<p align="center"> | ||
<img src="https://github.com/KratosMultiphysics/Examples/blob/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/data/anoeta_stadium_truss_eigenmode_2?raw=true" alt="2st eigenmode animation." style="width: 600px;"/> | ||
</p> | ||
|
||
<p align="center"> | ||
<img src="https://github.com/KratosMultiphysics/Examples/blob/master/structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/data/anoeta_stadium_truss_eigenmode_3?raw=true" alt="3st eigenmode animation." style="width: 600px;"/> | ||
</p> | ||
|
||
## References | ||
[1] “Real Sociedad Amplía Los Derechos de Explotación de Anoeta Hasta 2074.” Palco23, Palco23, 17 Feb. 2022, www.palco23.com/clubes/real-sociedad-amplia-los-derechos-de-explotacion-de-anoeta-hasta-2074. | ||
|
||
[2] “La Real Sociedad Amplía El Derecho de Explotación de Anoeta Hasta 2074.” 2Playbook, 16 Feb. 2022, www.2playbook.com/clubes/real-sociedad-amplia-derecho-explotacion-anoeta-hasta-2074_6946_102.html. Accessed 4 Oct. 2023. | ||
|
||
|
||
|
Binary file added
BIN
+599 KB
...eta_stadium_truss_eigenvalue_analysis/data/anoeta_stadium_truss_eigenmode_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+468 KB
...eta_stadium_truss_eigenvalue_analysis/data/anoeta_stadium_truss_eigenmode_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+660 KB
...eta_stadium_truss_eigenvalue_analysis/data/anoeta_stadium_truss_eigenmode_3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+706 KB
...nics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/data/anoeta_truss_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+82.3 KB
...ics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/data/anoeta_truss_2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
83 changes: 83 additions & 0 deletions
83
structural_mechanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/source/MainKratos.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
import sys | ||
import time | ||
import importlib | ||
|
||
import KratosMultiphysics | ||
|
||
def CreateAnalysisStageWithFlushInstance(cls, global_model, parameters): | ||
class AnalysisStageWithFlush(cls): | ||
|
||
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() | ||
|
||
def ModifyInitialGeometry(self): | ||
super().ModifyInitialGeometry() | ||
|
||
# Auxiliary function to create the concentrated mass elements | ||
# First argument is the model part name and second one the extra mass to be applied at each node | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_Esquinas", 4145.75) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_porteria-ext-esquina", 1911) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_porteria-ext-centro", 1811.25) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_largo-int-centro", 3663.275) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_largo-int-esquinas", 3755) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_porteria-int-esquinas", 3784.375) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_porteria-int-centro", 3718.75) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_largo-ext-intermedio", 2887.5) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_largo-ext-esquinas", 1940.75) | ||
self.__CreateNodalConcentratedMassElements("Structure.GENERIC_largo-ext-centro", 3730.3) | ||
|
||
def Initialize(self): | ||
super().Initialize() | ||
sys.stdout.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 __CreateNodalConcentratedMassElements(self, model_part_name, mass_value): | ||
# Search for the maximum element id | ||
main_model_part = self.model.GetModelPart("Structure") | ||
max_id = 0 | ||
for element in main_model_part.Elements: | ||
if element.Id > max_id: | ||
max_id = element.Id | ||
|
||
# For each node create a concentrated nodal mass element | ||
mass_nodes_model_part = self.model.GetModelPart(model_part_name) | ||
property_0 = mass_nodes_model_part.GetProperties(0) # Get the default empty properties | ||
for node in mass_nodes_model_part.Nodes: | ||
# Create the concentrated nodal mass element | ||
max_id += 1 # Update the element id | ||
node_list = [node.Id] # The nodal list is just the current node | ||
new_element = mass_nodes_model_part.CreateNewElement("NodalConcentratedElement3D1N", max_id, node_list, property_0) | ||
|
||
# Set the extra mass value to current element | ||
# IMPORTANT: this needs to be mass (internally it will be multiplied by the gravity, which value is the VOLUME_ACCELERATION within the ProjectParameters.json) | ||
new_element.SetValue(KratosMultiphysics.NODAL_MASS, mass_value) | ||
|
||
|
||
return AnalysisStageWithFlush(global_model, parameters) | ||
|
||
if __name__ == "__main__": | ||
|
||
with open("ProjectParameters.json", 'r') as parameter_file: | ||
parameters = KratosMultiphysics.Parameters(parameter_file.read()) | ||
|
||
analysis_stage_module_name = parameters["analysis_stage"].GetString() | ||
analysis_stage_class_name = analysis_stage_module_name.split('.')[-1] | ||
analysis_stage_class_name = ''.join(x.title() for x in analysis_stage_class_name.split('_')) | ||
|
||
analysis_stage_module = importlib.import_module(analysis_stage_module_name) | ||
analysis_stage_class = getattr(analysis_stage_module, analysis_stage_class_name) | ||
|
||
global_model = KratosMultiphysics.Model() | ||
simulation = CreateAnalysisStageWithFlushInstance(analysis_stage_class, global_model, parameters) | ||
simulation.Run() |
78 changes: 78 additions & 0 deletions
78
...echanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/source/ProjectParameters.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"problem_data" : { | ||
"problem_name" : "anoeta_stadium_truss", | ||
"parallel_type" : "OpenMP", | ||
"echo_level" : 1, | ||
"start_time" : 0.0, | ||
"end_time" : 1.0 | ||
}, | ||
"solver_settings" : { | ||
"time_stepping" : { | ||
"time_step" : 1.1 | ||
}, | ||
"solver_type" : "eigen_value", | ||
"model_part_name" : "Structure", | ||
"domain_size" : 3, | ||
"echo_level" : 1, | ||
"model_import_settings" : { | ||
"input_type" : "mdpa", | ||
"input_filename" : "anoeta_stadium_truss" | ||
}, | ||
"material_import_settings" : { | ||
"materials_filename" : "StructuralMaterials.json" | ||
}, | ||
"eigensolver_settings" : { | ||
"solver_type" : "eigen_eigensystem", | ||
"max_iteration" : 1000, | ||
"tolerance" : 1e-6, | ||
"number_of_eigenvalues" : 5, | ||
"echo_level" : 1 | ||
}, | ||
"rotation_dofs" : false, | ||
"volumetric_strain_dofs" : false, | ||
"builder_and_solver_settings": { | ||
"use_block_builder": false | ||
} | ||
}, | ||
"processes" : { | ||
"constraints_process_list" : [{ | ||
"python_module" : "assign_vector_variable_process", | ||
"kratos_module" : "KratosMultiphysics", | ||
"process_name" : "AssignVectorVariableProcess", | ||
"Parameters" : { | ||
"model_part_name" : "Structure.DISPLACEMENT_Displacement_Auto1", | ||
"variable_name" : "DISPLACEMENT", | ||
"interval" : [0.0,"End"], | ||
"constrained" : [true,true,true], | ||
"value" : [0.0,0.0,0.0] | ||
} | ||
}], | ||
"loads_process_list" : [{ | ||
"python_module" : "assign_vector_by_direction_process", | ||
"kratos_module" : "KratosMultiphysics", | ||
"check" : "DirectorVectorNonZero direction", | ||
"process_name" : "AssignVectorByDirectionProcess", | ||
"Parameters" : { | ||
"model_part_name" : "Structure.SelfWeight3D_Self_weight_Auto1", | ||
"variable_name" : "VOLUME_ACCELERATION", | ||
"interval" : [0.0,"End"], | ||
"constrained" : false, | ||
"modulus" : 9.81, | ||
"direction" : [0.0,0.0,-1.0] | ||
} | ||
}], | ||
"list_other_processes" : [{ | ||
"python_module" : "postprocess_eigenvalues_process", | ||
"kratos_module" : "KratosMultiphysics.StructuralMechanicsApplication", | ||
"help" : "This process postprocces the eigen values for GiD", | ||
"process_name" : "PostProcessEigenvaluesProcess", | ||
"Parameters" : { | ||
"result_file_name" : "anoeta_stadium_truss", | ||
"animation_steps" : 20, | ||
"file_format" : "gid", | ||
"label_type" : "frequency" | ||
} | ||
}] | ||
}, | ||
"analysis_stage" : "KratosMultiphysics.StructuralMechanicsApplication.structural_mechanics_analysis" | ||
} |
63 changes: 63 additions & 0 deletions
63
...hanics/use_cases/anoeta_stadium_truss_eigenvalue_analysis/source/StructuralMaterials.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{ | ||
"properties" : [{ | ||
"model_part_name" : "Structure.Parts_Truss_Tubo_superior", | ||
"properties_id" : 1, | ||
"Material" : { | ||
"constitutive_law" : { | ||
"name" : "TrussConstitutiveLaw" | ||
}, | ||
"Variables" : { | ||
"DENSITY" : 7850.0, | ||
"YOUNG_MODULUS" : 206900000000.0, | ||
"CROSS_AREA" : 0.026, | ||
"TRUSS_PRESTRESS_PK2" : 0.0 | ||
}, | ||
"Tables" : null | ||
} | ||
},{ | ||
"model_part_name" : "Structure.Parts_Truss_Barras_inferiores", | ||
"properties_id" : 2, | ||
"Material" : { | ||
"constitutive_law" : { | ||
"name" : "TrussConstitutiveLaw" | ||
}, | ||
"Variables" : { | ||
"DENSITY" : 7850.0, | ||
"YOUNG_MODULUS" : 206900000000.0, | ||
"CROSS_AREA" : 0.0185, | ||
"TRUSS_PRESTRESS_PK2" : 0.0 | ||
}, | ||
"Tables" : null | ||
} | ||
},{ | ||
"model_part_name" : "Structure.Parts_Truss_Barras_cruzadas", | ||
"properties_id" : 3, | ||
"Material" : { | ||
"constitutive_law" : { | ||
"name" : "TrussConstitutiveLaw" | ||
}, | ||
"Variables" : { | ||
"DENSITY" : 7850.0, | ||
"YOUNG_MODULUS" : 206900000000.0, | ||
"CROSS_AREA" : 0.010681, | ||
"TRUSS_PRESTRESS_PK2" : 0.0 | ||
}, | ||
"Tables" : null | ||
} | ||
},{ | ||
"model_part_name" : "Structure.Parts_Truss_Soportes", | ||
"properties_id" : 4, | ||
"Material" : { | ||
"constitutive_law" : { | ||
"name" : "TrussConstitutiveLaw" | ||
}, | ||
"Variables" : { | ||
"DENSITY" : 7850.0, | ||
"YOUNG_MODULUS" : 206900000000.0, | ||
"CROSS_AREA" : 0.007339, | ||
"TRUSS_PRESTRESS_PK2" : 0.0 | ||
}, | ||
"Tables" : null | ||
} | ||
}] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Es como si no llevara nada