Crack width calculations

The following functions are related to calculating crack widths.

Crack width criterion

structuralcodes.codes.ec2_2004.w_max(exposure_class: Literal['X0', 'XC1', 'XC2', 'XC3', 'XC4', 'XD1', 'XD2', 'XS1', 'XS2', 'XS3'], load_combination: Literal['f', 'qp']) float[source]

Computes the recommended value of the maximum crack width.

EUROCODE 2 1992-1-1:2004, Table (7.1N).

Parameters:
  • exposure_class (str) – The exposure class. Possible values: X0, XC1, XC2, XC3, XC4, XD1, XD2, XS1, XS2, XS3.

  • load_combination (str) – The characteristic of the load combination. Frequent (f), or quasi-permanent (qp).

Returns:

The maximum recommended value for the crack width wmax in mm.

Return type:

float

Raises:

ValueError – if not valid exposure_class or load_combination values.

Calculated crack width

structuralcodes.codes.ec2_2004.wk(sr_max: float, eps_sm_eps_cm: float) float[source]

Computes the crack width.

EUROCODE 2 1992-1-1:2004, Eq. (7.8).

Parameters:
  • sr_max (float) – The maximum crack length spacing in mm.

  • eps_sm_eps_cm (float) – the difference between the mean strain in the reinforcement under relevant combination of loads, including the effect of imposed deformations and taking into account tension stiffening and the mean strain in the concrete between cracks.

Returns:

Crack width in mm.

Return type:

float

Raises:

ValueError – If any of sr_max or esm_ecm is less than zero.

structuralcodes.codes.ec2_2004.sr_max_close(c: float, phi: float, rho_p_eff: float, k1: float, k2: float, k3: float | None = None, k4: float | None = None) float[source]

Computes the maximum crack spacing in cases where bonded reinforcement is fixed at reasonably close centres within the tension zone (w_spacing<=5(c+phi/2)).

EUROCODE 2 1992-1-1:2004, Eq. (7.11).

Parameters:
  • c (float) – Is the cover in mm of the longitudinal reinforcement.

  • phi (float) – Is the bar diameter in mm. Where mixed bar diameters used, then it should be replaced for an equivalent bar diameter.

  • rho_p_eff (float) – Effective bond ratio between areas given by Eq. (7.10).

  • k1 (float) – Coefficient that takes into account the bound properties of the bonded reinforcement.

  • k2 (float) – Coefficient that takes into account the distribution of of the strain.

Keyword Arguments:
  • k3 (float, optional) – Coefficient from the National Annex. If not specified then k3=3.4.

  • k4 (float) – Coefficient from the National Annex. If not specified then k4=0.425.

Returns:

The maximum crack spaing in mm.

Return type:

float

Raises:
  • ValueError – If one or more of c, phi, rho_p_eff, k3 or k4 is lower than zero.

  • ValueError – If k1 is not 0.8 or 1.6.

  • ValueError – If k2 is not between 0.5 and 1.0.

structuralcodes.codes.ec2_2004.sr_max_far(h: float, x: float) float[source]

Computes the maximum crack spacing in cases where bonded reinforcement exceeds (w_spacing>5(c+phi/2)) or where there is no bonded reinforcement at all.

EUROCODE 2 1992-1-1:2004, Eq. (7.14).

Parameters:
  • h (float) – Total depth of the beam in mm.

  • x (float) – Distance to non tension area of the element mm.

Returns:

Maximum crack spacing in mm.

Return type:

float

Raises:
  • ValueError – If one of h or x is less than zero.

  • ValueError – If x is greater than h.

structuralcodes.codes.ec2_2004.sr_max_theta(sr_max_y: float, sr_max_z: float, theta: float) float[source]

Computes the crack spacing sr_max when there is an angle between the angle of principal stress and the direction of the reinforcement, for members in two orthogonal directions, that is significant (> 15 degrees).

EUROCODE 2 1992-1-1:2004, Eq. (7.15).

Parameters:
  • sr_max_y (float) – Crack spacing in mm in the y-direction.

  • sr_max_z (float) – Crack spacing in mm in the z-direction.

  • theta (float) – Angle in radians between the reinforcement in the y-direction and the direction of the principal tensile stress.

