Skip to content

Commit 28b06eb

Browse files
committed
Updated readme.md, removed prints, updated imports
1 parent 6e38921 commit 28b06eb

File tree

5 files changed

+608
-3
lines changed

5 files changed

+608
-3
lines changed

README.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Load-bearing Walls
2+
3+
Calculating the linear reactions for a load bearing wall _can_ be a pain in the but if you have anything more than one load source.
4+
5+
This package provides a simple analysis technique (like, the loads go down through the wall) for calculating the _consolidated_ reactions at the bottom of the wall when you have multiple load sources and multiple load directions. No FE here!
6+
7+
This package is intended to be material agnostic and allows the designer to specify behaviour such as the load spread, the spread angle, and if the spread applies to gravity, in-plane lateral, or both.
8+
9+
Point loads and distributed loads can be added to the wall. The designer defines the convention of their loading directions (e.g the `gravity` direction can be `"y"` or `"Fz"` or whatever you want).
10+
11+
## How to install
12+
13+
`pip install loadbearing_wall`
14+
15+
## How to use
16+
17+
```python
18+
from loadbearing_wall import LinearWallModel
19+
20+
# Here is the example from the test suite
21+
22+
wall = LinearWallModel(
23+
height=2.0,
24+
length=4.0,
25+
vertical_spread_angle=0.0, # deg
26+
gravity_dir = "Fz",
27+
inplane_dir = "Fx",
28+
magnitude_start_key="w1",
29+
magnitude_end_key="w2",
30+
location_start_key="x1",
31+
location_end_key="x2",
32+
)
33+
```
34+
35+
> **Note:** You can add distributed loads and point loads at time of initialization (as dicts) or you can use the supplied `add_dist_load` and `add_point_load` methods.
36+
37+
### Adding loads
38+
39+
```python
40+
# DEAD loads
41+
42+
wall.add_dist_load(
43+
magnitude_start=10,
44+
magnitude_end=10,
45+
location_start=0,
46+
location_end=4,
47+
case="D",
48+
dir="Fz"
49+
)
50+
51+
wall.add_dist_load(
52+
magnitude_start=8,
53+
magnitude_end=8,
54+
location_start=1.5,
55+
location_end=3.25,
56+
case="D",
57+
dir="Fz"
58+
)
59+
60+
# LIVE loads
61+
62+
wall.add_dist_load(
63+
magnitude_start=15,
64+
magnitude_end=15,
65+
location_start=0,
66+
location_end=4,
67+
case="L",
68+
dir="Fz"
69+
)
70+
71+
wall.add_dist_load(
72+
magnitude_start=17.5,
73+
magnitude_end=17.5,
74+
location_start=1.5,
75+
location_end=3.25,
76+
case="L",
77+
dir="Fz"
78+
)
79+
80+
## Wind load (in plane as point load)
81+
82+
wall.add_point_load(
83+
magnitude=100,
84+
location=0.0,
85+
case="W",
86+
dir="Fx"
87+
)
88+
```
89+
90+
### Get Reactions
91+
92+
```python
93+
wall.spread_loads() # Execute this first if you are spreading loads
94+
reactions = wall.get_reactions()
95+
```
96+
97+
### Results
98+
99+
In the results below, notice how there are two UDLs of different magnitudes for both the `"D"` and `"L"` load cases. This is because the point load spread out and, due to super-position, is added to the applied distributed load.
100+
101+
Note also how the point load is resisted by only `2.0` units of wall at the bottom. If the wall were really long (say `6` or `8` units), and a load is applied at a point, is it reasonable to say that the whole wall is engaged to resist the shear? This would not be the case if the wall had some sort of drag element on top to engage the whole wall. In that case, you would apply a distributed `"Fx"` load and then the whole wall would resist the shear.
102+
103+
```python
104+
{'Fz': {'D': [{'w1': 9.333334,
105+
'w2': 9.333334,
106+
'x1': 0.0,
107+
'x2': 5.249999999999,
108+
'case': 'D',
109+
'dir': 'Fz'},
110+
{'w1': 6.666667,
111+
'w2': 6.666667,
112+
'x1': 5.250000000001,
113+
'x2': 6.0,
114+
'case': 'D',
115+
'dir': 'Fz'}],
116+
'L': [{'w1': 15.833333,
117+
'w2': 15.833333,
118+
'x1': 0.0,
119+
'x2': 5.249999999999,
120+
'case': 'L',
121+
'dir': 'Fz'},
122+
{'w1': 10.0,
123+
'w2': 10.0,
124+
'x1': 5.250000000001,
125+
'x2': 6.0,
126+
'case': 'L',
127+
'dir': 'Fz'}]},
128+
'Fx': {'W': [{'w1': 50.0,
129+
'w2': 50.0,
130+
'x1': 0.0,
131+
'x2': 2.0,
132+
'case': 'W',
133+
'dir': 'Fx'}]}}
134+
```
135+
136+
## Limitations
137+
138+
- Does not calculate overturning moment on lateral loads (it would be nice if it can calculate the tension/compression forces based on a given `d`)
139+
- I am sure there are others but I cannot think of them in the present moment when I am trying to upload this README.md!

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ build-backend = "hatchling.build"
2121
[dependency-groups]
2222
dev = [
2323
"black>=25.1.0",
24+
"ipykernel>=6.30.1",
2425
"pytest>=8.4.1",
2526
]

src/loadbearing_wall/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77

88
__version__ = "0.1.0"
99

10+
from loadbearing_wall.wall_model import LinearWallModel
1011
from loadbearing_wall import *

src/loadbearing_wall/linear_reactions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ def consolidate_reactions(
157157
for lr in linear_reactions:
158158
if lr.w1 is None and lr.x1 is None:
159159
point_load = {w0: lr.w0, x0: lr.x0, dir_key: load_dir, case_key: load_case}
160-
print(f"{point_load=}")
161160
flattened_reaction_components.append(
162161
point_load
163162
)
@@ -168,7 +167,6 @@ def consolidate_reactions(
168167
m = (lr.w1 - lr.w0) / (lr.x1 - lr.x0)
169168
y0 = lr.w0
170169
singularity_function = Singularity(x0=lr.x0, y0=y0, x1=lr.x1, m=m, precision=6)
171-
print(singularity_function)
172170
singularity_functions.append(singularity_function)
173171
if not singularity_functions: continue
174172
linear_reactions = singularity_xy_to_distributed_loads(
@@ -236,7 +234,6 @@ def singularity_xy_to_distributed_loads(
236234
dist_loads = []
237235
prev_x = None
238236
for idx, (x, y) in enumerate(zip(*xy_vals)):
239-
print(f"{(x, y)=}")
240237
if idx == 0: continue
241238
if prev_x is None:
242239
prev_x = x

0 commit comments

Comments
 (0)