Source code for viiapackage.viiaStatus

### =============================================================================================================== ###
###                                                                                                                 ###
###                                                  viiaStatus.py                                                  ###
###                                                                                                                 ###
### =============================================================================================================== ###
# This module contains all constants for the VIIA project.
# Units are in m, N, rads and kg

# Module is based on:
# VIIA_QE_R376 Basis of Design Retrofit Advice NLTH, v11.0, d.d. 29 August 2024
# VIIA_QE_R376 Basis of Design Step-by-Step MRS, v1.0, d.d. 21 January 2022
# VIIA_QE_R1674 Uitgangspuntenrapport engineering NLPO, v1.0, d.d. 1 August 2019

# This script was based upon the Constitution For Python At VIIA
# For use by VIIA
# Copyright RHDHV

### ===================================================================================================================
###    Contents
### ===================================================================================================================

#   1. Import modules

#   2. Class Project updated for VIIA project and VIIA settings

#   3. Create VIIA project

#   4. End of script

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

# General imports
from pathlib import Path
from warnings import warn, catch_warnings, simplefilter
from typing import Optional, Union, List
from sys import executable

# References for functions and classes in DataFusr Python base package
from datafusr_py_base.deprecation import remove_function, rename_method

# References for functions and classes in the rhdhv_fem package
from rhdhv_fem.fem_status import Project
from rhdhv_fem.shapes import Shapes
from rhdhv_fem.fem_DIANAutils import check_diana_version

# References for functions and classes in the viiaPackage
from viiapackage.VIIAClassDefinition import _viia_create_beam, _viia_create_column, _viia_create_floor, \
    _viia_create_roof, _viia_create_wall, _viia_create_fstrip, _viia_create_material, _viia_create_geometry, \
    viia_get, viia_get_level, _viia_create_walls_on_grid, _viia_create_floors_on_grid, _viia_create_beams_on_grid, \
    _viia_create_columns_on_grid, _viia_create_beams_on_grid_in_shape, viia_create_collar_ties_on_grid, \
    _viia_create_cavity_wall_tie, _viia_create_main_surface_reinforcement, _viia_remove_shape, viia_get_shape, \
    viia_get_connection, viia_compare_shape_name
from viiapackage.viiaChecking import viia_check_mesh
from viiapackage.viiaAnalysis import viia_create_datfile, viia_update_analyses_DIANA_to_ABAQUS, viia_analysis, \
    viia_modify_analysis
from viiapackage.analyses.viia_create_analysis import viia_create_analysis
from viiapackage.analyses.helper_functions.phasing import viia_phased_analysis
from viiapackage.viiaShapeOperations import viia_create_cavity_wall_ties_from_list, viia_align_with_grid, \
    viia_create_all_lintels, viia_create_lintel, viia_truss, viia_create_nonlinear_concrete_wall, \
    viia_split_wall_horizontal, viia_split_wall_vertical, viia_split_all_walls, viia_walls_split_floor_heights, \
    viia_auto_resize_all_walls, viia_wall_to_columns, viia_openings_on_contour_wall, viia_change_linemass, \
    viia_wooden_beam_floors, viia_find_max_name_number, viia_add_openings, \
    viia_find_max_id, viia_projection_on_surface, viia_add_roof_openings, viia_split_surface, \
    viia_extend_wall_to_wall_horizontal, viia_convert_all_columns_to_walls
from viiapackage.shape_operations import viia_add_floor_openings
from viiapackage.geometry import viia_create_outer_leaf, viia_create_dummy_plate_between_walls, \
    viia_create_cavity_wall_ties, viia_create_wall_ties_on_line, viia_connect_cavity_walls, viia_move_cavity_wall_tie, \
    viia_remove_cavity_wall_tie, viia_adjust_fstrips, viia_create_foundation_walls_and_strips, \
    viia_create_foundation_columns_and_strips, viia_get_total_cavity_wall_width, viia_set_psse, viia_set_nsce, \
    viia_get_psse, viia_get_nsce
from viiapackage.viiaConnections import _viia_connect_all_shapes, _viia_connect_shape, viia_create_connection, \
    viia_create_tying, _viia_connections_get_mappings, viia_node_data_diana, viia_shape_data_diana, \
    viia_disconnect_shape
from viiapackage.connections import viia_auto_hinges, viia_auto_interfaces
from viiapackage.viiaSettings import ViiaSettings
from viiapackage.viiaSupports import viia_create_supports, viia_create_piles
from viiapackage.supports import viia_create_boundary_springs_for_static_analysis, \
    viia_create_all_boundary_springs_for_static_analysis, viia_remove_supports, \
    viia_update_pile_supports_for_rob_test, viia_remove_temporarily_pile_supports_for_rob_test, \
    viia_create_line_supports_for_foundation_walls
from viiapackage.strengthening import viia_l2_002, viia_l2_005, viia_l2_029, viia_l2_025, viia_l2_043, viia_l2_053, \
    viia_l2_054, viia_l2_060, viia_l3a, viia_l3b, viia_l3d, viia_l3e, viia_l3g, viia_l3m, viia_l3s, viia_l4b, \
    viia_l4d, viia_l4f, viia_l4i, viia_l4o, viia_l4r, viia_l5a, viia_l5b, viia_l5n, viia_l5p, viia_l6j
from viiapackage.layers import viia_create_layer, viia_get_layers, viia_get_top_layer, viia_get_highest_layer, \
    viia_check_layers
from viiapackage.viiaLoads import viia_create_mass_all_openings, viia_create_mass_all_wall_openings, \
    viia_create_mass_wall_openings, \
    viia_create_mass_horizontal_surface_openings, viia_create_mass_all_horizontal_surface_openings, \
    viia_create_mass_roof_openings, viia_create_mass_all_roof_openings, viia_create_linemass, viia_surface_mass, \
    viia_create_linemass_beam, \
    viia_create_pointmass, viia_add_outer_leaf_wall_line_load, viia_adjust_mass_of_surface, \
    viia_create_surface_mass_floor, viia_create_surface_mass_wall, viia_include_outerleaf_in_innerleaf_density, \
    viia_create_dead_loads, viia_convert_imposed_loads_to_self_weight, viia_convert_self_weight_to_imposed_loads, \
    viia_create_loads, viia_remove_loads, viia_add_basemotion_signals, viia_change_signal, \
    viia_create_load_combination_static, viia_create_load_combination_rob_test, \
    viia_create_load_combination_response_spectrum, viia_create_load_combination_push_over, \
    viia_create_load_combination_base_motion, \
    viia_create_load_combination_earthquake, viia_remove_load_combination, viia_remove_load_combination_rob_test, \
    viia_remove_load_combination_response_spectrum, viia_remove_load_combination_push_over, \
    viia_remove_load_combination_base_motion, viia_remove_load_combination_earthquake, viia_create_response_spectra
from viiapackage.viiaMaterials import viia_create_materials, viia_linear_properties, viia_non_linear_properties
from viiapackage.viiaGeometries import viia_create_geometries
from viiapackage.viiaDatas import viia_create_datas, viia_create_all_datas
from viiapackage.viiaGeneral import viia_create_model, viia_create_plots, viia_plot_layers, viia_read_dump, \
    viia_read_myviia_model, viia_write_dump, \
    _viia_find_nodes_top_ridge, _viia_find_foundation_nodes_under_wall, \
    _viia_find_wall_groups_for_nlka_in_model, _viia_find_intersecting_floors_for_wall, \
    _viia_find_upper_floor_of_wall, _viia_find_lower_floor_of_wall, _viia_find_foundation_strip_below_wall, \
    _viia_find_top_wall, viia_get_flat_roofs, viia_check_inner_wall, _viia_get_weight_of_elements_in_box, \
    viia_get_inner_walls, viia_get_facades, viia_create_cost_key_figures, \
    _viia_analysis_diana_gui_files, viia_get_signal, viia_get_material, \
    viia_check_materialname_present, viia_print_execution_time, viia_plot_grid, _viia_find_floor_mesh_nodes
