Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
2e70179
Draft initial structure for the concrete class
mortenengen Dec 13, 2022
b8f67bb
Update docstring of base material
mortenengen Dec 13, 2022
c299dcc
minimum reinforcement areas functions
DanielGMorenaFhecor Dec 15, 2022
59a04f5
raise ValueError test functions for min area
DanielGMorenaFhecor Dec 27, 2022
b7167aa
crack_min_steel_without_direct_calculation
DanielGMorenaFhecor Jan 12, 2023
7189d31
Commit
DanielGMorenaFhecor Jan 12, 2023
4a0fcfb
crack without direct calculation tests
DanielGMorenaFhecor Jan 12, 2023
84c0140
adjusted bond strength
DanielGMorenaFhecor Jan 12, 2023
e0f1baa
hc_eff_concrete_tension formulation and testing
DanielGMorenaFhecor Jan 12, 2023
f2cbb49
requiremets.txt updated
DanielGMorenaFhecor Jan 12, 2023
333dcbe
rho_p_eff
DanielGMorenaFhecor Jan 12, 2023
59f1198
kt load duration
DanielGMorenaFhecor Jan 12, 2023
34d85d2
strain diff formula
DanielGMorenaFhecor Jan 12, 2023
a8ab129
chapter completed
DanielGMorenaFhecor Jan 13, 2023
ce4e432
imports and renamed functions
DanielGMorenaFhecor Jan 13, 2023
938c0f5
removed duplicate file
DanielGMorenaFhecor Jan 13, 2023
6ba6dc9
removed testing file
DanielGMorenaFhecor Jan 13, 2023
a9c9263
test renaming and docstring corrections
DanielGMorenaFhecor Jan 16, 2023
50c65b7
pull from upstream
DanielGMorenaFhecor Feb 8, 2023
ea3552b
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Mar 9, 2023
4fd8b7e
230309 requested changes applied
DanielGMorenaFhecor Mar 9, 2023
1cffa61
small lint fixes
DanielGMorenaFhecor Mar 9, 2023
b483d40
vscode config updated
DanielGMorenaFhecor Mar 9, 2023
e9d953d
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor May 26, 2023
182e538
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Dec 18, 2023
e509fb9
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Mar 4, 2024
d57f945
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Apr 4, 2024
bc049e4
Merge branch 'dev' of https://github.com/DanielGMorenaFhecor/structur…
DanielGMorenaFhecor Jul 30, 2024
17cdf47
Merge branch 'dev' of https://github.com/fib-international/structural…
DanielGMorenaFhecor Aug 20, 2024
33ec3ee
Merge branch 'dev' of https://github.com/fib-international/structural…
Sep 25, 2024
3bdaed3
Merge remote-tracking branch 'upstream/dev' into dev
Dec 2, 2024
7f80d3c
anch
DanielGMorenaFhecor May 21, 2025
c6644e3
Init structure for AASHTO
DanielGMorenaFhecor Jun 23, 2025
3497f03
Sample function
DanielGMorenaFhecor Jun 23, 2025
d32a70b
AASHTO LRFD 2020 functions for shear design of concrete members witho…
Jun 24, 2025
2db6ebc
Merge branch 'aashto-init' of https://github.com/DanielGMorenaFhecor/…
Samc-3 Jun 24, 2025
d1c29de
commit
Samc-3 Jun 24, 2025
f191b68
Fixed coding format and added shear stress resistance for concrete me…
Samc-3 Jun 24, 2025
1487f98
Add initial shear tests for AASHTO 2020
Samc-3 Jun 24, 2025
0664010
Test cases for the shear function of concrete memebers with and witho…
Samc-3 Jun 26, 2025
dbc027b
Test cases for AASHTO
Samc-3 Jun 27, 2025
fbc459d
Fixed the naming convention of the functions
Samc-3 Jun 30, 2025
27fce98
New Error tests
Samc-3 Jun 30, 2025
8078f43
Fixed naming errors
Samc-3 Jun 30, 2025
5b65283
Shear punching file for AASHTO
Samc-3 Jun 30, 2025
f1717dc
Function names are clearer
Samc-3 Jun 30, 2025
2283feb
Punching test file for AASHTO 2020
Samc-3 Jun 30, 2025
e7e222b
Added the nominal punching shear resistance function
Samc-3 Jun 30, 2025
e3ac642
Added test case for the nominal shear punching resistance function
Samc-3 Jun 30, 2025
c2531ac
Added more error test cases
Samc-3 Jun 30, 2025
671ce27
Added more test cases for the erros in the functions and cleaned up s…
Samc-3 Jun 30, 2025
9d8f0b4
added the value error code to the nominal shear punching resistance f…
Samc-3 Jun 30, 2025
f59502c
Added the test cases for the errors of each function in the _punching…
Samc-3 Jun 30, 2025
65846b7
Fixed the error in calculating punching shear stress resistance
Samc-3 Jul 1, 2025
24068fc
Functions for crack_control
Samc-3 Jul 2, 2025
52a732b
Fixed the spacing function
Samc-3 Jul 2, 2025
ed379b1
Test file for crack control aashto
Samc-3 Jul 3, 2025
0ba924e
Added test case errors
Samc-3 Jul 3, 2025
a4f44a4
Adding the deflections file
Samc-3 Jul 18, 2025
e6e7202
Fixing crack_control errors
Samc-3 Jul 18, 2025
4b093e3
fixed the shear resistance
Samc-3 Jul 28, 2025
2235d1b
completed the deflection functions
Samc-3 Jul 28, 2025
e1c1c9f
Changed shear stress to just shear resistance
Samc-3 Jul 28, 2025
8827f76
Fixed shear
Samc-3 Jul 28, 2025
a3d9673
Fixed the comment wording to match what the functions are doing
Samc-3 Jul 28, 2025
e1d22b0
Fixed the functions from punching shear stress to punchingg shear res…
Samc-3 Jul 28, 2025
0fd97dc
Adding test cases for deflections
Samc-3 Jul 29, 2025
fa757ad
Fixed the Mu function and test cases
Samc-3 Jul 30, 2025
d3e60bd
Fixed Mu deflections
Samc-3 Jul 30, 2025
1453790
Fixed the Ie functiona and tests
Samc-3 Jul 30, 2025
0df9176
modified vsconfig
aperezcaldentey Aug 26, 2025
f2f4fde
Renamed aashto files to proper notation
Samc-3 Sep 2, 2025
7ef1d3e
Merge branch 'aashto-init' of https://github.com/DanielGMorenaFhecor/…
Samc-3 Sep 2, 2025
586c09a
Fixed the units in the shear cases
Samc-3 Sep 4, 2025
db89659
Fixed commments for correct labeling of models and variables
Samc-3 Sep 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"notebook.formatOnSave.enabled": true,
"notebook.codeActionsOnSave": {
"notebook.source.organizeImports": "explicit"
}
},
}
5 changes: 5 additions & 0 deletions prueba.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from structuralcodes.codes.aashto_2020 import _deflections
from structuralcodes.codes.aashto_2020 import _punching

