Eurocode 2 - Chapter 3 - Concrete

raw functions

In [1]:
import pandas as pd
import numpy as np
from numpy import vectorize
import matplotlib.pyplot as plt
In [2]:
from streng.codes.eurocodes.ec2.raw.ch3.concrete import strength, stress_strain, elastic_deformation

elastic_deformation

Ecm

In [3]:
print(elastic_deformation.Ecm.__doc__)
 Modulus of elasticity

    Args:
        fck (float): Characteristic (5%) compressive strength of concrete [MPa]

    Returns:
        float: Given using the expression:

        .. math::
            E_{cm}=22 (\dfrac{f_{cm}}{10})^{0.3}


In [4]:
Ecm = elastic_deformation.Ecm(fck=20.0)

print(f'Ecm = {Ecm:.2f}GPa')
Ecm = 29.96GPa

ν

In [5]:
print(elastic_deformation.ν.__doc__)
 Poisson's ratio

    Args:
        cracked (bool): True for cracked, False for uncracked

    Returns:
        float: 0.0 for cracked, 0.2 for uncracked


In [6]:
ν_cracked = elastic_deformation.ν(cracked=True)
ν_uncracked = elastic_deformation.ν(cracked=False)

print(f'ν_cracked = {ν_cracked}')
print(f'ν_uncracked = {ν_uncracked}')
ν_cracked = 0.0
ν_uncracked = 0.2

strength

fcd

In [7]:
print(strength.fcd.__doc__)
Design value for the compressive strength of concrete

    Args:
        acc (float): Coefficient taking account of long term effects on the compressive strength
                     and of unfavourable effects resulting from the way the load is applied
        fck (float): Characteristic (5%) compressive strength of concrete
        γc (float): Safety factor

    Returns:
        float: Given using the expression:

        .. math::
            f_{cd}=a_{cc}\dfrac{f_{ck}}{γ_c}


In [8]:
fcd = strength.fcd(acc=0.85,
                  fck=20.0,
                  γc=1.5)

print(f'fcd = {fcd:.2f}MPa')
fcd = 11.33MPa

fcm

In [9]:
print(strength.fcm.__doc__)
 Mean compressive strength at 28 days

    Args:
        fck (float): Characteristic (5%) compressive strength of concrete [MPa]

    Returns:
        float: Given using the expression:

        .. math::
            f_{cm}=f_{ck} + 8


In [10]:
fcm = strength.fcm(fck=20.0)

print(f'fcm = {fcm:.2f}MPa')
fcm = 28.00MPa

fctm

In [11]:
print(strength.fctm.__doc__)
 Mean tensile strength at 28 days

    Args:
        fck (float): Characteristic (5%) compressive strength of concrete [MPa]

    Returns:
        float: Given using the expression:

        .. math::

           f_{ctm} = 0.30\cdot f_{ck}^{2/3} for f_{ck}\le 50MPa

           f_{ctm} = 2.12\cdot ln(1+f_{cm}/10) for f_{ck}> 50MPa


In [12]:
fctm = strength.fctm(fck=20.0)

print(f'fctm = {fctm:.2f}MPa')
fctm = 2.21MPa

fctk005

In [13]:
print(strength.fctk005.__doc__)
 Characteristic (5% fractile) tensile strength of concrete [MPa]

    Args:
        fck (float): Characteristic (5%) compressive strength of concrete [MPa]

    Returns:
        float: Given using the expression:

        .. math::
            f_{ctk,0.05}=0.7\cdot f_{ctm}


In [14]:
fctk005 = strength.fctk005(fck=20.0)

print(f'fctk005 = {fctk005:.2f}MPa')
fctk005 = 1.55MPa

fctk095

In [15]:
print(strength.fctk095.__doc__)
 Characteristic (95% fractile) tensile strength of concrete [MPa]

    Args:
        fck (float): Characteristic (5%) compressive strength of concrete [MPa]

    Returns:
        float: Given using the expression:

        .. math::
            f_{ctk,0.95}=1.3\cdot f_{ctm}


In [16]:
fctk095 = strength.fctk095(fck=20.0)

print(f'fctk095 = {fctk095:.2f}MPa')
fctk095 = 2.87MPa

stress_strain

εc1

In [17]:
print(stress_strain.εc1.__doc__)

    Compressive strain in the concrete at the peak stress (‰)

    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days

    Returns:
        float: Given using the expression:

        .. math::
            ε_{c1} = min(0.7\cdot f_{cm}^{0.31}, 2.8)


In [18]:
εc1 = stress_strain.εc1(fck=20.0)

print(f'εc1 = {εc1:.2f}‰')
εc1 = 1.97‰

εc2

In [19]:
print(stress_strain.εc2.__doc__)

    The strain at reaching the maximum strength (‰)

    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days

    Returns:
        float: Given using the expressions:

        .. math::
            \begin{eqnarray}
                ε_{c2} & = & 2.0 & for & f_{ck} \le 50MPa \\
                ε_{c2} & = & 2.0 + 0.085(f_{ck}-50)^{0.53} & for & f_{ck} \ge 50MPa
            \end{eqnarray}


In [20]:
εc2 = stress_strain.εc2(fck=20.0)

print(f'εc2 = {εc2:.2f}‰')
εc2 = 2.00‰

εc3

In [21]:
print(stress_strain.εc3.__doc__)
 (‰)

    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days

    Returns:
        float: Given using the expressions:

        .. math::
            \begin{eqnarray}
                ε_{c3} & = & 1.75 & for & f_{ck} \le 50MPa \\
                ε_{c3} & = & 1.75 + 0.55(f_{ck}-50)/40 & for & f_{ck} \ge 50MPa
            \end{eqnarray}


In [22]:
εc3 = stress_strain.εc3(fck=20.0)