Returns:

The crack spacing in mm.

Return type:

float

Raises:
  • ValueError – If sr_max_y or sr_max_z is negative.

  • ValueError – If theta is not between 0 and pi/2.

structuralcodes.codes.ec2_2004.eps_sm_eps_cm(sigma_s: float, alpha_e: float, rho_p_eff: float, kt: float, fct_eff: float, Es: float) float[source]

Returns the strain difference (epsilon_sm - epsilon_cm) needed to compute the crack width. esm is the mean strain in the reinforcement under the relevant combination of loads of imposed deformations and taking into account the effects of tension stiffening. Only the additional tensile strain beyond the state of zero strain of the concrete is considered. epsilon_cm is the mean strain in the concrete between the cracks.

EUROCODE 2 1992-1-1:2004, Eq. (7.9).

Parameters:
  • sigma_s (float) – Is the stress in MPa in the tension reinforcement assuming a cracked section. For pretensioned members, s_steel may be replaced by increment of s_steel stress variation in prestressing tendons from the state of zero strain of the concrete at the same level.

  • alpha_e (float) – Is the ratio Es/Ecm.

  • rho_p_eff (float) – Effective bond ratio between areas given by Eq. (7.10).

  • kt (float) – Is a factor dependent on the load duration.

  • fct_eff (float) – Is the mean value of the tensile strength in MPa of the concrete effective at the time when the cracks may first be expected to occur: fct_eff=fctm or fctm(t) if crack is expected earlier than 28 days.

  • Es (float) – Steel elastic modulus in MPa.

Returns:

The strain difference between concrete and steel.

Return type:

float

Raises:
  • ValueError – If any sigma_s, alpha_e, rho_p_eff, fct_eff or Es is less than 0.

  • ValueError – if kt is not 0.6 and not 0.4.

structuralcodes.codes.ec2_2004.alpha_e(Es: float, Ecm: float) float[source]

Compute the ratio between the steel and mean concrete elastic modules.

EUROCODE 2 1992-1-1:2004, Section 7.3.4-2

Parameters:
  • Es (float) – Steel elastic modulus in MPa.

  • Ecm (float) – Concrete mean elastic modulus in MPa.

Returns:

Ratio between modules.

Return type:

float

Raises:

ValueError – If any of es or ecm is lower than 0.

structuralcodes.codes.ec2_2004.hc_eff(h: float, d: float, x: float) float[source]

Returns the effective height of concrete in tension surrounding the reinforcement or prestressing tendons.

EUROCODE 2 1992-1-1:2004, Section (7.3.2-3).

Parameters:
  • h (float) – total depth of the element in mm.

  • d (float) – distance in mm to the level of the steel centroid.

  • x (float) – distance in mm to the zero tensile stress line.

Returns:

The effective height in mm.

Return type:

float

Raises:
  • ValueError – If any of h, d or x is lower than zero.

  • ValueError – If d is greater than h.

  • ValueError – If x is greater than h.

structuralcodes.codes.ec2_2004.k(h: float) float[source]

Is the coefficient which allow for the effect of non-uniform self-equilibrating stresses, which lead to a reduction of restraint forces. k=1 for webs w<=300mm or flanges widths less than 300mm k=0.65 for webs w>=800mm or flanges with widths greater than 800mm.

EUROCODE 2 1992-1-1:2004, Eq. (7.1).

Parameters:

h (float) – flange length or flange width in mm

Returns:

k coefficient value.

Return type:

float

Raises:

ValueError – if h is less than 0

structuralcodes.codes.ec2_2004.k1(bond_type: Literal['bond', 'plain']) float[source]

Get the k1 coefficient which takes account of the bond properties of the bounded reinforcement.

EUROCODE 2 1992-1-1:2004, Eq. (7.11-k1).

Parameters:

bond_type (str) – The bond property of the reinforcement. High bond bars (bond), or bars with an effectively plain surface (plain).

Returns:

Value of the k1 coefficient.

Return type:

float

Raises:
  • ValueError – If bond_type is neither ‘bond’ nor ‘plain’.

  • TypeError – If bond_type is not an str.

