Module viiaResults

This module contains the functions to handle the results of the different analyses. Correct result handling can only be performed if the VIIA conventions and workflow are followed.

Result handling

viiapackage.viiaResults.viia_create_movie_diana(project: ViiaProject, analysis: Optional[Union[str, Analysis]] = None, output_block: str = 'OUTPUT_MOVIE', result_type: Optional[str] = None, result_component: str = 'TrDtXYZ', deformation_type: str = 'absolute', deformation_scale_factor: Optional[float] = None, deformed_edge_view: int = 1, undeformed_edge_view: int = 1, fixed_legend: bool = True, min_legend_value: float = 0, max_legend_value: float = 60, save_movie: bool = True, frames_per_second: int = 12, width: int = 1024, height: int = 768, output_file_type: str = 'avi', units: Optional[Dict[str, str]] = None, diana_view_point: Optional[Union[Tuple, List]] = None) Optional[Path][source]

Function to prepare and create a movie of the results in DIANA software.

Input:
  • project (obj): Project object containing collections of fem objects and project variables.

  • analysis (str or obj): Name of the analysis or the object reference of the analysis with the results for the movie. Default value is None, in which case the analysis will be retrieved from project, but only if there is one present, otherwise the user should specify which analysis to use.

  • output_block (str): Name of the output block in DIANA. Default value is ‘OUTPUT_MOVIE’.

  • result_type (str): Type of result to be shown in the movie. Example: ‘Displacements (2498)’. Default value is None.

  • result_component (str): Component of the result to be shown in the movie. Default value is ‘TrDtXYZ’. Other options can be ‘TrDtX’, ‘TrDtY’, ‘TrDtZ’ etc.

  • deformation_type (str): Type of deformation to be shown in the movie. Default value is ‘absolute’ or it can also be set to ‘normalized’.

  • deformation_scale_factor (float): Scale factor for the deformation. Default value for absolute deformation is 10 and for normalized deformation is 0.05.

  • deformed_edge_view (int): Option to select the deformed mesh edge view in DIANA. Default value is 1. Allowable values are:

    1: Free face edges 2: Feature edges 3: No edges

  • undeformed_edge_view (int): Option to select the undeformed mesh edge view in DIANA. Default value is 1. Allowable values are:

    1: Free face edges 2: Feature edges 3: No edges

  • fixed_legend (bool): Option to set the legend to fixed values. Default value is True.

  • min_legend_value (float): Minimum value for the legend. Default value is 0.

  • max_legend_value (float): Maximum value for the legend. Default value is 60.

  • save_movie (bool): Option to save the movie. Default value is True.

  • frames_per_second (int): Number of frames per second in the movie. Default value is 12.

  • width (int): Width of the movie display. Default value is 1024 pixels.

  • height (int): Height of the movie display. Default value is 768 pixels.

  • output_folder (str or Path): Folder location where the movie should be saved. By default, the movie will be saved in the workfolder.

  • output_file_type (str): Type of the output file. Default value is ‘avi’. It can also be set to ‘ogg’.

  • units (dict): Dictionary with the type of units and its desired unit. Default value is {‘LENGTH’: ‘mm’}. Some of the other examples can be {‘MASS’: ‘KG’}, {‘FORCE’: ‘KN’}, {‘TIME’: ‘SEC’} etc.

  • diana_view_point (View, list or tuple): The view point that should be used for the picture. Can be used when the default view is not sufficient. (Use ‘currentViewPoint()’ in DianaIE to retrieve the DIANA view point). The DIANA view point is a list or tuple of 11 floats where: 1st to 3rd values are camera position coordinates, 4th to 6th values are camera view vector direction, 7th to 9th values are camera focal point coordinates, 10th value is camera viewing angle in degrees and 11th value is the viewpoint height. When None the default view will be used. Default is None, using the ISO1 viewpoint.

Output:
  • The movie settings are set in DIANA.

  • As per user choice, the movie is saved in the specified folder.

viiapackage.viiaResults.viia_results(project: ViiaProject, analysis_nr: str, out_file: Optional[Union[Path, str]] = None, dat_file: Optional[Union[Path, str]] = None, signal: Optional[str] = None, runtime: Optional[float] = None, geo_output: Optional[bool] = True, node_foundation: int = None, node_top: int = None, bsc_nls_dir: Optional[Path] = None, tva_nls_dir: Optional[Path] = None, save_mode_pictures: Optional[int] = 5, load_model: bool = True, json_file: Optional[Union[Path, str]] = None, convergence_graphs: bool = True, base_shear_graphs: bool = True, wall_displacement_graphs: bool = True, acceleration_graphs: bool = True, result_pictures: bool = True, diana_view_point: Optional[Union[Tuple, List]] = None)[source]

This function will perform the result handling for the selected analysis. It will retrieve the DIANA calculation files from the requested or the most recent analysis folder if not specified. What result pictures / graphs or other info is retrieved is different for the analysis.

Note

Most analysis result handling require this function to be run in DIANA to generate the requested result pictures.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • analysis_nr (str): Number of the VIIA analysis. For example ‘A1’.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Optional input, if not provided the out-file will be retrieved from the analysis folder. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • dat_file (path): The ABAQUS dat-file location and filename of the analysis requested as path. Optional input, if not provided the dat-file will be retrieved from the analysis folder. Alternative (str): The ABAQUS dat-file location and filename of the analysis requested as string.

  • signal (str): The signal for which the results need to be created. Example format is ‘S1’. This is used for A4, A12 and A15 analysis. Default value is None.

  • runtime (float): The time that the analysis ran, in [s]. This value is optional and only used to log and stored in database. Default value is None.

  • geo_output (bool): This allows the user to choose if the geo output needs to be created. This can be handy if the user wants to create results for multiple signals together. Then the user does not need to create the geo output each time. Currently used only for analysis A12. Default value is set to True.

  • node_foundation (int): Optional node number from which to extract the foundation accelerations. If no input is given, the first node encountered in both a fstrip and the tb-file is used

  • node_top (int): Node number from which to extract the top of building accelerations. If no input is given, the node from the tb-file with the highest z-coordinate is selected.

  • bsc_nls_dir (Path): The path for BSC A10 folder. If there is no difference in the mass and load distribution between BSC and TVA, the geo output will be the same for BSC and TVA.

  • tva_nls_dir (Path): The path for TVA A13 folder, default is None. If None, the geo output will be the same for BSC and TVA. Otherwise, the TVA A13 folder should be specified.

  • save_mode_pictures (int): This refers to number of modes, for which the result items displacement DispXYZ and rotation RotXYZ is plotted for the entire structure. Default value is set to 5.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

  • json_file (path): The json-file of the model, location and filename of the analysis requested as path. Alternative (str): The json-file location and filename of the analysis requested as string. Default value is None, using the default VIIA path for analysis files.

  • convergence_graphs (bool): Toggle to generate convergence graphs in NLTH analyses. Default value is True.

  • base_shear_graphs (bool): Toggle to generate base shear graphs in NLTH analyses. Default value is True.

  • wall_displacement_graphs (bool): Toggle to generate wall displacement graphs in NLTH analyses. Default value is True.

  • acceleration_graphs (bool): Toggle to generate acceleration graphs in NLTH analyses. Default value is True.

  • result_pictures (bool): Toggle to generate result pictures in NLTH analyses. Default value is True.

  • diana_view_point (list or tuple): The diana view point that should be used for the picture. Can be used when the default view is not sufficient. (Use ‘currentViewPoint()’ in DianaIE to retrieve the diana view point). The diana view point is a list or tuple of 11 floats where: 1st to 3rd values are camera position coordinates, 4th to 6th values are camera view vector direction, 7th to 9th values are camera focal point coordinates, 10th value is camera viewing angle in degrees and 11th value is the viewpoint height. When None the default view will be used. Default is None.

Output:
  • The required result pictures are generated. For this the function should run in DIANA.

  • The required graphs are created.

  • The required data is retrieved from the files and returned.

  • All files are generated in the analysis folder.

Result handling analysis sub-functions

The following functions are currently supported analysis for result handling.

viiapackage.results.results_a1.viia_results_a1(project: ViiaProject, json_file: Optional[Path] = None, out_file: Optional[Union[Path, str]] = None, dat_file: Optional[Union[Path, str]] = None, post_on_myviia: bool = True, load_model: bool = True) Dict[str, float][source]

Combination of functions to be performed on output of A1 linear static analysis in VIIA.

Includes:
  • Determination of the mass of the structure.

  • Determination of center of mass.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • json_file (path): The json-file of the model generated at the moment the A1 analysis folder with its contents was generated. Default value is None, in which case the json-file is retrieved from the current analysis folder.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Optional input, if not provided the out-file will be retrieved from the analysis folder. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • dat_file (path): The ABAQUS dat-file location and filename of the analysis requested as path. Optional input, if not provided the dat-file will be retrieved from the analysis folder. Alternative (str): The ABAQUS dat-file location and filename of the analysis requested as string.

  • post_on_myviia (bool): Select to post the collected data to MYVIIA. Default value is True.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

Output:
  • Result items of A1 calculation are returned as dictionary.

viiapackage.results.results_a2.viia_results_a2(project: ViiaProject, out_file: Path, runtime: Optional[float] = None)[source]

Combination of functions to be performed on output of A2 Rob-test.

Includes:
  • Boolean of the outcome of the Rob-test analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • analysis_nr (str): Number of the VIIA analysis. For example ‘A1’.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • runtime (float): The time that the analysis ran, in [s]. This value is optional and only used to log and stored in database. Default value is None.

Output:
  • Result items of A2 calculation are saved in project.

viiapackage.results.results_a3.viia_results_a3(project: ViiaProject, json_file: Path, out_file: Optional[Union[Path, str]] = None, dat_file: Optional[Union[Path, str]] = None, load_model: bool = True) None[source]

Combination of functions to be performed on output of A3 eigen value analysis in VIIA.

Includes:
  • Graph of eigenfrequency distribution.

  • Graphs of governing modes plotted in response spectrum.

  • Result pictures of the eigenmodes of A3 analysis.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • json_file (path): The json-file of the model generated at the moment the A3 analysis folder with its contents was generated. Default value is None, in which case the json-file is retrieved from the current analysis folder. Only required when loading the model is requested.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Optional input, if not provided the out-file will be retrieved from the current analysis folder. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • dat_file (path): The ABAQUS dat-file location and filename of the analysis requested as path. Optional input, if not provided the dat-file will be retrieved from the analysis folder. Alternative (str): The ABAQUS dat-file location and filename of the analysis requested as string.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

Output:
  • Result items of A3 eigenvalue analysis are saved in workfolder.

viiapackage.results.results_a4.viia_results_a4(project: ViiaProject, signal: str, convergence_graphs: bool = True, wall_displacement_graphs: bool = True, result_pictures: bool = True, load_model: bool = True, view: Optional[View] = None)[source]

Combination of functions to be performed on output of A4 linear time history analysis.

