-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: concrete material properties and material class for Eurocode 2,…
… 2004 (#77) * Start implementing material properties for concrete ec2 2004 * Add eps_cu1 and eps_c2 * Add eps_cu2, n, eps_c3 and eps_cu3 * Add concrete implementation of concrete for EC2 2004 * Add EC2 to design code factory * Add tests for concrete ec2 2004 * Move ec2 2004 tests into new structure * Update units and docstrings * Change name of function for calculating n * Force absolute values for args * Add fun for calc fcd * Fix incorrect docstring
- Loading branch information
1 parent
cd6bb81
commit 72e8978
Showing
7 changed files
with
1,067 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
220 changes: 220 additions & 0 deletions
220
structuralcodes/codes/ec2_2004/_concrete_material_properties.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
"""Concrete material properties according to Tab. 3.1.""" | ||
|
||
import math | ||
|
||
from structuralcodes.codes import mc2010 | ||
|
||
|
||
def fcm(fck: float, delta_f: float = 8) -> float: | ||
"""The mean compressive strength of concrete. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Keyword Args: | ||
delta_f (float): The difference between the mean and the | ||
characteristic strength. | ||
Returns: | ||
float: The mean compressive strength in MPa. | ||
""" | ||
return mc2010.fcm(fck=abs(fck), delta_f=abs(delta_f)) | ||
|
||
|
||
def fctm(fck: float) -> float: | ||
"""The mean tensile strength of concrete. | ||
EN 1992-1-1: 2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Returns: | ||
float: The mean tensile strength in MPa. | ||
""" | ||
return mc2010.fctm(fck=abs(fck)) | ||
|
||
|
||
def fctk_5(_fctm: float) -> float: | ||
"""The 5% fractile of the tensile strength of concrete. | ||
EN 1992-1-1: 2004, Table 3.1. | ||
Args: | ||
_fctm (float): The mean tensile strength of concrete in MPa. | ||
Returns: | ||
float: The 5% fractile of the tensile strength in MPa. | ||
""" | ||
return mc2010.fctkmin(_fctm=abs(_fctm)) | ||
|
||
|
||
def fctk_95(_fctm: float) -> float: | ||
"""The 95% fractile of the tensile strength of concrete. | ||
EN 1992-1-1: 2004, Table 3.1. | ||
Args: | ||
_fctm (float): The mean tensile strength of concrete in MPa. | ||
Returns: | ||
float: The 95% fractile of the tensile strength in MPa. | ||
""" | ||
return mc2010.fctkmax(_fctm=abs(_fctm)) | ||
|
||
|
||
def Ecm(_fcm: float) -> float: | ||
"""The secant modulus of concrete. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
_fcm (float): The mean compressive strength of concrete in MPa. | ||
Returns: | ||
float: The secant modulus of concrete in MPa. | ||
""" | ||
return 22000.0 * math.pow(abs(_fcm) / 10, 0.3) | ||
|
||
|
||
def eps_c1(_fcm: float) -> float: | ||
"""The strain at maximum compressive stress of concrete (fcm) for the | ||
Sargin constitutive law. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
_fcm (float): The mean compressive strength of concrete in MPa. | ||
Returns: | ||
float: The strain at maximum compressive stress, absolute value, no | ||
unit. | ||
""" | ||
return min(0.7 * math.pow(abs(_fcm), 0.31), 2.8) / 1000 | ||
|
||
|
||
def eps_cu1(fck: float) -> float: | ||
"""The ultimate strain for the Sargin constitutive law. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Returns: | ||
float: The ultimate strain, absolute value, no unit. | ||
""" | ||
fck = abs(fck) | ||
return ( | ||
3.5 / 1000 | ||
if fck < 50 | ||
else (2.8 + 27 * ((98 - fcm(fck)) / 100) ** 4) / 1000 | ||
) | ||
|
||
|
||
def eps_c2(fck: float) -> float: | ||
"""The strain at maximum compressive stress of concrete for the | ||
parabolic-rectangular law. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Returns: | ||
float: The strain at maximum compressive stress, absolute value, no | ||
unit. | ||
""" | ||
fck = abs(fck) | ||
return ( | ||
2.0 / 1000 if fck < 50 else (2.0 + 0.085 * (fck - 50) ** 0.53) / 1000 | ||
) | ||
|
||
|
||
def eps_cu2(fck: float) -> float: | ||
"""The ultimate strain of the parabolic-rectangular law. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Returns: | ||
float: The ultimate strain, absolute value, no unit. | ||
""" | ||
fck = abs(fck) | ||
return ( | ||
3.5 / 1000 if fck < 50 else (2.6 + 35 * ((90 - fck) / 100) ** 4) / 1000 | ||
) | ||
|
||
|
||
def n_parabolic_rectangular(fck: float) -> float: | ||
"""The exponent in the parabolic-rectangular law. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Returns: | ||
float: The exponent n, absolute value, no unit. | ||
""" | ||
fck = abs(fck) | ||
return 2.0 if fck < 50 else (1.4 + 23.4 * ((90 - fck) / 100) ** 4) | ||
|
||
|
||
def eps_c3(fck: float) -> float: | ||
"""The strain at maximum compressive stress of the bi-linear law. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Returns: | ||
float: The strain at maximum compressive stress, absolute value, no | ||
unit. | ||
""" | ||
fck = abs(fck) | ||
return 1.75 / 1000 if fck < 50 else (1.75 + 0.55 * (fck - 50) / 40) / 1000 | ||
|
||
|
||
def eps_cu3(fck: float) -> float: | ||
"""The ultimate strain of the bi-linear law. | ||
EN 1992-1-1:2004, Table 3.1. | ||
Args: | ||
fck (float): The characteristic compressive strength of concrete in | ||
MPa. | ||
Returns: | ||
float: The ultimate strain, absolute value, no unit. | ||
""" | ||
return eps_cu2(fck) | ||
|
||
|
||
def fcd(fck: float, alpha_cc: float, gamma_c: float) -> float: | ||
"""The design compressive strength of concrete. | ||
EN 1992-1-1:2004, Eq. (3.15) | ||
Args: | ||
fck (float): The characteristic compressive strength in MPa. | ||
alpha_cc (float): A factor for considering long-term effects on the | ||
strength, and effects that arise from the way the load is applied. | ||
gamma_c (float): The partial factor of concrete. | ||
Returns: | ||
float: The design compressive strength of concrete in MPa | ||
""" | ||
return abs(alpha_cc) * abs(fck) / abs(gamma_c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.