PyCBA 0.4.1__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {PyCBA-0.4.1/src/PyCBA.egg-info → PyCBA-0.4.2}/PKG-INFO +1 -1
- {PyCBA-0.4.1 → PyCBA-0.4.2/src/PyCBA.egg-info}/PKG-INFO +1 -1
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/__init__.py +1 -1
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/beam.py +12 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/inf_lines.py +28 -5
- {PyCBA-0.4.1 → PyCBA-0.4.2}/LICENSE +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/README.md +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/pyproject.toml +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/setup.cfg +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/setup.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/PyCBA.egg-info/SOURCES.txt +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/PyCBA.egg-info/dependency_links.txt +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/PyCBA.egg-info/requires.txt +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/PyCBA.egg-info/top_level.txt +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/analysis.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/bridge.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/load.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/pattern.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/results.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/utils.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/src/pycba/vehicle.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/tests/test_basic.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/tests/test_bridge.py +0 -0
- {PyCBA-0.4.1 → PyCBA-0.4.2}/tests/test_inf_lines.py +0 -0
|
@@ -219,6 +219,18 @@ class Beam:
|
|
|
219
219
|
The number of restraints in the beam
|
|
220
220
|
"""
|
|
221
221
|
return len(self._restraints)
|
|
222
|
+
|
|
223
|
+
@property
|
|
224
|
+
def no_fixed_restraints(self):
|
|
225
|
+
"""
|
|
226
|
+
Returns the number of fixed restraints of the beam (fully-supported DOFs)
|
|
227
|
+
|
|
228
|
+
Returns
|
|
229
|
+
-------
|
|
230
|
+
no_fixed_restraints : int
|
|
231
|
+
The number of fixed restraints in the beam
|
|
232
|
+
"""
|
|
233
|
+
return len(np.where(np.array(self._restraints)==-1)[0])
|
|
222
234
|
|
|
223
235
|
@property
|
|
224
236
|
def length(self):
|
|
@@ -121,18 +121,41 @@ class InfluenceLines:
|
|
|
121
121
|
x = self.vResults[0].results.x
|
|
122
122
|
dx = x[2] - x[1]
|
|
123
123
|
idx = np.where(np.abs(x - poi) <= dx * 1e-6)[0][0]
|
|
124
|
-
#
|
|
125
|
-
|
|
126
|
-
np.abs(np.cumsum(np.insert(self.ba.beam.mbr_lengths, 0, 0)) - poi)
|
|
127
|
-
).argmin()
|
|
124
|
+
#idx = np.abs(x - poi).argmin()
|
|
125
|
+
|
|
128
126
|
npts = len(self.vResults)
|
|
129
127
|
eta = np.zeros(npts)
|
|
128
|
+
|
|
129
|
+
#
|
|
130
|
+
# Getting the correct vertical reaction is tricky
|
|
131
|
+
# Should be relatively easy to extend to get moment reactions too.
|
|
132
|
+
#
|
|
133
|
+
# Get vector of the node locations
|
|
134
|
+
node_locations = np.cumsum(np.insert(self.ba.beam.mbr_lengths, 0, 0))
|
|
135
|
+
# The indices of the supported vertical DOFs wrt the node locations vector
|
|
136
|
+
vert_sup_dof_idx = np.where(np.array(self.ba._beam.restraints)[::2]==-1)[0]
|
|
137
|
+
# The locations then of these vertical supports
|
|
138
|
+
vert_sup_locs = node_locations[vert_sup_dof_idx]
|
|
139
|
+
# The index of the closest vertical support
|
|
140
|
+
closest_vert_sup_idx = np.abs(vert_sup_locs-poi).argmin()
|
|
141
|
+
# And its value
|
|
142
|
+
closest_vert_sup = vert_sup_locs[closest_vert_sup_idx]
|
|
143
|
+
# And now the indixe of this support in the node locations vector
|
|
144
|
+
node_idx = np.where(node_locations==closest_vert_sup)[0][0]
|
|
145
|
+
# And hence its index in the overall DOFs vector
|
|
146
|
+
dof_idx = 2*node_idx
|
|
147
|
+
|
|
148
|
+
# Now we must link the supported DOF to the index in the BeamAnalysis reactions vector
|
|
149
|
+
idx_mask = np.zeros_like(self.ba._beam.restraints)
|
|
150
|
+
idx_mask[np.where(np.array(self.ba._beam.restraints)==-1)] = np.arange(self.ba.beam.no_fixed_restraints)
|
|
151
|
+
# And finally the index of the vertical support nearest the POI in the reactions vector
|
|
152
|
+
vert_sup_idx = idx_mask[dof_idx]
|
|
130
153
|
|
|
131
154
|
for i, res in enumerate(self.vResults):
|
|
132
155
|
if load_effect == "V":
|
|
133
156
|
eta[i] = res.results.V[idx]
|
|
134
157
|
elif load_effect == "R":
|
|
135
|
-
eta[i] = res.R[
|
|
158
|
+
eta[i] = res.R[vert_sup_idx]
|
|
136
159
|
else:
|
|
137
160
|
eta[i] = res.results.M[idx]
|
|
138
161
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|