Includes:
  • Graph of convergence.

  • Graphs of relative out-of-plane wall displacements.

  • Result pictures for A4 analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • signal (str): Signal to consider. Can be S1-S11.

  • convergence_graphs (bool): Toggle to generate convergence graphs. Default value is True.

  • wall_displacement_graphs (bool): Toggle to generate wall displacement graphs. Default value is True.

  • result_pictures (bool): Toggle to generate result pictures. Default value is True.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

  • view (obj): View that should be used for the pictures. When None the default view will be used. Default is None.

Output:
  • Result items of A4 analysis are created.

viiapackage.results.results_a5.viia_results_a5(project: ViiaProject, out_file: Path, runtime: Optional[float] = None)[source]

Combination of functions to be performed on output of A5 linear time history analysis on flexible base.

Includes:
  • Base shear graph.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • analysis_nr (str): Number of the VIIA analysis. For example ‘A1’.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • runtime (float): The time that the analysis ran, in [s]. This value is optional and only used to log and stored in database. Default value is None.

Output:
  • Result items of A5 calculation.

viiapackage.results.results_a6.viia_results_a6(project: ViiaProject, out_file: Path, runtime: Optional[float] = None)[source]

Combination of functions to be performed on output of A6 non-linear pushover analysis fixed base.

Includes:
  • Convergence graph.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • analysis_nr (str): Number of the VIIA analysis. For example ‘A1’.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • runtime (float): The time that the analysis ran, in [s]. This value is optional and only used to log and stored in database. Default value is None.

Output:
  • Result items of A6 analysis.

viiapackage.results.results_a6a.viia_results_a6a(project: ViiaProject, out_file: Path, runtime: Optional[float] = None)[source]

Combination of functions to be performed on output of A6 Non-linear static calculation. Includes: Determination of center of mass and runtime of the analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • analysis_nr (str): Number of the VIIA analysis. For example ‘A1’.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • runtime (float): The time that the analysis ran, in [s]. This value is optional and only used to log and stored in database. Default value is None.

Output:
  • Result items of A6a calculation are saved in project.

viiapackage.results.results_a7.viia_results_a7(project: ViiaProject, json_file: Optional[Path] = None, out_file: Optional[Union[Path, str]] = None, dat_file: Optional[Union[Path, str]] = None, load_model: bool = True, result_pictures: bool = True, view: Optional[View] = None) None[source]

Combination of functions to be performed on output of A7 eigen value analysis in VIIA.

Includes:
  • Graph of eigenfrequency distribution.

  • Graphs of governing modes plotted in response spectrum.

  • Result pictures of the eigenmodes of A7 analysis.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • json_file (path): The json-file of the model generated at the moment the A7 analysis folder with its contents was generated. Default value is None, in which case the json-file is retrieved from the current analysis folder. Only required when loading the model is requested.

  • analysis (obj): Instance of analysis class that contains the eigenvalue analysis.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Optional input, if not provided the out-file will be retrieved from the analysis folder. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • dat_file (path): The ABAQUS dat-file location and filename of the analysis requested as path. Optional input, if not provided the dat-file will be retrieved from the analysis folder. Alternative (str): The ABAQUS dat-file location and filename of the analysis requested as string.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

  • result_pictures (bool): Toggle to generate result pictures. Default value is True.

  • view (obj): View that should be used for the pictures. When None the default view will be used. Default is None.

Output:
  • Result items of A7 eigenvalue analysis are saved in workfolder.

viiapackage.results.results_a10.viia_results_a10(project: ViiaProject, convergence_graphs: bool = True, geo_output: bool = True, result_pictures: bool = True, load_model: bool = True, view: Optional[View] = None)[source]

Combination of functions to be performed on output of A10 nonlinear static analysis.

Includes:
  • Graph of convergence.

  • Generating json-file with data for the geotechnical advisor.

  • Result pictures for A10 analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • convergence_graphs (bool): Toggle to generate convergence graphs. Default value is True.

  • geo_output (bool): This allows the user to choose if the geo output needs to be created. This can be handy if the user wants to create results for multiple signals together. Then the user does not need to create the geo output each time. Default value is set to True.

  • result_pictures (bool): Toggle to generate result pictures. Default value is True.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

  • view (obj): View that should be used for the pictures. When None the default view will be used. Default is None.

Output:
  • Result items of A10 analysis are created.

viiapackage.results.results_a12.viia_results_a12(project: ViiaProject, signal: str, bsc_nls_dir: Path, convergence_graphs: bool = True, base_shear_graphs: bool = True, wall_displacement_graphs: bool = True, acceleration_graphs: bool = True, geo_output: bool = True, result_pictures: bool = True, post_on_myviia: bool = True, load_model: bool = True, view: Optional[View] = None)[source]

Combination of functions to be performed on output of A12 nonlinear time history analysis.

Includes:
  • Graph of convergence.

  • Graph of base shear in time-history.

  • Graphs of relative out-of-plane wall displacements.

  • Graphs of building acceleration at base, foundation and selected nodes on floors.

  • Generating json-file with data for the geotechnical advisor.

  • Result pictures for A12 analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • signal (str): Signal to consider. Can be S1-S11.

  • bsc_nls_dir (Path): The path for BSC A10, which contains the geo_output_nls json-file.

  • convergence_graphs (bool): Toggle to generate convergence graphs. Default value is True.

  • base_shear_graphs (bool): Toggle to generate base shear graphs. Default value is True.

  • wall_displacement_graphs (bool): Toggle to generate wall displacement graphs. Default value is True.

  • acceleration_graphs (bool): Toggle to generate acceleration graphs. Default value is True.

  • geo_output (bool): This allows the user to choose if the geo output needs to be created. This can be handy if the user wants to create results for multiple signals together. Then the user does not need to create the geo output each time. Default value is set to True.

  • result_pictures (bool): Toggle to generate result pictures. Default value is True.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

  • post_on_myviia (bool): Select to post the collected data to MYVIIA. Default value is True.

  • view (obj): View that should be used for the pictures. When None the default view will be used. Default is None.

Output:
  • Result items of A12 analysis are created.

viiapackage.results.results_a13.viia_results_a13(project: ViiaProject, convergence_graphs: bool = True, geo_output: bool = True, result_pictures: bool = True, load_model: bool = True, view: Optional[View] = None)[source]

Combination of functions to be performed on output of A13 nonlinear static analysis with strengthening.

Includes:
  • Graph of convergence.

  • Generating json-file with data for the geotechnical advisor.

  • Result pictures for A13 analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • convergence_graphs (bool): Toggle to generate convergence graphs. Default value is True.

  • geo_output (bool): This allows the user to choose if the geo output needs to be created. This can be handy if the user wants to create results for multiple signals together. Then the user does not need to create the geo output each time. Default value is set to True.

  • result_pictures (bool): Toggle to generate result pictures. Default value is True.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

  • view (obj): View that should be used for the pictures. When None the default view will be used. Default is None.

Output:
  • Result items of A13 analysis are created.

viiapackage.results.results_a15.viia_results_a15(project: ViiaProject, signal: str, bsc_nls_dir: Path, tva_nls_dir: Path, convergence_graphs: bool = True, base_shear_graphs: bool = True, wall_displacement_graphs: bool = True, acceleration_graphs: bool = True, geo_output: bool = True, result_pictures: bool = True, post_on_myviia: bool = True, load_model: bool = True, view: Optional[View] = None)[source]

Combination of functions to be performed on output of A15 nonlinear time history analysis with strengthening.

Includes:
  • Graph of convergence.

  • Graph of base shear in time-history.

  • Graphs of relative out-of-plane wall displacements.

  • Graphs of building acceleration at base, foundation and selected nodes on floors.

  • Generating json-file with data for the geotechnical advisor.

  • Result pictures for A15 analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • signal (str): Signal to consider. Can be S1-S11.

  • bsc_nls_dir (Path): The path for BSC A10, which contains the geo_output_nls json-file.

  • tva_nls_dir (Path): The path for TVA A13, which contains the geo_output_nls json-file.

  • convergence_graphs (bool): Toggle to generate convergence graphs. Default value is True.

  • base_shear_graphs (bool): Toggle to generate base shear graphs. Default value is True.

  • wall_displacement_graphs (bool): Toggle to generate wall displacement graphs. Default value is True.

  • acceleration_graphs (bool): Toggle to generate acceleration graphs. Default value is True.

  • geo_output (bool): This allows the user to choose if the geo output needs to be created. This can be handy if the user wants to create results for multiple signals together. Then the user does not need to create the geo output each time. Default value is set to True.

  • result_pictures (bool): Toggle to generate result pictures. Default value is True.

  • load_model (bool): Select to reload the model. Default value is True, but when directly creating analysis and running, it needs to be switched off.

  • post_on_myviia (bool): Select to post the collected data to MYVIIA. Default value is True.

  • view (obj): View that should be used for the pictures. When None the default view will be used. Default is None.

Output:
  • Result items of A15 analysis are created.

viiapackage.results.results_eigenvalue.viia_results_eigenvalue(project: ViiaProject, analysis: Analysis, analysis_nr: str, out_file: Optional[Union[Path, str]] = None, dat_file: Optional[Union[Path, str]] = None, result_pictures: bool = True, view: Optional[View] = None) Dict[str, Union[List[float], float]][source]

Combination of functions to be performed on output of eigen value analysis in VIIA.

Includes:
  • Graph of eigenfrequency distribution.

  • Graphs of governing modes plotted in response spectrum.

  • Result pictures of the eigenmodes.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • analysis (obj): Instance of analysis class that contains the eigenvalue analysis.

  • analysis_nr (str): Number of analysis in VIIA for the eigenvalue analysis. Select from A3 or A7.

  • out_file (path): The DIANA out-file location and filename of the analysis requested as path. Optional input, if not provided the out-file will be retrieved from the analysis folder. Alternative (str): The DIANA out-file location and filename of the analysis requested as string.

  • dat_file (path): The ABAQUS dat-file location and filename of the analysis requested as path. Optional input, if not provided the dat-file will be retrieved from the analysis folder. Alternative (str): The ABAQUS dat-file location and filename of the analysis requested as string.

  • result_pictures (bool): Toggle to generate result pictures. Default value is True.

  • view (obj): View that should be used for the pictures. When None the default view will be used. Default is None.

Output:
  • Result items of eigenvalue analysis are saved in workfolder.

  • Returns the data of the modes in converted format for further result handling functions.

class viiapackage.results.viia_pushover_curve.PushoverCurve(project: ViiaProject, displacement: Union[List, np.array], base_shear: Union[List, np.array], eff_mass: Optional[float] = None, seismic_mass: Optional[float] = None, direction: str = 'Unknown', meshnode: Union[MeshNode, List[float], int, str] = None, level: str = None)[source]

Bases: object

This is the class used for the result handling of push-over curves. It processes the raw data for a system where its displacement and base shear are read from the .tb files. Methods are provided to manipulate the data based on engineering judgement which aligned with UPR. e.g. Normalization from the MDOF to SDOF, cut off the push over curve until desired steps, bilinearization of the push over curves, etc.

acceleration_spectrum(effective_mass: float = None)[source]

Method of the ‘PushoverCurve’ class, it is updated accordingly to the graph_coordinates array. Normalises the base shear to the acceleration spectrum.