structuralcodes.codes.ec2_2004.k2(eps_r: float) float[source]

Computes a coeff. which takes into account the distribution of strain.

EUROCODE 2 1992-1-1:2004, Eq. (7.13).

Parameters:

eps_r (float) – ratio epsilon_2/epsilon_1 where epsilon_1 is the greater and epsilon_2 is the lesser strain at the boundaries of the section considered, assessed on the basis of a cracked section. epsilon_r=0 for bending and epsilon_r=1 for pure tension.

Returns:

The k2 coefficient value.

Return type:

float

Raises:

ValueError – If eps_r is not between 0 and 1.

structuralcodes.codes.ec2_2004.k3()[source]

Returns the k3 coefficient for computing sr_max.

Returns:

Value for the coefficient.

Return type:

float

structuralcodes.codes.ec2_2004.k4()[source]

Returns the k4 coefficient for computing sr_max.

Returns:

Value for the coefficient.

Return type:

float

structuralcodes.codes.ec2_2004.kc_tension() float[source]

Computes the coefficient which takes account of the stress distribution within the section immediately prior to cracking and the change of the lever arm in pure tension.

EUROCODE 2 1992-1-1:2004, Eq. (7.1).

Returns:

Value of the kc coefficient in pure tension.

Return type:

float

structuralcodes.codes.ec2_2004.kc_rect_area(h: float, b: float, fct_eff: float, N_ed: float) float[source]

Computes the coefficient which takes account of the stress distribution within the section immediately prior to cracking and the change of the lever arm for bending+axial combination in rectangular sections and webs of box sections and T-sections.

EUROCODE 2 1992-1-1:2004, Eq. (7.2).

Parameters:
  • h (float) – heigth of the element in mm

  • b (float) – width of the element in mm

  • fct_eff (float) – is the mean value of the tensile strength in MPa of the concrete effective at the time when the cracks may first be expected to occur: fct,eff=fct or lower (fct(t)), is cracking is expected earlier than 28 days.

  • N_ed (str) – axial force at the serviceability limit state acting on the part of the cross-section under consideration (compressive force positive). n_ed should be determined considering the characteristic values of prestress and axial forces under the relevant combination of actions.

Returns:

Value of the kc coefficient.

Return type:

float

Raises:

ValueError – If h or b are less than 0.

structuralcodes.codes.ec2_2004.kc_flanges_area(f_cr: float, A_ct: float, fct_eff: float) float[source]

Computes the coefficient which takes account of the stress distribution within the section immediately prior to cracking and the change of the lever arm for bending+axial combination in rectangular sections for flanges of box sections and T-sections.

EUROCODE 2 1992-1-1:2004, Eq. (7.3).

Parameters:
  • f_cr – is the absolute value in kN of the tensile force within the flange immediately prior to cracking due to cracking moment calculated with fct,eff.

  • A_ct (float) – is the area of concrete within the tensile zone in mm2. The tensile zone is that part of the section which is calculated to be in tension just before the formation of the first crack.

  • fct_eff (float) – is the mean value of the tensile strength in MPa of the concrete effective at the time when the cracks may first be expected to occur: fct,eff=fct or lower (fct(t)), is cracking is expected earlier than 28 days.

Returns:

Value of the kc coefficient.

Return type:

float

Raises:

ValueError – If A_ct is less than 0mm2.

structuralcodes.codes.ec2_2004.xi1(xi: float, phi_p: float, phi_s: float) float[source]

Computes the adjusted ratio of bond strength taking into account the different diameters of prestressing and reinforcing steel.

EUROCODE 2 1992-1-1:2004, Eq. (7.5).

Parameters:
  • xi (float) – ratio of bond strength of prestressing and reinforcing steel, according to Table 6.2 in 6.8.2.

  • phi_p (float) – largest bar diameter in mm of reinforcing steel. Equal to 0 if only prestressing is used in control cracking.

  • phi_s (float) – equivalent diameter in mm of tendon acoording to 6.8.2.

Returns:

With the value of the ratio.

Return type:

float

Raises:

ValueError – If diameters phi_s or phi_p are lower than 0. If ratio of bond strength xi is less than 0.15 or larger than 0.8.