mcr = _deflections.Mcr(fc_prime=5, b=200 / 25.4, h=500 / 25.4, d=450 / 25.4)
print(mcr)
Empty file.
61 changes: 61 additions & 0 deletions structuralcodes/codes/aashto_2024/_crack_control.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## AASHTO LRFD Functions for Control of Cracking ##


def beta_s(h: float, dc) -> float:
"""Determines the flexural strain ratio.

AASHTO LRFD 2024 10th Edition, Eq (5.6.7-2)

Args:
h (float): height of the cross section in (in)
dc (float): the thickness of the concrete cover from the surface
to the center of the reinforcement in (in)

Returns:
The flexural strain ratio

Raises:
ValueError: If h is less than 0
ValueError: If dc is less than 0
"""
if h < 0:
raise ValueError(f'h={h} cannot be less than 0')
if dc < 0:
raise ValueError(f'dc={dc} cannot be less than 0')

return 1 + (dc / (0.7 * (h - dc)))


def s(fyk: float, beta_s: float, gamma_e: float, dc: float) -> float:
"""Determines the spacing of nonprestressed reinforcement.

AASHTO LRFD 2024 10th Edition, Eq. (5.6.7-1)

Args:
fyk (float): The steel reinforcement yielding strength in ksi
beta_s (float): The flexural strain ratio
gamma_e (float): The exposure factor
dc (float): The thickness of concrete cover from surface to center
of the reinforcement in (in)

Returns:
The spacing of nonprestressed reinforcement in (in)

Raises:
ValueError: If fyk is less than 0
ValueError: If gamma_e is less than 0
ValueError: If beta_s is less than 0
ValueError: If dc is less than 0
"""
if fyk < 0:
raise ValueError(f'fyk={fyk} cannot be less than 0')
if gamma_e < 0:
raise ValueError(f'gamma_e={gamma_e} cannot be less than 0')
if beta_s < 0:
raise ValueError(f'beta_s={beta_s} cannot be less than 0')
if dc < 0:
raise ValueError(f'dc={dc} cannot be less than 0')