Input:
  • effective_mass (float): Value for the effective mass in [kg] for which the acceleration spectrum is created.

Return:
  • Acceleration spectrum.

bilinearise(drift_limit: Union[float, int], effective_mass: float = None, output_params: bool = False, plot: bool = True)[source]

Method of ‘PushoverCurve’ class to bilinearize a given system. The data for bilinear curve will be returned. The parameters for the curve can be outputted optionally.

Input:
  • drift_limit (float): The drift limit of the system in [m].

  • effective_mass (float): Value for the effective mass in [kg].

  • output (bool): Option to output all calculated parameters for generating the bilinearised data of the PushoverCurve.

Return:
  • The biliearize data is returned. If requested a dictionary is returned with the following parameters (keys) and the calculated value for it. Parameters ‘K_init’, ‘plateau’, ‘u_cap_sys’, ‘u_cap_bilin’ and ‘energy’ are returned.

find_cut_off_step(displacement_cut_off: float = None, base_shear_cut_off: float = None)[source]

Method of ‘PushoverCurve’ class to find the closest step given a displacement/base shear value or given both.

Input:
  • displacement_cut_off (float): Magnitude of displacement used to find the corresponding step.

  • base_shear_cut_off (float): Magnitude of the base shear used to find the corresponding step.

Return:
  • The nearest step for the input.

find_elastic_mode(return_idx: Optional[bool] = False)[source]

Method of ‘PushoverCurve’ class to find the displacement value corresponding to the 60% of maximum base shear in the elastic range.

Input
  • return_idx (bool): Select to return both the index and value of the displacement, by default set to False, only returning the value for the displacement.

Output:
  • Displacement of 60% maximum base shear and its index.

static find_intersections_index(project: ViiaProject, x: Union[Iterable, float, int], y: [Union[Iterable, float, int]], warnings: bool = True)[source]

Method of PushoverCurve to find the intersection of two iterable x and y. The index will be returned if there is an sign change of x - y between this index and index + 1. https://stackoverflow.com/questions/28766692/intersection-of-two-graphs-in-python-find-the-x-value >>> x = [1,2,3] >>> y = [2,0,6] >>> PushoverCurve.find_intersections_index(project,x,y) array([0, 1], dtype=int64)

Input:
  • x: array or list

  • y: array or list or scalar

Output:
  • Returns a numpy array which contains all the intersection indices.

find_k_init()[source]

Method of ‘PushoverCurve’ class to find the initial stiffness of a system using 60% of maximum base shear.

Input:
  • No input required.

output:
  • Returns the value of the initial stiffness in [N/m]

property graph_coordinates

Property of the ‘PushoverCurve’ class, this property is designed to return the updated data [displacement, base shear] cut-off for a specific step. Subsequent methods (e.g. bilinearization) will be using the updated array. The graph_coordinates is setup as a matrix, formatted:

step_1 [[disp1, base shear1], step_2 [disp2, base shear2], … step_cutoff [dispn, base shearn]]

Input:
  • No input required.

Return:
  • Returns the updated data matrix.

static normalize_to_sdof(project, *args)[source]

Method of ‘PushoverCurve’ class to normalize the input systems given by its seismic mass. This step is to convert the push over curve raw data to capacity curve data by dividing by the effective mass. e.g. for two storey building, this method will take into account the displacement and seismic mass for each floor. Convert a MDOF to SDOF where the effective mass is assigned.

Input:
  • Instance of PushoverCurve object. The seismic mass for each system needs to be provided.

Return:
  • The effective mass of SDOF system

  • The transformation factor

static plot_curve(project: ViiaProject, curve_type: str = 'PO_curve', input_curve=None, bilinear_data=None, plot_all: bool = False, effective_mass=None, ADRS: bool = False, **kwargs)[source]

Method of the ‘PushoverCurve’ class, to plot the push-over curve in a single graph. Bilinear curve is optional.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • curve_type (str): Optional of ‘PO_curve’, ‘Bilinearize’, ‘CS’ or ‘Updated ADRS’.

  • input_curve

  • bilinear_data (list or np.array): 1 dimensional bilinear data to be plotted.

  • plot_all (boolean): Option to plot bilinear curve with capacity curve in one graph

  • effective_mass

  • ADRS (boolean): Option to plot the elastic ADRS and 20% damping ADRS in one graph.

Return:
  • Plot of the raw data push-over curve.

viiapackage.results.viia_pushover_curve.read_one_output_item(output_item: str, lines: list, direction: int)[source]

An output file may contain multiple output items. This function will read only the output_item and returns the sum in a list

Input:
  • output_item - (str) Name of the output item which is needed to be read

  • lines - (list) A list containing all the lines from the base shear .tb file

  • direction - (int) An Integer corresponding to X ( =1 ) or Y( =2 ) direction

Output:
  • A dictionary with key:value pair of step:total force for the given output_item is returned.

viiapackage.results.viia_pushover_curve.viia_convert_to_sdof_po_system(project: ViiaProject, po_curves: list, mass_dict_manual: dict = None)[source]

Function to convert the MDOF into SDOF for push over analysis, the global behavior of the structure is simplified to an equivalent simple degree of freedom system SDOF-system.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • po_curves (list): list of push over curve object created with the displacement and base shear data

  • mass_dict_manual (dict): Dictionary that with the same key value definition of the viia_center_of_mass_nlpo(). this gives the user possibility to overwrite the mass dictionary.

Output:
  • Returns the equivalent SDOF push over system and asscociated with its structural data, which includes : ‘eff_mass’, ‘eff_height’, ‘gamma’, ‘po_curves’, ‘v_star_base’, ‘u_star_roof’, ‘roof’ and the push over curve is plotted

viiapackage.results.viia_pushover_curve.viia_get_damping_ratio_correction_factor(mu_sys: float, failure: str = 'dc', beta: float = 0)[source]

Function to get the damping ratio and reduction factor of a system.

Input:
  • mu_sys (float): System ductility factor, output from viia_get_sys_ductility_factor

  • failure (str): failure mechanism, optional ‘dc’(ductile) or ‘br’(brittle)

  • beta (float): Output from PushoverCurve.bilinearise() with bilinearized curve data contained.

Output:
  • Returns the reduction factor and system damping factor

viiapackage.results.viia_pushover_curve.viia_get_drift_limit(project: ViiaProject, po_system: namedtuple)[source]

Function to get the inter-story drift limit of a structure. Value taken from: Table 15 from NPR: Global limit state criteria for building systems and inelastic mechanisms

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • po_system (namedtuple): Output from viia_create_pushover_curves with all structural information contained

Output:
  • Returns the drift limit for ductile and brittle failure mechanism

viiapackage.results.viia_pushover_curve.viia_get_performance_point(project: ViiaProject, bi_params: dict, init_cache: dict, error=1)[source]

Function to get the performance point. The iterative process should yield the performance point within 5000 steps. If the performance point is not converging, check the numerical stability of the bilinear data and previous output.

Input:
  • x (np.array): x of ADRS value (displacement).

  • y (np.array): y of ADRS value (acceleration).

  • x_new (np.array): x of ADRS value (displacement).

  • is_adrs (bool): boolean to choose if the input data is ADRS data.

  • fill (bool): If true, will extraplate the data, else with fill the data with np.nan. In practice, the Teff will use the extraplate while the bilinear data should fill with nan.

Output:
  • Returns the 2D array based on the new given grid.

viiapackage.results.viia_pushover_curve.viia_get_sys_ductility_factor(bi_params: dict, u_updated=None)[source]

Function to get the system ductility factor of a structure. Later this will be updated for the iterative process of performance point.

Input:
  • bi_params (dict): Output from PushoverCurve.bilinearise() with bilinearized curve data contained.

Output:
  • Returns the system ductility factor

viiapackage.results.viia_pushover_curve.viia_initialise_performance_point(project: ViiaProject, bi_params: dict)[source]

Function to initialize the algorithm to find the performance point. User should check if the output parameters are rational, for details, please refer to NPR or protocol.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • bi_params (dict): Output dictionary from the bilinearize function.

Output:
  • Returns the dictionary containing the information of the first step for performance point.

viiapackage.results.viia_pushover_curve.viia_interpolation_performance_point(x: array, y: array, x_new: array, is_adrs: bool = False, fill: bool = False)[source]

Function to interpolate the array based on a given new grid. If the array is ADRS data, then fill the value with zero where it is beyond the range. By doing so, the 2D array will be a closed contour which is easier to find the intersection.

Input:
  • x (np.array): x of ADRS value (displacement).

  • y (np.array): y of ADRS value (acceleration).

  • x_new (np.array): x of ADRS value (displacement).

  • is_adrs (bool): boolean to choose if the input data is ADRS data.

  • fill (bool): If true, will extraplate the data, else with fill the data with np.nan. In practice, the Teff will use the extraplate while the bilinear data should fill with nan.

Output:
  • Returns the 2D array based on the new given grid.

viiapackage.results.viia_pushover_curve.viia_read_pushover_curve_data(project: ViiaProject, work_folder: Union[Path, str], direction: str, traction: Optional[bool] = True, mesh_nodes: List[MeshNode] = None)[source]

Function to read the DIANA result file in tabulated format. The work folder should contain the files that are needed for the push over analysis: displacement and base shear tabulated file, mesh file and json file.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • work_folder (str or Path): Path reference of the result folder.

  • direction (str): Direction for the results to be collected. Select from x, y or z-direction.

  • traction (bool) - Optional argument. Set it to ‘True’ if base shear ‘.tb’ files contains interface tractions instead of reaction forces.

  • mesh_nodes (list of obj.ref.): List of MeshNode objects of which the results are returned. By default the argument is set to None, extracting all nodes in the file. When a node is requested that is not in the file, it will be omitted in the dictionary that is returned.

Output:
  • diplacement dict: with the meshnode and the steps as nested key, displacement (mm) as value,

  • base shear dict: with the load step as key and the base shear (N) of that step as value.

  • po_curve list: list of push over curve object created with the displacement and base shear data

viiapackage.results.viia_pushover_curve.viia_read_tb_base_shear_nlpo(project: ViiaProject, file_dat: Union[Path, str], file_tb: Union[Path, str], direction: str = None, traction: Optional[str] = False)[source]

Function to read the DIANA result file in tabulated format. The file should contain the displacements of the point of which the push-over curve is requested.

Input:
  • file_dat (str or Path): Path reference of the result file of DIANA (.tb-file). Alternative is file as string.

  • file_tb (str or Path): Path reference of the result file of DIANA names OUTPUT_NLPO_BASE_SHEAR_TB. or else path is provided as a string

  • direction (str): Direction for the results to be collected. Select from x, y or z-direction.

  • traction (Bool): False, only when the object is flexbase and output block contains boundary interface tractions this.

Output:
  • Returns a dictionary with the load step as key and the base shear (N) of that step as value.

viiapackage.results.viia_pushover_curve.viia_read_tb_displacements_nlpo(project: ViiaProject, file: Union[Path, str], direction: str, mesh_nodes: List[MeshNode] = None)[source]