from viiapackage.viiaResults import viia_results, viia_create_movie_diana
from viiapackage.results import viia_find_wall_overburden_load, viia_wall_displacements, viia_acceleration_graphs, \
    viia_movie_maker, viia_collect_pile_reactions
from viiapackage.results.make_pictures import \
    viia_make_picture_strengthening_measures, viia_show_picture
from viiapackage.results.result_functions.viia_results_pushover import viia_get_drift_limits, _viia_demand_curve
from viiapackage.results.result_functions import viia_convergence_graph
from viiapackage.results.result_functions.viia_foundation_area import viia_foundation_area
from viiapackage.results.result_functions.viia_base_shear import viia_base_shear
from viiapackage.results.geo_output import viia_create_geo_output_static_analysis, viia_create_geo_output_nlth, \
    viia_append_envelope_requests_geo_abaqus
from viiapackage.viiaPictures import viia_model_pictures
from viiapackage.viiaReporting import viia_prepare_for_engineering_report, viia_create_report
from viiapackage.viiaReferenceApproach import viia_get_preselection_reference_approach, viia_ref_table, \
    viia_collect_reference_walls_data, viia_scoring_current_wall, viia_collect_reference_models
from viiapackage.reporting import viia_create_model_plots_appendix, viia_create_crm, viia_forces_l2_measures
from viiapackage.pictures import viia_plot_psse_nsce, viia_plot_foundation_details, viia_create_model_plots
from viiapackage.tools import viia_start_interactive_modelling, viia_create_object_jira, viia_nlka_tool, \
    viia_nlka_graph_data, viia_create_gable_roof, viia_create_hip_roof, viia_get_file, viia_update_version_in_scripts, \
    get_package_version
from viiapackage.pile_properties import viia_pile_tool
from viiapackage.database import viia_get_project_information
from viiapackage.general import viia_get_latest_model_folder, viia_restructure_folder, viia_get_script_in_folder, \
    viia_get_subfolder_in_folder
from viiapackage.pictures.model_pictures.helper_functions import viia_add_legend_model_pictures


### ===================================================================================================================
###    2. Class Project updated for VIIA project and VIIA settings
### ===================================================================================================================

