Skip to content

Commit 3509fc8

Browse files
author
Moreno
committed
Save WIP changes before switching to main
1 parent 30ca6d1 commit 3509fc8

16 files changed

+193
-143
lines changed

examples/05_Anchors/anchor_dandg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
# Assign mooring loads
3131
anchor.loads = {
3232
'Hm': 5.0e6,
33-
'Vm': 2.5e5
34-
}
33+
'Vm': 2.5e5}
34+
3535
anchor.line_type = 'chain'
3636
anchor.d = 0.16
3737
anchor.w = 5000.0
@@ -57,7 +57,7 @@
5757
anchor.getSizeAnchor(
5858
geom = [anchor.dd['design']['L'], anchor.dd['design']['D']],
5959
geomKeys = ['L', 'D'],
60-
geomBounds = [(2.0, 70.0), (0.25, 3.0)],
60+
geomBounds = [(2.0, 30.0), (2.25, 5.0)],
6161
loads = None,
6262
lambdap_con = [4, 50],
6363
zlug_fix = True,

examples/05_Anchors/anchor_driven_soil.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
'type': 'driven',
2121
'design': {
2222
'L': 25.0, # Embedded length
23-
'D': 4.25, # Diameter
23+
'D': 2.00, # Diameter
2424
'zlug': 3.0 # Padeye depth
2525
}
2626
},
@@ -29,7 +29,7 @@
2929

3030
# Assign mooring loads
3131
anchor.loads = {
32-
'Hm': 2.0e6,
32+
'Hm': 7.0e5,
3333
'Vm': 2.5e5}
3434

3535
anchor.line_type = 'chain'
@@ -71,9 +71,9 @@
7171
anchor.getSizeAnchor(
7272
geom = [anchor.dd['design']['L'], anchor.dd['design']['D']],
7373
geomKeys = ['L', 'D'],
74-
geomBounds = [(2.0, 70.0), (0.25, 3.0)],
74+
geomBounds = [(2.0, 50.0), (0.25, 3.5)],
7575
loads = None,
76-
lambdap_con = [4, 50],
76+
lambdap_con = [3, 50],
7777
zlug_fix = True,
7878
safety_factor = {'SF_horizontal': 1, 'SF_vertical': 1},
7979
plot = True)

examples/05_Anchors/anchor_helical.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030

3131
# --- Assign mooring loads and properties ---
3232
anchor.loads = {
33-
'Hm': 80e4,
34-
'Vm': 50e5}
33+
'Hm': 8e5,
34+
'Vm': 1e5}
3535

3636
anchor.line_type = 'chain'
3737
anchor.d = 0.16
@@ -48,8 +48,7 @@
4848
line_type = anchor.line_type,
4949
d = anchor.d,
5050
w = anchor.w,
51-
plot = True
52-
)
51+
plot = True)
5352

5453
print('\nLug Forces Computed:')
5554
print(f'Ha = {Ha:.2f} N')
@@ -63,8 +62,7 @@
6362
line_type = anchor.line_type,
6463
d = anchor.d,
6564
w = anchor.w,
66-
plot = False
67-
)
65+
plot = False)
6866

6967
print('\nCapacity Results:')
7068
for key, val in anchor.anchorCapacity.items():
@@ -79,5 +77,4 @@
7977
lambdap_con = [6, 15],
8078
zlug_fix = True,
8179
safety_factor = {'SF_horizontal': 1, 'SF_vertical': 1},
82-
plot = False
83-
)
80+
plot = False)

examples/05_Anchors/anchor_plate.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
# --- Create plate anchor ---
2020
anchor = Anchor(
2121
dd = {'type': 'plate', 'design': {'B': 3.0, 'L': 6.0, 'zlug': 14.0, 'beta': 30.0}},
22-
r = [100.0, 100.0, 0.0]
23-
)
22+
r = [0.0, 0.0, 0.0])
2423

2524
# --- Assign load and mooring properties ---
2625
anchor.loads = {
2726
'Hm': 3.5e6,
28-
'Vm': 2.5e6
29-
}
27+
'Vm': 2.5e6}
28+
3029
anchor.line_type = 'chain'
3130
anchor.d = 0.16
3231
anchor.w = 5000.0
@@ -42,8 +41,7 @@
4241
line_type = anchor.line_type,
4342
d = anchor.d,
4443
w = anchor.w,
45-
plot = True
46-
)
44+
plot = True)
4745

