Skip to content

shrinkage

Shrinkage strain of EN 1992-1-1:2023 Annex B.

shrink_strain delegates to :mod:eurocodepy.ec2.time_dependent2023; the helper functions below (the individual beta and epsilon terms) are kept as they were, array-friendly, for compatibility.

draw_charts(chart_data)

Draws charts related to creep and shrinkage of concrete.

Parameters:

Name Type Description Default
chart_data dict

the data for the charts.

required
Source code in eurocodepy/ec2/sls/shrinkage.py
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
def draw_charts(chart_data):
    """
    Draws charts related to creep and shrinkage of concrete.

    Args:
        chart_data (dict): the data for the charts.
    """

    t_values = chart_data["t_values"]
    epsilon_cs_values = chart_data["epsilon_cs_values"]

    # Chart 1: Creep and shrinkage over time
    plt.figure(figsize=(10, 6))
    plt.plot(t_values, epsilon_cs_values)
    plt.xlabel("Time (days)")
    plt.ylabel("Creep and Shrinkage (x10^-6)")
    plt.title("Creep and Shrinkage Over Time")
    plt.grid(True)

generate_chart_data(fcm28, RH, hn, concrete_class, alpha_NDP_b, alpha_NDP_d)

Generates data for charts related to creep and shrinkage of concrete.

Parameters:

Name Type Description Default
fcm28 float

Mean compressive strength of concrete at 28 days (MPa).

required
RH float

Relative humidity (%).

required
hn float

Notional size of the concrete member (mm).

required
concrete_class str

Class of concrete ('CS', 'CN', or 'CR').

required
alpha_NDP_b float

Coefficient of the basic shrinkage (NDP).

required
alpha_NDP_d float

Coefficient of the drying shrinkage (NDP).

required

Returns:

Name Type Description
dict dict

the data for the charts.

Source code in eurocodepy/ec2/sls/shrinkage.py
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
def generate_chart_data(fcm28, RH, hn, concrete_class, alpha_NDP_b, alpha_NDP_d) -> dict:
    """
    Generates data for charts related to creep and shrinkage of concrete.

    Args:
        fcm28 (float): Mean compressive strength of concrete at 28 days (MPa).
        RH (float): Relative humidity (%).
        hn (float): Notional size of the concrete member (mm).
        concrete_class (str): Class of concrete ('CS', 'CN', or 'CR').
        alpha_NDP_b (float): Coefficient of the basic shrinkage (NDP).
        alpha_NDP_d (float): Coefficient of the drying shrinkage (NDP).

    Returns:
        dict: the data for the charts.
    """

    t_values = np.linspace(0, 365 * 50, 500)  # Time in days, up to 50 years
    epsilon_cs_values = []

    for t in t_values:
        epsilon_cs_values.append(shrink_strain(t, 1, fcm28, RH, hn, concrete_class, alpha_NDP_b, alpha_NDP_d))

    return {
        "t_values": t_values,
        "epsilon_cs_values": epsilon_cs_values,
    }

generate_table_data(fcm28, concrete_class, alpha_NDP_b, alpha_NDP_d)

Generates data for the table related to creep and shrinkage of concrete.

Parameters:

Name Type Description Default
fcm28 float

Mean compressive strength of concrete at 28 days (MPa).

required
concrete_class str

Class of concrete ('CS', 'CN', or 'CR').

required
alpha_NDP_b float

Coefficient of the basic shrinkage (NDP).

required
alpha_NDP_d float

Coefficient of the drying shrinkage (NDP).

required

Returns:

Name Type Description
dict dict

the data for the table.

Source code in eurocodepy/ec2/sls/shrinkage.py
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
def generate_table_data(fcm28, concrete_class, alpha_NDP_b, alpha_NDP_d) -> dict:
    """
    Generates data for the table related to creep and shrinkage of concrete.

    Args:
        fcm28 (float): Mean compressive strength of concrete at 28 days (MPa).
        concrete_class (str): Class of concrete ('CS', 'CN', or 'CR').
        alpha_NDP_b (float): Coefficient of the basic shrinkage (NDP).
        alpha_NDP_d (float): Coefficient of the drying shrinkage (NDP).

    Returns:
        dict: the data for the table.
    """

    RH_values = [50, 65, 80]
    t_values = [365]  # You specified t = 365 days
    hn_values = [100, 300, 500, 700, 1000]
    table_data = {}

    for RH in RH_values:
        table_data[RH] = {}
        for hn in hn_values:
            epsilon_cs_values = []
            for t in t_values:
                epsilon_cs_values.append(shrink_strain(t, 1, fcm28, RH, hn, concrete_class, alpha_NDP_b, alpha_NDP_d)*1000.0)
            table_data[RH][hn] = epsilon_cs_values * 1000

    return table_data