Function to read the DIANA result file in tabulated format. The file should contain the displacements of the point of which the push-over curve is requested.

Input:
  • file (str or Path): Path reference of the result file of DIANA (.tb-file). Alternative is file as string.

  • direction (str): Direction for the results to be collected. Select from x or y.

  • mesh_nodes (list of obj.ref.): List of MeshNode objects of which the results are returned. By default the argument is set to None, extracting all nodes in the file. When a node is requested that is not in the file, it will be omitted in the dictionary that is returned.

Output:
  • Returns a dictionary with the mesh-nodes as key and a list of displacements as value (mm). The information on steps is not collected.

viiapackage.results.viia_pushover_curve.viia_reshape_ADRS(x: array, y: array)[source]

Function to reshape inelastic ADRS to add an off for the constant y value range. This is needed for the further interpolation of the ADRS data to ensure the 2D data can be appropriately interpolated and make it differentiable. It is done by replacement of the constant value segment with an offset of (x_const, y_const), (x_const + 0.01, 0) line.

Input:
  • x (np.array): x of ADRS value (displacement).

  • y (np.array): y of ADRS value (acceleration).

Output:
  • Returns the updated inelastic ADRS (2dim np.array) based on a given correction factor

viiapackage.results.viia_pushover_curve.viia_update_inelastic_ADRS(project: ViiaProject, correction_factor: float)[source]

Function to update the inelastic ADRS given a correction factor

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • correction_factor (float): range from (0,1), a scaling factor to elastic ADRS, also called reduction factor.

Output:
  • Returns the updated inelastic ADRS based on a given correction factor.

Result handling sub-functions

The analysis sub-functions determine which results are handled.

Pictures

Following functions are available for picture generation.

viiapackage.results.make_pictures.viia_make_picture_strengthening_measures(project: ViiaProject, name: str, picture_type: str = 'Model')[source]

Function to create a picture of the specified view for strengthening measures. The picture ‘BUILDING’ of model pictures is created by default. If this is not present a (random) picture from the model picture dictionary is selected to be created.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • view_name (str): Name of the view of which a picture is created.

  • picture_type (str): Type of picture to be created. Can be ‘Model’ or ‘Result’. Default value ‘Model’.

Output:
  • Picture is created from view.

viiapackage.results.make_pictures.viia_show_picture(project: ViiaProject, view_name: str, picture_type: str, picture_name: str, reinforcement: bool = True)[source]

This function can be used to check a specific picture. It will show the picture on screen.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • view_name (str): Name of the view to be presented on screen.

  • picture_type (str): Type of picture, can be ‘Model’ or ‘Results’.

  • picture_name (str): Name of the picture.

  • reinforcement (bool): Default value is ‘True’, reinforcements will be shown (if any exist in the picture).

Output
  • Picture is created on screen in DIANA.

viiapackage.results.result_functions.picture_colours._viia_picture_colours(project: ViiaProject, colour_type: str)[source]

Method of ‘Pictures’ class to create a list with colours to be used for the shapes and the reinforcements. The type is selected in the set_picture_dictionary functions in ‘Views’ class. The type destermines which shapes and reinforcements will get the same colour.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • colour_type (str): Selection of colours for different shapes and reinforcements. Currently available are:
    • Material: all shapes and reinforcements of the same material get the same colour.

    • Reinforcement: all reinforcements are coloured red and the shapes have background colour.

    • Floor: all floors are coloured based on their material and thickness, the other shapes have background colour.

    • Wall: all walls are coloured based on their material and thickness, the other shapes have background colour.

    • Beam: all beams and colours are coloured based on their geometry name, the other shapes have background colour.

    • Soil: all soil shapes are coloured based on their layer, the other shapes have background colour.

    • Single: all shapes and reinforcements have single background colour.

Output:
  • A list in attribute ‘shapecolours’ is created with colours for each shape that is active in the picture. It has the same length as the list in attribute ‘shapes’.

  • A list in attribute ‘reinforcementcolours’ is created with colours for each reinforcement that is active in the picture. It has the same length as the list in attribute ‘reinforcements’.

Movies

viiapackage.results.make_movie.viia_movie_maker(project: ViiaProject)[source]

This function will create a movie from the movie pictures that have been created in the picture script.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

Output:
  • A movie in mpeg format is created.

viiapackage.results.make_movie.viia_prepare_for_movies(project: ViiaProject, last_timestep: int) Tuple[float, float][source]

Function to prepare for movies.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • last_timestep (int): The number of timesteps (including self-weight steps).

Output:
  • Returns tuple of two floats, the minimum and maximum displacement for the movie.

Result handling model (acceleration graph)

viiapackage.results.result_functions.viia_acceleration_graphs._create_acceleration_plot(project: ViiaProject, x_values: List[float], y_values: List[float], data: list, direction: str, final_timestep: int, signal: str, output_folder: Path) Path[source]

This function creates the acceleration plot.

viiapackage.results.result_functions.viia_acceleration_graphs._create_displacement_plot(project: ViiaProject, x_values: List[float], y_values: List[float], data: list, direction: str, final_timestep: int, signal: str, output_folder: Path) Path[source]

This function creates the displacement plot.

viiapackage.results.result_functions.viia_acceleration_graphs._get_base_acceleration(project: ViiaProject, signal: str, direction: str, unit: str = 'm/s2') Tuple[List[float], List[float]][source]

Function that retrieves the base acceleration for a given signal and direction from the project at all time-steps.

Input:
  • signal (str): Name of the signal, can be S1-S11. For example ‘S4’.

  • direction (str): Either x, y or z.

  • unit (str): Can be either in ‘G’ or in ‘m/s2’. Default value is ‘m/s2’.

Output:
  • Returns tuple with list of time-steps (in seconds) for all the available data points and list of base acceleration values for the given signal and direction corresponding to these time-steps.

viiapackage.results.result_functions.viia_acceleration_graphs._viia_create_acceleration_json(project: ViiaProject, data: Dict[str, Dict[str, List[float]]]) Path[source]

Function to store the data of the accelerations (in VIIA format) in a json-file in the current analysis folder.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • data (dict): Dictionary with the data of the graphs per direction.

Output:
  • Generates a json-file in the current analysis-folder with the data of the accelerations.

  • Returns the path of the file created.

viiapackage.results.result_functions.viia_acceleration_graphs._viia_differentiate_acceleration_numerically(time_steps: List[float], displacements_x: List[float], displacements_y: List[float], displacements_z: List[float], differentiation_scheme: str = 'forward-difference', diff_gap: int = 1)[source]

This function uses the numerical differentiation technique from fem-math module to determine the accelerations, using the datapoints for displacement from the tb-file. The user can select differentiation schema and select the differentiation gap. A check is performed if the Nyquist frequency is not below 25Hz.

viiapackage.results.result_functions.viia_acceleration_graphs._viia_get_disp_result_mesh_node(result_mesh_node: MeshNode, output_items: List[DisplacementOutputItem], analysis_references: List[AnalysisReference])[source]

This function retrieves the displacement results for a result_mesh_node. The function searches through the shapes connected to the result_mesh_node and selects the shape with the results. After selection, displacement results are retrieved for all output_items and all analysis_references.

viiapackage.results.result_functions.viia_acceleration_graphs.viia_acceleration_graphs(project: ViiaProject, tb_file: Path, signal: str, analysis: Analysis, acceleration_nodes: Optional[List[int]] = None, final_timestep: Optional[int] = None, diff_gap: int = 1) Optional[List[Path]][source]

For a given signal, this function generates three graphs that present the acceleration of the building in x-, y- and z-directions. The acceleration is plotted for three locations; Base acceleration, foundation acceleration and far field acceleration. For foundation and top of building, a node must be provided from which to extract the acceleration data.

Note

The accelerations are calculated based on numerical differentiation of the displacements of the mesh-nodes Be aware that the tb-file values may contain unexpected noise.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • tb_file_loc (Path): Location of the tb-file.

  • signal (str): String representing the signal, can be S1 to S11.

  • analysis (obj): Object reference of analysis of the results in the tb-file.

  • acceleration_nodes (list of int): A list of nodes that user specified to collect acceleration, these nodes are specified by the ID of the mesh-node.

  • final_timestep (int): Optional timestep up to which to plot the signal and the accelerations.

  • diff_gap (int): Gap between the two consecutive time steps considered for numerical differentiation. Default value 1. Only required if numerical differentiation is applied.

Output:
  • This function generates three plots in a new folder ‘A12 Acceleration Graphs’, describing the acceleration of the building in x-, y- and z-direction in three different locations. The folder and the three files are return in a tuple (order: folder, x, y- and z-graph).

viiapackage.results.result_functions.viia_acceleration_graphs.viia_get_accel_graph_mesh_nodes(project: ViiaProject, has_foundation_nodes: Optional[bool] = False) Dict[str, List[MeshNode]][source]

This function returns a set of default mesh-nodes by selecting one node from each floor, one node from pile or shallow foundation strip and optional foundation wall nodes.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • has_foundation_nodes (bool): If true, the foundation wall middle nodes will be selected, else not.

Output:
  • Returns a dictionary containing mesh-node objects for ‘foundation_nodes’, ‘floor_nodes’, ‘pile_strip_nodes’ and ‘fstrip_nodes’ (as keys). The values are a list of MeshNode objects.

Result handling model (base shear)

viiapackage.results.result_functions.viia_base_shear.viia_base_shear(project: ViiaProject, analysis: Analysis, base_shear_tb_file: List[Union[Path, str]] = None, geo_postprocessed_data_json_file_abaqus: Union[Path, str] = None)[source]

This function calculates the base shear from a DIANA analysis or ABAQUS geo post-processing for an object with strip foundation, or pile foundation or mixed foundations.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • base_shear_tb_file(list): List of output .tb files for calculating the base shear from DIANA.

  • geo_postprocessed_data_json_file_abaqus(string or Path): Path or string of path of output .json files for geo postprocessing from ABAQUS.

  • analysis (obj): Object reference of the analysis of which the base shear should be calculated.

Output:
  • A figure with the base shear in time-history is created and saved in the current analysis folder.

  • A json file with calculated base shear in time-history is created and saved in the current analysis folder.

Result handling model (eigen frequency)

viiapackage.results.result_functions.viia_eigen_frequency_graph.viia_convert_eigenvalue_results(project: ViiaProject, raw_modes: Dict[int, Dict[str, float]], analysis_nr: str) Dict[str, Union[List[float], float]][source]

Function to restructure the modes and the data connected to the modes. It stores this converted format in the Eigen-json file in the current analysis folder. The data is stored in project in format used by the result picture function.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • raw_modes (dict): Dictionary with mode numbers as integers (keys) with a dictionary as value. The sub-dictionaries contain information on the eigenfrequency (in Hz), percentage of participating mass in x-, y- and z-direction (in [-]). The required keys of the sub-dictionary are: ‘frequency’, ‘percentage x-direction’, ‘percentage y-direction’ and ‘percentage z-direction’.

Output:
  • Generates a json-file in the current analysis-folder with the data of the eigenfrequency analysis, independent of the software it is generated with.

  • Returns the data in converted format for further result handling functions.