4846
print('\nLug Forces Computed:')
4947
print(f'Ha = {Ha:.2f} N')
@@ -57,8 +55,7 @@
5755
line_type = anchor.line_type,
5856
d = anchor.d,
5957
w = anchor.w,
60-
plot = True
61-
)
58+
plot = True)
6259

6360
print('\nCapacity Results:')
6461
for key, value in anchor.anchorCapacity.items():
@@ -72,6 +69,6 @@
7269
loads = None,
7370
lambdap_con = [2, 4], # less critical for plates
7471
zlug_fix = True,
75-
safety_factor = {'SF_combined': 3},
76-
plot = True
77-
)
72+
safety_factor = {'SF_horizontal': 2, 'SF_vertical': 3},
73+
#safety_factor = {'SF_combined': 3},
74+
plot = True)

examples/05_Anchors/anchor_soil_uniform.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11

2-
import sys
3-
sys.path.append(r'C:\Code\FAModel_anchors\famodel')
4-
52
from project import Project
63
from anchors.anchor import Anchor
74

@@ -57,7 +54,6 @@
5754
geom = [anchor.dd['design']['L'], anchor.dd['design']['D']],
5855
geomKeys = ['L', 'D'],
5956
geomBounds = [(8.0, 15.0), (2.0, 4.0)],
60-
loads = None,
6157
lambdap_con = [3, 6],
6258
zlug_fix = False,
6359
safety_factor = {'SF_combined': 1},

examples/05_Anchors/anchor_suction.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
D = anchor.dd['design']['D']
6161
zlug = anchor.dd['design']['zlug']
6262
# Access matched profile
63-
layers = anchor.soil_profile
64-
z0 = layers[0]['top']
63+
layers = anchor.soil_profile[0]['layers']
64+
z0 = layers[0]['top']
6565

6666
plot_suction(layers, L=L, D=D, z0=z0, zlug=zlug)
6767

@@ -121,7 +121,7 @@
121121
loads = None,
122122
lambdap_con = [3, 6],
123123
zlug_fix = False,
124-
safety_factor = {'SF_combined': 1},
124+
safety_factor = {'SF_horizontal': 2, 'SF_vertical': 3},
125125
plot = True)
126126

127127
print('\nFinal Optimized Anchor:')

examples/05_Anchors/anchor_torpedo.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@
8787
lambdap_con = [2, 8],
8888
zlug_fix = True,
8989
safety_factor = {'SF_combined': 1},
90-
plot = True
91-
)
90+
plot = True)
9291

9392
print('\nFinal Optimized Anchor:')
9493
print('Design:', anchor.dd['design'])