structuralcodes.codes.ec2_2004.rho_p_eff(As: float, xi1: float, Ap: float, Ac_eff: float) float[source]

Effective bond ratio between areas.

EUROCODE 2 1992-1-1:2004, Eq. (7.10).

Parameters:
  • As (float) – Steel area in mm2.

  • xi1 (float) – The adjusted ratio of bond according to expression (7.5).

  • Ap (float) – The area in mm2 of post-tensioned tendons in ac_eff.

  • Ac_eff (float) – Effective area of concrete in tension surrounding the reinforcement or prestressing tendons of depth hc_eff.

Returns:

With the retio between areas.

Return type:

float

Raises:

ValueError – If any of As, xi1, Ap or Ac_eff is less than 0.

structuralcodes.codes.ec2_2004.phi_eq(n1: int, n2: int, phi1: float, phi2: float) float[source]

Computes the equivalent diameter. For a section with n1 bars of diameter phi1 and n2 bars of diameter phi2.

EUROCODE 2 1992-1-1:2004, Sect. (7.12).

Parameters:
  • n1 (int) – Number of bars with diameter phi1.

  • n2 (int) – Number of bars with diameter phi2.

  • phi1 (float) – Diameter of n1 bars in mm.

  • phi2 (float) – Diamater of n2 bars in mm.

Returns:

The equivalent diameter in mm.

Return type:

float

Raises:
  • ValueError – If any of n1 or n2 is less than 0.

  • ValueError – If any of phi1 or phi2 is less than 0.

  • TypeError – If any of n1 or n2 is not an integer.

structuralcodes.codes.ec2_2004.kt(load_type: Literal['short', 'long']) float[source]

Returns the kt factor dependent on the load duration for the crack width calculation.

Parameters:

load_type (str) – The load type, ‘short’ for term loading, ‘long’ for long term loading.

Returns:

With the kt factor.

Return type:

float

Raises:

ValueError – If load_type is not ‘short’ and not ‘long’.

structuralcodes.codes.ec2_2004.w_spacing(c: float, phi: float) float[source]

Computes the distance threshold from which the maximum crack spacing is constant.

EUROCODE 2 1992-1-1:2004, Sect. (7.3.4-3).

Parameters:
  • c (float) – Cover of the longitudinal reinforcement in mm.

  • phi (float) – Is the bar diameter in mm. Where mixed bar diameters used, then it should be replaced for an equivalent bar diameter.

Returns:

Threshold distance in mm.

Return type:

float

Raises:

ValueError – If any of c or phi is less than 0.

Minimum reinforcement

structuralcodes.codes.ec2_2004.As_min(A_ct: float, sigma_s: float, fct_eff: float, k: float, kc: float) float[source]

Computes the minimum area of reinforcing steel within the tensile zone for control of cracking areas.

EUROCODE 2 1992-1-1:2004, Eq. (7.1).

Parameters:
  • A_ct (float) – is the area of concrete within the tensile zone in mm2. The tensile zone is that part of the section which is calculated to be in tension just before the formation of the first crack.

  • sigma_s (float) – is the absolute value of the maximum stress in MPa permitted in the reinforcement immediately after the formation of the crack. This may be taken as theyield strength of the reinforcement, fyk. A lower value may, however, be needed to satisfy the crack width limits according to the maximum bar size of spacing (see 7.3.3 (2)).

  • fct_eff (float) – is the mean value of the tensile strength in MPa of the concrete effective at the time when the cracks may first be expected to occur: fct,eff=fct or lower (fct(t)), is cracking is expected earlier than 28 days.

  • k (float) – is the coefficient which allow for the effect of non-uniform self-equilibrating stresses, which lead to a reduction of restraint forces. k=1 for webs w<=300mm or flanges widths less than 300mm k=0.65 for webs w>=800mm or flanges with widths greater than 800mm Intermediate values may be interpolated.

  • kc (float) – is a coefficient which takes account of the stress distribution within the section immediately prior to cracking and the change of the lever arm.

Returns:

The minimum area of reinforcing steel within the tensile zone in mm2.

Return type:

float

Raises:

ValueError – if k value is not between 0.65 and 1 or kc is not larger than 0 and lower than 1.