viiapackage.results.result_functions.viia_eigen_frequency_graph.viia_create_eigenvalue_json(project: ViiaProject, modes: Dict[str, Union[List[float], float]]) Path[source]

Function to store the eigenvalues (in VIIA format) in the Eigen-json file in the current analysis folder.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • modes (dict): Dictionary with values as list of floats. The list is sorted and ordered based on mode number. The required keys are ‘frequency_list’, ‘modal_x’, ‘modal_y’, ‘modal_z’, ‘result_list_x’, ‘result_list_y’, ‘result_list_z’, ‘cumulativ_x’, ‘cumulativ_y’ and ‘cumulativ_z’. All lists should have equal length, except for the cumulativ value.

Output:
  • Generates a json-file in the current analysis-folder with the data of the eigenfrequency analysis, independent of the software it is generated with.

  • Returns the path of the file created.

viiapackage.results.result_functions.viia_eigen_frequency_graph.viia_eigen_frequency_graph(project: ViiaProject, modes: Dict[str, Union[List[float], float]]) List[Path][source]

Function creates graphs with the eigenfrequency distribution of the building and the governing modes, based on the mass participation.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • modes (dict): Dictionary with values as list of floats. The list is sorted and ordered based on mode number. The required keys are ‘frequency_list’, ‘modal_x’, ‘modal_y’, ‘modal_z’, ‘result_list_x’, ‘result_list_y’, ‘result_list_z’, ‘cumulativ_x’, ‘cumulativ_y’ and ‘cumulativ_z’. All lists should have equal length, except for the cumulativ value.

Output:
  • Returns list of created graphs as file path.

  • Figure of graph with eigenfrequency distribution, saved to the current analysis folder.

  • Two graphs with the governing modes based on the mass-participation projected on the spectrum.

Result handling model (convergence graph)

viiapackage.results.result_functions.viia_convergence_graph.viia_convergence_graph(project: ViiaProject, file: Union[Path, str], criterion: str = 'energy', signal: Optional[str] = None, show: bool = True, plasticity: bool = False, analysis: Optional[Union[str, Analysis]] = None) Path[source]

Function generates the convergence graph based on the output file of a DIANA analysis.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • file (path or str): File name and location as single string of the out-file (DIANA) or msg-file (ABAQUS).

  • criterion (str): Select the criterion to plot the convergence for. For DIANA, choose between energy, displacement or force convergence criterium. For ABAQUS, choose between force or moment convergence criterium. For ABAQUS, a displacement convergence graph is also added when force is chosen, a rotation convergence graph is added for moment. Only one criterion can be selected. Default value is energy.

  • signal (str): Optional input to include signal in title. Can be S1-S11.

  • show (bool): Switch to indicate if the pop-up screen of the graph should appear. Default value is True.

  • plasticity (bool): Select to add another graph for the plasticity behaviour. Default value is False, in which case only cracking behaviour is plotted.

  • analysis (Obj): Optional input for the object reference of the analysis that is performed. Default value is None. Also, the name of the analysis can be provided as string (in that case it is only used in the title of the plot).

Output:
  • Returns the path of the created image with the convergence graph and supporting graphs. The image is saved in the current analysis folder.

Result handling model (pile reactions)

viiapackage.results.result_functions.viia_pile_reactions.viia_collect_pile_reactions(project: ViiaProject, pile_output_file: Path, analysis: Analysis, signal: Optional[str] = None) Path[source]

This function collects the pile forces from the DIANA output file, creates graphs per pile with the forces over time, and it creates a json-file with the collect information that can be used for reporting.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • pile_output_file (Path): Path to the OUTPUT_5B tb-file from DIANA NLTH analysis.

  • analysis (obj): Object reference of the NLTH analysis.

  • signal (str): String representing the signal, can be S1 to S11.

Output:
  • Returns the folder with the created results for the piles.

viiapackage.results.result_functions.viia_pile_reactions.viia_create_pile_reaction_graph(project: ViiaProject, time_values: List[float], x_values: List[float], y_values: List[float], z_values: List[float], pile_name: str, output_folder: Path, analysis: Analysis, signal: str) Path[source]

This function creates the ssi plot.

viiapackage.results.result_functions.viia_pile_reactions.viia_create_pile_reactions_json(data: Dict[str, Dict[str, List[float]]], output_folder: Path, analysis: Analysis, analysis_folder: Path, signal: Optional[str] = None) Path[source]

Function to store the results of the wall displacements (in VIIA format) in a json-file in the current analysis folder.

Input:
  • data (dict): Dictionary with the data of the pile results.

  • output_folder (Path): Folder where the json should be saved.

Output:
  • Generates a json-file in the current analysis-folder with the data of the pile reactions.

  • Returns the path of the file created.

Result handling model (geo-output)

class viiapackage.results.geo_output.geo_output.GeoOutput(foundation_type: str, support_type: str = 'FlexBaseFinal')[source]

Bases: object

This is the super-class for the output for the geotechnical assessment. It contains the general methods and sets the general attributes.

classmethod check_foundation_type(project: ViiaProject)[source]

Get the foundation type

get_forces_from_abaqus(results_file: Path)[source]

Method to load forces per strip or per pile from a ABAQUS results json-file into the GeoOutput class.

Input:

results_file (Path): Path to json-file containing force output.

get_forces_from_diana(tb_file: Path, data_type: str, analysis: Analysis)[source]

Method to load forces per strip or per pile from a DIANA tb-file into the GeoOutput class.

Input:
  • tb_file (Path): Path to tb-file containing force output results.

  • analysis (obj): Object reference of analysis of the results in the tb-file.

get_fstrip_elements()[source]

Get the foundation strip elements.

get_fstrip_pairs() namedtuple[source]

Method of ‘GeoOutput’ class to obtain the fstrips and the corresponding boundary interfaces from the dat-file.

get_geo_input(analysis: Analysis, tb_file_5a: Optional[Path] = None, tb_file_5b: Optional[Path] = None, abaqus_results: Optional[Path] = None, get_displacements: bool = True)[source]

Function to obtain the input for creating the GeoOutput objects (NLTH and NLS), which would contain the data for the Geo-output. The input includes the list of foundation elements and the input forces from the relevant tb-files.

Input:
  • analysis (obj): Object reference of analysis of the results in the tb-file(s).

  • tb_file_5a (Path): Path of the tb-file for the geo-output. Default value None, only required for shallow foundations.

  • tb_file_5b (Path): Path of the tb-file for the geo-output. Default value None, only required for pile foundations.

  • abaqus_results (Path): The full path to Abaqus post processed results file. Mutually exclusive to output_5a/output_5b. Default value is None.

  • get_displacements (bool): Switch to get displacements. Can be False when getting NLS data. Default value True.

Output:
  • The input required for the geo-output classes are returned.

get_pile_displacements_from_abaqus(results_file: Path)[source]

Method to load displacements per pile from a ABAQUS results json-file into the GeoOutput class.

Input:
  • results_file (Path): Path to json-file containing pile displacements.

get_pile_displacements_from_diana(tb_file: Optional[Path] = None)[source]

Method to load displacement per pile from a DIANA tb-file into the GeoOutput class.

Input:
  • tb_file (Path): path to tb file containing force output. If tb-file is already read somewhere else None should be given so the reading is skipped.

Output:
  • Returns the displacement for each pile for all the time steps.

get_pile_elements()[source]

Get the foundation pile elements.

get_pile_pairs() namedtuple[source]

Method of ‘GeoOutput’ class to match the pile name and its nodes.

get_viia_object_address() str[source]

Retrieve the address for the object.

class viiapackage.results.geo_output.geo_output_nls.GeoOutputNLS(static_force_step: int, variable_force_step: int, foundation_type: str)[source]

Bases: GeoOutput

This is a subclass of the GeoOutput class. It contains the methods and attributes specific for A10 analysis non-linear static flexbase analysis geo-output.

calculate_force(software: str = 'diana') Tuple[List[namedtuple], List[namedtuple]][source]

Method of ‘GeoOutputNLS’ class to calculate the normal forces for each foundation strip or pile.

write_json(output_dir: Optional[Path] = None) Path[source]

Method of ‘GeoOutputNLS’ to write the json-file in the A10 or A13 analysis result folder. A json-file that contains the force data will be created.

Input:
  • output_dir (Path): Path to the A10 or A13 result folder, where the json-file should be saved. Default value is None, storing the json-file in the workfolder.

Output:
  • Creates the json-file containing the information from the GeoOutputLS class.

  • The path of the generated json-file is returned.

viiapackage.results.geo_output.geo_output_nls.viia_create_geo_output_static_analysis(project: ViiaProject, analysis: Analysis, output_5a: Optional[Path] = None, output_5b: Optional[Path] = None, abaqus_results: Optional[Path] = None, foundation_type: Optional[str] = None, output_dir: Optional[Path] = None) Path[source]

This function handles the results to collect the geo-output. It processes the tb-file(s) for pile, shallow and mixed foundations and calculates the normal forces per foundation strip or pile for A10 or A13 analysis. All the data is stored in a json-file.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • analysis (obj): Object reference of nonlinear static analysis.

  • output_5a (Path): The full path of 5a tabulated file for fstrips elements and nodes. Mutually exclusive to abaqus_results. Default is None, shallow foundation is not considered (output_5b is then required).

  • output_5b (Path): The full path of 5b tabulated file for pile nodes. Mutually exclusive to abaqus_results. Default is None, pile foundation is not considered (output_5a is then required).

  • abaqus_results (Path): The full path to Abaqus post processed results file. Mutually exclusive to output_5a/output_5b. Default value is None.

  • foundation_type (str): The foundation type modelled in the model. The allowed values are ‘mixed’, ‘strips’ or ‘piles’. Default value None, in which case it is derived from the model.

  • output_dir (Path): The path where the result json-file will be saved. Default value None, the json-file will be saved to the current analysis folder (this is the normal workflow in VIIA).

Output:
  • Generates the json-file with the geo-output from the flexbase non-linear static analysis.

  • Saves the json-file to the requested folder.

  • The path of the generated json-file is returned.

class viiapackage.results.geo_output.geo_output_nlth.GeoOutputNLTH(signal: str, foundation_type: str, support_type: str = 'FlexBaseFinal')[source]

Bases: GeoOutput

This is the subclass of the Geo output class. It contains the methods and attributes specific for NLTH analysis geo-output

calculate_forces_per_fstrip_all_timesteps() list[source]

Method of ‘GeoOutputNLTH’ class to calculate the base shear forces per time step per strip.

Input:
  • No input required.

Output:
  • Returns a list containing the forces per time step per fstrip

calculate_forces_per_pile_all_timesteps() list[source]

Method of ‘GeoOutputNLTH’ class to calculate the base shear forces per time step per pile.

Input:
  • No input required.

Output:
  • Returns a list containing the forces per time step per pile.

calculate_total_forces_per_timestep() list[source]

Method of ‘GeoOutputNLTH’ class to calculate the total forces per time step.

Input:
  • No input required.

