Source code for viiapackage.supports.pile_foundation.pile_properties.calculate_huan_beam_properties

### ===================================================================================================================
###   Calculate the properties of the Huan beam
### ===================================================================================================================
# Copyright ©VIIA 2024

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

# General imports
from __future__ import annotations
from typing import TYPE_CHECKING, Dict

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


### ===================================================================================================================
###   2. Function to calculate Huan beam properties
### ===================================================================================================================

[docs]def viia_calculate_huan_beam_properties(project: ViiaProject, data: dict) -> Dict[str, float]: """ Function to calculate 1D huan beam properties for DIANA use, based on complete pile data. Input: - project (obj): VIIA project object containing collections of fem objects and project variables. - data_dict (dict): Dictionary contains geo inputs for the calculation. The 'concrete_strength_grade' is required key of the dictionary. Output: - Returns huan beam properties as a dictionary. """ hb_properties = {} # Get EC concrete properties (linear) hb_concrete = project.create_material(name=data['concrete_strength_grade'], code='EC', capacity=True) hb_properties['density'] = hb_concrete.mass_density hb_properties['youngs_modulus'] = hb_concrete.material_model.youngs_modulus hb_properties['poissons_ratio'] = hb_concrete.material_model.poissons_ratio hb_properties['raylei_a'] = 0.0624157 hb_properties['raylei_b'] = 0.00105401 # Get nonlinear properties hb_properties['crack_bandwidth'] = 0.05 hb_properties['tensile_strength'] = hb_concrete.capacity.f_ctm hb_properties['tensile_fracture_energy'] = 73 * (hb_concrete.capacity.f_cm / 1e6) ** 0.18 hb_properties['compressive_strength'] = hb_concrete.capacity.f_cm hb_properties['residual_tensile_strength'] = 0.0 # Set initial values for compressive stress-strain diagram hb_properties['compressive_stress_strain_diagram'] = [0.0, 0.0] # Note: nonlinear parameter eps_c1 not implemented eps_c1 = min(0.7 * (hb_concrete.capacity.f_cm / 1000000) ** 0.31, 2.8) x = 0 for i in range(13): if i < 8: x += - eps_c1 / 8 else: x += (- hb_concrete.capacity.eps_cu2 * 1000 + eps_c1) / 4 k = 1.05 * hb_concrete.material_model.youngs_modulus * eps_c1 / 1000 / hb_concrete.capacity.f_cm n = - x / eps_c1 y = -(k * n - n ** 2) / (1 + (k - 2) * n) * hb_concrete.capacity.f_cm hb_properties['compressive_stress_strain_diagram'].append(x/1000) hb_properties['compressive_stress_strain_diagram'].append(y) hb_properties['compressive_stress_strain_diagram'].append(-0.01) hb_properties['compressive_stress_strain_diagram'].append(-1e6) hb_concrete.remove_material() return hb_properties
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================