examples/05_Anchors/example_suction.ipynb

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,22 @@
2525
},
2626
{
2727
"cell_type": "code",
28-
"execution_count": 37,
28+
"execution_count": 7,
2929
"id": "9f2d8d4b",
3030
"metadata": {},
31-
"outputs": [],
31+
"outputs": [
32+
{
33+
"ename": "ModuleNotFoundError",
34+
"evalue": "No module named 'famodel'",
35+
"output_type": "error",
36+
"traceback": [
37+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
38+
"\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
39+
"Cell \u001b[1;32mIn[7], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mfamodel\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01manchors\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01manchor\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m Anchor\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;21;01mfamodel\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01manchors\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01manchors_famodel\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msupport_plots\u001b[39;00m\u001b[38;5;250m \u001b[39m\u001b[38;5;28;01mimport\u001b[39;00m plot_suction\n",
40+
"\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'famodel'"
41+
]
42+
}
43+
],
3244
"source": [
3345
"from famodel.anchors.anchor import Anchor\n",
3446
"from famodel.anchors.anchors_famodel.support_plots import plot_suction"
@@ -45,7 +57,7 @@
4557
},
4658
{
4759
"cell_type": "code",
48-
"execution_count": 38,
60+
"execution_count": 5,
4961
"id": "935551c4",
5062
"metadata": {},
5163
"outputs": [],
@@ -105,16 +117,19 @@
105117
},
106118
{
107119
"cell_type": "code",
108-
"execution_count": 39,
120+
"execution_count": 6,
109121
"id": "3aab0b15",
110122
"metadata": {},
111123
"outputs": [
112124
{
113-
"name": "stdout",
114-
"output_type": "stream",
115-
"text": [
116-
"zlug: 8.67\n",
117-
"L: 12.0\n"
125+
"ename": "NameError",
126+
"evalue": "name 'Anchor' is not defined",
127+
"output_type": "error",
128+
"traceback": [
129+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
130+
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
131+
"Cell \u001b[1;32mIn[6], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m anchor \u001b[38;5;241m=\u001b[39m \u001b[43mAnchor\u001b[49m(\n\u001b[0;32m 2\u001b[0m dd \u001b[38;5;241m=\u001b[39m {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mtype\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;124m'\u001b[39m\u001b[38;5;124msuction\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdesign\u001b[39m\u001b[38;5;124m'\u001b[39m: {\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mD\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m2.5\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mL\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m12.0\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124mzlug\u001b[39m\u001b[38;5;124m'\u001b[39m: \u001b[38;5;241m8.67\u001b[39m}},\n\u001b[0;32m 3\u001b[0m r \u001b[38;5;241m=\u001b[39m [\u001b[38;5;241m250.0\u001b[39m, \u001b[38;5;241m250.0\u001b[39m, \u001b[38;5;241m0.0\u001b[39m]\n\u001b[0;32m 4\u001b[0m )\n\u001b[0;32m 5\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mzlug:\u001b[39m\u001b[38;5;124m'\u001b[39m, anchor\u001b[38;5;241m.\u001b[39mdd[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdesign\u001b[39m\u001b[38;5;124m'\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mzlug\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[0;32m 6\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mL:\u001b[39m\u001b[38;5;124m'\u001b[39m, anchor\u001b[38;5;241m.\u001b[39mdd[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdesign\u001b[39m\u001b[38;5;124m'\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mL\u001b[39m\u001b[38;5;124m'\u001b[39m])\n",
132+
"\u001b[1;31mNameError\u001b[0m: name 'Anchor' is not defined"
118133
]
119134
}
120135
],
@@ -138,17 +153,19 @@
138153
},
139154
{
140155
"cell_type": "code",
141-
"execution_count": 40,
156+
"execution_count": 3,
142157
"id": "368fac90",
143158
"metadata": {},
144159
"outputs": [
145160
{
146-
"name": "stdout",
147-
"output_type": "stream",
148-
"text": [
149-
"[Anchor] Interpolated soil profile: Interpolated_2D with soil types ['clay']\n",
150-
"zlug: 8.67\n",
151-
"L: 12.0\n"
161+
"ename": "NameError",
162+
"evalue": "name 'anchor' is not defined",
163+
"output_type": "error",
164+
"traceback": [
165+
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
166+
"\u001b[1;31mNameError\u001b[0m Traceback (most recent call last)",
167+
"Cell \u001b[1;32mIn[3], line 1\u001b[0m\n\u001b[1;32m----> 1\u001b[0m \u001b[43manchor\u001b[49m\u001b[38;5;241m.\u001b[39minterpolateSoilProfile(profile_map)\n\u001b[0;32m 2\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mzlug:\u001b[39m\u001b[38;5;124m'\u001b[39m, anchor\u001b[38;5;241m.\u001b[39mdd[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdesign\u001b[39m\u001b[38;5;124m'\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mzlug\u001b[39m\u001b[38;5;124m'\u001b[39m])\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mL:\u001b[39m\u001b[38;5;124m'\u001b[39m, anchor\u001b[38;5;241m.\u001b[39mdd[\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mdesign\u001b[39m\u001b[38;5;124m'\u001b[39m][\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mL\u001b[39m\u001b[38;5;124m'\u001b[39m])\n",
168+
"\u001b[1;31mNameError\u001b[0m: name 'anchor' is not defined"
152169
]
153170
}
154171
],

famodel/anchors/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Units within FAModel follow the SI exclusively. The input soil parameters units
3737

3838
profile_map = [
3939
{
40-
'location_name': 'CPT_1',
40+
'name': 'CPT_1',
4141
'x': 498234, 'y': 5725141,
4242
'layers': [
4343
{

0 commit comments

Comments
 (0)