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

### ===================================================================================================================
###   FUNCTION viia_analyse_force_elongation_curve
### ===================================================================================================================
# Copyright ©VIIA 2024

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

# No imports required

### ===================================================================================================================
###   2. Function to analyse force elongation curve to get the yield stiffness
### ===================================================================================================================

[docs]def viia_analyse_force_elongation_curve(data_dict: dict): """ Function to calculate yield stiffness of pile horizontal spring based on geo inputs. This is done by finding the value in the force-elongation diagram, where the force is equal to the yield capacity value. Input: - data_dict (dict): Dictionary contains geo inputs for the calculation. Output: - Returns yield_stiffness as a float. """ displacements = data_dict['force_elongation_diagram']['elongation'] forces = data_dict['force_elongation_diagram']['force'] yield_force = data_dict['yield_capacity'] yield_stiffness = None for i, force in enumerate(forces): if force == yield_force: yield_stiffness = force / displacements[i] if not yield_stiffness: raise ValueError( "ERROR: Yield stiffness cannot be determined. Please check the 'force elongation diagram' and " "'yield capacity' inputs with geotechnical advisor.") return yield_stiffness
### =================================================================================================================== ### 3. End of script ### ===================================================================================================================