Output:
  • Returns a list containing the forces per time step

create_merged_json(bsc_nls_dir: Path, tva_nls_dir: Optional[Path] = None) Tuple[Optional[Path], Optional[Path]][source]

Method of ‘GeoOutputNLTH’ class to create the final geo output .json sent to the geo engineer. This contains the information from NLS and NLTH analyses

get_critical_steps() None[source]

Method of ‘GeoOutputNLTH’ class to calculate the critical steps for the analysis. Critical steps are the steps where the value of the base shear is the highest or lowest in a given direction. The critical steps are stored in the attribute self.critical_steps.

get_critical_steps_for_displacement()[source]

Method of ‘GeoOutputNLTH’ class to calculate the critical steps for pile displacement for the analysis. Critical steps are the time steps where the value of displacement is maximum or minimum in the given direction. This function is used only for piles

Input:
  • No input required.

Output
  • Returns the displacement for each pile for all the time steps.

  • Returns the critical time steps for each individual pile.

get_displacement_per_pile()[source]

Method of ‘GeoOutputNLTH’ class to get the maximum and minimum displacement for each pile and for the corresponding critical time steps for the individual pile.

Input:
  • No input required.

Output
  • Returns the dictionary of maximum and minimum displacement per pile in each direction along with the timestep

get_fstrip_data_json() dict[source]

Method of ‘GeoOutputNLTH’ class to assemble the input for each fstrip without the forces.

Input:
  • No input required.

Output:
  • Returns a dictionary containing information about fstrips except the forces. The format is based on the final .json sent to the geo engineer.

get_fstrip_force_data_for_json() dict[source]

Method of ‘GeoOutputNLTH’ class to retrieve the forces for each fstrip at the critical time steps.

Input:
  • No input required.

Output:
  • Returns a dictionary containing information about the forces in fstrips. The format is based on the final json-file sent to the geo engineer.

get_pile_data_json() dict[source]

Method of ‘GeoOutputNLTH’ class to assemble the input for each pile without the forces.

Input:
  • No input required.

Output:
  • Returns a dictionary containing information about piles except the forces. The format is based on the final json-file sent to the geo engineer.

get_pile_force_data_for_json() dict[source]

Method of ‘GeoOutputNLTH’ class to retrieve the forces for each pile at the critical time steps.

Input:
  • No input required.

Output:
  • Returns a dictionary containing information about the forces in piles.The format is based on the final json-file sent to the geo engineer.

get_time_step_data()[source]

Method of ‘GeoOutputNLTH’ class to obtain the time step data.

Input:
  • No input required.

Output:
  • Returns the total number of time steps and the list of step numbers which are time steps.

read_nls_json(bsc_nls_dir: Path, tva_nls_dir: Optional[Path] = None)[source]

Method of the ‘GeoOutputNLTH’ class read the Json dumped in A10(NLS) folder. The A10 result is stored in the self.read_dump_bsc and self.read_dump_tva attribute.

Input:
  • bsc_nls_dir (Path): The path for BSC A10. If there is no difference in the mass and load distribution between BSC and TVA, the geo output will be the same for BSC and TVA.

  • tva_nls_dir (Path): The path for TVA A13, default is None. If None, the geo output will be the same for BSC and TVA. Otherwise, the TVA A13 folder should be specified. Default value None.

viiapackage.results.geo_output.geo_output_nlth.viia_create_geo_output_nlth(project: ViiaProject, signal: str, bsc_nls_dir: Path, analysis: Analysis, output_5a: Optional[Path] = None, output_5b: Optional[Path] = None, abaqus_results: Optional[Path] = None, foundation_type: Optional[str] = None, tva_nls_dir: Optional[Path] = None) Tuple[Optional[Path], Optional[Path]][source]

This function handles the results to collect the geo-output. It processes the tb-file(s) for pile, shallow and mixed foundations and calculates the foundation forces for a given signal. The force information from A10 or A13 is combined with that of A12 or A15 and the final json-file is created in the format required by the geotechnical advisor.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • signal (str): The signal for which the geo-output should be created. This should be given in the format ‘S1’.

  • bsc_ls_dir (Path): The full path to the folder containing the result json-file for the non-strengthened non-linear static flexbase analysis A10.

  • analysis (obj): Object reference of analysis of the results in the tb-file(s).

  • output_5a (Path): The full path of 5a tabulated file for fstrips elements and nodes. Mutually exclusive to abaqus_results. Default is None, shallow foundation is not considered (output_5b is then required).

  • output_5b (Path): The full path of 5b tabulated file for pile nodes. Mutually exclusive to abaqus_results. Default is None, pile foundation is not considered (output_5a is then required).

  • abaqus_results (Path): The full path to ABAQUS post processed results file. Mutually exclusive to output_5a/output_5b. Default value None.

  • foundation_type (str): The foundation type modelled in the model. The allowed values are ‘mixed’, ‘strips’ or ‘piles’. Default value None.

  • tva_nls_dir (Path): The full path to the folder containing the result json-file for the strengthened non-linear static flexbase analysis A13. If not provided the results from the BSC analysis are used. Default value None.

Output:
  • Handles the results from the NLTH analysis per signal (A12 or A15).

  • Merges the results with the results from the flexbase non-linear static analysis (A10 or A13).

  • Saves the json-file(s) to the specified folder.

  • The paths of the generated json-file is returned.

viiapackage.results.geo_output.helper_functions._calculate_forces_per_timestep_fstrip(dat_file, fstrip_itf, time_step_numbers, time_step, result_dict)[source]

Function for creating forces for a mapped fstrip per time step.

viiapackage.results.geo_output.helper_functions._calculate_forces_per_timestep_piles(pile, time_step_numbers, time_step, result_dict)[source]

Function for creating forces for piles per time step.

viiapackage.results.geo_output.helper_functions._get_fstrip_width(p1: List[float], p2: List[float], p3: List[float], p4: List[float]) float[source]
Input:
  • p1 (list of 3 float): The coordinate of corner point that defines the quadrilateral.

  • p2 (list of 3 float): The coordinate of corner point that defines the quadrilateral.

  • p3 (list of 3 float): The coordinate of corner point that defines the quadrilateral.

  • p4 (list of 3 float): The coordinate of corner point that defines the quadrilateral.

Output:
  • Returns the width of the fstrips, in [m].

viiapackage.results.geo_output.helper_functions.viia_append_envelope_requests_geo_abaqus(project: ViiaProject, json_path: Path, pile_displacement_requets: bool = False)[source]

Appends json file that is an input for abaqus envelope script with the data about the section forces of the foundation strips.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • json_path (Path): Path object of the json to be appended location.

Result handling level 2 (connections)

viiapackage.results.result_functions.viia_connection_results.viia_create_connection_overview_xls(project: ViiaProject, xls_location: Union[str, Path]) Path[source]

Function to create an Excel file with information about the connections.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • xls_location (str or obj): Folder location where the Excel file should be made. Could be given as string or Path object.

Output:
  • An Excel file will be created at the give location with all the information about the connections.

viiapackage.results.result_functions.viia_connection_results.viia_historic_extreme_envelope_interface_results(project: ViiaProject)[source]

Function to retrieve the historic extreme envelope results for point and line interfaces

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Four dictionaries with the extreme results for stress and relative displacement for point and line interfaces

Result handling level 3 (in-plane floors)

No functionality present.

Result handling level 4 (out-of-plane walls)

viiapackage.results.result_functions.viia_wall_displacements._viia_create_wall_displacements_json(project: ViiaProject, data: Dict[str, Dict[str, List[float]]]) Path[source]

Function to store the results of the wall displacements (in VIIA format) in a json-file in the current analysis folder.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • data (dict): Dictionary with the data of the graphs per wall.

Output:
  • Generates a json-file in the current analysis-folder with the data of the wall displacements.

  • Returns the path of the file created.

viiapackage.results.result_functions.viia_wall_displacements.viia_wall_displacements(project: ViiaProject, wall_oop_tbfile: Path, signal: str, wall_list: List[Union[str, Wall]] = None, analysis: Optional[Analysis] = None) Optional[Tuple[Path, List[Path]]][source]

This function computes the in-plane and out-of-plane displacements for the walls through all the time steps of the time signal.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • wall_oop_tbfile (Path): Path to the OUTPUT_2.tb file.

  • signal (str): String representing the signal, can be S1 to S11.

  • wall_list (list): List of walls as object reference or wall-names as strings to be considered in this function. Default value is None, applying all walls except for the foundation walls.

Output:
  • The absolute and relative in-plane and out-of-plane displacements for each wall requested in the wall_list (If no wall is specified then all walls are considered) are generated within the OOP_IP_displacements folder in the working folder. The folder and a list of create files are returned in a tuple.

viiapackage.results.overburden_load.get_diana_load_case.get_diana_load_case(project: ViiaProject, analysis: Analysis, load_case: Optional[str] = None) str[source]

This function gets the correct load-case name in DIANA software.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • analysis (obj): Object reference of the analysis for which the load case must be found.

  • load-case (str): The name of the requested load-case.

Output:
  • The name of the load-case in DIANA software.

viiapackage.results.overburden_load.overburden_load_to_excel.overburden_load_to_excel(project: ViiaProject, walls: List[Wall]) Path[source]

This function writes the overburden loads for the walls in the list to an Excel-file.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • walls (list of obj): List of wall objects to save the overburdenload to excel for.

Output:
  • Generates an Excel-sheet in the workfolder with the overburden loads per wall.

class viiapackage.results.overburden_load.probe_curve.ProbeCurve(project: ViiaProject, start_point: List[float], end_point: List[float], result_case: List[str], view: List[str], steps: int = 10)[source]

Bases: object

This is the class for probe curves, specifying a line to collect the results on.

get_values(average: bool = False)[source]

Method of ProbeCurve class to evaluate the result value between the start point and end point.

remove_all_curves()[source]

Method of ProbeCurve class to remove all the existing probe curves.

viiapackage.results.overburden_load.viia_find_wall_overburden_load.viia_find_wall_overburden_load(project: ViiaProject, walls: Optional[List[Wall]] = None, load_case: Optional[str] = None, steps=50, view: list = None)[source]

This function creates the overburden load for the walls in input list as their attribute, it is only applicable for rectangular walls at this stage.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • walls (list of obj.): The selected wall objects. If none are given, all walls are selected.

  • load_case (str): The load-case selected from the analysis.

  • steps (int): Number of segments for the probe curve. Default value is 50. Creates 50 sample points.

  • view (list of 2 str): default arguments, specifically, for example: [‘Distributed Forces/mappedintpnt’, ‘Nyy’] for the purpose of calculating the overburden load.

Output:
  • All rectangular wall objects have an additional attribute for the overburden load. If overburden load is >0, it is set to 0 (wall cannot be in tension under self weight).

  • An Excel is created in the workfolder with the wall names and overburden loads.

Result handling level 5 (in-plane walls)

No functionality present.

Result handling level 6 (foundation and soil)

No functionality present.

Result collecting for MYVIIA

The following helper functions are used to collect the result data that needs to be sent to MYVIIA.