fss = 0.6 * fyk

return (700 * gamma_e / (beta_s * fss)) - (2 * dc)
241 changes: 241 additions & 0 deletions structuralcodes/codes/aashto_2024/_deflections.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
## AASHTO LRFD Functions for Deflections

import math


def Mu(
fc_prime: float,
fy: float,
As: float,
b: float,
h: float,
d: float,
L: float,
phi: float,
) -> float:
"""Determines the design ultimate moment.

AASHTO LRFD 2024 10th Edition, Eq (5.6.3.2a-1)

Args:
fc_prime (float): compressive strength of concrete in (ksi)
fy (float): yield strength of the steel reinforcement in (ksi)
As (float): area of steel reinforcement
b (float): width of the cross section in (in)
h (float): height of the cross section in (in)
d (float): effective depth of cross section in (in)
L (float): span in (in)
phi (flaot): design factor

Returns:
Design moment in (k-in)

Raises:
ValueError: If fc_prime is less than 0
ValueError: If fy is less than 0
ValueError: If As is less than 0
ValueError: If b is less than 0
ValueError: If h is less than 0
ValueError: If d is less than 0
ValueError: If L is less than 0
ValueError: If phi is less than 0
"""
if fc_prime < 0:
raise ValueError(f'fc_prime={fc_prime} fc_prime cannot be less than 0')
if fy < 0:
raise ValueError(f'fy={fy} fy cannot be less than 0')
if As < 0:
raise ValueError(f'As={As} As cannot be less than 0')
if b < 0:
raise ValueError(f'b={b} b cannot be less than 0')
if h < 0:
raise ValueError(f'h={h} h cannot be less than 0')
if d < 0:
raise ValueError(f'd={d} d cannot be less than 0')
if L < 0:
raise ValueError(f'L={L} L cannot be less than 0')
if phi < 0:
raise ValueError(f'phi={phi} phi cannot be less than 0')

x = As * fy / (fc_prime * b * 0.8)

return phi * (As * fy * (d - 0.4 * x))


def Mcr(fc_prime: float, b: float, h: float, d: float) -> float:
"""Determines the cracking moment.

AASHTO LRFD 2024 10th Edition, Eq (5.6.3.2a-1)

Args:
fc_prime (float): compressive strength of concrete in (ksi)
b (float): width of the cross section in (in)
h (float): height of the cross section in (in)
d (float): effective depth of cross section in (in)

Returns:
Cracking moment in (k-in)

Raises:
ValueError: If fc_prime is less than 0
ValueError: If b is less than 0
ValueError: If h is less than 0
ValueError: If d is less than 0
"""
if fc_prime < 0:
raise ValueError(f'fc_prime={fc_prime} fc_prime cannot be less than 0')
if b < 0:
raise ValueError(f'b={b} b cannot be less than 0')
if h < 0:
raise ValueError(f'h={h} h cannot be less than 0')
if d < 0:
raise ValueError(f'd={d} d cannot be less than 0')

fr = 0.24 * math.sqrt(fc_prime)
Ig = b * (h**3) / 12
y_bar = h / 2
yt = d - y_bar

return fr * Ig / yt


