introvoyz041 commited on
Commit
2cb9ced
·
verified ·
1 Parent(s): 73e5b19

Migrated from GitHub

Browse files
Files changed (42) hide show
  1. data/.readthedocs.yml +26 -0
  2. data/CONTRIBUTING.md +34 -0
  3. data/FoundationDesign/__init__.py +20 -0
  4. data/FoundationDesign/combinedfootingdesign.py +0 -0
  5. data/FoundationDesign/concretedesignfunc.py +242 -0
  6. data/FoundationDesign/datavalidation.py +76 -0
  7. data/FoundationDesign/foundationdesign.py +0 -0
  8. data/LICENSE +674 -0
  9. data/README.md +162 -0
  10. data/SUPPORT.md +14 -0
  11. data/assets/bending_moment.png +3 -0
  12. data/assets/bending_moment1.png +3 -0
  13. data/assets/mosley_bungey_example_combined_footing.png +3 -0
  14. data/assets/prab-bhatt-example-axially-loaded.png +3 -0
  15. data/assets/prab-bhatt-example-eccentrically-loaded-footing.png +3 -0
  16. data/assets/shear_force.jpg +3 -0
  17. data/assets/shear_force.png +3 -0
  18. data/docs/Makefile +20 -0
  19. data/docs/conf.py +35 -0
  20. data/docs/docstrings.rst +145 -0
  21. data/docs/examples.rst +26 -0
  22. data/docs/index.rst +59 -0
  23. data/docs/installation.rst +23 -0
  24. data/docs/make.bat +35 -0
  25. data/docs/requirements_docs.txt +3 -0
  26. data/docs/theory.rst +0 -0
  27. data/examples/Combined_Footing_Mosley_bungey.ipynb +0 -0
  28. data/examples/Concentric_Footing_Example.ipynb +0 -0
  29. data/examples/Eccentric_Footing_Example.ipynb +0 -0
  30. data/examples/__init__.py +0 -0
  31. data/paper/paper.bib +97 -0
  32. data/paper/paper.md +168 -0
  33. data/requirements-test.txt +4 -0
  34. data/requirements.txt +3 -0
  35. data/setup.py +31 -0
  36. data/tests/CombinedFootingAnalysis.py +31 -0
  37. data/tests/__init__.py +0 -0
  38. data/tests/test.py +68 -0
  39. data/tests/test2.py +36 -0
  40. data/tests/test_PadFoundation.py +78 -0
  41. data/tests/test_PadFoundationDesign.py +126 -0
  42. data/top_level.txt +3 -0
data/.readthedocs.yml ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the OS, Python version and other tools you might need
8
+ build:
9
+ os: ubuntu-22.04
10
+ tools:
11
+ python: "3.11"
12
+ jobs:
13
+ post_create_environment:
14
+ - python -m pip install sphinx_rtd_theme
15
+
16
+
17
+ # Build documentation in the "docs/" directory with Sphinx
18
+ sphinx:
19
+ configuration: docs/conf.py
20
+
21
+ # Optional but recommended, declare the Python requirements required
22
+ # to build your documentation
23
+ # See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
24
+ python:
25
+ install:
26
+ - requirements: requirements.txt
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## How to Contribute to FoundationDesign 🎉
2
+
3
+ Thanks so much for considering contributing to **FoundationDesign**! Here's how you can get involved:
4
+
5
+ - **🔧 Submit Pull Requests**
6
+ Contributions that add features, improve tests, or fix bugs are highly welcome. Please ensure your code passes existing tests and adheres to the project's style (Ruff, SciPy/NumPy conventions).
7
+
8
+ - **🧩 Pick a Good First Issue**
9
+ If you're new, check out the open issues or the "Future Works" section in the README-for example, adding PDF report generation, strip/strap footing design, API support, or expanding foundation types (piles, rafts).
10
+
11
+ - **💡 Share Feedback**
12
+ This is my first major Python project-your thoughts on usability, documentation, test quality, even coding style are incredibly valuable. Constructive feedback helps the project grow!
13
+
14
+ - **🐛 Report Bugs or Suggest Features**
15
+ Spot a bug? Have a feature request? Just open an issue on GitHub-it’s the most straightforward way for me to track and respond. If it’s easier for you, feel free to message me at kunleyusuf858@outlook.com.
16
+
17
+ ---
18
+
19
+ ### 🛠 Getting Started
20
+
21
+ 1. **Fork** the repo and create a feature branch.
22
+ 2. **Install locally** with `pip install -e .` and run `pytest`.
23
+ 3. **Write tests** for any new functionality or bug fix.
24
+ 4. **Open a Pull Request** with a clear description of your changes.
25
+
26
+ ---
27
+
28
+ ### 🤝 Need Help?
29
+
30
+ Don't hesitate to contact me if you're unsure where to start or want to discuss your ideas. Happy to guide you through the process!
31
+
32
+ ---
33
+
34
+ Your contribution-no matter how small-helps make `FoundationDesign` better for learners, practitioners, and engineers worldwide. Let's build something great together!
data/FoundationDesign/__init__.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from FoundationDesign.foundationdesign import PadFoundation, padFoundationDesign
2
+ from FoundationDesign.datavalidation import (
3
+ assert_input_limit,
4
+ assert_number,
5
+ assert_strictly_positive_number,
6
+ assert_maximum_input_limit,
7
+ assert_input_range,
8
+ )
9
+ from FoundationDesign.concretedesignfunc import (
10
+ bending_reinforcement,
11
+ minimum_steel,
12
+ maximum_steel,
13
+ shear_stress_check_1d,
14
+ column_punching_coefficient_k,
15
+ reinforcement_provision,
16
+ )
17
+ from FoundationDesign.combinedfootingdesign import (
18
+ CombinedFootingAnalysis,
19
+ CombinedFootingDesign,
20
+ )
data/FoundationDesign/combinedfootingdesign.py ADDED
The diff for this file is too large to render. See raw diff
 
