3Contains class definitions for strain profiles and cracks.
12from fosanalysis
import utils
13from fosanalysis
import preprocessing
14from fosanalysis
import compensation
18from .
import separation
22 Hold the strain data and methods to identify cracks and calculate the crack widths.
23 The crack widths are calculated with the general equation:
25 w_{\mathrm{cr},i} = \int_{l_{\mathrm{eff,l},i}}^{l_{\mathrm{eff,r},i}}
26 \varepsilon^{\mathrm{DOFS}}(x)
27 - \varepsilon^{\mathrm{ts}}(x)
28 - \varepsilon^{\mathrm{shrink}}(x)
32 - \f$\varepsilon^{\mathrm{DOFS}}(x)\f$ the strain values (\ref strain) for the positional data \f$x\f$ (\ref x),
33 - \f$\varepsilon^{\mathrm{ts}}(x)\f$ tension stiffening values (\ref tension_stiffening_values), calculated by \ref ts_compensator,
34 - \f$\varepsilon^{\mathrm{shrink}}(x)\f$ shrink and creep compensation values (\ref shrink_calibration_values), calculated by \ref shrink_compensator.
35 - left \f$l_{\mathrm{eff,l},i}\f$ and right \f$l_{\mathrm{eff,r},i}\f$ limit of the effective length of the \f$i\f$th crack, estimated by \ref lengthsplitter
40 strain_inst: np.array =
None,
43 lengthsplitter =
None,
45 shrink_compensator =
None,
46 suppress_compression: bool =
True,
47 ts_compensator =
None,
50 Constructs a strain profile object.
51 \param x \copybrief x For more, see \ref x.
52 \param strain \copybrief strain For more, see \ref strain.
53 \param strain_inst \copybrief strain_inst For more, see \ref strain_inst.
54 \param crackfinder \copybrief crackfinder For more, see \ref crackfinder.
55 \param integrator \copybrief integrator For more, see \ref integrator.
56 \param lengthsplitter \copybrief lengthsplitter For more, see \ref lengthsplitter.
57 \param name \copybrief name For more, see \ref name.
58 \param shrink_compensator \copybrief shrink_compensator For more, see \ref shrink_compensator.
59 \param suppress_compression \copybrief suppress_compression For more, see \ref suppress_compression.
60 \param ts_compensator \copybrief ts_compensator For more, see \ref ts_compensator.
61 \param *args Additional positional arguments, will be passed to the superconstructor.
62 \param **kwargs Additional keyword arguments, will be passed to the superconstructor.
110 Resetting several attributes to it's original state before any calculations.
113 - \ref shrink_calibration_values
114 - \ref tension_stiffening_values
121 Returns the crack widths.
122 The following is done:
123 1. Find the crack positions, see \ref find_cracks().
124 2. Find the effective lengths of the crack, see \ref set_lt().
125 3. Shrinking/creep is taken into account, see \ref compensate_shrink().
126 4. Taking tension stiffening (subtraction of triangular areas) into account, see \ref calculate_tension_stiffening().
127 5. For each crack segment, the crack width is calculated by integrating the strain using fosdata.integrate_segment().
129 \param clean Switch, whether the all data should be cleaned using \ref clean_data() before carrying out any calculation.
132 \return Returns a \ref cracks.CrackList.
151 x_seg, y_seg = utils.cropping.cropping(self.
x,
156 crack.width = self.
integrator.integrate_segment(x_seg, y_seg)
160 Identify cracks, settings are stored in \ref crackfinder.
166 Estimate transfer length to \ref crack_list, settings are stored in \ref lengthsplitter.
167 If \ref crack_list is empty, \ref find_cracks() is carried out beforehand.
175 Calculate the shrink influence of the concrete and store it in \ref shrink_calibration_values.
176 It is required to provide the following attributes:
180 - \ref shrink_compensator is not `None`
185 raise RuntimeError(
"Something went wrong while attempting to calculate shrink compensation.")
190 Compensates for the strain, that does not contribute to a crack, but is located in the uncracked concrete.
191 \return An array with the compensation values for each measuring point is returned.
198 raise RuntimeError(
"Something went wrong while attempting to calculate tension stiffening compensation.")
202 *cracks_tuple: tuple,
203 recalculate: bool =
True,
206 Use this function to manually add a crack to \ref crack_list at the closest measuring point to `x` after an intial crack identification.
207 It assumes, that \ref find_cracks() is run beforehand at least once.
208 Afterwards, \ref set_lt() and \ref calculate_crack_widths() is run, if `recalculate` is set to `True`.
209 \param cracks_tuple Any number of \ref cracks.Crack objects or numbers (mix is allowed).
210 In case of a number, it is assumed to be the (approximate) position of the crack. The added \ref cracks.Crack object will be put at the closest entry of \ref x.
211 In case of a \ref cracks.Crack object (e.g. imported from another \ref StrainProfile), a copy is placed at the closest measuring of \ref x to \ref cracks.Crack.location.
212 \param recalculate Switch, whether all crack should be updated after the insertion, defaults to `True`.
213 Set to `False`, if you want to suppress a recalculation, until you are finished with modifying \ref crack_list.
217 for crack
in cracks_tuple:
219 crack = copy.deepcopy(crack)
220 index, x_pos = utils.misc.find_closest_value(self.
x, crack.location)
222 crack.location = x_pos
223 crack.max_strain=self.
strain[index]
224 crack.x_l = crack.x_l
if crack.x_l
is not None and crack.x_l < crack.location
else None
225 crack.x_r = crack.x_r
if crack.x_r
is not None and crack.x_r > crack.location
else None
227 index, x_pos = utils.misc.find_closest_value(self.
x, crack)
230 max_strain=self.
strain[index],
237 *cracks_tuple: tuple,
238 recalculate: bool =
True,
241 Use this function to manually delete cracks from \ref crack_list, that were wrongfully identified automatically by \ref find_cracks().
242 After the deletion, \ref set_lt() and \ref calculate_crack_widths() is run, if `recalculate` is set to `True`.
243 \param cracks_tuple Any number of integers (list indexes) of the cracks that should be deleted.
244 \param recalculate Switch, whether all crack should be updated after the insertion, defaults to `True`.
245 \return Returns a \ref cracks.CrackList of the deleted \ref cracks.Crack objects.
258 The strain profile is assumed to be from a sensor embedded directly in the concrete.
259 The crack width calculation is carried out according to \cite Fischer_2019_Distributedfiberoptic.
260 The tension stiffening component \f$\varepsilon^{\mathrm{TS}}\f$ is provided by \ref compensation.tensionstiffening.Fischer.
265 Constructs a strain profile object, of a sensor embedded in concrete.
266 \param *args Additional positional arguments, will be passed to \ref StrainProfile.__init__().
267 \param **kwargs Additional keyword arguments, will be passed to \ref StrainProfile.__init__().
272 default_values.update(kwargs)
273 super().
__init__(*args, **default_values)
277 The strain profile is assumed to be from a sensor attached to a reinforcement rebar.
278 The crack width calculation is carried out according to \cite Berrocal_2021_Crackmonitoringin.
279 The tension stiffening component \f$\varepsilon^{\mathrm{TS}}\f$ is provided by \ref compensation.tensionstiffening.Berrocal.
280 using the following calculation:
282 \omega{}_{\mathrm{cr},i} = \int_{l_{\mathrm{eff,l},i}}^{l_{\mathrm{eff,r},i}} \varepsilon^{\mathrm{DOFS}}(x) - \rho \alpha \left(\hat{\varepsilon}(x) - \varepsilon^{\mathrm{DOFS}}(x)\right) \mathrm{d}x
284 Where \f$ \omega{}_{\mathrm{cr},i} \f$ is the \f$i\f$th crack and
285 - \f$ \varepsilon^{\mathrm{DOFS}}(x) \f$ is the strain reported by the sensor,
286 - \f$ \hat{\varepsilon}(x) \f$ the linear interpolation of the strain between crack positions,
287 - \f$ \alpha \f$: \copydoc compensation.tensionstiffening.Berrocal.alpha
288 - \f$ \rho \f$: \copydoc compensation.tensionstiffening.Berrocal.rho
295 Constructs a strain profile object, of a sensor attached to a reinforcement rebar.
296 \param alpha \copybrief compensation.tensionstiffening.Berrocal.alpha For more, see \ref compensation.tensionstiffening.Berrocal.alpha.
297 \param rho \copybrief compensation.tensionstiffening.Berrocal.rho For more, see \ref compensation.tensionstiffening.Berrocal.rho.
298 \param *args Additional positional arguments, will be passed to \ref StrainProfile.__init__().
299 \param **kwargs Additional keyword arguments, will be passed to \ref StrainProfile.__init__().
304 default_values.update(kwargs)
305 super().
__init__(*args, **default_values)
Implements the tension stiffening approach according to the proposal by berrocal_2021_crackmonitoring...
Implements the tension stiffening approach based on fischer_2019_distributedfiberoptic.
A Crack object presents a crack in concrete with its properties.
Object to identify potential crack positions.
Assigns the transfer length to a all cracks.Crack objects in a cracks.CrackList.
The strain profile is assumed to be from a sensor embedded directly in the concrete.
__init__(self, *args, **kwargs)
Constructs a strain profile object, of a sensor embedded in concrete.
The strain profile is assumed to be from a sensor attached to a reinforcement rebar.
__init__(self, float alpha, float rho, *args, **kwargs)
Constructs a strain profile object, of a sensor attached to a reinforcement rebar.
rho
Reinforcement ratio of steel to concrete .
alpha
Ratio of Young's moduli of steel to concrete .
Hold the strain data and methods to identify cracks and calculate the crack widths.
suppress_compression
Switch, whether compression (negative strains) should be suppressed, defaults to True.
shrink_calibration_values
Array of calibration values for the shrinking in the measurement area.
np.array _strain_compensated
Strain, from which the crack widths are calculated.
tension_stiffening_values
Array of the tension stiffening.
add_cracks(self, *tuple cracks_tuple, bool recalculate=True)
Use this function to manually add a crack to crack_list at the closest measuring point to x after an ...
x
Location data of the measurement area in accordance to strain.
lengthsplitter
separation.CrackLengths object used to assign the cracks their respective effective lengths.
strain_inst
Strain data (y-axis) for the initial load experiment.
find_cracks(self)
Identify cracks, settings are stored in crackfinder.
ts_compensator
compensation.tensionstiffening.TensionStiffeningCompensator object used to substract out the influenc...
shrink_compensator
compensation.shrinking.ShrinkCompensator object to compensate the strain values for concrete shrinkin...
name
Name of the strain profile, defaults to "".
np.array calculate_tension_stiffening(self)
Compensates for the strain, that does not contribute to a crack, but is located in the uncracked conc...
list delete_cracks(self, *tuple cracks_tuple, bool recalculate=True)
Use this function to manually delete cracks from crack_list, that were wrongfully identified automati...
np.array compensate_shrink(self, *args, **kwargs)
Calculate the shrink influence of the concrete and store it in shrink_calibration_values.
cracks.CrackList calculate_crack_widths(self, bool clean=True)
Returns the crack widths.
crack_list
List of cracks, see cracks.Crack for documentation.
strain
Strain data in the measurement area in accordance to x.
list set_lt(self)
Estimate transfer length to crack_list, settings are stored in lengthsplitter.
crackfinder
finding.CrackFinder object, wich holds the settings for peak identification.
__init__(self, np.array x, np.array strain, np.array strain_inst=None, crackfinder=None, integrator=None, lengthsplitter=None, str name="", shrink_compensator=None, bool suppress_compression=True, ts_compensator=None, *args, **kwargs)
Constructs a strain profile object.
clean_data(self)
Resetting several attributes to it's original state before any calculations.
integrator
utils.integration.Integrator object used to integrate the strain data to estimate the crack widths.
A filter to limit the entries.
This intermediate class indicates, that a sub-class is implementing a workflow.
Object to integrate a function given by discrete argument data and associated values .