print(f'εc3 = {εc3:.2f}‰')
εc3 = 1.75‰

εcu1

In [23]:
print(stress_strain.εcu1.__doc__)


    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days

    Returns:
        float: Given using the expressions:

        .. math::
            \begin{eqnarray}
                ε_{cu1} & = & 3.5 & for & f_{ck} \le 50MPa \\
                ε_{cu1} & = & 2.8 + 27 \cdot ((98 - f_{cm})/100)^4 & for & f_{ck} \ge 50MPa
            \end{eqnarray}


In [24]:
εcu1 = stress_strain.εcu1(fck=20.0)

print(f'εcu1 = {εcu1:.2f}‰')
εcu1 = 3.50‰

εcu2

In [25]:
print(stress_strain.εcu2.__doc__)

    The ultimate strain

    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days

    Returns:
        float: Given using the expressions:

        .. math::
            \begin{eqnarray}
                ε_{cu2} & = & 3.5 & for & f_{ck} \le 50MPa \\
                ε_{cu2} & = & 2.6 + 35 \cdot ((90 - f_{ck})/100)^4 & for & f_{ck} \ge 50MPa
            \end{eqnarray}


In [26]:
εcu2 = stress_strain.εcu2(fck=20.0)

print(f'εcu2 = {εcu2:.2f}‰')
εcu2 = 3.50‰

εcu3

In [27]:
print(stress_strain.εcu3.__doc__)


    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days

    Returns:
        float: Given using the expressions:

        .. math::
            \begin{eqnarray}
                ε_{cu2} & = & 3.5 & for & f_{ck} \le 50MPa \\
                ε_{cu2} & = & 2.6 + 35 \cdot ((90 - f_{ck})/100)^4 & for & f_{ck} \ge 50MPa
            \end{eqnarray}


In [28]:
εcu3 = stress_strain.εcu3(fck=20.0)

print(f'εcu3 = {εcu3:.2f}‰')
εcu3 = 3.50‰

n

In [29]:
print(stress_strain.n.__doc__)


    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days

    Returns:
        float: Given using the expressions:

        .. math::
            \begin{eqnarray}
                n & = & 2.0 & for & f_{ck} \le 50MPa \\
                n & = & 1.4 + 23.4 \cdot ((90 - f_{ck})/100)^4 & for & f_{ck} \ge 50MPa
            \end{eqnarray}


In [30]:
n = stress_strain.n(fck=20.0)

print(f'n = {n:.2f}‰')
n = 2.00‰

σc_nl

In [31]:
print(stress_strain.σc_nl.__doc__)

    Stress-strain relation for non-linear structural analysis

    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days
        εc (float): concrete strain (‰)

    Returns:
        float: Given using the expression:

        .. math::
            \begin{eqnarray}
                σ_{c} & = & f_{ctm}\dfrac{kη-η^2}{1+(k-2)η} \\
                where: & \\
                η & = & \dfrac{ε_c}{ε_{c1}} \\
                k & = & 1.05\cdot E_{cm} \cdot ε_{c1} / f_{cm}
            \end{eqnarray}


In [32]:
fck_check = 20.0

εcs = np.linspace(0, stress_strain.εc1(fck_check), num=50)
σcs = stress_strain.σc_nl(fck_check, εcs)

fig, ax = plt.subplots()
line0, = ax.plot(εcs, σcs, '-', linewidth=2,
                 label='fck')
ax.legend(loc='right')
ax.grid(True)
plt.show()
../../../../_images/jupyters_codes_eurocodes_ec2_raw_ch3_concrete_50_0.png

σc_design

In [33]:
print(stress_strain.σc_design.__doc__)

    Stress-strain relations for the design of cross-sections

    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days
        αcc (float): Coefficient taking account of long term effects on the compressive strength
                     and of unfavourable effects resulting from the way the load is applied
        γc (float): Safety factor
        εc (float): concrete strain (‰)

    Returns:
        float: Given using the expression:

        .. math::
            \begin{eqnarray}
                σ_{c} & = & f_{cd}\cdot(1-(1-\dfrac{ε_c}{ε_{c2}})^n) & for & 0\le ε_c \le ε_{c2} \\
                σ_{c} & = & f_{cd} & for & ε_{c2}\le ε_c \le ε_{cu2}
            \end{eqnarray}


In [34]:
fck_check = 20.0

εcs = np.linspace(0, stress_strain.εcu2(fck_check), num=50)
vσcs = vectorize(stress_strain.σc_design)
σcs = vσcs(fck_check, 0.85, 1.5, εcs)

fig, ax = plt.subplots()
line0, = ax.plot(εcs, σcs, '-', linewidth=2,
                 label='fck')
ax.legend(loc='right')
ax.grid(True)
plt.show()
../../../../_images/jupyters_codes_eurocodes_ec2_raw_ch3_concrete_53_0.png

σc_bilin

In [35]:
print(stress_strain.σc_bilin.__doc__)


    Args:
        fck (float): Characteristic compressive cylinder strength of concrete at 28 days
        αcc (float): Coefficient taking account of long term effects on the compressive strength
                     and of unfavourable effects resulting from the way the load is applied
        γc (float): Safety factor
        εc (float): concrete strain (‰)

    Returns:
        float:


In [36]:
fck_check = 20.0

εcs = np.linspace(0, stress_strain.εcu2(fck_check), num=50)
vσcs = vectorize(stress_strain.σc_bilin)
σcs = vσcs(fck_check, 0.85, 1.5, εcs)

fig, ax = plt.subplots()
line0, = ax.plot(εcs, σcs, '-', linewidth=2,
                 label='fck')
ax.legend(loc='right')
ax.grid(True)
plt.show()
../../../../_images/jupyters_codes_eurocodes_ec2_raw_ch3_concrete_56_0.png