Skip to content

Commit

Permalink
v1.0.10 - fixed issue with calc of critical span.
Browse files Browse the repository at this point in the history
  • Loading branch information
millen1m committed Apr 20, 2021
1 parent d6907bf commit 20ca336
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion geofound/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.9"
__version__ = "1.0.10"
4 changes: 2 additions & 2 deletions geofound/capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,9 +816,9 @@ def calc_crit_span(sl, fd, vertical_load, ip_axis='length', verbose=0, axis_inf=
setattr(new_fd, ip_axis, est_len)
q = capacity_method_selector(sl, new_fd, method, verbose=max(0, verbose-1), axis_inf=axis_inf)
if axis_inf is None:
area = fd.area
area = new_fd.area
else:
area = getattr(fd, fd.ip_axis)
area = getattr(new_fd, fd.ip_axis)
curr_fos = (q * area) / vertical_load
if np.isclose(curr_fos, 1.0, rtol=0.01):
break
Expand Down
8 changes: 5 additions & 3 deletions tests/test_capacity.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,12 @@ def test_calc_crit_length():
unit_dry_weight = 18.0
sl = geofound.create_soil(phi, cohesion, unit_dry_weight)
fd = geofound.create_foundation(length, width, depth)
vload = 3000.0
# vload = 3000.0
q_ult = geofound.capacity_vesic_1975(sl, fd)
vload = 0.5 * q_ult * fd.area
crit_len = geofound.capacity.calc_crit_span(sl, fd, vload, ip_axis='length')

assert np.isclose(crit_len, 3.149, rtol=0.001), crit_len
assert np.isclose(crit_len, 2.765625, rtol=0.001), crit_len


def test_very_short_foundation_w_vesics():
Expand Down Expand Up @@ -585,6 +587,6 @@ def load_soil_sample_data2(sl1):


if __name__ == '__main__':
test_very_short_foundation_w_vesics()
test_calc_crit_length()
# test_meyerhof_and_hanna_capacity_sand_over_sand_gwl()
# test_meyerhof_and_hanna_capacity_strong_clay_over_weak_sand()

0 comments on commit 20ca336

Please sign in to comment.