viiapackage.results.collect_results_for_myviia.viia_collect_results_a1.viia_collect_results_a1(project: ViiaProject, center_of_mass: Dict[str, float], json_file: Path) Dict[str, Optional[float]][source]

Combining information from the out-file from DIANA or dat-file from ABAQUS with data of the model itself.

Includes:
  • Aggregation of A1 results.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • center_of_mass (dict): Dictionary with required information from the analysis. The required keys are ‘sum_vertical_loads’, ‘center_of_mass_x’ and ‘center_of_mass_y’. The values are floats.

  • json_file (path): Path of the json-file of the model.

Output:
  • Returns dictionary with collected information required for the A1 analysis.

viiapackage.results.collect_results_for_myviia.viia_collect_results_a12.viia_collect_results_a12(project: ViiaProject, signal: str, base_shear_data: Optional[Dict] = None) Dict[str, Union[str, Optional[float], Dict[str, List[float]]]][source]

This function collects the data from the A12 analysis that will be sent to MYVIIA.

Includes:
  • Aggregation of A12 results.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • center_of_mass (dict): Dictionary with required information from the analysis. The required keys are ‘sum_vertical_loads’, ‘center_of_mass_x’ and ‘center_of_mass_y’. The values are floats.

  • json_file (path): Path of the json-file of the model.

Output:
  • Returns dictionary with collected information required for the A1 analysis.

viiapackage.results.collect_results_for_myviia.viia_collect_results_a15.viia_collect_results_a15(project: ViiaProject, signal: str, base_shear_data: Optional[Dict] = None) Dict[str, Union[str, Optional[float], Dict[str, List[float]]]][source]

This function collects the data from the A15 analysis that will be sent to MYVIIA.

Includes:
  • Aggregation of A15 results.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • center_of_mass (dict): Dictionary with required information from the analysis. The required keys are ‘sum_vertical_loads’, ‘center_of_mass_x’ and ‘center_of_mass_y’. The values are floats.

  • json_file (path): Path of the json-file of the model.

Output:
  • Returns dictionary with collected information required for the A1 analysis.

Helper functions

viiapackage.results.result_functions.viia_foundation_area.viia_foundation_area(project: ViiaProject) Tuple[Optional[float], Optional[int]][source]

Function calculates the foundation area of the foundation strips from the generated dat-file.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

Output:
  • Returns the two values as tuple. First value is the area of shallow foundation in the model (supported surfaces), in [m2] and the second value is the number of piles. If one is not present it will return None instead.

viiapackage.results.result_functions.viia_get_latest_result_folder.viia_get_latest_result_folder(project: ViiaProject, version: Optional[int] = 1, folder: Optional[Path] = PosixPath('/home/vsts/work/1/s'), files: Optional[List[str]] = None)[source]

This function selects the latest from the default analysis sub-folders. The path is based on the latest version and time in the name of the folder. The version number determines the required model step. For BSC, the version is always 1.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • version (int): The version number as indicated at start of the project. By VIIA convention version number 1 indicates the BSC and higher numbers the strengthening steps. Default value is 1, returning the latest analysis folder for the BSC evaluation.

  • folder (Path): Directory of the analysis sub-folder.

  • files (list): Contains file names of result files that are required to exist in the result folder.

Output:
  • The latest result folder for the specified version number, containing the optional inputted files, is returned as path reference.

viiapackage.results.result_functions.viia_limits._viia_find_drift_limits_nlth(shape: Shapes, interstorey_height: float, eff_height: float, storey_num: float, thicknesses: List[float], ductility: str, support: str, reduced_limits_database: Dict) Optional[Dict][source]

This function returns a dictionary with the drift checks and corresponding limit values to be performed on a shape for NLTH. Checks and limits are retrieved from a reduced form of the VIIA-LimitValues-NLTH-Database. This function is called by a higher-level function that determines the input arguments.

Input:
  • shape (obj): Shape for which checks and limit values are retrieved.

  • interstorey_height (float): Interstorey height of the shape.

  • eff_height (float): Material of the shape as it appears in the database.

  • storey_num (float): Number of storeys of the building.

  • thicknesses (list): Nominal thicknesses of the material and its top layer (if applicable).

  • ductility (str): Ductility class to which the failure mode of the building corresponds.

  • support (str): Support conditions of the shape.

  • reduced_limits_database (Dict): Reduced version of the VIIA-LimitValues-NLTH-Database.

Output:
  • Returns a dictionary with the checks as keys and the corresponding limit values as values.

viiapackage.results.result_functions.viia_limits._viia_find_effective_height(project: ViiaProject, shape: Shapes, layers: List[Layer]) Optional[Tuple[float, float]][source]

This function will return the effective height for the passed shape and the number of storeys of the building. Only the passed layers are considered for determining these values.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • shape (obj): Shape for which the effective height is computed.

  • layers (list): List containing the layers used to determine the effective height

Output:
  • Effective height for the passed shape and number of storeys of the building.

viiapackage.results.result_functions.viia_limits._viia_find_interstorey_height(project: ViiaProject, shape: Shapes, layers: List[Layer]) Optional[float][source]

This function will return the interstorey height for the passed shape. Only the passed layers are considered for determining this value.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • shape (obj): Shape for which the interstorey height is computed.

  • layers (list): List containing the layers used to determine the interstorey height

Output:
  • Interstorey height for the passed shape.

viiapackage.results.result_functions.viia_limits._viia_find_limits_material_data(material_name: str) Optional[Tuple[str, str, str]][source]

This function will return a tuple with the generic material, a first iteration of the material name for searching in the VIIA-LimitValues-Databases, and the linearity for the material name passed.

Input:
  • material_name (str): The name of a material according to VIIA naming convention.

Output:
  • Return tuple with generic material, first iteration of material name for searching in database, and linearity.

viiapackage.results.result_functions.viia_limits._viia_find_strength_limits_nlth(shape: Shapes, material: str, thicknesses: List[float], strength_class: str, reduced_limits_database: Dict) Optional[Dict][source]

This function returns a dictionary with the strength checks and corresponding limit values to be performed on a shape for NLTH. Checks and limits are retrieved from a reduced form of the VIIA-LimitValues-NLTH-Database. This function is called by a higher-level function that determines the input arguments.

Input:
  • shape (obj): Shape for which checks and limit values are retrieved.

  • material (str): Material of the shape as it appears in the database.

  • thicknesses(list): Nominal thicknesses of the material and its top layer (if applicable).

  • strength_class (str): Strength class of the material.

  • reduced_limits_database (Dict): Reduced version of the VIIA-LimitValues-NLTH-Database.

Output:
  • Returns a dictionary with the checks as keys and the corresponding limit values as values.

viiapackage.results.result_functions.viia_limits._viia_get_database_limits(project: ViiaProject) Optional[Dict][source]

This function will return a dictionary with the limit values for analysis-type-specific checks from the VIIA-LimitValues-Databases.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • Return dictionary with the limit values for analysis-type-specific checks from the VIIA-LimitValues-Databases.

viiapackage.results.result_functions.viia_limits.viia_find_limits_NLTH(project: ViiaProject, shape: Shapes) Optional[Dict][source]

This function returns a dictionary with the checks to be performed on the passed shape as keys and the corresponding limit values as values for the passed shape for NLTH. Checks and limits are retrieved from the VIIA-LimitValues-NLTH-Database.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • shape (obj): Shape for which checks and limit values are retrieved.

Output:
  • Returns a dictionary with the checks as keys and the corresponding limit values as values.

viiapackage.results.result_functions.viia_read_diana_outfile_linear_static.viia_read_diana_outfile_linear_static(project: ViiaProject, outfile: Union[Path, str], load_combination_id: int = 1) Dict[str, float][source]

Function calculates the center of mass based on the output file of a linear static calculation.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • outfile (Path): File name and location as single string or path of the output file of a linear static calculation. Alternative file location of the out-file can be provided as string.

  • load_combination_id (str): Load-combination ID in DIANA software. Default value is 1.

Output:
  • Notification on screen and in log of the position of the center of mass.

  • Returns 3 floats: sum of vertical loads in [N], center of mass in x-direction [m] and center of mass in y-direction [m].

viiapackage.results.result_functions.viia_results_pushover._compute_damping(project: ViiaProject, combinations: Optional[List[dict]] = None, autofill: Optional[bool] = False, soil_damping=False)[source]

This function computes the spectral reduction factor based on given characteristics of the structure. It is designed for nested use in ‘viia_assess_po_curve()’ Stand-alone use is not recommended

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-combinations: list of dictionaries with keys ‘subsystem’, ‘load_case’ and ‘failure_mechanism’, respectively