def Ie(
fc_prime: float,
fy: float,
As: float,
b: float,
h: float,
d: float,
L: float,
phi: float,
Es: float,
Ec: float,
) -> float:
"""Determines the effective moment of inertia.

AASHTO LRFD 2024 10th Edition

Args:
fc_prime (float): compressive strength of concrete in (ksi)
fy (float): yield strength of the steel reinforcement in (ksi)
As (float): area of steel reinforcement
b (float): width of the cross section in (in)
h (float): height of the cross section in (in)
d (float): effective depth of cross section in (in)
L (float): span in (in)
phi (float): design factor
Es (float): modulus of elasticity of steel (ksi)
Ec (float): modulus of elasticity of concrete (ksi)

Returns:
Effective moment of inertia (in^4)

Raises:
ValueError: If fc_prime is less than 0
ValueError: If fy is less than 0
ValueError: If As is less than 0
ValueError: If b is less than 0
ValueError: If h is less than 0
ValueError: If d is less than 0
ValueError: If L is less than 0
ValueError: If phi is less than 0
ValueError: If Es is less than 0
ValueError: If Ec is less than 0
"""
if fc_prime < 0:
raise ValueError(f'fc_prime={fc_prime} fc_prime cannot be less than 0')
if fy < 0:
raise ValueError(f'fy={fy} fy cannot be less than 0')
if As < 0:
raise ValueError(f'As={As} As cannot be less than 0')
if b < 0:
raise ValueError(f'b={b} b cannot be less than 0')
if h < 0:
raise ValueError(f'h={h} h cannot be less than 0')
if d < 0:
raise ValueError(f'd={d} d cannot be less than 0')
if L < 0:
raise ValueError(f'L={L} L cannot be less than 0')
if phi < 0:
raise ValueError(f'phi={phi} phi cannot be less than 0')
if Es < 0:
raise ValueError(f'Es={Es} Es cannot be less than 0')
if Ec < 0:
raise ValueError(f'Ec={Ec} Es cannot be less than 0')

n = Es / Ec
Ac = n * As
Ig = b * (h**3) / 12
Ma = Mu(fc_prime, fy, As, b, h, d, L, phi)
M_cr = Mcr(fc_prime, b, h, d)
two_thirds_Mcr = (2 / 3) * M_cr
x = As * fy / (fc_prime * b * 0.8)
Icr = ((b * x**3) / 3) + Ac * (d - x) ** 2

if Ma < two_thirds_Mcr:
return Ig

if Ma > two_thirds_Mcr:
return Icr / (1 - ((two_thirds_Mcr / Ma) ** 2) * (1 - (Icr / Ig)))


def delta(
qqp: float,
L: float,
Ec: float,
Ieff: float,
) -> float:
"""Determines the instantaneous deflection of the beam.

Args:
qqp (float): quasi permanent load in (k/in)
L (float): span (in)
Ec (float): modulus of elasticity of concrete (ksi)
Ieff (float): effective moment of inertia (in^4)

Returns:
The deflection in (in)

Raises:
ValueError: If L is less than 0
ValueError: If Ec is less than 0
ValueError: If Ieff is less than 0
"""
if L < 0:
raise ValueError(f'L={L} cannot be less than 0')
if Ec < 0:
raise ValueError(f'Ec={Ec} cannot be less than 0')
if Ieff < 0:
raise ValueError(f'Ieff={Ieff} cannot be less than 0')

return (5 * qqp * L**4) / (384 * Ec * Ieff)


def time_delta(deflection: float, factor: float, rho_prime: float) -> float:
"""Determines the time dependent deflection of the beam.

AASHTO LRFD 2024 10th Edition, Eq (5.6.3.5.2b-1)

Args:
deflection (float): instantaneous deflection in (in)
factor (float): time dependent factor for sustained loads
rho_prime (float): compressive reinforcement ratio

Returns:
The time dependent deflection in (in)

Raises:
ValueError: If deflection is less than 0
ValueError: If factor is less than 0
ValueError: If rho_prime is less than 0
"""
if deflection < 0:
raise ValueError(f'deflection={deflection} cannot be less than 0')
if factor < 0:
raise ValueError(f'factor={factor} cannot be less than 0')
if rho_prime < 0:
raise ValueError(f'rho_prime={rho_prime} cannot be less than 0')

landa_delta = factor / (1 + 50 * rho_prime)

return landa_delta * deflection
Loading