Source code for viiapackage.analyses.analysis_a2

### ===================================================================================================================
###   A2 Rob-test
### ===================================================================================================================
# Copyright ©VIIA 2024

### ===================================================================================================================
###   1. Import modules
### ===================================================================================================================

# General imports
from __future__ import annotations
from typing import TYPE_CHECKING

# References for functions and classes in the rhdhv_fem package
from rhdhv_fem.analyses import Analysis

# References for functions and classes in the viiaPackage
if TYPE_CHECKING:
    from viiapackage.viiaStatus import ViiaProject


### ===================================================================================================================
###   2. Function to create the A2 analysis
### ===================================================================================================================

[docs]def viia_create_analysis_a2(project: ViiaProject) -> Analysis: """ This function creates the A2 analysis, complete existing model linear static analysis. This analysis is available for DIANA and ABAQUS software. It applies displacements and checks the model. Input: - project (obj): VIIA project object containing collections of fem objects and project variables. Output: - Creates and returns the A2 with all settings for VIIA. """ # Set analysis name name = 'A2 - Rob-test - Lineair statische analyse met fixed base' # Select the Rob-test load combination load_combination = project.viia_get('load_combinations', name='Rob-test') if load_combination is None: raise ValueError( "ERROR: The load-combination 'Rob-test' is not present in project for the A2 Rob-test analysis.") # Create the output-blocks for linear static analysis output = [ project.create_output_block_static( name='OUTPUT_STATIC', load_combinations='ALL', output_items=[project.create_output_item('displacements')], output_filename=f'{project.name}_v{project.version}_OUTPUT_STATIC'), project.create_output_block_static( name='OUTPUT_ROBTEST_TB', load_combinations=[load_combination], output_device='tabulated', output_items=[project.create_output_item('displacements')], output_filename=f'{project.name}_v{project.version}_OUTPUT_ROBTEST_TB')] # Create the execute-block for static analysis analysis_block = project.create_static_analysis_block(output_blocks=output) # Create the analysis return project.create_analysis(name=name, calculation_blocks=[analysis_block])
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================