containing the name of a subsystem (e.g. ‘global_system or ‘line_of_y_8.3’), the name of the load-case (e.g. ‘X_pos_uni’ or ‘Y_neg_tri’, and the type of failure mechanism (either ‘brittle’ or ‘ductile’). If not inputted,

the function will consider the governing pushover lines for ‘x’ and ‘y’ direction, which are to be set using ‘viia_set_governing_lines_per_direction(…)’.

-autofill: whether or not to call precedential functions when preparatory data is missing -soil_damping: whether to take into account soil radiation damping. This is currently not supported

Output:
  • None: data is added to project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover._convert_tb_to_array(project: ViiaProject, filenames: [<class 'dict'>], direction: [<class 'str'>])[source]

Function to read tabulated result files from pushover analyses and store displacements and reaction forces in arrays.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-filenames: dictionary with keys ‘Displacements’ and ‘Reaction forces’, storing the path of associated tb-files

as strings

-direction: ‘x’ or ‘y’, corresponding with the pushover direction

Output:

-an array storing all displacements for each step for each node number considered -an array storing all reaction/nodal forces for each step for each node number considered -all node numbers of nodes associated with displacements -all node numbers of nodes associated with reaction/nodal forces

viiapackage.results.result_functions.viia_results_pushover._get_storey_height(project: ViiaProject, subsystems: Optional[List[str]] = None)[source]

Function that finds the number of storeys and the height of each storey (per subsystem)

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-subsystems: list with names of subsystems to process

Output:

-list of story heights -number of storeys -data is stored in project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover._viia_assess_po_curve(project: ViiaProject, combinations: ~typing.Optional[~typing.List[dict]] = None, autofill: ~typing.Optional[bool] = True, tolerance: [<class 'float'>] = 0.1)[source]
This function assesses the requested pushover lines with the corresponding ADRS.

This function is an antecedent to ‘viia_bilinearize_po_curve()’

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-combinations: list of dictionaries with keys ‘subsystem’, ‘load_case’ and ‘failure_mechanism’, respectively

containing the name of a subsystem (e.g. ‘global_system or ‘line_of_y_8.3’), the name of the load-case (e.g. ‘X_pos_uni’ or ‘Y_neg_tri’, and the type of failure mechanism (either ‘brittle’ or ‘ductile’). If not inputted,

the function will consider the governing pushover lines for ‘x’ and ‘y’ direction, which are to be set using ‘viia_set_governing_lines_per_direction(…)’.

-autofill: whether or not to call precedential functions when preparatory data is missing -tolerance: tolerance associated with the change in iterated result value of the system ductility factor

Output:
  • None: data is added to project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover._viia_bilinearize_po_curve(project: ViiaProject, combinations: ~typing.Optional[~typing.List[dict]] = None, autofill: ~typing.Optional[bool] = True, _iteration: [<class 'bool'>] = False)[source]
Bilinearizes pushover curves of SDoF equivalent systems. This function is an antecedent to

‘viia_get_drift_limits()’

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

  • combinations: list of dictionaries with keys ‘subsystem’, ‘load_case’ and ‘failure_mechanism’, respectively containing the name of a subsystem (e.g. ‘global_system or ‘line_of_y_8.3’), the name of the load-case (e.g. ‘X_pos_uni’ or ‘Y_neg_tri’, and the type of failure mechanism (either ‘brittle’ or ‘ductile’). If not inputted, the function will consider the governing pushover lines for ‘x’ and ‘y’ direction, which are to be set using ‘viia_set_governing_lines_per_direction(…)’.

  • autofill: Whether to call precedential functions when preparatory data is missing

  • _iteration: an option designed purely for use in ‘viia_assess_po_curve’. It is strictly recommended to use

the default input argument.

Output:
  • None: data is added to project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover._viia_demand_curve(project: ViiaProject, spectr_red_fac=1.0, return_period=2475, steps=100)[source]

This is function is to create the seismic demand curve for push over analysis. The corresponding theory and procedure can be found in NLPO protocol assessment section 3. If the adress of the object is set priorly, the function is able to collect preparatory data from the NEN webtool.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

  • spectr_red_fac (float): spectral reduction factor associated with the system damping

  • return_period (int): the prescribed return period associated with the demand spectrum in years

  • steps (int): discrete points that control the smoothness of the figure

Output:
  • dictionary that contains the (in)/elastic displacement/accelertion response spectrum value

  • dictionary with associated spectrum parameters

Attribute:
  • viia_demand_curve.get_value_ADR

return a dict containing the (in)/elastic disp/acceleration spectrum value on period t

>> data = viia_demand_curve(response_spectrum_file) >> data_at_random_time = viia_demand_curve.get_value_ADR(t=0.5) >> data_at_random_time = {‘se’: 0.521809934,

‘sDe’: 32.38312009139122, ‘sen’: 0.29434049937163764, ‘sDen’: 18.266543271504304}

viiapackage.results.result_functions.viia_results_pushover._viia_get_pushover_result_data_from_tb(project: ViiaProject, analysis: [<class 'str'>] = 'A6', subsystems: ~typing.Optional[~typing.List[str]] = None, load_cases: ~typing.Optional[~typing.List[str]] = None, autofill: ~typing.Optional[bool] = False)[source]

This function will collect the displacement and the base shear data for the assessment for each load case and direction.

For subsystem, the .tb file with displacement and bear shear are read. For each subsystem, the displacement result has been put into the result dictionary as an array with the size of load steps while the base shear is calculated by summing up the result from all nodes within this subsystem.

This function is an antecedent to ‘viia_get_pushover_result_dict_const()’

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-analysis: the analysis number, e.g. ‘A6’ -subsystems: list with names of subsystems to process -load_cases: list with names of load-cases to process -autofill: whether or not to call precedential functions when preparatory data is missing

Output:
  • None: data is added to project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover._viia_get_pushover_result_dict_const(project: ViiaProject, subsystems: Optional[List[str]] = None, load_cases: Optional[List[str]] = None, autofill: Optional[bool] = False)[source]

This function will collect all the data for the assessment which will be immutable after mesh. (e.g. the node number of displacement, seismic mass).

For subsystem, the evaluation node numbers are determined after mesh for displacement and base shear. The .tb file from linear static analysis is needed to calculate the seismic mass for each subsystem.

For SDOF, the evaluation node for displacement will be filled.

This function is an antecedent to ‘viia_set_up_pushover_result_dict()’

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-subsystems: list with names of subsystems to process -load_cases: list with names of load-cases to process -autofill: Whether to call precedential functions when preparatory data is missing

Output:
  • None: data is added to project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover._viia_mdof_to_sdof_po_curve(project: ViiaProject, subsystems: Optional[List[str]] = None, load_cases: Optional[List[str]] = None, autofill: Optional[bool] = False)[source]

This function converts a MDoF (sub)system into an SDoF equivalent according to the NPR for NLPO. This function is the antecedent to ‘viia_get_pushover_result_data_from_tb’

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

  • subsystems: list with names of subsystems to process

  • load_cases: list with names of load-cases to process

  • autofill: Whether to call precedential functions when preparatory data is missing

Output:
  • None: data is added to project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover._viia_plot_draft_po_curves(project: ViiaProject, subsystems: Optional[List[str]] = None, load_cases: Optional[List[str]] = None, steps: Optional[int] = None)[source]

Function to define the governing subsystem for each load-case of subsystem NLPO.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-subsystems: list with names of subsystems to process -load_cases: list with names of load-cases to process -steps: number of steps to be incorporated

Output:

-None: plots are saved in the associated analysis sub-folder

viiapackage.results.result_functions.viia_results_pushover._viia_plot_governing_line_per_direction(project: ViiaProject, analysis='A6', steps: Optional[int] = None)[source]

Plots the governing bilinearized pushover lines as set in ‘viia_set_governing_line_per_direction’, seperately for ‘x’ and ‘y’ direction. If available, the 5% and 20% damped ADRS, and the brittle and ductile drift limits are also plotted.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-analysis: the analysis number associated with the plotted data, e.g. ‘A6’ -steps: the number of steps to be incorporated

Output:

-None: stores the plots in the ‘ADRS’ subfolder

viiapackage.results.result_functions.viia_results_pushover._viia_plot_governing_line_per_load_case(project: ViiaProject, analysis: [<class 'str'>] = 'A6', steps: ~typing.Optional[int] = None)[source]

Plots the governing pushover lines as set in ‘viia_set_governing_line_per_load_case’, separately for ‘x’ and ‘y’ direction. If available, the 5% and 20% damped ADRS, and the brittle and ductile drift limits are also plotted.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

  • analysis: the analysis number associated with the plotted data, e.g. ‘A6’

  • steps: the number of steps to be incorporated

Output:
  • None: stores the plots in the ‘ADRS’ sub-folder

viiapackage.results.result_functions.viia_results_pushover._viia_pushover_data_into_excel(project: ViiaProject, subsystems: Optional[List[str]] = None, load_cases: Optional[List[str]] = None, save_file_location: Optional[str] = None)[source]

Writes all relevant and available pushover and ADRS data into Excel

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-subsystems: names of the subsystems of which data is desired. -load_cases: Name of the load-cases of which data is desired. -save_file_location: desired path which to store the excel in.

Output: -No python output, creates an excel file instead

viiapackage.results.result_functions.viia_results_pushover._viia_store_demand_curves(project: ViiaProject, spectr_red_facs: [typing.List[float]] = [0.564], steps: [<class 'int'>] = 100, return_period: [<class 'int'>] = 2475, add_elastic: [<class 'bool'>] = True)[source]

Function that creates (if necassary) and globally stores the requested (in)elastic demand spectra in project.project_specific[‘ADRS’].

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

  • spectr_red_facs (list): contains spectral reduction factors associated with the system damping

  • steps (int): discrete points that control the smoothness of the spectrum

  • return_period (int): the prescribed return period associated with the demand spectrum in years

  • add_elastic (bool): whether or not to store the elastic spectrum as well

Output:
  • None: data is added to project.project_specific[‘ADRS’]

viiapackage.results.result_functions.viia_results_pushover.viia_get_drift_limits(project: ViiaProject, com_list_per_storey: List[float], category: str = 'Ductile')[source]

This function obtains the drift limits of a SDoF system equivalent according to the NPR for NLPO.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

  • com_list_per_storey (list): list with names of subsystems to process

Output:
  • Data is added to project.project_specific[‘drift_limits’]

viiapackage.results.result_functions.viia_results_pushover.viia_pushover_nodes_reactionforces_m_eff(pushover_tbfile_dict, rforce_nodes)[source]

This function will look for the reaction force results from the TB file with specified node numbers. It will return a list of reaction forces of those nodes. This function is specifically used for calculating effective masses.

Function use: DIANA

Input:
  • Tabulated file with the reaction forces of the specified nodes

  • The required nodes for evaluation

Output:
  • Returns a list of the reaction forces of nodes

viiapackage.results.result_functions.viia_results_pushover.viia_results_pushover(project: ViiaProject, analysis_nr: [<class 'str'>])[source]

Generic function for producing output associated with pushover assessment. Can be used in A6, A11, A13 or A14.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

-Analysis number, e.g. ‘A6’

Output:

-None: Stores all figures in the associated analysis folders. Stores data in project.project_specific[‘PO_data’]

viiapackage.results.result_functions.viia_results_pushover.viia_set_up_pushover_result_dict(project: ViiaProject)[source]

This function will set up the project specific dictionary to collect all the result which will be used for the assessment.

Input:
  • project (obj): ViiaProject object containing collections and of fem objects and project variables.

Output:
  • None: The dictionary for assessment of single line and subsystem have been created and can be read by

    project.project_specific[‘PO_data’], whose key is the name of subsystem, while the value is the data for result handling.

viiapackage.results.result_functions.viia_sra.viia_sra(project: ViiaProject, sra_tb_file: str, check_nodes: Dict, single_graph: bool = False, base_signals: bool = False, response_spectrum: bool = False, result_item: str = 'accelerations')[source]

This function reads the acceleration output of the reference points and creates graphs to visualise the results. The graphs can be imported to the Engineering Report.

The accelarations can be plotted versus time, or the response spectrum can be calculated with this function.

Input:
  • project (obj): Project object containing collections and of fem objects and project variables.

  • sra_tb_file(str): Name of the file, and contains the complete folder and type in the string. If set to None, the results are already read and set in the results dictionary. Renewed data entrance can be omitted. This is useful (will speed up) if function is performed more than one time in a mainscript.

  • check_nodes (dict): Keys (int) are the nodes for which the graph needs to be created. The nodes should be in the file with the results. Values (str) are the descriptions of the reference node that will be entered in the legend of the graph.

  • singe_graph (bool): X-, y- and z-direction are plotted in one graph if set to ‘True’. Default value is ‘False’ which will create a figure with 3 graphs, each graph containing the accelerations in respectively x-, y- and z-direction.

  • base_signals (bool): The site specific site respons spectrum analysis has been performed for a free field situation (this calculation is called the soilcolumn calculation). The results of this analysis is the base acceleration signal that is used in flexbase calculations. These accelerations will be added to the graph. The signals need to be present in the ‘TimeseriesCombinationSet’ class.

  • response_spectrum (bool): The results can be given for a response spectrum analysis with the signal as input. Default setting is to plot the timesignal. The response spectrum analysis will take some time to finish.

  • result_item (str): By default the function plots the accelerations, but by changing the result_item to ‘displacements’, the displacements are plotted.

Output:
  • A figure with the requested items is created and saved in the analysisfolder.

  • The DIANA resultfile is saved as csv file for use in excel.