data/FoundationDesign/concretedesignfunc.py ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+ import numpy as np
3
+
4
+
5
+ def shear_check_column_face(column_perimeter: float, fck: float, d: float):
6
+ """
7
+ Function to check the shear at column face. This would be used to ascertain
8
+ the suitability of the initial depth assumed.
9
+
10
+ Parameters
11
+ ----------
12
+ column_perimeter : float
13
+ The column perimeter in m
14
+ fck : float
15
+ Characteristic compressive cylinder strength in N/mm2. Accepted range of values [16,20,25,30,32,35,37,40,45,55]
16
+ fyk : float
17
+ Characteristic yield strength of reinforcement in N/mm2
18
+ d : float
19
+ Depth to tension reinforcement in mm
20
+
21
+ Returns
22
+ -------
23
+ float
24
+ Maximum shear resistance in N/mm2
25
+ """
26
+ Vrd_max = (0.5 * column_perimeter * d * (0.6 * (1 - fck / 250)) * fck / 1.5) / 1000
27
+ return Vrd_max
28
+
29
+
30
+ def punching_shear_column_face(d: float, fck: float, column_perimeter: float):
31
+ """
32
+ Function to check the shear at column face.
33
+
34
+ Parameters
35
+ ----------
36
+ column_perimeter : float
37
+ The column perimeter in m
38
+ fck : float
39
+ Characteristic compressive cylinder strength in N/mm2. Accepted range of values [16,20,25,30,32,35,37,40,45,55]
40
+ d : float
41
+ Depth to tension reinforcement in mm
42
+ fck : float
43
+ Characteristic compressive cylinder strength in N/mm2. Accepted range of values [16,20,25,30,32,35,37,40,45,55]
44
+
45
+ Returns
46
+ -------
47
+ float
48
+ Maximum shear resistance in N/mm2
49
+ """
50
+ vrd_max = 0.2 * (1 - fck / 250) * fck * column_perimeter * d
51
+ return round(vrd_max, 3)
52
+
53
+
54
+ def bending_reinforcement(
55
+ m: float, depth: float, fck: float, fyk: float, length: float
56
+ ):
57
+ """
58
+ Function to calculate the area of steel required according to eurocode 2.
59
+
60
+ Parameters
61
+ ----------
62
+ m : float
63
+ design bending moment in kNm
64
+ depth : float
65
+ Depth to tension reinforcement in m
66
+ fck : float
67
+ Characteristic compressive cylinder strength in N/mm2. Accepted range of values [16,20,25,30,32,35,37,40,45,55]
68
+ fyk : float
69
+ Characteristic yield strength of reinforcement in N/mm2
70
+ length : float
71
+ Length of the element to be designed in mm
72
+
73
+ Returns
74
+ -------
75
+ float
76
+ Area of steel required in mm2
77
+ """
78
+ compression_status = None
79
+ depth = depth * 1000
80
+ k = (m * 10**6) / (fck * length * (depth**2.0))
81
+ if k > 0.167:
82
+ compression_status = "Compression Reinforcement required, design out of scope"
83
+ la = 0.5 + math.sqrt(0.25 - (0.882 * k))
84
+ if la >= 0.95:
85
+ la = 0.95
86
+ area_of_steel = (m * 10**6) / (0.87 * fyk * la * depth)
87
+ return {
88
+ "area_of_steel": round(area_of_steel),
89
+ "compression_status": compression_status,
90
+ }
91
+
92
+
93
+ def minimum_steel(fck: float, fyk: float, bt: float, d: float):
94
+ """
95
+ Function to calculate the minimum area of steel required.
96
+
97
+ Parameters
98
+ ----------
99
+ fck : float
100
+ Characteristic compressive cylinder strength in N/mm2. Accepted range of values [16,20,25,30,32,35,37,40,45,55]
101
+ fyk : float
102
+ Characteristic yield strength of reinforcement in N/mm2
103
+ bt : float
104
+ width in mm
105
+ d : float
106
+ Depth to tension reinforcement in m
107
+
108
+ Returns
109
+ -------
110
+ float
111
+ Minimum area of steel required in mm2
112
+ """
113
+ d = d * 1000
114
+ as_min = (0.078 * (fck ** (2 / 3)) / fyk) * bt * d
115
+ limiting_as = 0.0013 * bt * d
116
+ minimum_as = max(as_min, limiting_as)
117
+ return round(minimum_as, 0)
118
+
119
+
120
+ def maximum_steel(length: float, d: float):
121
+ """
122
+ Function to calculate the maximum area of steel required.
123
+
124
+ Parameters
125
+ ----------
126
+ length : float
127
+ Length in m
128
+ d : float
129
+ Depth to tension reinforcement in m
130
+
131
+ Returns
132
+ -------
133
+ float
134
+ Maximum area of steel required in mm2
135
+ """
136
+ max_area = 0.04 * length * d
137
+ return max_area
138
+
139
+
140
+ def shear_stress_check_1d(d: float, px: float, fck: float):
141
+ """
142
+ Function to determine the rectangular section in shear at a distance equivalent to 1d from the column face.
143
+
144
+ Parameters
145
+ ----------
146
+ d : float
147
+ Depth to tension reinforcement in m
148
+ px : float
149
+ Longitudinal reinforcement ratio unitless
150
+ fck : float
151
+ Characteristic compressive cylinder strength in N/mm2. Accepted range of values [16,20,25,30,32,35,37,40,45,55]
152
+
153
+ Returns
154
+ -------
155
+ float
156
+ resistance of members without shear reinforcement in MPa
157
+ """
158
+ k = min((1 + math.sqrt(200 / d)), 2)
159
+ p1 = min(px, 0.02)
160
+ vrd_c = max(
161
+ (0.12 * k * ((100 * p1 * fck) ** (1 / 3))), (0.035 * (k**1.5) * (fck**0.5))
162
+ )
163
+ return round(vrd_c, 3)
164
+
165
+
166
+ def column_punching_coefficient_k(column_ratio: float):
167
+ """Interpolating Values of k for rectangular loaded areas from table 6.1 of the Eurocode 2."""
168
+ x = np.array([0.5, 1, 2, 3])
169
+ y = np.array([0.45, 0.6, 0.7, 0.8])
170
+ if column_ratio < np.min(x) or column_ratio > np.max(x):
171
+ raise ValueError("column_ratio is outside the valid range for interpolation")
172
+ # Linear interpolation using numpy.interp
173
+ k = np.interp(column_ratio, x, y)
174
+ return k
175
+
176
+
177
+ def reinforcement_provision(assteel, fy):
178
+ """
179
+ Reinforcement area (mm2/m) for different bar spacing.
180
+
181
+ Parameters
182
+ ----------
183
+ assteel : float
184
+ Area of steel required calculated in mm2/m
185
+ fy : float
186
+ Characteristic yield strength of reinforcement in N/mm2
187
+
188
+ Returns
189
+ -------
190
+ t : string
191
+ Steel class label R for mild steel Grade 250, Y for Grade 410 (Type 2), T for Grade 460 (Type 2),
192
+ H for Grade 500 (Type 2).
193
+ rd : string
194
+ Rod diameters in mm range 8,10,12,16,20,25,32,40
195
+ sv : float
196
+ bar spacing in mm
197
+ asteel_provided : float
198
+ Area of steel provided in mm2/m
199
+ """
200
+ if fy <= 250:
201
+ t = "R"
202
+ elif fy > 250 and fy <= 410:
203
+ t = "Y"
204
+ elif fy > 410 and fy <= 460:
205
+ t = "T"
206
+ elif fy > 460 and fy <= 500:
207
+ t = "H"
208
+ if assteel <= 402:
209
+ rd = "8mm"
210
+ dia = 8.00
211
+ elif assteel > 402 and assteel <= 628:
212
+ rd = "10mm"
213
+ dia = 10.00
214
+ elif assteel > 628 and assteel <= 905:
215
+ rd = "12mm"
216
+ dia = 12.00
217
+ elif assteel > 905 and assteel <= 1610:
218
+ rd = "16mm"
219
+ dia = 16.00
220
+ elif assteel > 1610 and assteel <= 2510:
221
+ rd = "20mm"
222
+ dia = 20.00
223
+ elif assteel > 2510 and assteel <= 3930:
224
+ rd = "25mm"
225
+ dia = 25.00
226
+ elif assteel > 3930 and assteel <= 6430:
227
+ rd = "32mm"
228
+ dia = 32.00
229
+ elif assteel > 6430:
230
+ rd = "40mm"
231
+ dia = 40.00
232
+ area = (math.pi * dia**2) / 4
233
+ v1 = assteel / area
234
+ v = 1000 / v1
235
+ n = int(v / 25) * 25
236
+ if n > 200 and fy <= 250:
237
+ n = 200
238
+ elif n > 250 and fy > 250:
239
+ n = 250
240
+ sv = float(n)
241
+ asteel_provided = round(area * (1000 / sv))
242
+ return [t, rd, sv, asteel_provided]
data/FoundationDesign/datavalidation.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Module to aid with data validation of inputs"""
2
+
3
+
4
+ def assert_positive_number(n, name):
5
+ """Assert that an input is a positive number."""
6
+ if type(n) not in [int, float]:
7
+ raise ValueError(
8
+ f"The value for '{name}' should be an integer or a float, not a {type(n)}."
9
+ )
10
+ if n < 0:
11
+ raise ValueError(f"The value for '{name}' should be >= 0, not {n}")
12
+
13
+
14
+ def assert_strictly_positive_number(n, name):
15
+ """Assert that an input is a strictly positive number."""
16
+ if type(n) not in [int, float]:
17
+ raise ValueError(
18
+ f"The value for '{name}' should be an integer or a float, not a {type(n)}."
19
+ )
20
+ if n < 0:
21
+ raise ValueError(f"The value for '{name}' should be > 0, not {n}")
22
+
23
+
24
+ def assert_number(n, name):
25
+ """Assert that an input is a number."""
26
+ if type(n) not in [int, float]:
27
+ raise ValueError(
28
+ f"The value for '{name}' should be an integer or a float, not a {type(n)}."
29
+ )
30
+
31
+
32
+ def assert_length(l, num, name):
33
+ """Assert that a tuple or list is of a specific length."""
34
+ if len(l) != num:
35
+ raise ValueError(f"The length of '{name}' should be {num} not {len(l)}.")
36
+
37
+
38
+ def assert_list_contents(l, content, name):
39
+ """Assert that a tuple or list contains only specific items"""
40
+ for a in l:
41
+ if a not in content:
42
+ raise ValueError(
43
+ f"The variable '{name}', must be a tuple or"
44
+ + f" list containing only items in {content} not {a}."
45
+ )
46
+
47
+
48
+ def assert_contents(var, content, name):
49
+ """Assert that a variable is within a specific subset of available values"""
50
+
51
+ var = [var]
52
+ for a in var:
53
+ if a not in content:
54
+ raise ValueError(
55
+ f"The variable '{name}', must only have a"
56
+ + f" value that is specified in {content} not '{a}'."
57
+ )
58
+
59
+
60
+ def assert_input_limit(l, num, name):
61
+ """Assert that a tuple or list is of a specific length."""
62
+ if l < num:
63
+ raise ValueError(f"The value of '{name}' should be greater than {num} not {l}.")
64
+
65
+
66
+ def assert_maximum_input_limit(l, num, name):
67
+ """Assert that a tuple or list is of a specific length."""
68
+ if l > num:
69
+ raise ValueError(f"The value of '{name}' should be less than {num} not {l}.")
70
+
71
+
72
+ def assert_input_range(name, value, range_of_values):
73
+ if value not in range_of_values:
74
+ raise ValueError(
75
+ f"The value for '{name}' should be in the range of {range_of_values} not {value}mm"
76
+ )
data/FoundationDesign/foundationdesign.py ADDED
The diff for this file is too large to render. See raw diff
 
data/LICENSE ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ GNU GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+ Preamble
9
+
10
+ The GNU General Public License is a free, copyleft license for
11
+ software and other kinds of works.
12
+
13
+ The licenses for most software and other practical works are designed
14
+ to take away your freedom to share and change the works. By contrast,
15
+ the GNU General Public License is intended to guarantee your freedom to
16
+ share and change all versions of a program--to make sure it remains free
17
+ software for all its users. We, the Free Software Foundation, use the
18
+ GNU General Public License for most of our software; it applies also to
19
+ any other work released this way by its authors. You can apply it to
20
+ your programs, too.
21
+
22
+ When we speak of free software, we are referring to freedom, not
23
+ price. Our General Public Licenses are designed to make sure that you
24
+ have the freedom to distribute copies of free software (and charge for
25
+ them if you wish), that you receive source code or can get it if you
26
+ want it, that you can change the software or use pieces of it in new
27
+ free programs, and that you know you can do these things.
28
+
29
+ To protect your rights, we need to prevent others from denying you
30
+ these rights or asking you to surrender the rights. Therefore, you have
31
+ certain responsibilities if you distribute copies of the software, or if
32
+ you modify it: responsibilities to respect the freedom of others.
33
+
34
+ For example, if you distribute copies of such a program, whether
35
+ gratis or for a fee, you must pass on to the recipients the same
36
+ freedoms that you received. You must make sure that they, too, receive
37
+ or can get the source code. And you must show them these terms so they
38
+ know their rights.
39
+
40
+ Developers that use the GNU GPL protect your rights with two steps:
41
+ (1) assert copyright on the software, and (2) offer you this License
42
+ giving you legal permission to copy, distribute and/or modify it.
43
+
44
+ For the developers' and authors' protection, the GPL clearly explains
45
+ that there is no warranty for this free software. For both users' and
46
+ authors' sake, the GPL requires that modified versions be marked as
47
+ changed, so that their problems will not be attributed erroneously to
48
+ authors of previous versions.
49
+
50
+ Some devices are designed to deny users access to install or run
51
+ modified versions of the software inside them, although the manufacturer
52
+ can do so. This is fundamentally incompatible with the aim of
53
+ protecting users' freedom to change the software. The systematic
54
+ pattern of such abuse occurs in the area of products for individuals to
55
+ use, which is precisely where it is most unacceptable. Therefore, we
56
+ have designed this version of the GPL to prohibit the practice for those
57
+ products. If such problems arise substantially in other domains, we
58
+ stand ready to extend this provision to those domains in future versions
59
+ of the GPL, as needed to protect the freedom of users.
60
+
61
+ Finally, every program is threatened constantly by software patents.
62
+ States should not allow patents to restrict development and use of
63
+ software on general-purpose computers, but in those that do, we wish to
64
+ avoid the special danger that patents applied to a free program could
65
+ make it effectively proprietary. To prevent this, the GPL assures that
66
+ patents cannot be used to render the program non-free.
67
+
68
+ The precise terms and conditions for copying, distribution and
69
+ modification follow.
70
+
71
+ TERMS AND CONDITIONS
72
+
73
+ 0. Definitions.
74
+
75
+ "This License" refers to version 3 of the GNU General Public License.
76
+
77
+ "Copyright" also means copyright-like laws that apply to other kinds of
78
+ works, such as semiconductor masks.
79
+
80
+ "The Program" refers to any copyrightable work licensed under this
81
+ License. Each licensee is addressed as "you". "Licensees" and
82
+ "recipients" may be individuals or organizations.
83
+
84
+ To "modify" a work means to copy from or adapt all or part of the work
85
+ in a fashion requiring copyright permission, other than the making of an
86
+ exact copy. The resulting work is called a "modified version" of the
87
+ earlier work or a work "based on" the earlier work.
88
+
89
+ A "covered work" means either the unmodified Program or a work based
90
+ on the Program.
91
+
92
+ To "propagate" a work means to do anything with it that, without
93
+ permission, would make you directly or secondarily liable for
94
+ infringement under applicable copyright law, except executing it on a
95
+ computer or modifying a private copy. Propagation includes copying,
96
+ distribution (with or without modification), making available to the
97
+ public, and in some countries other activities as well.
98
+
99
+ To "convey" a work means any kind of propagation that enables other
100
+ parties to make or receive copies. Mere interaction with a user through
101
+ a computer network, with no transfer of a copy, is not conveying.
102
+
103
+ An interactive user interface displays "Appropriate Legal Notices"
104
+ to the extent that it includes a convenient and prominently visible
105
+ feature that (1) displays an appropriate copyright notice, and (2)
106
+ tells the user that there is no warranty for the work (except to the
107
+ extent that warranties are provided), that licensees may convey the
108
+ work under this License, and how to view a copy of this License. If
109
+ the interface presents a list of user commands or options, such as a
110
+ menu, a prominent item in the list meets this criterion.
111
+
112
+ 1. Source Code.
113
+
114
+ The "source code" for a work means the preferred form of the work
115
+ for making modifications to it. "Object code" means any non-source
116
+ form of a work.
117
+
118
+ A "Standard Interface" means an interface that either is an official
119
+ standard defined by a recognized standards body, or, in the case of
120
+ interfaces specified for a particular programming language, one that
121
+ is widely used among developers working in that language.
122
+
123
+ The "System Libraries" of an executable work include anything, other
124
+ than the work as a whole, that (a) is included in the normal form of
125
+ packaging a Major Component, but which is not part of that Major
126
+ Component, and (b) serves only to enable use of the work with that
127
+ Major Component, or to implement a Standard Interface for which an
128
+ implementation is available to the public in source code form. A
129
+ "Major Component", in this context, means a major essential component
130
+ (kernel, window system, and so on) of the specific operating system
131
+ (if any) on which the executable work runs, or a compiler used to
132
+ produce the work, or an object code interpreter used to run it.
133
+
134
+ The "Corresponding Source" for a work in object code form means all
135
+ the source code needed to generate, install, and (for an executable
136
+ work) run the object code and to modify the work, including scripts to
137
+ control those activities. However, it does not include the work's
138
+ System Libraries, or general-purpose tools or generally available free
139
+ programs which are used unmodified in performing those activities but
140
+ which are not part of the work. For example, Corresponding Source
141
+ includes interface definition files associated with source files for
142
+ the work, and the source code for shared libraries and dynamically
143
+ linked subprograms that the work is specifically designed to require,
144
+ such as by intimate data communication or control flow between those
145
+ subprograms and other parts of the work.
146
+
147
+ The Corresponding Source need not include anything that users
148
+ can regenerate automatically from other parts of the Corresponding
149
+ Source.
150
+
151
+ The Corresponding Source for a work in source code form is that
152
+ same work.
153
+
154
+ 2. Basic Permissions.
155
+
156
+ All rights granted under this License are granted for the term of
157
+ copyright on the Program, and are irrevocable provided the stated
158
+ conditions are met. This License explicitly affirms your unlimited
159
+ permission to run the unmodified Program. The output from running a
160
+ covered work is covered by this License only if the output, given its
161
+ content, constitutes a covered work. This License acknowledges your
162
+ rights of fair use or other equivalent, as provided by copyright law.
163
+
164
+ You may make, run and propagate covered works that you do not
165
+ convey, without conditions so long as your license otherwise remains
166
+ in force. You may convey covered works to others for the sole purpose
167
+ of having them make modifications exclusively for you, or provide you
168
+ with facilities for running those works, provided that you comply with
169
+ the terms of this License in conveying all material for which you do
170
+ not control copyright. Those thus making or running the covered works
171
+ for you must do so exclusively on your behalf, under your direction
172
+ and control, on terms that prohibit them from making any copies of
173
+ your copyrighted material outside their relationship with you.
174
+
175
+ Conveying under any other circumstances is permitted solely under
176
+ the conditions stated below. Sublicensing is not allowed; section 10
177
+ makes it unnecessary.
178
+
179
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
+
181
+ No covered work shall be deemed part of an effective technological
182
+ measure under any applicable law fulfilling obligations under article
183
+ 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184
+ similar laws prohibiting or restricting circumvention of such
185
+ measures.
186
+
187
+ When you convey a covered work, you waive any legal power to forbid
188
+ circumvention of technological measures to the extent such circumvention
189
+ is effected by exercising rights under this License with respect to
190
+ the covered work, and you disclaim any intention to limit operation or
191
+ modification of the work as a means of enforcing, against the work's
192
+ users, your or third parties' legal rights to forbid circumvention of
193
+ technological measures.
194
+
195
+ 4. Conveying Verbatim Copies.
196
+
197
+ You may convey verbatim copies of the Program's source code as you
198
+ receive it, in any medium, provided that you conspicuously and
199
+ appropriately publish on each copy an appropriate copyright notice;
200
+ keep intact all notices stating that this License and any
201
+ non-permissive terms added in accord with section 7 apply to the code;
202
+ keep intact all notices of the absence of any warranty; and give all
203
+ recipients a copy of this License along with the Program.
204
+
205
+ You may charge any price or no price for each copy that you convey,
206
+ and you may offer support or warranty protection for a fee.
207
+
208
+ 5. Conveying Modified Source Versions.
209
+
210
+ You may convey a work based on the Program, or the modifications to
211
+ produce it from the Program, in the form of source code under the
212
+ terms of section 4, provided that you also meet all of these conditions:
213
+
214
+ a) The work must carry prominent notices stating that you modified
215
+ it, and giving a relevant date.
216
+
217
+ b) The work must carry prominent notices stating that it is
218
+ released under this License and any conditions added under section
219
+ 7. This requirement modifies the requirement in section 4 to
220
+ "keep intact all notices".
221
+
222
+ c) You must license the entire work, as a whole, under this
223
+ License to anyone who comes into possession of a copy. This
224
+ License will therefore apply, along with any applicable section 7
225
+ additional terms, to the whole of the work, and all its parts,
226
+ regardless of how they are packaged. This License gives no
227
+ permission to license the work in any other way, but it does not
228
+ invalidate such permission if you have separately received it.
229
+
230
+ d) If the work has interactive user interfaces, each must display
231
+ Appropriate Legal Notices; however, if the Program has interactive
232
+ interfaces that do not display Appropriate Legal Notices, your
233
+ work need not make them do so.
234
+
235
+ A compilation of a covered work with other separate and independent
236
+ works, which are not by their nature extensions of the covered work,
237
+ and which are not combined with it such as to form a larger program,
238
+ in or on a volume of a storage or distribution medium, is called an
239
+ "aggregate" if the compilation and its resulting copyright are not
240
+ used to limit the access or legal rights of the compilation's users
241
+ beyond what the individual works permit. Inclusion of a covered work
242
+ in an aggregate does not cause this License to apply to the other
243
+ parts of the aggregate.
244
+
245
+ 6. Conveying Non-Source Forms.
246
+
247
+ You may convey a covered work in object code form under the terms
248
+ of sections 4 and 5, provided that you also convey the
249
+ machine-readable Corresponding Source under the terms of this License,
250
+ in one of these ways:
251
+
252
+ a) Convey the object code in, or embodied in, a physical product
253
+ (including a physical distribution medium), accompanied by the
254
+ Corresponding Source fixed on a durable physical medium
255
+ customarily used for software interchange.
256
+
257
+ b) Convey the object code in, or embodied in, a physical product
258
+ (including a physical distribution medium), accompanied by a
259
+ written offer, valid for at least three years and valid for as
260
+ long as you offer spare parts or customer support for that product
261
+ model, to give anyone who possesses the object code either (1) a
262
+ copy of the Corresponding Source for all the software in the
263
+ product that is covered by this License, on a durable physical
264
+ medium customarily used for software interchange, for a price no
265
+ more than your reasonable cost of physically performing this
266
+ conveying of source, or (2) access to copy the
267
+ Corresponding Source from a network server at no charge.
268
+
269
+ c) Convey individual copies of the object code with a copy of the
270
+ written offer to provide the Corresponding Source. This
271
+ alternative is allowed only occasionally and noncommercially, and
272
+ only if you received the object code with such an offer, in accord
273
+ with subsection 6b.
274
+
275
+ d) Convey the object code by offering access from a designated
276
+ place (gratis or for a charge), and offer equivalent access to the
277
+ Corresponding Source in the same way through the same place at no
278
+ further charge. You need not require recipients to copy the
279
+ Corresponding Source along with the object code. If the place to
280
+ copy the object code is a network server, the Corresponding Source
281
+ may be on a different server (operated by you or a third party)
282
+ that supports equivalent copying facilities, provided you maintain
283
+ clear directions next to the object code saying where to find the
284
+ Corresponding Source. Regardless of what server hosts the
285
+ Corresponding Source, you remain obligated to ensure that it is
286
+ available for as long as needed to satisfy these requirements.
287
+
288
+ e) Convey the object code using peer-to-peer transmission, provided
289
+ you inform other peers where the object code and Corresponding
290
+ Source of the work are being offered to the general public at no
291
+ charge under subsection 6d.
292
+
293
+ A separable portion of the object code, whose source code is excluded
294
+ from the Corresponding Source as a System Library, need not be
295
+ included in conveying the object code work.
296
+
297
+ A "User Product" is either (1) a "consumer product", which means any
298
+ tangible personal property which is normally used for personal, family,
299
+ or household purposes, or (2) anything designed or sold for incorporation
300
+ into a dwelling. In determining whether a product is a consumer product,
301
+ doubtful cases shall be resolved in favor of coverage. For a particular
302
+ product received by a particular user, "normally used" refers to a
303
+ typical or common use of that class of product, regardless of the status
304
+ of the particular user or of the way in which the particular user
305
+ actually uses, or expects or is expected to use, the product. A product
306
+ is a consumer product regardless of whether the product has substantial
307
+ commercial, industrial or non-consumer uses, unless such uses represent
308
+ the only significant mode of use of the product.
309
+
310
+ "Installation Information" for a User Product means any methods,
311
+ procedures, authorization keys, or other information required to install
312
+ and execute modified versions of a covered work in that User Product from
313
+ a modified version of its Corresponding Source. The information must
314
+ suffice to ensure that the continued functioning of the modified object
315
+ code is in no case prevented or interfered with solely because
316
+ modification has been made.
317
+
318
+ If you convey an object code work under this section in, or with, or
319
+ specifically for use in, a User Product, and the conveying occurs as
320
+ part of a transaction in which the right of possession and use of the
321
+ User Product is transferred to the recipient in perpetuity or for a
322
+ fixed term (regardless of how the transaction is characterized), the
323
+ Corresponding Source conveyed under this section must be accompanied
324
+ by the Installation Information. But this requirement does not apply
325
+ if neither you nor any third party retains the ability to install
326
+ modified object code on the User Product (for example, the work has
327
+ been installed in ROM).
328
+
329
+ The requirement to provide Installation Information does not include a
330
+ requirement to continue to provide support service, warranty, or updates
331
+ for a work that has been modified or installed by the recipient, or for
332
+ the User Product in which it has been modified or installed. Access to a
333
+ network may be denied when the modification itself materially and
334
+ adversely affects the operation of the network or violates the rules and
335
+ protocols for communication across the network.
336
+
337
+ Corresponding Source conveyed, and Installation Information provided,
338
+ in accord with this section must be in a format that is publicly
339
+ documented (and with an implementation available to the public in
340
+ source code form), and must require no special password or key for
341
+ unpacking, reading or copying.
342
+
343
+ 7. Additional Terms.
344
+
345
+ "Additional permissions" are terms that supplement the terms of this
346
+ License by making exceptions from one or more of its conditions.
347
+ Additional permissions that are applicable to the entire Program shall
348
+ be treated as though they were included in this License, to the extent
349
+ that they are valid under applicable law. If additional permissions
350
+ apply only to part of the Program, that part may be used separately
351
+ under those permissions, but the entire Program remains governed by
352
+ this License without regard to the additional permissions.
353
+
354
+ When you convey a copy of a covered work, you may at your option
355
+ remove any additional permissions from that copy, or from any part of
356
+ it. (Additional permissions may be written to require their own
357
+ removal in certain cases when you modify the work.) You may place
358
+ additional permissions on material, added by you to a covered work,
359
+ for which you have or can give appropriate copyright permission.
360
+
361
+ Notwithstanding any other provision of this License, for material you
362
+ add to a covered work, you may (if authorized by the copyright holders of
363
+ that material) supplement the terms of this License with terms:
364
+
365
+ a) Disclaiming warranty or limiting liability differently from the
366
+ terms of sections 15 and 16 of this License; or
367
+
368
+ b) Requiring preservation of specified reasonable legal notices or
369
+ author attributions in that material or in the Appropriate Legal
370
+ Notices displayed by works containing it; or
371
+
372
+ c) Prohibiting misrepresentation of the origin of that material, or
373
+ requiring that modified versions of such material be marked in
374
+ reasonable ways as different from the original version; or
375
+
376
+ d) Limiting the use for publicity purposes of names of licensors or
377
+ authors of the material; or
378
+
379
+ e) Declining to grant rights under trademark law for use of some
380
+ trade names, trademarks, or service marks; or
381
+
382
+ f) Requiring indemnification of licensors and authors of that
383
+ material by anyone who conveys the material (or modified versions of
384
+ it) with contractual assumptions of liability to the recipient, for
385
+ any liability that these contractual assumptions directly impose on
386
+ those licensors and authors.
387
+
388
+ All other non-permissive additional terms are considered "further
389
+ restrictions" within the meaning of section 10. If the Program as you
390
+ received it, or any part of it, contains a notice stating that it is
391
+ governed by this License along with a term that is a further
392
+ restriction, you may remove that term. If a license document contains
393
+ a further restriction but permits relicensing or conveying under this
394
+ License, you may add to a covered work material governed by the terms
395
+ of that license document, provided that the further restriction does
396
+ not survive such relicensing or conveying.
397
+
398
+ If you add terms to a covered work in accord with this section, you
399
+ must place, in the relevant source files, a statement of the
400
+ additional terms that apply to those files, or a notice indicating
401
+ where to find the applicable terms.
402
+
403
+ Additional terms, permissive or non-permissive, may be stated in the
404
+ form of a separately written license, or stated as exceptions;
405
+ the above requirements apply either way.
406
+
407
+ 8. Termination.
408
+
409
+ You may not propagate or modify a covered work except as expressly
410
+ provided under this License. Any attempt otherwise to propagate or
411
+ modify it is void, and will automatically terminate your rights under
412
+ this License (including any patent licenses granted under the third
413
+ paragraph of section 11).
414
+
415
+ However, if you cease all violation of this License, then your
416
+ license from a particular copyright holder is reinstated (a)
417
+ provisionally, unless and until the copyright holder explicitly and
418
+ finally terminates your license, and (b) permanently, if the copyright
419
+ holder fails to notify you of the violation by some reasonable means
420
+ prior to 60 days after the cessation.
421
+
422
+ Moreover, your license from a particular copyright holder is
423
+ reinstated permanently if the copyright holder notifies you of the
424
+ violation by some reasonable means, this is the first time you have
425
+ received notice of violation of this License (for any work) from that
426
+ copyright holder, and you cure the violation prior to 30 days after
427
+ your receipt of the notice.
428
+
429
+ Termination of your rights under this section does not terminate the
430
+ licenses of parties who have received copies or rights from you under
431
+ this License. If your rights have been terminated and not permanently
432
+ reinstated, you do not qualify to receive new licenses for the same
433
+ material under section 10.
434
+
435
+ 9. Acceptance Not Required for Having Copies.
436
+
437
+ You are not required to accept this License in order to receive or
438
+ run a copy of the Program. Ancillary propagation of a covered work
439
+ occurring solely as a consequence of using peer-to-peer transmission
440
+ to receive a copy likewise does not require acceptance. However,
441
+ nothing other than this License grants you permission to propagate or
442
+ modify any covered work. These actions infringe copyright if you do
443
+ not accept this License. Therefore, by modifying or propagating a
444
+ covered work, you indicate your acceptance of this License to do so.
445
+
446
+ 10. Automatic Licensing of Downstream Recipients.
447
+
448
+ Each time you convey a covered work, the recipient automatically
449
+ receives a license from the original licensors, to run, modify and
450
+ propagate that work, subject to this License. You are not responsible
451
+ for enforcing compliance by third parties with this License.
452
+
453
+ An "entity transaction" is a transaction transferring control of an
454
+ organization, or substantially all assets of one, or subdividing an
455
+ organization, or merging organizations. If propagation of a covered
456
+ work results from an entity transaction, each party to that
457
+ transaction who receives a copy of the work also receives whatever
458
+ licenses to the work the party's predecessor in interest had or could
459
+ give under the previous paragraph, plus a right to possession of the
460
+ Corresponding Source of the work from the predecessor in interest, if
461
+ the predecessor has it or can get it with reasonable efforts.
462
+
463
+ You may not impose any further restrictions on the exercise of the
464
+ rights granted or affirmed under this License. For example, you may
465
+ not impose a license fee, royalty, or other charge for exercise of
466
+ rights granted under this License, and you may not initiate litigation
467
+ (including a cross-claim or counterclaim in a lawsuit) alleging that
468
+ any patent claim is infringed by making, using, selling, offering for
469
+ sale, or importing the Program or any portion of it.
470
+
471
+ 11. Patents.
472
+
473
+ A "contributor" is a copyright holder who authorizes use under this
474
+ License of the Program or a work on which the Program is based. The
475
+ work thus licensed is called the contributor's "contributor version".
476
+
477
+ A contributor's "essential patent claims" are all patent claims
478
+ owned or controlled by the contributor, whether already acquired or
479
+ hereafter acquired, that would be infringed by some manner, permitted
480
+ by this License, of making, using, or selling its contributor version,
481
+ but do not include claims that would be infringed only as a
482
+ consequence of further modification of the contributor version. For
483
+ purposes of this definition, "control" includes the right to grant
484
+ patent sublicenses in a manner consistent with the requirements of
485
+ this License.
486
+
487
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
488
+ patent license under the contributor's essential patent claims, to
489
+ make, use, sell, offer for sale, import and otherwise run, modify and
490
+ propagate the contents of its contributor version.
491
+
492
+ In the following three paragraphs, a "patent license" is any express
493
+ agreement or commitment, however denominated, not to enforce a patent
494
+ (such as an express permission to practice a patent or covenant not to
495
+ sue for patent infringement). To "grant" such a patent license to a
496
+ party means to make such an agreement or commitment not to enforce a
497
+ patent against the party.
498
+
499
+ If you convey a covered work, knowingly relying on a patent license,
500
+ and the Corresponding Source of the work is not available for anyone
501
+ to copy, free of charge and under the terms of this License, through a
502
+ publicly available network server or other readily accessible means,
503
+ then you must either (1) cause the Corresponding Source to be so
504
+ available, or (2) arrange to deprive yourself of the benefit of the
505
+ patent license for this particular work, or (3) arrange, in a manner
506
+ consistent with the requirements of this License, to extend the patent
507
+ license to downstream recipients. "Knowingly relying" means you have
508
+ actual knowledge that, but for the patent license, your conveying the
509
+ covered work in a country, or your recipient's use of the covered work
510
+ in a country, would infringe one or more identifiable patents in that
511
+ country that you have reason to believe are valid.
512
+
513
+ If, pursuant to or in connection with a single transaction or
514
+ arrangement, you convey, or propagate by procuring conveyance of, a
515
+ covered work, and grant a patent license to some of the parties
516
+ receiving the covered work authorizing them to use, propagate, modify
517
+ or convey a specific copy of the covered work, then the patent license
518
+ you grant is automatically extended to all recipients of the covered
519
+ work and works based on it.
520
+
521
+ A patent license is "discriminatory" if it does not include within
522
+ the scope of its coverage, prohibits the exercise of, or is
523
+ conditioned on the non-exercise of one or more of the rights that are
524
+ specifically granted under this License. You may not convey a covered
525
+ work if you are a party to an arrangement with a third party that is
526
+ in the business of distributing software, under which you make payment
527
+ to the third party based on the extent of your activity of conveying
528
+ the work, and under which the third party grants, to any of the
529
+ parties who would receive the covered work from you, a discriminatory
530
+ patent license (a) in connection with copies of the covered work
531
+ conveyed by you (or copies made from those copies), or (b) primarily
532
+ for and in connection with specific products or compilations that
533
+ contain the covered work, unless you entered into that arrangement,
534
+ or that patent license was granted, prior to 28 March 2007.
535
+
536
+ Nothing in this License shall be construed as excluding or limiting
537
+ any implied license or other defenses to infringement that may
538
+ otherwise be available to you under applicable patent law.
539
+
540
+ 12. No Surrender of Others' Freedom.
541
+
542
+ If conditions are imposed on you (whether by court order, agreement or
543
+ otherwise) that contradict the conditions of this License, they do not
544
+ excuse you from the conditions of this License. If you cannot convey a
545
+ covered work so as to satisfy simultaneously your obligations under this
546
+ License and any other pertinent obligations, then as a consequence you may
547
+ not convey it at all. For example, if you agree to terms that obligate you
548
+ to collect a royalty for further conveying from those to whom you convey
549
+ the Program, the only way you could satisfy both those terms and this
550
+ License would be to refrain entirely from conveying the Program.
551
+
552
+ 13. Use with the GNU Affero General Public License.
553
+
554
+ Notwithstanding any other provision of this License, you have
555
+ permission to link or combine any covered work with a work licensed
556
+ under version 3 of the GNU Affero General Public License into a single
557
+ combined work, and to convey the resulting work. The terms of this
558
+ License will continue to apply to the part which is the covered work,
559
+ but the special requirements of the GNU Affero General Public License,
560
+ section 13, concerning interaction through a network will apply to the
561
+ combination as such.
562
+
563
+ 14. Revised Versions of this License.
564
+
565
+ The Free Software Foundation may publish revised and/or new versions of
566
+ the GNU General Public License from time to time. Such new versions will
567
+ be similar in spirit to the present version, but may differ in detail to
568
+ address new problems or concerns.
569
+
570
+ Each version is given a distinguishing version number. If the
571
+ Program specifies that a certain numbered version of the GNU General
572
+ Public License "or any later version" applies to it, you have the
573
+ option of following the terms and conditions either of that numbered
574
+ version or of any later version published by the Free Software
575
+ Foundation. If the Program does not specify a version number of the
576
+ GNU General Public License, you may choose any version ever published
577
+ by the Free Software Foundation.
578
+
579
+ If the Program specifies that a proxy can decide which future
580
+ versions of the GNU General Public License can be used, that proxy's
581
+ public statement of acceptance of a version permanently authorizes you
582
+ to choose that version for the Program.
583
+
584
+ Later license versions may give you additional or different
585
+ permissions. However, no additional obligations are imposed on any
586
+ author or copyright holder as a result of your choosing to follow a
587
+ later version.
588
+
589
+ 15. Disclaimer of Warranty.
590
+
591
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592
+ APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593
+ HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594
+ OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596
+ PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597
+ IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
+
600
+ 16. Limitation of Liability.
601
+
602
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605
+ GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606
+ USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607
+ DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608
+ PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610
+ SUCH DAMAGES.
611
+
612
+ 17. Interpretation of Sections 15 and 16.
613
+
614
+ If the disclaimer of warranty and limitation of liability provided
615
+ above cannot be given local legal effect according to their terms,
616
+ reviewing courts shall apply local law that most closely approximates
617
+ an absolute waiver of all civil liability in connection with the
618
+ Program, unless a warranty or assumption of liability accompanies a
619
+ copy of the Program in return for a fee.
620
+
621
+ END OF TERMS AND CONDITIONS
622
+
623
+ How to Apply These Terms to Your New Programs
624
+
625
+ If you develop a new program, and you want it to be of the greatest
626
+ possible use to the public, the best way to achieve this is to make it
627
+ free software which everyone can redistribute and change under these terms.
628
+
629
+ To do so, attach the following notices to the program. It is safest
630
+ to attach them to the start of each source file to most effectively
631
+ state the exclusion of warranty; and each file should have at least
632
+ the "copyright" line and a pointer to where the full notice is found.
633
+
634
+ <one line to give the program's name and a brief idea of what it does.>
635
+ Copyright (C) <year> <name of author>
636
+
637
+ This program is free software: you can redistribute it and/or modify
638
+ it under the terms of the GNU General Public License as published by
639
+ the Free Software Foundation, either version 3 of the License, or
640
+ (at your option) any later version.
641
+
642
+ This program is distributed in the hope that it will be useful,
643
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
644
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645
+ GNU General Public License for more details.
646
+
647
+ You should have received a copy of the GNU General Public License
648
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
649
+
650
+ Also add information on how to contact you by electronic and paper mail.
651
+
652
+ If the program does terminal interaction, make it output a short
653
+ notice like this when it starts in an interactive mode:
654
+
655
+ <program> Copyright (C) <year> <name of author>
656
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657
+ This is free software, and you are welcome to redistribute it
658
+ under certain conditions; type `show c' for details.
659
+
660
+ The hypothetical commands `show w' and `show c' should show the appropriate
661
+ parts of the General Public License. Of course, your program's commands
662
+ might be different; for a GUI interface, you would use an "about box".
663
+
664
+ You should also get your employer (if you work as a programmer) or school,
665
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
666
+ For more information on this, and how to apply and follow the GNU GPL, see
667
+ <https://www.gnu.org/licenses/>.
668
+
669
+ The GNU General Public License does not permit incorporating your program
670
+ into proprietary programs. If your program is a subroutine library, you
671
+ may consider it more useful to permit linking proprietary applications with
672
+ the library. If this is what you want to do, use the GNU Lesser General
673
+ Public License instead of this License. But first, please read
674
+ <https://www.gnu.org/licenses/why-not-lgpl.html>.
data/README.md ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FoundationDesign
2
+
3
+ [![PyPi](https://img.shields.io/pypi/v/FoundationDesign.svg)](https://pypi.org/project/FoundationDesign/)
4
+ ![PyPI - License](https://img.shields.io/pypi/l/FoundationDesign)
5
+ [![Downloads](https://static.pepy.tech/badge/foundationdesign)](https://pepy.tech/project/foundationdesign)
6
+ [![Downloads](https://static.pepy.tech/badge/foundationdesign/month)](https://pepy.tech/project/foundationdesign)
7
+ ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/FoundationDesign)
8
+ [![build & test](https://github.com/kunle009/FoundationDesign/actions/workflows/build-and-test.yml/badge.svg?branch=main)](https://github.com/kunle009/FoundationDesign/actions/workflows/build-and-test.yml)
9
+ [![Documentation Status](https://readthedocs.org/projects/foundationdesign/badge/?version=latest)](https://foundationdesign.readthedocs.io/en/latest/?badge=latest)
10
+ [![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/format.json)](https://github.com/charliermarsh/ruff)
11
+ [![Webapp](https://img.shields.io/website?url=https%3A%2F%2Ffoundationcalcs.com)](https://foundationcalcs.com)
12
+
13
+ 🚀 **Exciting Update**: The [FoundationCalcs](https://foundationcalcs.com) website is now live for beta testing! The platform allows you design foundations and download comprehensive pdf report. You can access the pad foundation calculator [here](https://foundationcalcs.com/pad_foundation_calculator) and the combined pad foundation calculator [here](https://foundationcalcs.com/combined_pad_foundation_calculator) and start interacting with this library via a web UI. Your feedback is important to improve the core library and the web platform.
14
+
15
+ ---
16
+
17
+ FoundationDesign is a python module to be used for the design and analysis
18
+ of different foundation types in accordance to the Eurocode 2.
19
+ This project is an attempt to have a free standalone python package that can
20
+ be used to analyse and design foundations with results as good as paid software's.
21
+ This module will be useful in determining:
22
+
23
+ - The critical bending moments in the foundation
24
+ - Critical shear force in the foundation
25
+ - Transverse shear check of the foundation
26
+ - Sliding checks
27
+ - Crack width checks
28
+ - Reinforcement provisions
29
+ - Punching shear checks etc
30
+
31
+ The project is based mainly on instructions contained in the Eurocode 2
32
+ alongside python packages like numpy,plotly,scipy and IndeterminateBeam package. Comprehensive
33
+ examples are contained in the examples folder.
34
+ The full package documentation can be accessed [here](http://foundationdesign.readthedocs.io/).
35
+
36
+ Text-based examples of the package presented in the [documentation](http://foundationdesign.readthedocs.io/en/latest/examples.html) includes [Concentric Pad Foundation](https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Concentric_Footing_Example.ipynb), [Eccentric Pad Foundation](https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Eccentric_Footing_Example.ipynb) and a [Combined Footing Pad Foundation](https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Combined_Footing_Mosley_bungey.ipynb). A web-based graphical user interface (GUI) can be accessed at [FoundationCalcs](https://foundationcalcs.com).
37
+
38
+ ## Project Purpose
39
+
40
+ 1. Create a free python package that can analyse and design pad foundation,combined footing foundation,
41
+ pile foundation and raft foundation design.
42
+
43
+ 2. Create a comprehensive web app for the structural design of foundations.
44
+
45
+ ## Functionality and usage
46
+
47
+ For now this package is limited to only concentric and eccentric pad foundation and combined footing foundation types.
48
+ A typical use case of the pad foundation class contained in the `FoundationDesign` module includes
49
+
50
+ - Create a `PadFoundation` object to help analyse
51
+ - Assign `foundation_loads` to the `PadFoundation`
52
+ - Assign `column_axial_loads` to the `PadFoundation`
53
+ - Assign `column_horizontal_loads_xdir` to the `PadFoundation`
54
+ - Assign `column_horizontal_loads_xdir` to the `PadFoundation`
55
+ - Assign `column_moments_xdir` to the `PadFoundation`
56
+ - Assign `column_moments_ydir` to the `PadFoundation`
57
+ - Check the `minimum_area_required` for the `PadFoundation`
58
+ - Check the `bearing_pressure_check_sls` on the `PadFoundation`
59
+ - Create a `PadFoundationDesign` object to help design the foundation
60
+ - Plot the Bending moment and shear force diagrams
61
+ - Check the area of steel required and provided in x and y direction
62
+ - Check the adequacy of the transverse shear along both column_axial_loads
63
+ - Check for `punching_shear_column_face` on the `PadFoundationDesign` object
64
+ - Check for `punching_shear_check_1d` on the `PadFoundationDesign` object
65
+ - Check for `punching_shear_check_2d` on the `PadFoundationDesign` object
66
+
67
+ ## Creating a Pad Foundation
68
+
69
+ The creation of a `PadFoundation` instance involves the input of the following:
70
+
71
+ 1. Foundation Length in mm
72
+ 2. Foundation Width in mm
73
+ 3. Column Length in mm
74
+ 4. Column Width in mm
75
+ 5. The position of the column along x direction from the origin in mm
76
+ 6. The position of the column along y direction from the origin in mm
77
+ 7. The soil bearing capacity in kN/mm2
78
+
79
+ from foundationdesign import PadFoundation,padFoundationDesign
80
+ fdn = PadFoundation(foundation_length=2500,foundation_width=2500,column_length=400,column_width=400,col_pos_xdir=1250,col_pos_ydir=1250,soil_bearing_capacity=200)
81
+
82
+ ## Assigning Foundation Loads
83
+
84
+ Soil self weight and concrete self weight can be added to the Foundation by specifying the Foundation thickness in
85
+ mm and the soil depth above the Foundation in mm. A default value of 18kN/mm&#x00B3; and 24kN/mm&#x00B3; has been specified
86
+ for soil unit weight and concrete unit weight respectively
87
+
88
+ fdn.foundation_loads(foundation_thickness=650,soil_depth_abv_foundation=0,soil_unit_weight=18,concrete_unit_weight=24)
89
+
90
+ ## Assigning Column Loads
91
+
92
+ Axial loads, horizontal loads in x and y direction, moments in x and y direction
93
+ can all be added to the pad foundation for permanent,imposed and wind load cases.
94
+
95
+ fdn.column_axial_loads(permanent_axial_load=800,imposed_axial_load=300)
96
+
97
+ ## Designing a pad foundation
98
+
99
+ To design the foundation the `PadFoundation` must first be created as done above
100
+ this would then be included when creating the `padFoundationDesign` object
101
+ The creation of this object includes the following:
102
+
103
+ 1. PadFoundation object created
104
+ 2. Characteristic compressive cylinder strength in N/mm2. Accepted range of values [16,20,25,30,32,35,37,40,45,55]
105
+ 3. Characteristic yield strength of reinforcement in N/mm2
106
+ 4. Nominal cover to foundation in mm
107
+ 5. Initial assumed bar diameter of the foundation in the x direction in mm. Accepted range of values [8,10,12,16,20,25,32,40]
108
+ used to calculate depth to tension reinforcement along the x direction
109
+ 6. Initial assumed bar diameter of the foundation in the y direction in mm Accepted range of values [8,10,12,16,20,25,32,40]
110
+ used to calculate depth to tension reinforcement along the y direction
111
+
112
+ fdn_design = padFoundationDesign(fdn, fck=30, fyk=500, concrete_cover=40, bar_diameterX=16, bar_diameterY=16)
113
+
114
+ ## Plotting Foundation forces
115
+
116
+ Lots of checks can be done on the Foundation which can be found in the notebooks contained in the examples folder
117
+ To show the bending moment of the Foundation. The `plot_bending_moment_X()` can be called this figure will show the
118
+ bending moment values at the critical location along the Foundation length or width. Plotting methods takes a show_plot argument which can either be True or False. which by default is True
119
+
120
+ fdn_design.plot_bending_moment_X()
121
+ fdn_design.plot_shear_force_X()
122
+
123
+ This outputs the bending moment plot with the design bending moment shown at the face of the column
124
+ ![Image](https://github.com/kunle009/FoundationDesign/blob/main/assets/bending_moment1.png?raw=true)
125
+ The shear force plot is also displayed with critical shearforce showing at 1d from column the face
126
+ ![Image](https://github.com/kunle009/FoundationDesign/blob/main/assets/shear_force.jpg?raw=true)
127
+
128
+ ## Installing the package
129
+
130
+ If you want to install the `FoundationDesign` package, you run this one-liner:
131
+
132
+ pip install FoundationDesign
133
+
134
+ **NOTE**: You need Python 3 to install this package (you may need to write `pip3` instead of `pip`).
135
+
136
+ The library dependencies are listed in the file `requirements.txt`, but you only need to look at them if you clone the repository.
137
+ If you install the package via `pip`, the listed dependencies should be installed automatically. You need a minimum of python version 3.8 to use this library.
138
+
139
+ ## Future Works
140
+
141
+ The following are areas that will be implemented in future:
142
+
143
+ - [ ] PDF report generation
144
+ - [x] User documentation
145
+ - [ ] A comprehensive web app for analysis and design of foundations
146
+ - [ ] Strip Footing Design (Eurocode 2)
147
+ - [ ] Strap Footing Design (Eurocode 2)
148
+ - [ ] API Support
149
+
150
+ ## Contributing
151
+
152
+ The guidelines for contributing are specified [here](https://github.com/kunle009/Foundationdesign/blob/main/CONTRIBUTING.md).
153
+
154
+ ## Support
155
+
156
+ The guidelines for support are specified [here](https://github.com/kunle009/Foundationdesign/blob/main/SUPPORT.md).
157
+
158
+ ## License
159
+
160
+ [![PyPI - License](https://img.shields.io/pypi/l/FoundationDesign)](https://github.com/kunle009/FoundationDesign/blob/main/LICENSE)
161
+
162
+ Copyright (c) 2022, Kunle Yusuf
data/SUPPORT.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Support for FoundationDesign 🛠️
2
+
3
+ Thank you for using **FoundationDesign**! If you encounter any issues or have suggestions, we’re here to help:
4
+
5
+ - **🐞 Found a bug?**
6
+ Please open an issue on GitHub so I can track and address it. The issue tracker is the fastest way to get support.
7
+
8
+ - **✨ Feature requests welcome!**
9
+ If you have an idea for a new feature, Let me know by opening an issue or drop me a message.
10
+
11
+ - **📬 Prefer to reach out directly?**
12
+ You can email me at **[kunleyusuf858@outlook.com]** for questions or feedback.
13
+
14
+ I review all contributions, questions, and comments seriously. Your input helps make `FoundationDesign` better for everyone—students, engineers, and educators. Thank you for your support!
data/assets/bending_moment.png ADDED

Git LFS Details

  • SHA256: d56c1ed5a17e5d567924a1400cf4696dbe45910f0f9c154149b17e0b51608626
  • Pointer size: 131 Bytes
  • Size of remote file: 116 kB
data/assets/bending_moment1.png ADDED

Git LFS Details

  • SHA256: 8793f1fe9c382da5b94c35ab9a4e7edf9314663c41dd20914159a9ee86ed06b8
  • Pointer size: 131 Bytes
  • Size of remote file: 115 kB
data/assets/mosley_bungey_example_combined_footing.png ADDED

Git LFS Details

  • SHA256: 75abe8676e837ecc9f5361360b04f0286a714336fd2769966109b880b0ef1848
  • Pointer size: 131 Bytes
  • Size of remote file: 147 kB
data/assets/prab-bhatt-example-axially-loaded.png ADDED

Git LFS Details

  • SHA256: 9bc01e27424ae1e04cf9869764681c662f4049479c15c39846c2206fd7b30ae7
  • Pointer size: 131 Bytes
  • Size of remote file: 189 kB
data/assets/prab-bhatt-example-eccentrically-loaded-footing.png ADDED

Git LFS Details

  • SHA256: 9ae4f000ea6ad53b23d136afdd516de5743fe43d33400950e223f67126f70103
  • Pointer size: 131 Bytes
  • Size of remote file: 361 kB
data/assets/shear_force.jpg ADDED

Git LFS Details

  • SHA256: a00452a8215e4138a60d42b1ccf311fdc7d4dafff506cbc163c9f2d407f317e2
  • Pointer size: 130 Bytes
  • Size of remote file: 43.1 kB
data/assets/shear_force.png ADDED

Git LFS Details

  • SHA256: a00452a8215e4138a60d42b1ccf311fdc7d4dafff506cbc163c9f2d407f317e2
  • Pointer size: 130 Bytes
  • Size of remote file: 43.1 kB
data/docs/Makefile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = .
9
+ BUILDDIR = _build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
data/docs/conf.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+ import os
9
+ import sys
10
+
11
+ sys.path.insert(0, os.path.abspath("../"))
12
+
13
+ import sphinx_rtd_theme
14
+
15
+ project = "FoundationDesign"
16
+ copyright = "2024, Kunle Yusuf"
17
+ author = "Kunle Yusuf"
18
+ release = "0.1.2"
19
+
20
+ # -- General configuration ---------------------------------------------------
21
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
22
+
23
+ extensions = [
24
+ "sphinx.ext.autodoc",
25
+ ]
26
+
27
+ templates_path = ["_templates"]
28
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
29
+
30
+
31
+ # -- Options for HTML output -------------------------------------------------
32
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
33
+
34
+ html_theme = "sphinx_rtd_theme"
35
+ html_static_path = ["_static"]
data/docs/docstrings.rst ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _docstrings:
2
+
3
+ ===========================
4
+ FoundationDesign Reference
5
+ ===========================
6
+
7
+ Pad Foundation Analysis
8
+ -----------------------
9
+ .. autoclass:: FoundationDesign.PadFoundation
10
+ .. autofunction:: FoundationDesign.PadFoundation.__init__
11
+ .. autofunction:: FoundationDesign.PadFoundation.area_of_foundation
12
+ .. autofunction:: FoundationDesign.PadFoundation.plot_geometry
13
+ .. autofunction:: FoundationDesign.PadFoundation.foundation_loads
14
+ .. autofunction:: FoundationDesign.PadFoundation.column_axial_loads
15
+ .. autofunction:: FoundationDesign.PadFoundation.column_horizontal_loads_xdir
16
+ .. autofunction:: FoundationDesign.PadFoundation.column_horizontal_loads_ydir
17
+ .. autofunction:: FoundationDesign.PadFoundation.column_moments_xdir
18
+ .. autofunction:: FoundationDesign.PadFoundation.column_moments_ydir
19
+ .. autofunction:: FoundationDesign.PadFoundation.total_force_X_dir_sls
20
+ .. autofunction:: FoundationDesign.PadFoundation.total_force_Y_dir_sls
21
+ .. autofunction:: FoundationDesign.PadFoundation.total_force_Z_dir_sls
22
+ .. autofunction:: FoundationDesign.PadFoundation.total_moments_X_direction_sls
23
+ .. autofunction:: FoundationDesign.PadFoundation.total_moments_Y_direction_sls
24
+ .. autofunction:: FoundationDesign.PadFoundation.eccentricity_X_direction_sls
25
+ .. autofunction:: FoundationDesign.PadFoundation.eccentricity_Y_direction_sls
26
+ .. autofunction:: FoundationDesign.PadFoundation.pad_base_pressures_sls
27
+ .. autofunction:: FoundationDesign.PadFoundation.bearing_pressure_check_sls
28
+ .. autofunction:: FoundationDesign.PadFoundation.plot_base_pressures_sls
29
+ .. autofunction:: FoundationDesign.PadFoundation.total_force_X_dir_uls
30
+ .. autofunction:: FoundationDesign.PadFoundation.total_force_Y_dir_uls
31
+ .. autofunction:: FoundationDesign.PadFoundation.total_force_Z_dir_uls
32
+ .. autofunction:: FoundationDesign.PadFoundation.total_moments_X_direction_uls
33
+ .. autofunction:: FoundationDesign.PadFoundation.total_moments_Y_direction_uls
34
+ .. autofunction:: FoundationDesign.PadFoundation.eccentricity_X_direction_uls
35
+ .. autofunction:: FoundationDesign.PadFoundation.eccentricity_Y_direction_uls
36
+ .. autofunction:: FoundationDesign.PadFoundation.pad_base_pressures_uls
37
+ .. autofunction:: FoundationDesign.PadFoundation.base_pressure_rate_of_change_X
38
+ .. autofunction:: FoundationDesign.PadFoundation.base_pressure_rate_of_change_Y
39
+
40
+
41
+ Pad Foundation Design
42
+ ---------------------
43
+ .. autoclass:: FoundationDesign.padFoundationDesign
44
+ .. autofunction:: FoundationDesign.padFoundationDesign.__init__
45
+ .. autofunction:: FoundationDesign.padFoundationDesign.__loading_diagrams_X_dir
46
+ .. autofunction:: FoundationDesign.padFoundationDesign.__loading_diagrams_Y_dir
47
+ .. autofunction:: FoundationDesign.padFoundationDesign.plot_foundation_loading_X
48
+ .. autofunction:: FoundationDesign.padFoundationDesign.plot_foundation_loading_Y
49
+ .. autofunction:: FoundationDesign.padFoundationDesign.plot_bending_moment_X
50
+ .. autofunction:: FoundationDesign.padFoundationDesign.plot_bending_moment_Y
51
+ .. autofunction:: FoundationDesign.padFoundationDesign.plot_shear_force_X
52
+ .. autofunction:: FoundationDesign.padFoundationDesign.plot_shear_force_Y
53
+ .. autofunction:: FoundationDesign.padFoundationDesign.get_design_moment_X
54
+ .. autofunction:: FoundationDesign.padFoundationDesign.get_design_moment_Y
55
+ .. autofunction:: FoundationDesign.padFoundationDesign.get_design_shear_force_X
56
+ .. autofunction:: FoundationDesign.padFoundationDesign.get_design_shear_force_Y
57
+ .. autofunction:: FoundationDesign.padFoundationDesign.area_of_steel_reqd_X_dir
58
+ .. autofunction:: FoundationDesign.padFoundationDesign.__reinforcement_calculations_X_dir
59
+ .. autofunction:: FoundationDesign.padFoundationDesign.reinforcement_provision_flexure_X_dir
60
+ .. autofunction:: FoundationDesign.padFoundationDesign.area_of_steel_reqd_Y_dir
61
+ .. autofunction:: FoundationDesign.padFoundationDesign.__reinforcement_calculations_Y_dir
62
+ .. autofunction:: FoundationDesign.padFoundationDesign.reinforcement_provision_flexure_Y_dir
63
+ .. autofunction:: FoundationDesign.padFoundationDesign.tranverse_shear_check_Xdir
64
+ .. autofunction:: FoundationDesign.padFoundationDesign.tranverse_shear_check_Ydir
65
+ .. autofunction:: FoundationDesign.padFoundationDesign.__punching_shear
66
+ .. autofunction:: FoundationDesign.padFoundationDesign.update_punching_shear_stress_factor
67
+ .. autofunction:: FoundationDesign.padFoundationDesign.punching_shear_column_face
68
+ .. autofunction:: FoundationDesign.padFoundationDesign.punching_shear_check_1d
69
+ .. autofunction:: FoundationDesign.padFoundationDesign.punching_shear_check_2d
70
+
71
+
72
+ Combined Pad Foundation Analysis
73
+ --------------------------------
74
+ .. autoclass:: FoundationDesign.CombinedFootingAnalysis
75
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.__init__
76
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_1_geometry
77
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_2_geometry
78
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_1_axial_loads
79
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_1_horizontal_loads_xdir
80
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_1_horizontal_loads_ydir
81
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_1_moments_xdir
82
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_1_moments_ydir
83
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_2_axial_loads
84
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_2_horizontal_loads_xdir
85
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_2_horizontal_loads_ydir
86
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_2_moments_xdir
87
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.update_column_2_moments_ydir
88
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.foundation_loads
89
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.area_of_foundation
90
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_X_dir_sls
91
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Y_dir_sls
92
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Z_dir_sls
93
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Y_dir_sls
94
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Z_dir_sls
95
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_moments_X_direction_sls
96
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_moments_Y_direction_sls
97
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.eccentricity_X_direction_sls
98
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.eccentricity_Y_direction_sls
99
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.pad_base_pressures_sls
100
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.bearing_pressure_check_sls
101
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.minimum_area_required_wt_moment
102
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.minimum_area_required
103
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.foundation_geometry_optimizer
104
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.plot_optimized_geometry
105
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_X_dir_uls
106
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Y_dir_uls
107
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Z_dir_uls
108
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Y_dir_uls
109
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_force_Z_dir_uls
110
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_moments_X_direction_uls
111
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.total_moments_Y_direction_uls
112
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.eccentricity_X_direction_uls
113
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.eccentricity_Y_direction_uls
114
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.pad_base_pressures_uls
115
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.base_pressure_rate_of_change_X
116
+ .. autofunction:: FoundationDesign.CombinedFootingAnalysis.base_pressure_rate_of_change_Y
117
+
118
+ Combined Pad Foundation Design
119
+ ------------------------------
120
+ .. autoclass:: FoundationDesign.CombinedFootingDesign
121
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.__init__
122
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.__loading_diagrams_X_dir
123
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.__loading_diagrams_Y_dir
124
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.plot_foundation_loading_X
125
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.plot_foundation_loading_Y
126
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.plot_bending_moment_X
127
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.plot_bending_moment_Y
128
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.plot_shear_force_X
129
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.plot_shear_force_Y
130
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.get_design_moment_X
131
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.get_design_moment_Y
132
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.get_design_shear_force_X
133
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.get_design_shear_force_Y
134
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.area_of_steel_reqd_X_dir
135
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.area_of_steel_reqd_Y_dir
136
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.tranverse_shear_check_Xdir
137
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.tranverse_shear_check_Ydir
138
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.__punching_shear
139
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.update_punching_shear_stress_factor
140
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.col_1_punching_shear_column_face
141
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.col_1_punching_shear_check_1d
142
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.col_1_punching_shear_check_2d
143
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.col_2_punching_shear_column_face
144
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.col_2_punching_shear_check_1d
145
+ .. autofunction:: FoundationDesign.CombinedFootingDesign.col_2_punching_shear_check_2d
data/docs/examples.rst ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _examples:
2
+
3
+ 1. Introduction to Examples
4
+ ==============================
5
+
6
+ This section demonstrates the core functionality of the ``FoundationDesign` package with examples. Examples were taken from textbooks by Prab Bhatt and Mosley and Bungey.
7
+
8
+
9
+
10
+
11
+ .. image:: https://colab.research.google.com/assets/colab-badge.svg
12
+ :target: https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Concentric_Footing_Example.ipynb
13
+
14
+ .. image:: https://colab.research.google.com/assets/colab-badge.svg
15
+ :target: https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Eccentric_Footing_Example.ipynb
16
+
17
+ .. image:: https://colab.research.google.com/assets/colab-badge.svg
18
+ :target: https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Combined_Footing_Mosley_bungey.ipynb
19
+
20
+
21
+ In order to effectively use the package online you should first run the cell that initialises the notebook by installing the package.
22
+
23
+ You can also approach the problems using the web-based graphical user interface |website|
24
+
25
+ .. image:: https://img.shields.io/website?url=https%3A%2F%2Fwww.foundationcalcs.com%2F
26
+ :alt: Website
data/docs/index.rst ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. FoundationDesign documentation master file, created by
2
+ sphinx-quickstart on Sat May 4 21:52:31 2024.
3
+ You can adapt this file completely to your liking, but it should at least
4
+ contain the root `toctree` directive.
5
+
6
+ Welcome to FoundationDesign's documentation!
7
+ ============================================
8
+ .. image:: https://img.shields.io/pypi/v/FoundationDesign
9
+ :alt: PyPI - Version
10
+ .. image:: https://img.shields.io/pypi/l/FoundationDesign
11
+ :alt: PyPI - License
12
+ .. image:: https://static.pepy.tech/badge/foundationdesign
13
+ :alt: PEPY - downloads
14
+ .. image:: https://static.pepy.tech/badge/foundationdesign/month
15
+ :alt: PEPY - downloads-month
16
+ .. image:: https://github.com/kunle009/FoundationDesign/actions/workflows/build-and-test.yml/badge.svg?branch=main
17
+ :alt: build-and-test
18
+
19
+
20
+ ``FoundationDesign`` FoundationDesign is a python module to be used for the design and analysis
21
+ of different foundation types in accordance to the Eurocode 2.
22
+ This project is an attempt to have a free standalone python package that can
23
+ be used to analyse and design foundations with results as good as paid softwares.
24
+ This module will be useful in determining:
25
+
26
+ - The critical bending moments in the foundation
27
+ - Critical shear force in the foundation
28
+ - Transverse shear check of the foundation
29
+ - Sliding checks
30
+ - Crack width checks
31
+ - Reinforcement provisions
32
+ - Punching shear checks etc
33
+
34
+
35
+ The ``FoundationDesign`` `package repository <https://github.com/kunle009/FoundationDesign>`_ can be found on Github and is ready for installation using `pip`.
36
+
37
+ .. toctree::
38
+ :maxdepth: 2
39
+ :caption: Getting Started
40
+
41
+ installation
42
+
43
+ .. toctree::
44
+ :maxdepth: 2
45
+ :caption: Theory
46
+
47
+ theory
48
+
49
+ .. toctree::
50
+ :maxdepth: 2
51
+ :caption: Examples
52
+
53
+ examples
54
+
55
+ .. toctree::
56
+ :maxdepth: 2
57
+ :caption: User documentation
58
+
59
+ docstrings
data/docs/installation.rst ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .. _installation:
2
+
3
+ ===========
4
+ First steps
5
+ ===========
6
+
7
+ * The easiest way to try this package for now is using a web-based notebook:
8
+ * Here's an example featuring the design of a concentric pad foundation
9
+
10
+ .. image:: https://colab.research.google.com/assets/colab-badge.svg
11
+ :target: https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Concentric_Footing_Example.ipynb
12
+
13
+ * You can also download and install the ``FoundationDesign`` package, which runs on Python 3.
14
+
15
+ * If you do not have a Python 3 interpreter on your machine, you can install the last version following the instructions in `this tutorial <https://realpython.com/installing-python/>`_.
16
+ * Once you have Python 3, you can open a terminal and install the package with this one-liner::
17
+
18
+ python3 -m pip install --user FoundationDesign
19
+
20
+ **NOTE**: You may need to replace ``python3`` above by the path to your Python 3 executable, or simply ``python`` if you are running Windows.
21
+
22
+ This project is open source, and the code can be found in this `GitHub repository
23
+ <https://github.com/kunle009/FoundationDesign/>`_.
data/docs/make.bat ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=.
11
+ set BUILDDIR=_build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
data/docs/requirements_docs.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ sphinx
2
+ sphinx-autobuild
3
+ sphinx-rtd-theme
data/docs/theory.rst ADDED
File without changes
data/examples/Combined_Footing_Mosley_bungey.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
data/examples/Concentric_Footing_Example.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
data/examples/Eccentric_Footing_Example.ipynb ADDED
The diff for this file is too large to render. See raw diff
 
data/examples/__init__.py ADDED
File without changes
data/paper/paper.bib ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ % Encoding: UTF-8
2
+ @proceedings{en1992,
3
+ added-at = {2012-02-01T19:15:41.000+0100},
4
+ address = {Brussels},
5
+ author = {for Standardization, European Committee},
6
+ biburl = {https://www.bibsonomy.org/bibtex/2865a69d4ed9b68e3d4f05f1017574379/fusenbach},
7
+ interhash = {b2e52194701c070daec06ada4b82cb2e},
8
+ intrahash = {865a69d4ed9b68e3d4f05f1017574379},
9
+ keywords = {en1992},
10
+ organization = {EN},
11
+ owner = {Lars Thomsen},
12
+ publisher = {CEN},
13
+ timestamp = {2012-02-01T19:15:41.000+0100},
14
+ title = {EN 1992-1-1 Eurocode 2: Design of concrete structures - Part 1-1: General ruels and rules for buildings},
15
+ year = 2005
16
+ }
17
+
18
+ @book{HibbelerRussell2013MoM,
19
+ publisher = {P.Ed Australia},
20
+ isbn = {9810694369},
21
+ year = {2013},
22
+ title = {Mechanics of Materials},
23
+ language = {eng},
24
+ address = {Melbourne},
25
+ author = {Hibbeler, Russell},
26
+ keywords = {Structural analysis (Engineering) ; Strength of materials},
27
+ }
28
+
29
+ @book{mosley1982reinforced,
30
+ title={Reinforced Concrete Design},
31
+ author={Mosley, W.H. and Bungey, J.H.},
32
+ isbn={9780333335567},
33
+ url={https://books.google.com.ng/books?id=PkBZAAAAYAAJ},
34
+ year={1982},
35
+ publisher={Macmillan}
36
+ }
37
+
38
+ @book{bhatt2014reinforced,
39
+ title={Reinforced Concrete Design to Eurocodes: Design Theory and Examples, Fourth Edition},
40
+ author={Bhatt, P. and MacGinley, T.J. and Choo, B.S.},
41
+ isbn={9781466552524},
42
+ lccn={2013028845},
43
+ url={https://books.google.com.ng/books?id=LWHvAgAAQBAJ},
44
+ year={2014},
45
+ publisher={Taylor \& Francis}
46
+ }
47
+
48
+ @book{arya2009design,
49
+ title={Design of Structural Elements: Concrete, Steelwork, Masonry and Timber Designs to British Standards and Eurocodes, Third Edition},
50
+ author={Arya, C.},
51
+ isbn={9781482288629},
52
+ url={https://books.google.com.ng/books?id=82BECgAAQBAJ},
53
+ year={2009},
54
+ publisher={CRC Press}
55
+ }
56
+
57
+ @article{Bonanno2021,
58
+ doi = {10.21105/jose.00111},
59
+ url = {https://doi.org/10.21105/jose.00111},
60
+ year = {2021}, publisher = {The Open Journal},
61
+ volume = {4}, number = {40}, pages = {111},
62
+ author = {Jesse Bonanno}, title = {IndeterminateBeam: A Python package for solving 1D indeterminate beams},
63
+ journal = {Journal of Open Source Education}
64
+ }
65
+
66
+ @Article{harris2020array,
67
+ title = {Array programming with {NumPy}},
68
+ author = {Charles R. Harris and K. Jarrod Millman and St{\'{e}}fan J.
69
+ van der Walt and Ralf Gommers and Pauli Virtanen and David
70
+ Cournapeau and Eric Wieser and Julian Taylor and Sebastian
71
+ Berg and Nathaniel J. Smith and Robert Kern and Matti Picus
72
+ and Stephan Hoyer and Marten H. van Kerkwijk and Matthew
73
+ Brett and Allan Haldane and Jaime Fern{\'{a}}ndez del
74
+ R{\'{i}}o and Mark Wiebe and Pearu Peterson and Pierre
75
+ G{\'{e}}rard-Marchant and Kevin Sheppard and Tyler Reddy and
76
+ Warren Weckesser and Hameer Abbasi and Christoph Gohlke and
77
+ Travis E. Oliphant},
78
+ year = {2020},
79
+ month = sep,
80
+ journal = {Nature},
81
+ volume = {585},
82
+ number = {7825},
83
+ pages = {357--362},
84
+ doi = {10.1038/s41586-020-2649-2},
85
+ publisher = {Springer Science and Business Media {LLC}},
86
+ url = {https://doi.org/10.1038/s41586-020-2649-2}
87
+ }
88
+
89
+ @online{plotly,
90
+ author = {Plotly Technologies Inc.},
91
+ title = {Collaborative data science},
92
+ publisher = {Plotly Technologies Inc.},
93
+ address = {Montreal, QC}, year = {2015},
94
+ url = {https://plot.ly}
95
+ }
96
+
97
+ @Comment{jabref-meta: databaseType:bibtex;}
data/paper/paper.md ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: "FoundationDesign: A Python library for structural analysis and design of different foundation type in accordance to the Eurocodes and the UK National Annex"
3
+ tags:
4
+ - foundation design
5
+ - foundation analysis
6
+ - foundation engineering
7
+ - eurocode
8
+ - structural engineering
9
+ - civil engineering
10
+ - Python
11
+ authors:
12
+ - name: Kunle Yusuf
13
+ orcid: 0009-0009-2339-267X
14
+ affiliation: 1
15
+ affiliations:
16
+ - name: No affiliation
17
+ index: 1
18
+ date: 08 July 2025
19
+ bibliography: paper.bib
20
+ nocite: |
21
+ @Bonanno2021, @harris2020array
22
+ ---
23
+
24
+ # Summary
25
+
26
+ `FoundationDesign` is a Python module to be used for the design and analysis of different foundation types in accordance to the Eurocode 2.This project is an attempt to have a free standalone Python package that can
27
+ be used to analyse and design foundations with results as good as paid software's. This module will be useful in determining:
28
+
29
+ - The critical bending moments in the foundation
30
+ - Critical shear force in the foundation
31
+ - Transverse shear check of the foundation
32
+ - Sliding checks
33
+ - Crack width checks
34
+ - Reinforcement provisions
35
+ - Punching shear checks etc
36
+
37
+ The project is based mainly on instructions contained in the [@en1992] and common engineering textbooks such as [@arya2009design], [@bhatt2014reinforced] and [@mosley1982reinforced]
38
+
39
+ The package can be used by:
40
+
41
+ - structural engineers to design foundations
42
+ - civil engineering students to learn the manual design of foundations
43
+
44
+ The [FoundationDesign repository](https://github.com/kunle009/) can be found on Github and is ready for installation using `pip`. Text-based examples of the package presented in the [documentation](http://foundationdesign.readthedocs.io/en/latest/examples.html) includes [Concentric Pad Foundation](https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Concentric_Footing_Example.ipynb), [Eccentric Pad Foundation](https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Eccentric_Footing_Example.ipynb) and a [Combined Footing Pad Foundation](https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Combined_Footing_Mosley_bungey.ipynb). A web-based graphical user interface (GUI) is available at [FoundationCalcs](https://foundationcalcs.com).
45
+
46
+ # Statement of Need
47
+
48
+ The structural design of foundations is a critical step in any civil infrastructure project, and proficiency in this area is essential for civil and structural engineers. However, there's a notable lack of tools that simplify and automate this process, especially via the web, which could significantly enhance accessibility to effective foundation design. The Python ecosystem for civil and structural engineers is also rapidly maturing. The `FoundationDesign` Python library contributes to this growth by complementing existing analysis and design libraries, all while remaining open source for further customization.
49
+
50
+ **FoundationDesign** is a Python package that addresses these gaps by offering:
51
+
52
+ 1. **Comprehensive Theoretical Implementation**
53
+ The package features a clear implementation of Eurocode 2 and UK National Annex principles and guidelines regarding bending, shear, punching shear, and sliding checks.
54
+
55
+ 2. **Interactive Computational Feedback**
56
+ Users can define foundation geometry and loads -including axial, horizontal, and moment loads—and immediately generate bending moment and shear force diagrams, base pressure and minimum-area checks, punching shear assessments, sliding stability, and reinforcement sizing. This instant visual feedback reinforces understanding through experimentation.
57
+
58
+ 3. **Open-Source and Extensible**
59
+ In stark contrast to prevailing practices in civil engineering software development -where applications are often closed-source and operate as 'black boxes'- `FoundationDesign` represents a significant departure. By fully embracing open source and currently licensed under GPL-3.0, it encourages both academic and professional users and engineers to inspect, adapt, and extend the library. Currently, `FoundationDesign` supports the design of concentric and eccentric pad foundations, as well as combined pad foundations.
60
+
61
+ 4. **Cloud Based Web GUI**
62
+ A companion web app [FoundationCalcs](https://foundationcalcs.com) -currently in beta- offers a GUI for the use of non programmers making the library further accessible to a wide range of users.
63
+
64
+ My structural design internship during my undergraduate studies served as the primary inspiration for this package. I spent that time designing foundations with an old Fortran command-line software that, while remarkably fast and efficient, demanded manual input through a cumbersome text file and lacked any visual feedback. This experience, alongside my growing interest in computer science since high school, propelled me to develop a more user-friendly and interactive software capable of designing foundations in a similar, powerful manner to the Fortran tool, but with a modern approach.
65
+
66
+ ## Functionality and Usage
67
+
68
+ For now this package is limited to only concentric and eccentric pad foundation and combined footing foundation types.
69
+ A typical use case of the pad foundation class contained in the `FoundationDesign` module includes
70
+
71
+ - Create a `PadFoundation` object to help analyse
72
+ - Assign `Loads` to the `PadFoundation` object
73
+ - Solving for foundation forces
74
+ - Design the foundation using the `padFoundationDesign` class
75
+ - Check the design results
76
+ - Plot foundation design forces.
77
+
78
+ You can follow along with the example below, which is an excerpt from [@bhatt2014reinforced] section 11.4.2.1 page 443, in this web-based [Concentric Pad Foundation Notebook](https://colab.research.google.com/github/kunle009/FoundationDesign/blob/main/examples/Concentric_Footing_Example.ipynb).
79
+
80
+ The units used throughout the Python package are SI units (newtons and metres)
81
+
82
+ ### Creating a Pad Foundation
83
+
84
+ The creation of a `PadFoundation` instance involves the input of the foundation length and breadth (m), the column length and breadth (m), soil bearing capacity (kN/m2) and the column position in the x and y direction relative to the foundation's origin (m). The `PadFoundation` class is contained in the `FoundationDesign` module and can be imported as follows:
85
+
86
+ ```Python
87
+ from FoundationDesign import PadFoundation,padFoundationDesign
88
+ # Create a foundation with an initial size of 2.5m by 2.5m,
89
+ # supporting a 400mm x 400mm column carrying a dead load of 800kN and imposed load of 300kN
90
+ # The soil bearing capacity is 200kN/m2.
91
+ fdn = PadFoundation(
92
+ foundation_length=2500,
93
+ foundation_width=2500,
94
+ column_length=400,
95
+ column_width=400,
96
+ col_pos_xdir=1250,
97
+ col_pos_ydir=1250,
98
+ soil_bearing_capacity=200,
99
+ )
100
+ ```
101
+
102
+ ### Defining Loads
103
+
104
+ `FoundationDesign` supports different types of loading scenarios in both x and y direction. This includes `column_axial_loads`, `column_horizontal_loads_xdir`, `column_horizontal_loads_xdir`, `column_moments_xdir` and `column_moments_ydir`.
105
+ These loads can be defined under three load cases `permanent` ,`imposed`and`wind`. With their accurate sign convention contained in the [documentation](https://foundationdesign.readthedocs.io/en/latest/docstrings.html)
106
+
107
+ ```Python
108
+ # Define the column axial loads with dead load of 800kN and imposed load of 300kN
109
+ fdn.column_axial_loads(permanent_axial_load=800,imposed_axial_load=300)
110
+ ```
111
+
112
+ ### Solving for Foundation Forces
113
+
114
+ Once the `PadFoundation` object has been assigned with `Loads` objects it can then be solved. The foundation's pressure relative to the soil bearing capacity and the minimum area of the foundation can be accessed
115
+
116
+ ```Python
117
+ fdn.bearing_pressure_check_sls()['status']
118
+ area = fdn.minimum_area_required()
119
+ ```
120
+
121
+ ### Designing the Pad Foundation
122
+
123
+ Designing the foundation involves creating a `padFoundationDesign` object, which takes the `PadFoundation` object as an argument alongside the concrete's `Fck`, `Fy`, `concrete_cover` and the reinforcement diameter in x and y directions `bar_diameterX` and `bar_diameterY`. The design allows the user check for bending moments, shear forces, punching shear, and reinforcement requirements in both directions. A proper description of symbols and units can be found in the [documentation](https://foundationdesign.readthedocs.io/en/latest/docstrings.html).
124
+
125
+ ```Python
126
+ # Design the pad foundation with a grade 30 concrete strength, reinforcement strength of 500 N/mm2, 40mm concrete cover
127
+ # and bar diameter of 16mm in both directions
128
+ fdn_design = padFoundationDesign(
129
+ fdn, fck=30, fyk=500, concrete_cover=40, bar_diameterX=16, bar_diameterY=16
130
+ )
131
+ ```
132
+
133
+ ### Checking Design Results
134
+
135
+ Different results can be checked from the `padFoundationDesign` object, including the reinforcement area required and provided in both x and y directions, the transverse shear check, punching shear checks and sliding resistance check. For Example,
136
+
137
+ ```Python
138
+ #Show the reinforcement area required along the x axis
139
+ fdn_design.area_of_steel_reqd_X_dir()['area_required_per_m']
140
+ # Show the transverse shear check along the x axis
141
+ fdn_design.transverse_shear_check_X_dir()['status']
142
+ # Show the punching shear check along the column face
143
+ fdn_design.punching_shear_column_face()['status']
144
+ # Show the punching shear check along the 1D perimeter
145
+ fdn_design.punching_shear_check_1d()['status']
146
+ # Show the punching shear check along the 2D perimeter
147
+ fdn_design.punching_shear_check_2d()['status']
148
+ # show the resistance of the foundation to sliding
149
+ fdn_design.sliding_resistance_check()['status']
150
+ ```
151
+
152
+ ### Plotting results
153
+
154
+ Lot's of results can be investigated by plotting different results from the `PadFoundation` and `padFoundationDesign` objects. The plots are generated using the [@plotly] library. Various other plots can be generated to visualise the foundation geometry, base pressures, loading diagrams, bending moment diagrams, and shear force diagrams. The following code snippet demonstrates how to generate some of these plots:
155
+
156
+ ```Python
157
+ # Plot the bending moment diagram in x direction
158
+ fdn_design.plot_bending_moment_X()
159
+ # Plot the shear force diagram in x direction
160
+ fdn_design.plot_shear_force_X()
161
+ ```
162
+
163
+ This outputs the bending moment plot with the design bending moment shown at the face of the column.
164
+ ![Foundation Bending Moment in X direction](https://github.com/kunle009/FoundationDesign/blob/main/assets/bending_moment1.png?raw=true)
165
+ The shear force plot is also displayed with critical shear force showing at 1d from column the face.
166
+ ![Foundation Shear Force in X direction](https://github.com/kunle009/FoundationDesign/blob/main/assets/shear_force.png?raw=true)
167
+
168
+ # References
data/requirements-test.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ indeterminatebeam==2.2.1
2
+ numpy==1.24.4
3
+ plotly==5.15.0
4
+ pytest
data/requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ indeterminatebeam==2.2.1
2
+ numpy>=1.24.4
3
+ plotly>=5.15.0
data/setup.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from setuptools import setup
2
+
3
+ # store readme.md files
4
+ with open("README.md", "r") as fh:
5
+ long_description = fh.read()
6
+ # read the requirements
7
+ with open("requirements.txt", "r") as fh:
8
+ requirements = [line.strip() for line in fh]
9
+
10
+ setup(
11
+ name="FoundationDesign",
12
+ packages=["FoundationDesign"],
13
+ version="0.1.2",
14
+ author="Kunle Yusuf",
15
+ author_email="kunleyusuf858@gmail.com",
16
+ description="A python module for structural analysis and design of different foundation types in accordance to the Eurocodes",
17
+ url="https://github.com/kunle009/FoundationDesign",
18
+ long_description=long_description,
19
+ long_description_content_type="text/markdown",
20
+ classifiers=[
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
27
+ "Operating System :: OS Independent",
28
+ ],
29
+ python_requires=">=3.8",
30
+ install_requires=requirements,
31
+ )
data/tests/CombinedFootingAnalysis.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import unittest
2
+ from FoundationDesign.combinedfootingdesign import CombinedFootingAnalysis
3
+
4
+ class CombinedFootingAnalysisTestCase:
5
+ def setUp(self):
6
+ comb_footing = CombinedFootingAnalysis(
7
+ foundation_length=4600,
8
+ foundation_width=2300,
9
+ soil_bearing_capacity=300,
10
+ spacing_btwn_columns=3000,
11
+ )
12
+ comb_footing.update_column_1_geometry(
13
+ column_length=300, column_width=300, col_pos_xdir=540, col_pos_ydir=1145
14
+ )
15
+ comb_footing.update_column_2_geometry(
16
+ column_length=400, column_width=400, col_pos_xdir=3540, col_pos_ydir=1145
17
+ )
18
+ comb_footing.update_column_1_axial_loads(
19
+ permanent_axial_load=1000, imposed_axial_load=200
20
+ )
21
+ comb_footing.update_column_2_axial_loads(
22
+ permanent_axial_load=1400, imposed_axial_load=300
23
+ )
24
+ comb_footing.foundation_loads(
25
+ foundation_thickness=850,
26
+ soil_depth_abv_foundation=0,
27
+ soil_unit_weight=18,
28
+ concrete_unit_weight=24,
29
+ consider_self_weight=False,
30
+ )
31
+ self.combined_footing = comb_footing
data/tests/__init__.py ADDED
File without changes
data/tests/test.py ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from FoundationDesign.foundationdesign import padFoundationDesign, PadFoundation
2
+
3
+ fdn = PadFoundation(
4
+ foundation_length=3600,
5
+ foundation_width=3000,
6
+ column_length=450,
7
+ column_width=450,
8
+ col_pos_xdir=1800,
9
+ col_pos_ydir=1500,
10
+ soil_bearing_capacity=150,
11
+ )
12
+
13
+ z = fdn.foundation_loads(
14
+ foundation_thickness=550,
15
+ soil_depth_abv_foundation=0,
16
+ soil_unit_weight=18,
17
+ concrete_unit_weight=24,
18
+ )
19
+ fdn.column_axial_loads(permanent_axial_load=770, imposed_axial_load=330)
20
+ fdn.column_horizontal_loads_xdir(
21
+ permanent_horizontal_load_xdir=35, imposed_horizontal_load_xdir=15
22
+ )
23
+ fdn.column_moments_xdir(permanent_moment_xdir=78, imposed_moment_xdir=34)
24
+
25
+
26
+ fdn_design = padFoundationDesign(
27
+ fdn, fck=30, fyk=500, concrete_cover=30, bar_diameterX=16, bar_diameterY=16
28
+ )
29
+
30
+ # fdn_design.plot_foundation_loading_X()
31
+ # fdn_design.plot_foundation_loading_Y()
32
+ # fdn_design.plot_bending_moment_X()
33
+ # fdn_design.plot_bending_moment_Y()
34
+ # fdn_design.plot_shear_force_Y()
35
+ # print(fdn_design.get_design_moment_X())
36
+ # print(fdn_design.get_design_moment_Y())
37
+ # print(fdn_design.get_design_shear_force_X())
38
+ # print(fdn_design.area_of_steel_reqd_X_dir())
39
+ # print(fdn_design.area_of_steel_reqd_Y_dir())
40
+ print(fdn_design.reinforcement_provision_flexure_X_dir())
41
+ print(fdn_design.reinforcement_provision_flexure_Y_dir())
42
+
43
+ #print(fdn_design.punching_shear_column_face())
44
+ #print(fdn_design.punching_shear_check_1d())
45
+ #print(fdn_design.punching_shear_check_2d())
46
+ #print(fdn_design.tranverse_shear_check_Xdir())
47
+ #print(fdn_design.tranverse_shear_check_Ydir())
48
+ #print(fdn_design.sliding_resistance_check())
49
+
50
+
51
+ # outputs
52
+ # print(fdn.area_of_foundation())
53
+ # print(fdn.total_force_X_dir_sls())
54
+ # print(fdn.total_force_Y_dir_sls())
55
+ # print(fdn.total_force_Z_dir_sls())
56
+ # print(fdn.total_moments_X_direction_sls())
57
+ # print(fdn.total_moments_Y_direction_sls())
58
+ # print(fdn.eccentricity_X_direction_sls())
59
+ # print(fdn.eccentricity_Y_direction_sls())
60
+ # print(fdn.pad_base_pressures_sls())
61
+ # print(fdn.pad_base_pressures_uls())
62
+ # print(fdn.total_force_X_dir_uls())
63
+ # print(fdn.total_force_Y_dir_uls())
64
+ # print(fdn.total_force_Z_dir_uls())
65
+ # print(fdn.total_moments_X_direction_uls())
66
+ # print(fdn.total_moments_Y_direction_uls())
67
+ # print(fdn.eccentricity_X_direction_uls())
68
+ # print(fdn.eccentricity_Y_direction_uls())
data/tests/test2.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from FoundationDesign import CombinedFootingAnalysis
2
+
3
+ comb_footing = CombinedFootingAnalysis(
4
+ foundation_length=4600,
5
+ foundation_width=2300,
6
+ soil_bearing_capacity=300,
7
+ spacing_btwn_columns=3000,
8
+ )
9
+ comb_footing.update_column_1_geometry(
10
+ column_length=300, column_width=300, col_pos_xdir=540, col_pos_ydir=1145
11
+ )
12
+ comb_footing.update_column_2_geometry(
13
+ column_length=400, column_width=400, col_pos_xdir=3540, col_pos_ydir=1145
14
+ )
15
+ comb_footing.update_column_1_axial_loads(
16
+ permanent_axial_load=1000, imposed_axial_load=200
17
+ )
18
+ comb_footing.update_column_2_axial_loads(
19
+ permanent_axial_load=1400, imposed_axial_load=300
20
+ )
21
+ comb_footing.foundation_loads(
22
+ foundation_thickness=850,
23
+ soil_depth_abv_foundation=0,
24
+ soil_unit_weight=18,
25
+ concrete_unit_weight=24,
26
+ consider_self_weight=False,
27
+ )
28
+ # min_area = comb_footing.minimum_area_required()
29
+ # z = comb_footing.foundation_geometry_optimizer()
30
+ comb_footing.plot_geometry()
31
+ pres = comb_footing.pad_base_pressures_sls()
32
+ print(pres)
33
+ pres = comb_footing.pad_base_pressures_uls()
34
+ print(pres)
35
+ comb_footing.bearing_pressure_check_sls()
36
+ comb_footing.total_axial_force_uls()
data/tests/test_PadFoundation.py ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import unittest
2
+ from FoundationDesign import PadFoundation
3
+
4
+
5
+ class PadFoundationTestCase(unittest.TestCase):
6
+ def setUp(self):
7
+ fdn = PadFoundation(
8
+ foundation_length=3600,
9
+ foundation_width=3000,
10
+ column_length=450,
11
+ column_width=450,
12
+ col_pos_xdir=1800,
13
+ col_pos_ydir=1500,
14
+ soil_bearing_capacity=150,
15
+ )
16
+
17
+ z = fdn.foundation_loads(
18
+ foundation_thickness=550,
19
+ soil_depth_abv_foundation=0,
20
+ soil_unit_weight=18,
21
+ concrete_unit_weight=24,
22
+ )
23
+
24
+ fdn.column_axial_loads(permanent_axial_load=770, imposed_axial_load=330)
25
+ fdn.column_horizontal_loads_xdir(
26
+ permanent_horizontal_load_xdir=35, imposed_horizontal_load_xdir=15
27
+ )
28
+ fdn.column_moments_xdir(permanent_moment_xdir=78, imposed_moment_xdir=34)
29
+ self.pad_foundation = fdn
30
+
31
+ def test_foundation_loads(self):
32
+ pad_foundation = self.pad_foundation
33
+ self.assertEqual(
34
+ pad_foundation.foundation_loads(
35
+ foundation_thickness=550,
36
+ soil_depth_abv_foundation=0,
37
+ soil_unit_weight=18,
38
+ concrete_unit_weight=24,
39
+ ),
40
+ [13.2, 0.0],
41
+ )
42
+
43
+ def test_minimum_area_of_foundation(self):
44
+ pad_foundation = self.pad_foundation
45
+ self.assertEqual(pad_foundation.minimum_area_required(), 10.24)
46
+
47
+ def test_total_loads_moments(self):
48
+ pad_foundation = self.pad_foundation
49
+ self.assertEqual(pad_foundation.total_force_X_dir_sls(), 50)
50
+ self.assertEqual(pad_foundation.total_force_Y_dir_sls(), 0)
51
+ self.assertEqual(pad_foundation.total_force_Z_dir_sls(), 1242.56)
52
+ self.assertEqual(pad_foundation.total_force_X_dir_uls(), 69.75)
53
+ self.assertEqual(pad_foundation.total_force_Y_dir_uls(), 0)
54
+ self.assertEqual(pad_foundation.total_moments_X_direction_sls(), 2376.108)
55
+ self.assertEqual(pad_foundation.total_moments_Y_direction_sls(), 1863.84)
56
+ self.assertEqual(pad_foundation.total_moments_X_direction_uls(), 3303.183)
57
+ self.assertEqual(pad_foundation.total_moments_Y_direction_uls(), 2590.434)
58
+
59
+ def test_eccentricities(self):
60
+ pad_foundation = self.pad_foundation
61
+ self.assertEqual(pad_foundation.eccentricity_X_direction_uls(), 112.72)
62
+ self.assertEqual(pad_foundation.eccentricity_Y_direction_uls(), 0)
63
+ self.assertEqual(pad_foundation.eccentricity_X_direction_sls(), 112)
64
+ self.assertEqual(pad_foundation.eccentricity_Y_direction_sls(), 0)
65
+
66
+ def test_pad_base_pressure(self):
67
+ pad_foundation = self.pad_foundation
68
+ self.assertTupleEqual(
69
+ pad_foundation.pad_base_pressures_sls(), (93.576, 93.576, 136.528, 136.528)
70
+ )
71
+ self.assertTupleEqual(
72
+ pad_foundation.pad_base_pressures_uls(),
73
+ (129.863, 129.863, 189.944, 189.944),
74
+ )
75
+
76
+
77
+ if __name__ == "__main__":
78
+ unittest.main(verbosity=2)
data/tests/test_PadFoundationDesign.py ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import unittest
2
+ from FoundationDesign import padFoundationDesign, PadFoundation
3
+
4
+
5
+ class PadFoundationDesignTestCase(unittest.TestCase):
6
+ def setUp(self):
7
+ fdn = PadFoundation(
8
+ foundation_length=3600,
9
+ foundation_width=3000,
10
+ column_length=450,
11
+ column_width=450,
12
+ col_pos_xdir=1800,
13
+ col_pos_ydir=1500,
14
+ soil_bearing_capacity=150,
15
+ )
16
+ z = fdn.foundation_loads(
17
+ foundation_thickness=550,
18
+ soil_depth_abv_foundation=0,
19
+ soil_unit_weight=18,
20
+ concrete_unit_weight=24,
21
+ )
22
+
23
+ fdn.column_axial_loads(permanent_axial_load=770, imposed_axial_load=330)
24
+ fdn.column_horizontal_loads_xdir(
25
+ permanent_horizontal_load_xdir=35, imposed_horizontal_load_xdir=15
26
+ )
27
+ fdn.column_moments_xdir(permanent_moment_xdir=78, imposed_moment_xdir=34)
28
+ fdn_design = padFoundationDesign(
29
+ fdn, fck=30, fyk=500, concrete_cover=30, bar_diameterX=16, bar_diameterY=16
30
+ )
31
+ self.pad_foundation_design = fdn_design
32
+
33
+ def test_foundation_plots(self):
34
+ pad_foundation_design = self.pad_foundation_design
35
+ # check plotting valid
36
+ # pad_foundation_design.plot_foundation_loading_X()
37
+ # pad_foundation_design.plot_foundation_loading_Y()
38
+ # pad_foundation_design.plot_bending_moment_X()
39
+ # pad_foundation_design.plot_bending_moment_Y()
40
+ # pad_foundation_design.plot_shear_force_Y()
41
+ self.assertEqual(pad_foundation_design.get_design_moment_X(), 607.861)
42
+ self.assertEqual(pad_foundation_design.get_design_moment_Y(), 415.754)
43
+ self.assertEqual(pad_foundation_design.get_design_shear_force_X(), 520.616)
44
+ self.assertEqual(pad_foundation_design.get_design_shear_force_Y(), 398.459)
45
+
46
+ def test_reinforcement_calculations(self):
47
+ pad_foundation_design = self.pad_foundation_design
48
+ self.assertEqual(pad_foundation_design.area_of_steel_reqd_X_dir()['area_required_per_m'], 958)
49
+ self.assertEqual(pad_foundation_design.area_of_steel_reqd_Y_dir()['area_required_per_m'], 747)
50
+ self.assertDictEqual(
51
+ pad_foundation_design.reinforcement_provision_flexure_X_dir(),
52
+ {
53
+ "steel_label": "H",
54
+ "bar_diameter": "16mm",
55
+ "bar_spacing": 200.0,
56
+ "area_provided": 1005,
57
+ "status": "Provide H16mm bars spaced at 200.0mm c/c bottom. The area provided is 1005mm²/m parallel to the 3.6m side",
58
+ },
59
+ )
60
+ self.assertDictEqual(
61
+ pad_foundation_design.reinforcement_provision_flexure_Y_dir(),
62
+ {
63
+ "steel_label": "H",
64
+ "bar_diameter": "12mm",
65
+ "bar_spacing": 150.0,
66
+ "area_provided": 754,
67
+ "status": "Provide H12mm bars spaced at 150.0mm c/c bottom. The area provided is 754mm²/m parallel to the 3.6m side",
68
+ },
69
+ )
70
+
71
+ def test_punching_shear(self):
72
+ pad_foundation_design = self.pad_foundation_design
73
+ self.assertDictEqual(
74
+ pad_foundation_design.punching_shear_column_face(),
75
+ {
76
+ "design_punching_shear_stress": 1.691468253968254,
77
+ "maximum_punching_shear_resistance": 4.488,
78
+ "status": "The maximum punching shear resistance of 4.488N/mm² exceeds the design punching shear stress of 1.691N/mm² - PASS!!!",
79
+ },
80
+ )
81
+ self.assertDictEqual(
82
+ pad_foundation_design.punching_shear_check_1d(),
83
+ {
84
+ "punching_shear_stress": 0.798,
85
+ "ved_design": 0.5876415001228639,
86
+ "status": "The maximum punching shear resistance of 0.798N/mm² exceeds the design punching shear stress of 0.588N/mm² - PASS!!!",
87
+ },
88
+ )
89
+ self.assertDictEqual(
90
+ pad_foundation_design.punching_shear_check_2d(),
91
+ {
92
+ "design_punching_shear_stress": 0.22247511396970102,
93
+ "shear_resistance_max": 0.399,
94
+ "status": "The maximum punching shear resistance of 0.399N/mm² exceeds the design punching shear stress of 0.222N/mm² - PASS!!!",
95
+ },
96
+ )
97
+
98
+ def test_sliding_transverse_checks(self):
99
+ pad_foundation_design = self.pad_foundation_design
100
+ self.assertDictEqual(
101
+ pad_foundation_design.tranverse_shear_check_Xdir(),
102
+ {
103
+ "design_shear_resistance": 609.792,
104
+ "status": "The design shear resistance of 609.792kN exceeds the design shear force of 520.616kN - PASS!!!",
105
+ },
106
+ )
107
+ self.assertDictEqual(
108
+ pad_foundation_design.tranverse_shear_check_Ydir(),
109
+ {
110
+ "design_shear_resistance": 739.123,
111
+ "status": "The design shear resistance of 739.123kN exceeds the design shear force of 398.459kN - PASS!!!",
112
+ },
113
+ )
114
+ self.assertDictEqual(
115
+ pad_foundation_design.sliding_resistance_check(),
116
+ {
117
+ "design_friction_angle": 0.349,
118
+ "sliding_resistance": 332.077,
119
+ "foundation_horizontal_force": 69.75,
120
+ "status": " The allowable sliding resistance 332kN is greater than the actual horizontal loads 70kN Status - PASS!!!",
121
+ },
122
+ )
123
+
124
+
125
+ if __name__ == "__main__":
126
+ unittest.main(verbosity=2)
data/top_level.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ FoundationDesign/ Top-level package
2
+ __init__.py Initialization file for the package
3
+ foundationdesign.py Main code file