[docs]class ViiaProject(Project): """ This class extends the Project class for the VIIA environment. The project contains general project setup, and facilitates the binding of the methods used in the VIIA project.""" # Define the supported analysis types supported_analyses_types = ['MRS', 'NLPO', 'NLPO-SDF', 'NLTH', 'SBS', 'NLPO-REF', 'NLTH-REF'] # Bind user-functions as method to Project class # User bindings based on naming convention of Project shape_creation = None material_creation = _viia_create_material geometry_creation = _viia_create_geometry # User bindings for FEM package viia_create_orthogonal_grid = Project.create_orthogonal_grid viia_create_levels = Project.create_levels viia_create_diagonal_gridline_two_points = Project.create_diagonal_gridline_two_points viia_create_diagonal_gridlines_points_vector = Project.create_diagonal_gridlines_points_vector # User bindings for VIIAClassDefinition viia_create_beam = _viia_create_beam viia_create_column = _viia_create_column viia_create_floor = _viia_create_floor viia_create_roof = _viia_create_roof viia_create_wall = _viia_create_wall viia_create_fstrip = _viia_create_fstrip viia_create_main_surface_reinforcement = _viia_create_main_surface_reinforcement viia_create_material = _viia_create_material viia_create_geometry = _viia_create_geometry viia_get = viia_get viia_get_shape = viia_get_shape viia_get_connection = viia_get_connection viia_get_level = viia_get_level viia_create_walls_on_grid = _viia_create_walls_on_grid viia_create_floors_on_grid = _viia_create_floors_on_grid viia_create_beams_on_grid = _viia_create_beams_on_grid viia_create_beams_on_grid_in_shape = _viia_create_beams_on_grid_in_shape viia_create_collar_ties_on_grid = viia_create_collar_ties_on_grid viia_create_columns_on_grid = _viia_create_columns_on_grid viia_create_cavity_wall_tie = _viia_create_cavity_wall_tie viia_remove_shape = _viia_remove_shape viia_compare_shape_name = viia_compare_shape_name # User bindings for viiaShapeOperations viia_create_cavity_wall_ties_from_list = viia_create_cavity_wall_ties_from_list viia_connect_cavity_walls = viia_connect_cavity_walls viia_move_cavity_wall_tie = viia_move_cavity_wall_tie viia_remove_cavity_wall_tie = viia_remove_cavity_wall_tie viia_create_outer_leaf = viia_create_outer_leaf viia_get_total_cavity_wall_width = viia_get_total_cavity_wall_width viia_create_dummy_plate_between_walls = viia_create_dummy_plate_between_walls viia_split_wall_horizontal = viia_split_wall_horizontal viia_split_wall_vertical = viia_split_wall_vertical viia_extend_wall_to_wall_horizontal = viia_extend_wall_to_wall_horizontal viia_walls_split_floor_heights = viia_walls_split_floor_heights viia_split_surface = viia_split_surface viia_wall_to_columns = viia_wall_to_columns viia_convert_all_columns_to_walls = viia_convert_all_columns_to_walls viia_create_cavity_wall_ties = viia_create_cavity_wall_ties viia_create_wall_ties_on_line = viia_create_wall_ties_on_line viia_align_with_grid = viia_align_with_grid viia_create_all_lintels = viia_create_all_lintels viia_create_lintel = viia_create_lintel viia_truss = viia_truss viia_create_nonlinear_concrete_wall = viia_create_nonlinear_concrete_wall viia_split_all_walls = viia_split_all_walls viia_openings_on_contour_wall = viia_openings_on_contour_wall viia_AutoResizeAllWalls = viia_auto_resize_all_walls viia_change_linemass = viia_change_linemass viia_wooden_beam_floors = viia_wooden_beam_floors viia_add_openings = viia_add_openings viia_add_floor_openings = viia_add_floor_openings viia_add_roof_openings = viia_add_roof_openings viia_find_max_name_number = viia_find_max_name_number viia_projection_on_surface = viia_projection_on_surface find_max_id = viia_find_max_id viia_set_psse = viia_set_psse viia_set_nsce = viia_set_nsce viia_get_psse = viia_get_psse viia_get_nsce = viia_get_nsce # User bindings for viiaAnalysis viia_create_datfile = viia_create_datfile viia_create_analysis = viia_create_analysis viia_modify_analysis = viia_modify_analysis viia_get_drift_limits = viia_get_drift_limits viia_update_analyses_DIANA_to_ABAQUS = viia_update_analyses_DIANA_to_ABAQUS viia_phased_analysis = viia_phased_analysis # User bindings for viiaChecking viia_check_mesh = viia_check_mesh viia_check_beam_rotation = remove_function('viia_check_beam_rotation', 'viiapackage', '69.4.0') viia_check_element_angle = remove_function('viia_check_element_angle', 'viiapackage', '69.4.0') viia_check_tyings = remove_function('viia_check_tyings', 'viiapackage', '70.2.1') # User bindings for viiaConnections viia_connect_all_shapes = _viia_connect_all_shapes viia_connect_shape = _viia_connect_shape viia_create_connection = viia_create_connection viia_create_tying = viia_create_tying viia_disconnect_shape = viia_disconnect_shape viia_connections_get_mappings = _viia_connections_get_mappings viia_auto_interfaces = viia_auto_interfaces viia_auto_hinges = viia_auto_hinges viia_node_data_diana = viia_node_data_diana viia_shape_data_diana = viia_shape_data_diana # User bindings for viiaGeneral viia_create_model = viia_create_model viia_create_plots = viia_create_plots viia_plot_layers = viia_plot_layers viia_find_wall_reference_nodes = remove_function('viia_find_wall_reference_nodes', 'viiapackage', '70.0.0') viia_check_datfile_elementsets = remove_function('viia_check_datfile_elementsets', 'viiapackage', '70.0.0') viia_find_3_mesh_nodes_on_wall = remove_function('viia_find_3_mesh_nodes_on_wall', 'viiapackage', '70.0.0') viia_find_floor_mesh_nodes = _viia_find_floor_mesh_nodes viia_find_nodes_top_ridge = _viia_find_nodes_top_ridge viia_find_foundation_nodes_under_wall = _viia_find_foundation_nodes_under_wall viia_find_wall_groups_for_nlka_in_model = _viia_find_wall_groups_for_nlka_in_model viia_find_intersecting_floors_for_wall = _viia_find_intersecting_floors_for_wall viia_find_upper_floor_of_wall = _viia_find_upper_floor_of_wall viia_find_lower_floor_of_wall = _viia_find_lower_floor_of_wall viia_find_foundation_strip_below_wall = _viia_find_foundation_strip_below_wall viia_find_top_wall = _viia_find_top_wall viia_get_flat_roofs = viia_get_flat_roofs viia_check_inner_wall = viia_check_inner_wall viia_get_weight_of_elements_in_box = _viia_get_weight_of_elements_in_box viia_read_from_gmc = remove_function('viia_read_from_gmc', 'viiapackage', '68.6.0') viia_gmc_ifc = remove_function('viia_gmc_ifc', 'viiapackage', '68.6.0') viia_cost_ifc = remove_function('viia_cost_ifc', 'viiapackage', '68.6.0') viia_get_inner_walls = viia_get_inner_walls viia_get_facades = viia_get_facades viia_create_cost_key_figures = viia_create_cost_key_figures viia_read_dump = viia_read_dump viia_read_myviia_model = viia_read_myviia_model viia_write_dump = viia_write_dump viia_analysis_diana_gui_files = _viia_analysis_diana_gui_files viia_get_signal = viia_get_signal viia_get_material = viia_get_material viia_check_materialname_present = viia_check_materialname_present viia_print_execution_time = viia_print_execution_time viia_plot_grid = viia_plot_grid # User bindings for layer viia_create_layer = viia_create_layer viia_get_layers = viia_get_layers viia_get_top_layer = viia_get_top_layer viia_get_highest_layer = viia_get_highest_layer viia_check_layers = viia_check_layers # User bindings for viiaLoads viia_create_mass_all_openings = viia_create_mass_all_openings viia_create_mass_all_wall_openings = viia_create_mass_all_wall_openings viia_create_mass_wall_openings = viia_create_mass_wall_openings viia_create_mass_roof_openings = viia_create_mass_roof_openings viia_create_mass_all_roof_openings = viia_create_mass_all_roof_openings viia_create_mass_horizontal_surface_openings = viia_create_mass_horizontal_surface_openings viia_create_mass_all_horizontal_surface_openings = viia_create_mass_all_horizontal_surface_openings viia_create_linemass = viia_create_linemass viia_surface_mass = viia_surface_mass viia_create_linemass_beam = viia_create_linemass_beam viia_create_pointmass = viia_create_pointmass viia_add_outer_leaf_wall_line_load = viia_add_outer_leaf_wall_line_load viia_adjust_mass_of_surface = viia_adjust_mass_of_surface viia_create_surface_mass_floor = viia_create_surface_mass_floor viia_create_surface_mass_wall = viia_create_surface_mass_wall viia_include_outerleaf_in_innerleaf_density = viia_include_outerleaf_in_innerleaf_density viia_create_dead_loads = viia_create_dead_loads viia_convert_imposed_loads_to_self_weight = viia_convert_imposed_loads_to_self_weight viia_convert_self_weight_to_imposed_loads = viia_convert_self_weight_to_imposed_loads viia_create_loads = viia_create_loads viia_remove_loads = viia_remove_loads viia_add_basemotion_signals = viia_add_basemotion_signals viia_change_signal = viia_change_signal viia_create_load_combination_static = viia_create_load_combination_static viia_create_loadcombination_static = rename_method( old='viia_create_loadcombination_static', new=viia_create_load_combination_static, new_name='viia_create_load_combination_static', since='71.1.0', package='viiapackage', until='72.0.0') viia_create_load_combination_rob_test = viia_create_load_combination_rob_test viia_create_loadcombination_rob_test = rename_method( old='viia_create_loadcombination_rob_test', new=viia_create_load_combination_rob_test, new_name='viia_create_load_combination_rob_test', since='71.1.0', package='viiapackage', until='72.0.0') viia_create_load_combination_response_spectrum = viia_create_load_combination_response_spectrum viia_create_loadcombination_responsespectrum = rename_method( old='viia_create_loadcombination_responsespectrum', new=viia_create_load_combination_response_spectrum, new_name='viia_create_load_combination_response_spectrum', since='71.1.0', package='viiapackage', until='72.0.0') viia_create_load_combination_push_over = viia_create_load_combination_push_over viia_create_loadcombination_push_over = rename_method( old='viia_create_loadcombination_push_over', new=viia_create_load_combination_push_over, new_name='viia_create_load_combination_push_over', since='71.1.0', package='viiapackage', until='72.0.0') viia_create_load_combination_base_motion = viia_create_load_combination_base_motion viia_create_loadcombination_base_motion = rename_method( old='viia_create_loadcombination_base_motion', new=viia_create_load_combination_base_motion, new_name='viia_create_load_combination_base_motion', since='71.1.0', package='viiapackage', until='72.0.0') viia_create_load_combination_earthquake = viia_create_load_combination_earthquake viia_create_loadcombination_earthquake = rename_method( old='viia_create_loadcombination_earthquake', new=viia_create_load_combination_earthquake, new_name='viia_create_load_combination_earthquake', since='71.1.0', package='viiapackage', until='72.0.0') viia_remove_load_combination = viia_remove_load_combination viia_remove_loadcombination = rename_method( old='viia_remove_loadcombination', new=viia_remove_load_combination, new_name='viia_remove_load_combination', since='71.1.0', package='viiapackage', until='72.0.0') viia_remove_load_combination_rob_test = viia_remove_load_combination_rob_test viia_remove_loadcombination_rob_test = rename_method( old='viia_remove_loadcombination_rob_test', new=viia_remove_load_combination_rob_test, new_name='viia_remove_load_combination_rob_test', since='71.1.0', package='viiapackage', until='72.0.0') viia_remove_load_combination_response_spectrum = viia_remove_load_combination_response_spectrum viia_remove_loadcombination_responsespectrum = rename_method( old='viia_remove_loadcombination_responsespectrum', new=viia_remove_load_combination_response_spectrum, new_name='viia_remove_load_combination_response_spectrum', since='71.1.0', package='viiapackage', until='72.0.0') viia_remove_load_combination_push_over = viia_remove_load_combination_push_over viia_remove_loadcombination_push_over = rename_method( old='viia_remove_loadcombination_push_over', new=viia_remove_load_combination_push_over, new_name='viia_remove_load_combination_push_over', since='71.1.0', package='viiapackage', until='72.0.0') viia_remove_load_combination_base_motion = viia_remove_load_combination_base_motion viia_remove_loadcombination_base_motion = rename_method( old='viia_remove_loadcombination_base_motion', new=viia_remove_load_combination_base_motion, new_name='viia_remove_load_combination_base_motion', since='71.1.0', package='viiapackage', until='72.0.0') viia_remove_load_combination_earthquake = viia_remove_load_combination_earthquake viia_remove_loadcombination_earthquake = rename_method( old='viia_remove_loadcombination_earthquake', new=viia_remove_load_combination_earthquake, new_name='viia_remove_load_combination_earthquake', since='71.1.0', package='viiapackage', until='72.0.0') viia_create_response_spectra = viia_create_response_spectra # User bindings for viiaMaterials viia_materials = viia_create_materials viia_linear_properties = viia_linear_properties viia_non_linear_properties = viia_non_linear_properties # User bindings for viiaGeometries viia_geometries = viia_create_geometries # User bindings for viiaDatas viia_create_datas = viia_create_datas viia_create_all_datas = viia_create_all_datas # User bindings for viiaReferenceApproach viia_get_preselection_reference_approach = viia_get_preselection_reference_approach viia_collect_reference_models = viia_collect_reference_models viia_collect_reference_walls_data = viia_collect_reference_walls_data viia_scoring_current_wall = viia_scoring_current_wall viia_ref_table = viia_ref_table # User bindings for viiaReporting viia_prepare_for_engineering_report = viia_prepare_for_engineering_report viia_create_report = viia_create_report viia_create_model_plots_appendix = viia_create_model_plots_appendix viia_create_crm = viia_create_crm viia_plot_foundation_details = viia_plot_foundation_details viia_plot_psse_nsce = viia_plot_psse_nsce # User bindings for viiaResults viia_make_picture_strengthening_measures = viia_make_picture_strengthening_measures viia_show_picture = viia_show_picture viia_create_model_plots = viia_create_model_plots viia_convergence_graph = viia_convergence_graph viia_base_shear = viia_base_shear viia_find_wall_overburden_load = viia_find_wall_overburden_load viia_demand_curve = _viia_demand_curve viia_results = viia_results viia_create_movie_diana = viia_create_movie_diana viia_foundation_area = viia_foundation_area viia_create_geo_output_static_analysis = viia_create_geo_output_static_analysis viia_create_geo_output_nlth = viia_create_geo_output_nlth viia_append_envelope_requests_geo_abaqus = viia_append_envelope_requests_geo_abaqus viia_get_file = viia_get_file viia_collect_pile_reactions = viia_collect_pile_reactions viia_wall_displacements = viia_wall_displacements viia_acceleration_graphs = viia_acceleration_graphs viia_movie_maker = viia_movie_maker # User bindings for viiaStrengthening viia_l2_002 = viia_l2_002 viia_l2_005 = viia_l2_005 viia_l2_025 = viia_l2_025 viia_l2_029 = viia_l2_029 viia_l2_043 = viia_l2_043 viia_l2_053 = viia_l2_053 viia_l2_054 = viia_l2_054 viia_l2_060 = viia_l2_060 viia_l3a = viia_l3a viia_l3b = viia_l3b viia_l3d = viia_l3d viia_l3e = viia_l3e viia_l3g = viia_l3g viia_l3m = viia_l3m viia_l3s = viia_l3s viia_l4b = viia_l4b viia_l4d = viia_l4d viia_l4f = viia_l4f viia_l4i = viia_l4i viia_l4o = viia_l4o viia_l4r = viia_l4r viia_l5a = viia_l5a viia_l5b = viia_l5b viia_l5n = viia_l5n viia_l5p = viia_l5p viia_l6j = viia_l6j viia_forces_l2_measures = viia_forces_l2_measures # User bindings for viiaSupports viia_create_supports = viia_create_supports viia_create_piles = viia_create_piles viia_create_boundary_springs_for_static_analysis = viia_create_boundary_springs_for_static_analysis viia_create_all_boundary_springs_for_static_analysis = viia_create_all_boundary_springs_for_static_analysis viia_remove_supports = viia_remove_supports viia_update_pile_supports_for_rob_test = viia_update_pile_supports_for_rob_test viia_remove_temporarily_pile_supports_for_rob_test = viia_remove_temporarily_pile_supports_for_rob_test viia_create_line_supports_for_foundation_walls = viia_create_line_supports_for_foundation_walls # User bindings for viiaWorkflow viia_analysis = viia_analysis viia_model_pictures = viia_model_pictures viia_add_legend_model_pictures = viia_add_legend_model_pictures viia_get_latest_model_folder = viia_get_latest_model_folder viia_restructure_folder = viia_restructure_folder viia_get_scripts_in_folder = viia_get_script_in_folder viia_get_subfolder_in_folder = viia_get_subfolder_in_folder # User bindings for tools viia_create_gable_roof = viia_create_gable_roof viia_create_hip_roof = viia_create_hip_roof viia_create_foundation_walls_and_strips = viia_create_foundation_walls_and_strips viia_create_foundation_columns_and_strips = viia_create_foundation_columns_and_strips viia_adjust_fstrips = viia_adjust_fstrips viia_nlka_tool = viia_nlka_tool viia_pile_tool = viia_pile_tool viia_nlka_graph_data = viia_nlka_graph_data viia_create_object_jira = viia_create_object_jira viia_start_interactive_modelling = viia_start_interactive_modelling # Bindings for MYVIIA database viia_get_project_information = viia_get_project_information
[docs] def __init__( self, name: str, analysis_type: Optional[str] = None, analysis_subtype: Optional[str] = None, token: Optional[str] = None): """ Input: - name (str): Name of the project to be created. - analysis_type (str): Select the type of analysis performed. Within VIIA currently 'MRS', 'SBS', 'NLTH' and 'NLPO' are available. Default is None. - analysis_subtype (str): Select the push-over approach, single line 'SL' or multiline 'ML'. This argument is only used in non-linear push-over analysis (analysis type 'NLPO'). Default value is None. - token (str): Optional input to provide the token for access to MYVIIA database. Input only used when script is performed on MYVIIA server environment. """ # __init__ method of 'Project' class is carried out with catch_warnings(): simplefilter(action='ignore', category=DeprecationWarning, lineno=215) Project.__init__(self, name) # Set token for MYVIIA login self.token = token # Set the analysis type and subtype self.analysis_type = analysis_type self.analysis_subtype = analysis_subtype # Project variable collecting the results of the analysis in a dictionary self.results = {} # Set frequent used folder locations self.appendix_pictures_folder = None # Collect the reference objects (in reference approach analysis type) self.ref_models = {} # Collect the settings for VIIA self.viia_settings = None
@property def token(self): return self.__token @token.setter def token(self, new_token: Optional[str] = None): if new_token is not None and not isinstance(new_token, str): raise ValueError("ERROR: To set the token for the viiaPackage provide input as string.") self.__token = new_token @property def analysis_type(self): return self.__analysis_type @analysis_type.setter def analysis_type(self, new_analysis_type: Optional[str]): if new_analysis_type is not None and not isinstance(new_analysis_type, str): raise ValueError("ERROR: To set the analysis_type provide input as string.") if new_analysis_type: new_analysis_type = new_analysis_type.upper() if new_analysis_type not in self.supported_analyses_types: raise NotImplementedError( f"ERROR: Analysis-type requested {new_analysis_type} should be " f"{', '.join(self.supported_analyses_types)}.") self.__analysis_type = new_analysis_type @property def analysis_subtype(self): return self.__analysis_subtype @analysis_subtype.setter def analysis_subtype(self, new_analysis_subtype: Optional[str]): if new_analysis_subtype is not None and not isinstance(new_analysis_subtype, str): raise ValueError("ERROR: To set the analysis_subtype provide input as string.") if new_analysis_subtype: new_analysis_subtype = new_analysis_subtype.upper() if new_analysis_subtype not in ['SL', 'ML']: raise NotImplementedError( f"ERROR: Analysis-subtype requested {new_analysis_subtype} should be 'SL' or 'ML'.") if new_analysis_subtype == 'ML': warn("WARNING: Multi-line NLPO is not supported anymore.") self.__analysis_subtype = new_analysis_subtype @property def appendix_pictures_folder(self): return self.__appendix_pictures_folder @appendix_pictures_folder.setter def appendix_pictures_folder(self, new_appendix_pictures_folder: Union[str, Path]): if isinstance(new_appendix_pictures_folder, str): new_appendix_pictures_folder = Path(new_appendix_pictures_folder) if new_appendix_pictures_folder is not None and not isinstance(new_appendix_pictures_folder, Path): raise TypeError( f"ERROR: Wrong type {type(new_appendix_pictures_folder)} provided for appendix_pictures_folder") self.__appendix_pictures_folder = new_appendix_pictures_folder @property def viia_settings(self): return self.__viia_settings @viia_settings.setter def viia_settings(self, new_viia_settings: Optional[ViiaSettings]): if new_viia_settings is not None and not isinstance(new_viia_settings, ViiaSettings): raise ValueError("ERROR: To set the viia_settings provide an instance of ViiaSettings class.") self.__viia_settings = new_viia_settings def _viia_supported(self, support_collection_name: str) -> List[Shapes]: """ Method of 'ViiaProject' returns the supported shapes in the project that belong to the specified support collection. Input: - support_collection_name (str): Name of the support collection list from where the supported shapes are retrieved. Output: - Returns the list of supported shapes that belong to the specified support collection. """ shapes = [] for shape_support in getattr(self.collections, support_collection_name): for connecting_shapes in shape_support.connecting_shapes: if connecting_shapes['connecting_shape'] not in shapes: shapes.append(connecting_shapes['connecting_shape']) return shapes @property def viia_supported_surfaces(self) -> List[Shapes]: """ Returns list of supported shapes that have a surface-support.""" return self._viia_supported('surface_supports') @property def viia_supported_points(self) -> List[Shapes]: """ Returns list of supported shapes that have a point-support.""" return self._viia_supported('point_supports') @property def importance_factor(self) -> float: """ Returns the value of the importance factor, depends on the consequence class.""" from viiapackage.viiaLoads import _get_viia_importance_factor return _get_viia_importance_factor(project=self) @property def object_part(self) -> Optional[dict]: for object_part in self.project_information['objectdelen']: if object_part['naam'] == self.project_information['objectdeel']: return object_part return None
[docs] def get_myviia_object_deel_id(self) -> int: """ This method of 'ViiaProject' will return the objectpart ID in MYVIIA database, based on the given retrieved project information at initialisation of the class.""" object_deel_id = None for objectpart in self.project_information['objectdelen']: if objectpart['naam'] == self.project_information['objectdeel']: object_deel_id = objectpart['id'] break if object_deel_id is None: raise ValueError( f"ERROR: ID of the object part '{self.project_information['objectdeel']}' cannot be found in MYVIIA " f"database. Make sure to select object part from: " f"{', '.join([str(objectpart['naam']) for objectpart in self.project_information['objectdelen']])}.") else: return object_deel_id
[docs] def shallow_foundation_present(self) -> bool: """ Method of 'ViiaProject' to check if there is a shallow foundation present in the model.""" for support_set in self.collections.supportsets: if any(supp_type in support_set.name for supp_type in ['FixedBase', 'FlexBaseGlobal', 'FlexBaseFinal']): return True return False
[docs] def pile_foundation_present(self) -> bool: """ Method of 'ViiaProject' to check if there is a pile foundation present in the model.""" return len(self.collections.piles) > 0
[docs] def update_package(self, package: str = None, version: str = None, extra_index_url: str = None): """ Function to update (or install) a package. Input: - package (str): Package that needs to be updated. Default is None. When None viiapackage will be updated. - version (str): Version of the package that need to be installed. Default is None. When None the latest available version will be installed. - extra_index_url (str): The extra index url for private packages. Default is None. When None and the package is viiapackage, the index-url of viiapackage will be used. Output: - Package is updated and script is exited. """ from rhdhv_fem.diana_utils import check_diana_interpreter from rhdhv_fem.client import fem_update_package from viiapackage import __version__ old_version = None if package is None: package = 'viiapackage' if package == 'viiapackage' and extra_index_url is None: extra_index_url = \ r"https://corporateroot.pkgs.visualstudio.com/VIIA/_packaging/viiapackage@Release/pypi/simple/" old_version = __version__ if self.rhdhvDIANA.run_diana: warn("WARNING: The update method cannot be used in Diana. Updating the package will be aborted.") return output = fem_update_package(project=self, package=package, version=version, extra_index_url=extra_index_url) # Check if the diana interpreter is set up properly check_diana_interpreter(project=self, package=package, version=version) if package == 'viiapackage' and old_version: interpreter = Path(executable).as_posix() _installed_version, _latest_version = get_package_version( package=package, interpreter=interpreter, extra_index_url=extra_index_url) viia_update_version_in_scripts(project=self, old_version=old_version, new_version=_installed_version) # Exit the script to use the updated package in the next run exit( "Script will exit, because after using project.update_package you should rerun before the update is " "effective.")
## DEPRECATION ## @staticmethod def viia_redis_displacement_group( direction: str, eigen_output_file: Union[Path, str] = None, interval_width: float = 0.05): warn('WARNING: The functionality for REDIS method push-over analyses is deprecated since version 68.1. ' 'Please contact the automating-team if you require the functionality.', DeprecationWarning, stacklevel=2) @staticmethod def viia_redis_displacement_to_signal( direction: str, node_groups: Union[Path, str, dict], nlpo_output_file: Union[Path, str] = None, number_of_sw_steps: int = 2): warn('WARNING: The functionality for REDIS method push-over analyses is deprecated since version 68.1. ' 'Please contact the automating-team if you require the functionality.', DeprecationWarning, stacklevel=2) @staticmethod def viia_create_loadcombination_redis_push_over(direction): warn('WARNING: The functionality for REDIS method push-over analyses is deprecated since version 68.1. ' 'Please contact the automating-team if you require the functionality.', DeprecationWarning, stacklevel=2) @staticmethod def viia_result_pictures( analysis_nr: str, load_datfile: bool = True, dominant_direction: str = None, signal: str = None, backside: bool = False, software: str = 'diana'): warn('WARNING: The functionality for result pictures has been moved and integrated in the result handling ' 'functions. The method is deprecated since version 67.0.', DeprecationWarning, stacklevel=2) @staticmethod def viia_load_latest_model(phase: Optional[Union[str, int]] = 'BSC'): warn('WARNING: The functionality for loading latest model is deprecated since version 68.1. ' 'Please contact the automating-team if you require the functionality, alterntative functionality is ' 'available.', DeprecationWarning, stacklevel=2) @staticmethod def viia_create_folder(phase: Optional[Union[str, int]] = 'BSC'): warn('WARNING: The functionality for creating a folder following VIIA convention is deprecated since version ' '68.1. Please contact the automating-team if you require the functionality, alterntative functionality is ' 'available.', DeprecationWarning, stacklevel=2)
### =================================================================================================================== ### 3. Create VIIA project ### ===================================================================================================================
[docs]def viia_create_project( project_name: str, object_part: str = 'Gehele object', version_nr: int = 1, language: str = 'EN', analysis_type: Optional[str] = None, reference_period: Optional[str] = None, myviia_token: str = None) \ -> ViiaProject: """ Function sets the name of the project. The start time of the session is recorded. The logfile for the project is created and sets the selected software for the analysis performed for the session. The default directions are created (X-, Y- and Z-direction). Additional for the VIIA package all the project defaults are set. Project information is collected from MYVIIA webtool. For the reference period and analysis type input may be provided to deviate from the values that are stored in the MYVIIA webtool, this can be done only for analyses. Reporting will use the information from MYVIIA. Make sure that the information on MYVIIA is up-to-date and if information needs to be updated, ask the projectleader to do that. Input: - project_name (str): Name of the project. This is the object number used in VIIA, for example '1234T'. - object_part (str): In case of multiple object parts, select the correct part for this analysis. On MYVIIA you can see which object parts are available. Default value is 'Gehele object', which is the name to be used if the object is not split in separate parts on MYVIIA. There can be multiple object-parts for reruns, multiple inspections and objects that are split for analyses (front house vs barn). - version_nr (int): Version number that will be present in the files written by the VIIApackage. Version 1 is reserved for the existing building analysis (NL: 'Bestaande situatie'), this can be including measures you always require (NL: 'Zowiezo maatregelen). From version 2 and up the version number indicates additional strengthening steps. The version numbering is used in the automated reporting tool. Default value is 1, referring to existing building model. - language (str): Language selection for the engineering report and figures. Available languages are 'EN' for English and 'NL' for Dutch. Default value is 'EN'. - analysis_type (str): If you want to deviate from the analysis type on the MYVIIA tool you can select the type of analysis to be performed. Within VIIA currently 'MRS', 'NLTH' and 'NLPO' are available. Default value is None. When another analysis-type is selected, you can perform analysis, but reporting is not possible. - reference_period (str): If you want to deviate from the reference period on the MYVIIA tool you can select the reference period for which the peak ground acceleration is determined. In that case select from 't1', 't2', 't3', 't4', 't5' or 't6'. Default value is None. - myviia_token (str): Optional input to provide the token for access to MYVIIA database. Input only used when script is performed on MYVIIA server environment. Output: - The projectname and related items are set in the 'Project' class. - Project information is collected from MYVIIA webtool. - A logfile for this session is created. - A check is performed if the correct version of the DIANA software is used (complying to the latest BoD). - Returns the VIIA project object. """ # Check for old-version exception in projectname if '-model' in project_name: raise RuntimeError( "ERROR: This viiaPackage version does not allow for using '-model' in the project name anymore. " "The correct object-number from MYVIIA should be used.") # Create the project instance in the viiaPackage project = ViiaProject(name=str(project_name), token=myviia_token) # Log the starting time project.write_log(f"Session started at {project.start_time}.") # Check version of DIANA when running for DIANA software if project.rhdhvDIANA.run_diana: check_diana_version(project) # Select if response spectra etc. need to be collected (not required for most tests) if 'test-' == project_name[:5]: # Testing is performed without using MYVIIA connection # Following information is required project.project_information['npr_versie'] = 'NPR9998:2020' if analysis_type: project.analysis_type = analysis_type else: # Collect project information and setup from MYVIIA project.viia_get_project_information(object_part=object_part) # Handle data from MYVIIA # Set the type of analysis performed for VIIA if analysis_type is not None and str(analysis_type) not in project.supported_analyses_types: raise ValueError( f"ERROR: The requested type of analysis '{analysis_type}' is not recognised. Make sure to select from " f"{', '.join(project.supported_analyses_types)}. If you do not specify the input for analysis type, " f"the analysis type set in MYVIIA webtool is used, if available.") elif analysis_type is None: analysis_type = project.project_information['analysis_subtype'] if analysis_type is None and len(project.project_information['objectdelen']) > 1 and \ object_part == 'Gehele object': project.write_log( "WARNING: The analysis type is not set on the MYVIIA webtool, because you selected the object part " "'Gehele object'. You can't perform analyses, but you can generate the EVVA.") elif analysis_type is None and project.project_information['inspection_type'] in \ ['TYPO', 'LOOV', 'VAL', 'EVS2']: project.write_log( "WARNING: The analysis type is not set on the MYVIIA webtool, but the inspection type is. You can't" " perform analyses, but you can generate the inspection report for typology inspection.") # Preparing building_type_simple parameter for reporting purposes project.project_information['building_type_simple'] = None elif analysis_type is None: raise ValueError( "ERROR: The analysis type is not set on the MYVIIA webtool. Inform your projectleader.") else: if str(analysis_type) == 'MRSA': analysis_type = 'MRS' project.analysis_type = analysis_type.upper() if project.analysis_type is not None and \ project.analysis_type != project.project_information['analysis_subtype']: project.write_log( f"WARNING: You selected '{analysis_type}' for this analysis, but on MYVIIA the expected analysis-type " f"is '{project.project_information['analysis_subtype']}'. Please discuss with your projectleader (" f"he/she can update MYVIIA for you). The analysis-type on the webtool is used for reporting, make sure " f"it is correct!") if project.analysis_type == 'MRS': # workaround to work with MRS with explicitly implementation project.write_log( "Analysis-type was set to MRS. The MRS is not explicitly implemented in the viiapackage. The " "analysis-type will be set to SBS, in order to be able to create material and such.") project.analysis_type = 'SBS' if project.analysis_type in ['NLTH', 'NLPO']: project.software = 'diana' project.write_log(f"The analysis-type is set to {project.analysis_type}.") # Set the reference period for the seismic demand and the consequence class if isinstance(project.project_information['gevolgklasse'], str): project.project_information['consequence_class'] = project.project_information['gevolgklasse'].upper() else: project.project_information['consequence_class'] = '-' if project.project_information['inspection_type'] in ['TYPO', 'LOOV', 'VAL', 'EVS2'] and \ project.analysis_type is None: pass else: if reference_period is not None and str(reference_period).lower() not in \ ['t1', 't2', 't3', 't4', 't5', 't6']: raise ValueError( f"ERROR: The requested reference period '{reference_period}' is not recognised. Make sure to " f"select from 't1', 't2', 't3', 't4', 't5', or 't6'. If you do not specify the input for " f"reference_period, the reference period set in MYVIIA webtool is used, if available.") elif reference_period is None: reference_period = project.project_information['tijdsperiode'] if reference_period is None: raise ValueError( "ERROR: The reference period is not set on the MYVIIA webtool. Inform your projectleader.") project.project_information['reference_period_myviia'] = project.project_information['tijdsperiode'] del project.project_information['tijdsperiode'] project.project_information['reference_period'] = reference_period.lower() if reference_period != project.project_information['reference_period_myviia']: project.write_log( f"WARNING: You selected '{reference_period}' for this analysis, but on MYVIIA the expected " f"reference period is '{project.project_information['reference_period_myviia']}'. Discuss with " f"your projectleader. The reference period in the webtool is used for reporting, make sure it is " f"correct.") viia_create_response_spectra(project=project) else: # Create the response spectra with the spectra data from MYVIIA if len(project.project_information['spectra']) != 4: project.write_log( f"WARNING: There is an error in collecting the response spectra in the MYVIIA database, " f"please report to datatool@viiagroningen.nl.") for spectrum in project.project_information['spectra']: if spectrum['scenario_nen'] != reference_period: project.write_log( f"WARNING: There is an error in collecting the response spectra in the MYVIIA database, " f"please report to datatool@viiagroningen.nl.") project.create_NPR_response_spectrum( name=f"{project.project_information['npr_versie']}-{spectrum['reference_period']}-" f"{spectrum['direction']}", peak_ground_acceleration=spectrum['ags'], plateau_factor=spectrum['p'], t_b=spectrum['t_b'], t_c=spectrum['t_c'], t_d=spectrum['t_d'], importance_factor=project.importance_factor, behaviour_factor=1.5, direction='horizontal') # Set the version number project.version = version_nr # VIIA specific settings if language not in ['EN', 'NL']: project.write_log(f"WARNING: Unknown language requested {language}, English has been selected as default.") language = 'EN' project.viia_settings = ViiaSettings(language=language) # Default names of output items # Name of output-block with enveloppe maximum values of dynamic analysis (str) project.output_max_name = 'OUTPUT_1A_MAX' # Name of output-block with enveloppe minimum values of dynamic analysis (str) project.output_min_name = 'OUTPUT_1B_MIN' # Name of output-block with results per timestep of dynamic analysis (str) project.output_real_name = 'OUTPUT_1C' # Name of output-block with maximum and minimum values of dynamic analysis to for linear modelled materials project.output_lin_name = 'OUTPUT_4' # Name of output-block with displacements to create a movie with project.output_movie_name = 'OUTPUT_MOVIE' # Name of output-block with results at nodes to create pictures for NLPO project.output_nodes_NLPO = 'OUTPUT_NLPO_SL_NODES' # Name of the output-block with result for the MRS analysis (for the floor check and beam/column check) project.output_MRS = 'OUTPUT_MRS' # Update default names of output project.output_max_name = project.output_max_name project.output_min_name = project.output_min_name project.output_real_name = project.output_real_name project.output_lin_name = project.output_lin_name project.output_movie_name = project.output_movie_name # The following items are updated in the 'Project' class of rhdhv_fem package # Settings for lists of objects to be saved project.project_specific.update({ 'lists': { 'imposed loads': [], 'nonlinear shapes original': {}, 'supported shapes': [], 'excluded supported surfaces': [], 'roof_beams': [], 'ssi_tyings': []}}) # The shallow foundation is applied on list of surfaces in supported surfaces (object references), or if surfaces # from Fstrips need to be excluded in the exclude supported surfaces list (object references) # The support type is the status parameter of the current supports in the model # The user supplied subroutines for shallow foundation is set in fos data dictionary project.project_specific['fos_data'] = {} # Settings for the pushover direction project.project_specific.update({'direction': {'current direction': None}}) project.project_specific.update({'load_combination': {'current load_combination': None}}) # These parameters are for response spectrum and the NLKA analysis input project.project_specific.update( {'parameters': {'ag_s': 0.0, 'p': 0.0, 't_b': 0.0, 't_c': 0.0, 't_d': 0.0, 'Jaar': None}}) project.project_specific.update({'Secant_eigen': {'x': 0.0, 'y': 0.0}}) # The model mode in x and y direction for push over analysis project.project_specific.update({'modes': [0, 0]}) # Settings for the SSI tying set project.project_specific.update({ 'ssi_tying_set_name': None}) # Settings for the analysis project.project_specific.update({ 'analysis': { 'current analysis folder': None}}) project.project_specific.update({ 'analysis_subtype': { 'current analysis subtype': None}}) project.project_specific.update({ 'storey_levels': {'N0': None}}) # Set the default data settings project.project_specific['integration_points'] = { 'linear': 3, 'non_linear': 7} # The line-masses are applied as self weight of dummy beam elements, dimension of this square beam in [m] (float) project.project_specific.update({ 'dummy_profile_linemass': '100x100', 'dummy_dimension_linemass': 0.1, 'stiffness': 1E6}) # Settings for shallow foundation strips # Spring stiffnesses in [N/m] for translational directions project.project_specific.update({ 'shallow foundation': { 'name': 'Shallow-foundation', 'dof': [[2, 2, 2], [0, 0, 1]], 'spring_stiffnesses': [[2.50000E+08, 2.50000E+08, 5.00000E+08], [0, 0, 0]], 'SSI tyings table filename': 'tying_table.dat', 'SSI tyings set name': 'SSI_TYING'}}) # Settings for pile foundations project.pile_foundation_settings = { # Settings for fixed base 'name': 'Pile', 'dof': [[2, 2, 2], [0, 0, 1]], 'spring_stiffnesses': [[7.50000E+08, 7.50000E+08, 1.25000E+09], [0, 0, 0]], 'pile_dimension': 1.00000E-01, # Settings for flexbase 'dimension_pile_spring': 5.00000E-02} # vertical dimension of springs of the pile in the model, in [m] # The time signal is extended and the timestep for the calculation is defined in [s] (float) project.project_specific.update({ 'signal': { 'current signal': None, 'extra time': 0.5, 'timestep size': 0.01, 'S1': 'S1', 'S2': 'S2', 'S3': 'S3', 'S4': 'S4', 'S5': 'S5', 'S6': 'S6', 'S7': 'S7', 'S8': 'S8', 'S9': 'S9', 'S10': 'S10', 'S11': 'S11', 'S12': 'S12', 'S13': 'S13', 'default signals': [1, 2, 3, 5, 6, 7, 9]}, 'direction': { 'X_pos': 'Positieve x-richting', 'X_pos_uni': 'Positieve x-richting', 'X_pos_modal': 'Positieve x-richting', 'X_pos_disp': 'Positieve x-richting', 'X_neg': 'Negatieve x-richting', 'X_neg_uni': 'Negatieve x-richting', 'X_neg_modal': 'Negatieve x-richting', 'X_neg_disp': 'Negatieve x-richting', 'Y_pos': 'Positieve y-richting', 'Y_pos_uni': 'Positieve y-richting', 'Y_pos_modal': 'Positieve y-richting', 'Y_pos_disp': 'Positieve y-richting', 'Y_neg': 'Negatieve y-richting', 'Y_neg_uni': 'Negatieve y-richting', 'Y_neg_modal': 'Negatieve y-richting', 'Y_neg_disp': 'Negatieve y-richting'}}) # Soilblock parameters project.project_specific.update({ 'soilblock': { # Minimum dimension edge soilblock to contour building in [m] 'distance edge': 25.0, # Minimum thickness of the 3D part of the soilblock in [m] 'minimum thickness 3D part': 5.0, # Factor for the thickness of the 3D part of the soilblock when piles are applied 'factor for minimum thickness 3D part with piles': 20, # Element size of the soil block elements in x- and y-direction in [m] 'horizontal elementsize': 1.0, # Maximum elementsize in vertical directuon in soilcolumn in [m] 'maximum vertical elementsize soilcolumn': 0.5, # Maximum elementsize in vertical direction in 3D modelled soilblock n [m] 'maximum vertical elementsize soilblock': 1.0, # Dimension of the soil column in x-direction in [m] 'dimension soilcolumn x': 1.0, # Dimension of the soil column in y-direction in [m] 'dimension soilcolumn y': 1.0, # Equivalent pile diameter (if piles are present) 'pile_equivalent_diameter': 5.0 / 8, # List with standardised colours for soilblock (hexagonal colors as list of strings 'color': ['#55ffff', '#ffaaff', '#0000ff', '#aaaa00', '#aa00ff', '#55ff00', '#ffaa00', '#555500', '#ff0000', '#55007f', '#38761d', '#55ffff', '#ffaaff', '#0000ff', '#aaaa00', '#aa00ff', '#55ff00', '#ffaa00', '#555500', '#ff0000', '#55007f', '#38761d']}}) project.diana_settings.picture_settings.update({ # Default colours for background of the shapes of lower building elements for the model pictures 'background_shape_colour': '#ffffff', # grey 'reinforcement_colour': '#e6194b'}) # red project.abaqus_settings.picture_settings.update({ # Default colours for background of the shapes of lower building elements for the model pictures 'background_shape_colour': '#ffffff', # grey 'reinforcement_colour': '#e6194b'}) # red # Color dictionary project.project_specific.update( {'name_mapping': { 'name_map_walls': { 'MW-KZS>1960': 'Calcium silicate after 1965', 'MW-KZS>1985': 'Calcium silicate after 1985', 'MW-KLEI>1945': 'Masonry clay after 1945', 'MW-KLEI<1945': 'Masonry clay before 1945', 'MW-PORISO': 'Masonry poriso', 'BETON': 'Concrete wall'}, 'name_map_floors': { 'BETON': 'Concrete', 'NEHOBO': 'NeHoBo', 'COMBI': 'Combination floor', 'KPV': 'Hollow core slab', 'PLATEN': 'Timber multiplex', 'PLANKEN': 'Timber plank', 'MW': 'Masonry'}, 'name_map_beams': { 'STAAL': 'Steel', 'HOUT': 'Timber', 'GELAMINEERD': 'Laminated timber', 'BETON': 'Concrete'}}}) # Strengthening measures project.project_specific.update({ 'strengthening_measures': { 'L4-B': { 'material': 'LIN-STAAL', 'column-profile': 'HEB100', 'beam-profile': 'IPE80', 'minimum distance': 1.0, 'minimum offset': 0.1}, 'L4-F': { 'material': 'LIN-HOUT', 'center-to-center': 0.4, 'column-profile': '50x75', 'minimum length of column': 1.0}, 'L4-I': { 'thickness': 0.1, 'ctc': 0.5, 'beam width': 0.05, 'minimum length': 0.5}, 'L4-O': { 'material': 'CFRP-QUAKESHIELD', 'ctc': {'1': 1.0, '2': 0.75, '3': 0.5, '4': 1.25}, 'minimum length': 0.5, 'cross section': {'20x1.4': 2.80000E-05, '30x1.4': 4.20000E-05, '30x2.5': 7.50000E-05}, 'contact perimeter': {'20x1.4': 4.28000E-02, '30x1.4': 6.28000E-02, '30x2.5': 6.5000E-02}}, 'L4-R': { 'minimum offset': 0.1, 'minimum distance': 0.1, 'ctc columns': 0.1, 'column': 0.1, 'minimum height': 0.5, 'ctc beams': 0.3, 'beam': 0.1}, 'L5-A': { 'material': 'BETON-C20/25', 'reinforcement_material': 'LIN-WAP-B500', 'reinforcement': 'R16_150xR12_150', 'thickness': 0.06}, 'L5-P': { 'material': 'BETON-C20/25', 'reinforcement_material': 'LIN-CFRPMESH-QUAKESHIELD', 'thickness': 0.02, 'vertical_mesh': 4.40000E-05, 'horizontal_mesh': 4.40000E-05}, 'L6-J': { 'concrete': 'C40/45', 'coverage': 0.05, 'thickness': 0.3}}}) # Set the project defined analysis for VIIA project.diana_settings.analysis_settings['MANUAL'] = { 'folder_name': 'Manual Images'} project.diana_settings.analysis_settings['MODEL'] = { 'folder_name': 'Model pictures'} project.diana_settings.analysis_settings['A1'] = { 'folder_name': 'A1 - Linear static fixed base', 'type': 'STATIC'} project.diana_settings.analysis_settings['A1a'] = { 'folder_name': 'A1a - Linear static fixed base for geo-output', 'type': 'STATIC'} project.diana_settings.analysis_settings['A2'] = { 'folder_name': 'A2 - Rob-test', 'type': 'ROB-TEST'} project.diana_settings.analysis_settings['A3'] = { 'folder_name': 'A3 - Eigenvalue fixed base', 'type': 'EIGEN', 'nmodes': 1000} project.diana_settings.analysis_settings['A4'] = { 'folder_name': 'A4 - LTH fixed base', 'type': 'NLTH-LIN', 'signals': ['S1', 'S2', 'S3', 'S5', 'S6', 'S7', 'S9']} project.diana_settings.analysis_settings['A5'] = { 'folder_name': 'A5 - Modale respons spectrum analyse', 'type': 'MRS'} project.diana_settings.analysis_settings['A6a'] = { 'folder_name': 'A6a - Non-linear static fixed base', 'type': 'STATIC-NL'} project.diana_settings.analysis_settings['A6'] = { 'folder_name': 'A6 - NLPO fixed base', 'type': 'NLPO', 'directions': ['X_pos', 'X_neg', 'Y_pos', 'Y_neg']} project.diana_settings.analysis_settings['A7'] = { 'folder_name': 'A7 - Eigenvalue flex base', 'type': 'EIGEN', 'nmodes': 1000} project.diana_settings.analysis_settings['A8'] = { 'folder_name': 'A8 - LTH flex base', 'type': 'NLTH-LIN', 'signals': ['S1', 'S2', 'S3', 'S5', 'S6', 'S7', 'S9']} project.diana_settings.analysis_settings['A9'] = { 'folder_name': 'A9 - NLKA'} project.diana_settings.analysis_settings['A10'] = { 'folder_name': 'A10 - Non-linear static flex base', 'type': 'STATIC-NL'} project.diana_settings.analysis_settings['A11'] = { 'folder_name': 'A11 - NLPO flex base', 'type': 'NLPO', 'directions': ['X_pos', 'X_neg', 'Y_pos', 'Y_neg']} project.diana_settings.analysis_settings['A12'] = { 'folder_name': 'A12 - NLTH flex base', 'type': 'NLTH', 'signals': ['S1', 'S2', 'S3', 'S5', 'S6', 'S7', 'S9']} project.diana_settings.analysis_settings['A13'] = { 'folder_name': 'A13 - Non-linear static flex base strengthening', 'type': 'STATIC-NL-STR'} project.diana_settings.analysis_settings['A13a'] = { 'folder_name': 'A13a - NLPO fixed base strengthening', 'type': 'NLPO', 'directions': ['X_pos', 'X_neg', 'Y_pos', 'Y_neg']} project.diana_settings.analysis_settings['A14'] = { 'folder_name': 'A14 - NLPO flex base strengthening', 'type': 'NLPO', 'directions': ['X_pos', 'X_neg', 'Y_pos', 'Y_neg']} project.diana_settings.analysis_settings['A15'] = { 'folder_name': 'A15 - NLTH flex base strengthening', 'type': 'NLTH', 'signals': ['S1', 'S2', 'S3', 'S5', 'S6', 'S7', 'S9']} project.diana_settings.analysis_settings['A16'] = { 'folder_name': 'A16 - Linear static fixed base strengthening for geo-output', 'type': 'STATIC', 'signals': ['S1', 'S2', 'S3', 'S5', 'S6', 'S7', 'S9']} project.diana_settings.analysis_settings['A17'] = { 'folder_name': 'A17 - Modale respons spectrum analyse strengthening', 'type': 'MRS'} # Create the NLKA graphs for one-way spanning walls if it's not a test if 'test-' != project_name[:5] and 'test' not in ViiaSettings.MYVIIA_SERVER and not ViiaSettings.MYVIIA_REPORT: nlka_folder = project.workfolder_location / 'NLKA graphs' if not nlka_folder.exists(): bcs = [[1, 4], [1, 5], [2, 4], [2, 5], [3, 4], [3, 5]] nlka_params = {'MW-KLEI<1945': [0.1, 0.21], 'MW-KZS>1960': [0.1, 0.21], 'MW-AAC': [0.07, 0.1]} for bc in bcs: for material, thicknesses in nlka_params.items(): for thickness in thicknesses: project.viia_nlka_graph_data( e_top=bc[0], e_bottom=bc[1], thickness=thickness, material_name=material, nlka_folder=nlka_folder) project.write_log( f"NLKA capacity curves for one-way spanning walls are created in {nlka_folder.as_posix()}.") return project
### =================================================================================================================== ### 4. End of Script ### ===================================================================================================================