pycba.bridge.BridgeAnalysis#
- class BridgeAnalysis(ba=None, veh=None)[source]#
Bases:
object
Performs a bridge crossing analysis for a defined vehicle. The vehicle is moved from the zero global x-coordinate of the beam until it has left the beam at the far end.
Any loads already defined on the BeamAnalysis object are retained and superimposed in each vehicle position analysis.
Can instantiate with nothing and later add or define the objects, or with instantiate with pre-defined bridge and vehicle objects.
Any loads already defined on the BeamAnalysis object are retained in each vehicle position analysis.
- Parameters:
ba (Optional[BeamAnalysis], optional) – A
pycba.analysis.BeamAnalysis
object. The default is None.veh (Optional[Vehicle], optional) – A
pycba.bridge.Vehicle
object. The default is None.
- Return type:
None.
Methods
Create and add a beam to a bridge analysis
Create and add the vehicle to the analysis
From the envelopes output, returns the extreme values, their locations, and the position of the vehicle for each in a dictionary of dictionaries
Returns the ratios of two sets of envelopes considering zero values and reactions.
Plots the envelopes of load effects from a vehicle traverse analysis
Plots the output of
pycba.bridge.BridgeAnalysis.envelopes_ratios()
.Plots for analysis of static vehicle
Runs the vehicle over the bridge performing a static analysis at each point
Set the bridge for the bridge analysis.
Set the vehicle for the bridge analysis.
Performs a single analysis for the vehicle, static at a given position
- add_bridge(L, EI, R, eletype=None)[source]#
Create and add a beam to a bridge analysis
- Parameters:
L (np.ndarray) – A vector of span lengths.
EI (Union[float, np.ndarray]) – A vector of member flexural rigidities.
R (np.ndarray) – A vector describing the support conditions at each member end.
eletype (Optional[np.ndarray]) – A vector of the member types. Defaults to a fixed-fixed element.
- Returns:
ba – A
pycba.analysis.BeamAnalysis
object.- Return type:
- set_bridge(ba)[source]#
Set the bridge for the bridge analysis.
Any loads already defined on the BeamAnalysis object are retained in each vehicle position analysis.
- Parameters:
ba (BeamAnalysis) – A
pycba.analysis.BeamAnalysis
object.- Return type:
None.
- add_vehicle(axle_spacings, axle_weights)[source]#
Create and add the vehicle to the analysis
- Parameters:
axle_spacings (np.ndarray) – A vector of axle spacings of length one fewer than the length of the vector of axle weights
axle_weights (np.ndarray) – A vector of axle weights, length one greater than the length of the axle spacings vector.
- Returns:
veh – A
pycba.bridge.Vehicle
object.- Return type:
- set_vehicle(veh)[source]#
Set the vehicle for the bridge analysis.
- Parameters:
veh (Vehicle) – A
pycba.bridge.Vehicle
object.- Return type:
None.
- static_vehicle(pos, plotflag=False)[source]#
Performs a single analysis for the vehicle, static at a given position
- Parameters:
pos (float) – The location of the front axle of the vehicle in global beam coordinates.
plotflag (bool, optional) – Whether or not to plot the results. The default is False.
- Raises:
ValueError – If a static beam analysis does not succeed, usually due to a beam configuration error.
- Returns:
ba – The pycba.Beamresults object containing the analysis results.
- Return type:
- run_vehicle(step, plot_env=False, plot_all=False)[source]#
Runs the vehicle over the bridge performing a static analysis at each point
- Parameters:
step (float) – The distance increment to move the vehicle.
plot_env (bool, optional) – Whether or not to plot the results envelope. The default is False.
plot_all (bool, optional) – Whether or not to plot the results for each position as an animation. The default is False.
- Raises:
ValueError – If a static beam analysis does not succeed, usually due to a beam configuration error.
- Returns:
The load effect envelopes for the traverse; a pycba.Envelopes object.
- Return type:
- critical_values(env)[source]#
From the envelopes output, returns the extreme values, their locations, and the position of the vehicle for each in a dictionary of dictionaries
- Parameters:
env (Envelopes) – An pycba.Envelopes object containing the results of a moving load analysis.
- Raises:
ValueError – If the supplied envelope is inconsistent with the current pycba.bridge.BridgeAnalysis object.
- Returns:
crit_values – A dictionary of dictionaries containing the critical values (i.e. extremes) of each of the load effects, both maximum and minimum.
- Return type:
Dict[str, Dict[str, Union[float, np.ndarray]]]
- envelopes_ratios(trial_env, ref_env)[source]#
Returns the ratios of two sets of envelopes considering zero values and reactions. Note that ratios are only meaningful for any one location on the beam, and so reaction envelopes ratios reduce to a scalar value. Ratios are absolute, and zeroed if within 1e-3 absolute tolerance of zero.
- Parameters:
trial_env (Envelopes) – The numerator pycba.Envelopes object, usually from the vehicle seeking access to the bridge.
ref_env (Envelopes) – The denominator pycba.Envelopes object, usually from the reference or benchamrk of acceptable load effects on the bridge. Can be from a single notional vehicle, or a suite of such vehicles.
- Raises:
ValueError – The envelopes need to be from the same bridge analysis object.
- Returns:
A dictionary of ratios between the two envelopes, considering the maximum and minimum of each load effect.
- Return type:
Dict[str,np.ndarray]
- plot_static(pos, axs=None)[source]#
Plots for analysis of static vehicle
- Parameters:
pos (float) – The position of the front axle of the vehicle in global bridge coordinates.
axs (Optional[plt.Axes], optional) – The axes on which to plot; if None is supplied, one is created. The default is None.
- Return type:
None.
- plot_envelopes(env)[source]#
Plots the envelopes of load effects from a vehicle traverse analysis
- Parameters:
env (Envelopes) – An pycba.Envelopes object containing the results of a moving load analysis.
- Return type:
None
- plot_ratios(env_ratios)[source]#
Plots the output of
pycba.bridge.BridgeAnalysis.envelopes_ratios()
.- Parameters:
env_ratios (Dict[str,np.ndarray]) – The dictionary of envelopes ratios.
- Raises:
ValueError – Inconsistency in the dictionary entries.
- Return type:
None.