### ===================================================================================================================
### A15 Analysis NLTH
### ===================================================================================================================
# Copyright ©VIIA 2024
### ===================================================================================================================
### 1. Import modules
### ===================================================================================================================
# General imports
from __future__ import annotations
from warnings import warn
from typing import TYPE_CHECKING, Optional
# 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
from viiapackage.analyses.analysis_nlth import viia_create_analysis_nlth
### ===================================================================================================================
### 2. Function to create the A15 analysis
### ===================================================================================================================
[docs]def viia_create_analysis_a15(
project: ViiaProject, iteration_method_requested: str = 'secant', output_1c: bool = False,
nr_time_steps: Optional[int] = None) -> Analysis:
"""
This function creates the A15 analysis, complete strengthened model NLTH. It depends on the software set, which will
switch between explicit (ABAQUS) and implicit (DIANA) analysis.
Input:
- project (obj): VIIA project object containing collections of fem objects and project variables.
- iteration_method_requested (str): The iteration method selected for the time-steps execute, the default value
is 'secant'. Other options are 'newton-raphson', 'linear-stiffness' and 'constant stiffness'.
- output_1c (bool): Select to create output-block 1C for additional signal checking. Default value is False.
- nr_time_steps (int): Overrule the number of time-steps to be used in the NLTH analysis. Default value None,
time-steps are determined based on the length of the signal.
Output:
- Creates and returns the A15 analysis object for the requested software with all settings for VIIA.
"""
# Check for version
if project.version < 2:
raise ValueError(
"ERROR: The strengthening models should have a version number of at least 2. When you continue, "
"you might encounter unexpected behaviour or errors in code.")
# Check for flexbase
if project.viia_settings.support_type not in ['FlexBaseGlobal', 'FlexBaseFinal']:
warn(
"WARNING: The A15 analysis requires flexbase supports. When you continue, you might encounter unexpected "
"behaviour or errors in code.")
# Creation of the analysis object
return viia_create_analysis_nlth(
project=project, name='A15 - Niet-lineair seismische analyse met flexbase met versterkingen',
iteration_method_requested=iteration_method_requested, output_1c=output_1c, nr_time_steps=nr_time_steps)
### ===================================================================================================================
### 3. End of script
### ===================================================================================================================