print_table(table_data)

Prints the table related to creep and shrinkage of concrete.

Parameters:

Name Type Description Default
table_data dict

the data for the table.

required
Source code in eurocodepy/ec2/sls/shrinkage.py
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
def print_table(table_data):
    """
    Prints the table related to creep and shrinkage of concrete.

    Args:
        table_data (dict): the data for the table.
    """

    RH_values = sorted(table_data.keys())
    hn_values = sorted(table_data[RH_values[0]].keys())

    # Print header row
    print("RH \\ hn\t", end="")
    for hn in hn_values:
        print(f"{hn}\t", end="")
    print()

    # Print data rows
    for RH in RH_values:
        print(f"{RH}\t", end="")
        for hn in hn_values:
            print(f"{table_data[RH][hn][0]:.2f}\t", end="")  # Assuming one t value
        print()

shrink_strain(t, ts, fcm28, RH, hn, concrete_class, alpha_NDP_b, alpha_NDP_d)

Total shrinkage strain eps_cs(t, ts) = eps_cbs(t) + eps_cds(t - ts), Eq. (B.23).

Basic shrinkage (Eqs. B.24, B.26, B.27) and drying shrinkage (Eqs. B.25, B.28-B.33) of EN 1992-1-1:2023 Annex B: it is :func:eurocodepy.ec2.time_dependent2023.shrinkage_total (which also has the rest of Annex B), so the arguments are validated (RH 20-100 %, 12 <= fck <= 100 MPa, t >= ts, class CS, CN or CR) and t, ts, fcm28, RH and hn may be arrays.

Parameters:

Name Type Description Default
t float | ndarray

age of the concrete [days].

required
ts float | ndarray

age at the beginning of drying [days].

required
fcm28 float | ndarray

mean compressive strength at 28 days [MPa].

required
RH float | ndarray

relative humidity [%] (20 to 100).

required
hn float | ndarray

notional size 2*Ac/u [mm].

required
concrete_class str

strength development class, "CS", "CN" or "CR" (anything else is an error).

required
alpha_NDP_b float

coefficient of the basic shrinkage, 1.0 unless the National Annex says otherwise.

required
alpha_NDP_d float

coefficient of the drying shrinkage, 1.0 unless the National Annex says otherwise.

required

Returns:

Type Description
float | ndarray

float | numpy.ndarray: the total shrinkage strain (positive = shortening, dimensionless).

Source code in eurocodepy/ec2/sls/shrinkage.py
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
def shrink_strain(t, ts, fcm28, RH, hn, concrete_class, alpha_NDP_b, alpha_NDP_d) -> "float | numpy.ndarray":
    """Total shrinkage strain ``eps_cs(t, ts) = eps_cbs(t) + eps_cds(t - ts)``, Eq. (B.23).

    Basic shrinkage (Eqs. B.24, B.26, B.27) and drying shrinkage (Eqs. B.25, B.28-B.33) of
    EN 1992-1-1:2023 Annex B: it is :func:`eurocodepy.ec2.time_dependent2023.shrinkage_total`
    (which also has the rest of Annex B), so the arguments are validated (RH 20-100 %,
    12 <= fck <= 100 MPa, t >= ts, class CS, CN or CR) and ``t``, ``ts``, ``fcm28``, ``RH`` and ``hn``
    may be arrays.

    Args:
        t (float | numpy.ndarray): age of the concrete [days].
        ts (float | numpy.ndarray): age at the beginning of drying [days].
        fcm28 (float | numpy.ndarray): mean compressive strength at 28 days [MPa].
        RH (float | numpy.ndarray): relative humidity [%] (20 to 100).
        hn (float | numpy.ndarray): notional size 2*Ac/u [mm].
        concrete_class (str): strength development class, "CS", "CN" or "CR" (anything else is an error).
        alpha_NDP_b (float): coefficient of the basic shrinkage, 1.0 unless the National Annex says otherwise.
        alpha_NDP_d (float): coefficient of the drying shrinkage, 1.0 unless the National Annex says otherwise.

    Returns:
        float | numpy.ndarray: the total shrinkage strain (positive = shortening, dimensionless).
    """
    from eurocodepy.ec2.time_dependent2023 import shrinkage_total
    return shrinkage_total(t, ts, fcm28, RH, hn, concrete_class,
                           alpha_ndp_b=alpha_NDP_b, alpha_ndp_d=alpha_NDP_d)