structuralcodes.codes.ec2_2004.As_min_p(A_ct: float, sigma_s: float, fct_eff: float, k: float, kc: float, Ap: float, phi_s: float, phi_p: float, xi: float, delta_s: float) float[source]

Computes the minimum area of reinforcing steel within the tensile zone for control of cracking areas in addition with bonded tendons.

EUROCODE 2 1992-1-1:2004, Eq. (7.1).

Parameters:
  • A_ct (float) – is the area of concrete within the tensile zone in mm2. The tensile zone is that part of the section which is calculated to be in tension just before the formation of the first crack.

  • sigma_s (float) – is the absolute value of the maximum stress in MPa permitted in the reinforcement immediately after the formation of the crack. This may be taken as the yield strength of the reinforcement, fyk. A lower value may, however, be needed to satisfy the crack width limits according to the maximum bar size of spacing (see 7.3.3 (2)).

  • fct_eff (float) – is the mean value of the tensile strength in MPa of the concrete effective at the time when the cracks may first be expected to occur: fct,eff=fct or lower (fct(t)), is cracking is expected earlier than 28 days.

  • k (float) – is the coefficient which allow for the effect of non- uniform self-equilibrating stresses, which lead to a reduction of restraint forces. k=1 for webs w<=300mm or flanges widths less than 300mm. k=0.65 for webs w>=800mm or flanges with widths greater than 800mm. Intermediate values may be interpolated.

  • kc (float) – is a coefficient which takes account of the stress distribution within the section immediately prior to cracking and the change of the lever arm.

  • Ap (float) – is the area in mm2 of pre or post-tensioned tendons within ac_eff.

  • phi_s (float) – largest bar diameter in mm of reinforcing steel. Equal to 0 if only prestressing is used in control cracking.

  • phi_p (float) – equivalent diameter in mm of tendon according to 6.8.2.

  • xi (float) – ratio of bond strength of prestressing and reinforcing steel, according to Table 6.2 in 6.8.2.

  • delta_s (float) – stress variation in MPa in prestressing tendons from the state of zero strain of the concrete at the same level.

Returns:

The minimm area of reinforcing steel within the tensile zone in mm2.

Return type:

float

Raises:
  • ValueError – If k value is not between 0.65 and 1 or kc is not larger

  • than 0 and lower than 1. If diameters phi_s or phi_p are lower than 0.

  • If ratio of bond xi strength is less than 0.15 or larger than 0.8. If

  • stress variation incr_stress is less than 0.

structuralcodes.codes.ec2_2004.As_min_2(wk: float, sigma_s: float, fct_eff: float, h_cr: float, h: float, d: float, delta_s: float = 0, kc: float | None = None) Tuple[float, float][source]

Computes the minimum area of reinforcing steel within the tensile zone for control of cracking areas.

EUROCODE 2 1992-1-1:2004, Table (7.2N), Table (7.3N).

Parameters:
  • wk (float) – the characteristic crack width value in mm.

  • sigma_s (float) – the steel stress value in MPa under the relevant combination of actions.

  • fct_eff (float) – is the mean value of the tensile strength in MPa of the concrete effective at the time when the cracks may first be expected to occur: fct,eff=fct or lower (fct(t)), is cracking is expected earlier than 28 days.

  • h_cr (float) – is the depth of the tensile zone immediately prior to cracking, considering the characteristic values of prestress and axial forces under the quasi-permanent combination of actions.

  • h (float) – the overall depth of the section in mm.

  • d (float) – is the effective depth to the centroid of the outer layer of the reinforcement.

Keyword Arguments:
  • delta_s (float, optional) – value of prestressed stress in MPa if applicable.

  • kc (float, optional) – is a coefficient which takes account of the stress distribution within the section immediately prior to cracking and the change of the lever arm in a bending section. None for pure tensile uniform axial section.

Returns:

With the value of the maximum bar diameters in mm in the first position and the maximum bar spacing in mm in the second position.

Return type:

tuple(float, float)

Raises:
  • ValueError – If wk, fct_eff, h_cr, h or d are less than 0.

  • ValueError – If kc is not between 0 and 1.

  • ValueError – If combination of wk and stress values are out of scope.