Skip to content

shrinkage

draw_charts(chart_data)

Draws charts related to creep and shrinkage of concrete.

Parameters:

Name Type Description Default
chart_data

A dictionary containing the data for the charts.

required
Source code in eurocodepy/ec2/sls/shrinkage.py
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
def draw_charts(chart_data):
    """
    Draws charts related to creep and shrinkage of concrete.

    Args:
        chart_data: A dictionary containing 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

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

required
RH

Relative humidity (%).

required
hn

Notional size of the concrete member (mm).

required
concrete_class

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

required
alpha_NDP_b

Coefficient depending on type of cement.

required
alpha_NDP_d

Coefficient depending on type of cement.

required

Returns:

Type Description

A dictionary containing the data for the charts.

Source code in eurocodepy/ec2/sls/shrinkage.py
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
def 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.

    Args:
        fcm28: Characteristic compressive strength of concrete at 28 days (MPa).
        RH: Relative humidity (%).
        hn: Notional size of the concrete member (mm).
        concrete_class: Class of concrete ('CS', 'CN', or 'CR').
        alpha_NDP_b: Coefficient depending on type of cement.
        alpha_NDP_d: Coefficient depending on type of cement.

    Returns:
        A dictionary containing 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

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

required
concrete_class

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

required
alpha_NDP_b

Coefficient depending on type of cement.

required
alpha_NDP_d

Coefficient depending on type of cement.

required

Returns:

Type Description

A dictionary containing the data for the table.

Source code in eurocodepy/ec2/sls/shrinkage.py
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
def generate_table_data(fcm28, concrete_class, alpha_NDP_b, alpha_NDP_d):
    """
    Generates data for the table related to creep and shrinkage of concrete.

    Args:
        fcm28: Characteristic compressive strength of concrete at 28 days (MPa).
        concrete_class: Class of concrete ('CS', 'CN', or 'CR').
        alpha_NDP_b: Coefficient depending on type of cement.
        alpha_NDP_d: Coefficient depending on type of cement.

    Returns:
        A dictionary containing 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

A dictionary containing the data for the table.

required
Source code in eurocodepy/ec2/sls/shrinkage.py
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
def print_table(table_data):
    """
    Prints the table related to creep and shrinkage of concrete.

    Args:
        table_data: A dictionary containing 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)

Calculates the total shrinkage and creep strain of concrete based on time, initial time, concrete compressive strength, relative humidity, effective height, concrete class, and coefficients for cement type. This function computes the total strain by combining the basic creep strain and drying shrinkage strain, adjusted for the initial time and temperature. The basic creep strain is calculated using the concrete compressive strength and the coefficients for the concrete class. The drying shrinkage strain is calculated using the relative humidity, effective height, and coefficients for the concrete class. The function returns the total strain as a float value. Uses EN1992-1:2025.

Parameters:

Name Type Description Default
t _type_

description

required
ts _type_

description

required
fcm28 _type_

description

required
RH _type_

description

required
hn _type_

description

required
concrete_class _type_

description

required
alpha_NDP_b _type_

description

required
alpha_NDP_d _type_

description

required

Returns:

Name Type Description
_type_

description

Source code in eurocodepy/ec2/sls/shrinkage.py
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
def shrink_strain(t, ts, fcm28, RH, hn, concrete_class, alpha_NDP_b, alpha_NDP_d):
    """Calculates the total shrinkage and creep strain of concrete based on time, initial time, concrete compressive strength, relative humidity, effective height, concrete class, and coefficients for cement type.
    This function computes the total strain by combining the basic creep strain and drying shrinkage strain, adjusted for the initial time and temperature.
    The basic creep strain is calculated using the concrete compressive strength and the coefficients for the concrete class.
    The drying shrinkage strain is calculated using the relative humidity, effective height, and coefficients for the concrete class.
    The function returns the total strain as a float value. Uses EN1992-1:2025.

    Args:
        t (_type_): _description_
        ts (_type_): _description_
        fcm28 (_type_): _description_
        RH (_type_): _description_
        hn (_type_): _description_
        concrete_class (_type_): _description_
        alpha_NDP_b (_type_): _description_
        alpha_NDP_d (_type_): _description_

    Returns:
        _type_: _description_
    """
    alpha_bs, alpha_ds = get_alpha_bs_ds(concrete_class)
    return epsilon_cbs(t, fcm28, alpha_bs, alpha_NDP_b) + epsilon_cds(t, ts, fcm28, RH, hn, alpha_ds, alpha_NDP_d)