Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/03_Frequency_Domain_Analysis_RAFT/01_platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ platform:
rB : [ 0, 0, 15] # [m] and B coordinates
shape : circ # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : True # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
# --- outer shell including hydro---
stations : [0, 1] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB
d : 10.0 # [m] diameters if circular or side lengths if rectangular (can be pairs)
Expand All @@ -50,7 +50,7 @@ platform:
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)
shape : circ # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : True # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
# --- outer shell including hydro---
stations : [0, 35] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB
d : 12.5 # [m] diameters if circular or side lengths if rectangular (can be pairs)
Expand Down
4 changes: 2 additions & 2 deletions examples/03_Frequency_Domain_Analysis_RAFT/02_FOWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ platform:
rB : [ 0, 0, 15] # [m] and B coordinates
shape : circ # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : True # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
# --- outer shell including hydro---
stations : [0, 1] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB
d : 10.0 # [m] diameters if circular or side lengths if rectangular (can be pairs)
Expand All @@ -1146,7 +1146,7 @@ platform:
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)
shape : circ # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : True # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
# --- outer shell including hydro---
stations : [0, 35] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB
d : 12.5 # [m] diameters if circular or side lengths if rectangular (can be pairs)
Expand Down
64 changes: 64 additions & 0 deletions examples/05_Anchors/anchor_drilled.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

from famodel.anchors.anchor import Anchor

# --- Define soil profile ---
profile_map = [
{
'name': 'CPT_D1',
'x': 0.0, 'y': 0.0,
'layers': [
{'top': 1.5, 'bottom': 5.0, 'soil_type': 'rock', 'UCS_top': 6.0, 'UCS_bot': 8.0, 'Em_top': 175, 'Em_bot': 290},
{'top': 5.0, 'bottom': 9.0, 'soil_type': 'rock', 'UCS_top': 8.0, 'UCS_bot': 10.7, 'Em_top': 277, 'Em_bot': 297},
{'top': 9.0, 'bottom': 30.0, 'soil_type': 'rock', 'UCS_top': 8.0, 'UCS_bot': 10.5, 'Em_top': 280, 'Em_bot': 305}
]
}
]

# --- Create driven pile anchor ---
anchor = Anchor(
dd = {
'type': 'drilled',
'design': {
'L': 10.0, # Embedded length
'D': 2.85, # Diameter
'zlug': 1.0 # Padeye depth
}
},
r = [0.0, 0.0, 0.0])

# Assign mooring loads
anchor.loads = {
'Hm': 5.0e6,
'Vm': 2.5e5}

anchor.line_type = 'chain'
anchor.d = 0.16
anchor.w = 5000.0

# Assign local soil
anchor.setSoilProfile(profile_map)

# --- Step 1: Capacity ---
anchor.getCapacityAnchor(
Hm = anchor.loads['Hm'],
Vm = anchor.loads['Vm'],
zlug = anchor.dd['design']['zlug'],
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True)

print('\nCapacity Results:')
for key, val in anchor.anchorCapacity.items():
print(f'{key}: {val:.2f}')

# --- Step 2: Optimize Anchor Geometry ---
anchor.getSizeAnchor(
geom = [anchor.dd['design']['L'], anchor.dd['design']['D']],
geomKeys = ['L', 'D'],
geomBounds = [(2.0, 30.0), (2.25, 5.0)],
loads = None,
lambdap_con = [4, 50],
zlug_fix = True,
safety_factor = {'SF_horizontal': 1, 'SF_vertical': 1},
plot = True)
65 changes: 65 additions & 0 deletions examples/05_Anchors/anchor_driven_rock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

from famodel.anchors.anchor import Anchor

# --- Define soil profile ---
profile_map = [
{
'name': 'CPT_D1',
'x': 0.0, 'y': 0.0,
'layers': [
{'top': 1.5, 'bottom': 6.0, 'soil_type': 'rock', 'UCS_top': 5.0, 'UCS_bot': 5.0, 'Em_top': 7, 'Em_bot': 7},
{'top': 6.0, 'bottom': 15.0, 'soil_type': 'rock', 'UCS_top': 6.0, 'UCS_bot': 6.7, 'Em_top': 7, 'Em_bot': 7},
{'top': 15.0, 'bottom': 35.0, 'soil_type': 'rock', 'UCS_top': 10.0, 'UCS_bot': 10.5, 'Em_top': 7, 'Em_bot': 7}
]
}
]

# --- Create driven pile anchor ---
anchor = Anchor(
dd = {
'type': 'driven',
'design': {
'L': 15.0, # Embedded length
'D': 1.85, # Diameter
'zlug': 1.5 # Padeye depth
}
},
r = [0.0, 0.0, 0.0]
)

# Assign mooring loads
anchor.loads = {
'Hm': 2.5e6,
'Vm': 2.5e5}

anchor.line_type = 'chain'
anchor.d = 0.16
anchor.w = 5000.0

# Assign local soil
anchor.setSoilProfile(profile_map)

# --- Step 1: Capacity ---
anchor.getCapacityAnchor(
Hm = anchor.loads['Hm'],
Vm = anchor.loads['Vm'],
zlug = anchor.dd['design']['zlug'],
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True)

print('\nCapacity Results:')
for key, val in anchor.anchorCapacity.items():
print(f'{key}: {val:.2f}')

# --- Step 2: Optimize Anchor Geometry ---
anchor.getSizeAnchor(
geom = [anchor.dd['design']['L'], anchor.dd['design']['D']],
geomKeys = ['L', 'D'],
geomBounds = [(2.0, 70.0), (0.25, 3.0)],
loads = None,
lambdap_con = [4, 50],
zlug_fix = True,
safety_factor = {'SF_horizontal': 1, 'SF_vertical': 1},
plot = True)
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

from anchor_map import Anchor
from famodel.anchors.anchor import Anchor

# --- Define soil profile ---
profile_map = [
{
'name': 'CPT_D1',
'x': 0.0, 'y': 0.0,
'layers': [
{'top': 1.0, 'bottom': 6.0, 'soil_type': 'clay', 'gamma_top': 9.0, 'gamma_bot': 10.0, 'Su_top': 45, 'Su_bot': 60},
{'top': 6.0, 'bottom': 15.0, 'soil_type': 'clay', 'gamma_top': 10.0, 'gamma_bot': 10.0, 'Su_top': 60, 'Su_bot': 80},
{'top': 15.0, 'bottom': 35.0, 'soil_type': 'clay', 'gamma_top': 10.0, 'gamma_bot': 10.5, 'Su_top': 80, 'Su_bot': 100}
{'top': 1.5, 'bottom': 6.0, 'soil_type': 'clay', 'gamma_top': 9.0, 'gamma_bot': 10.0, 'Su_top': 25, 'Su_bot': 200},
{'top': 6.0, 'bottom': 15.0, 'soil_type': 'sand', 'gamma_top': 10.0, 'gamma_bot': 10.0, 'phi_top': 28, 'phi_bot': 32, 'Dr_top': 80, 'Dr_bot': 85},
{'top': 15.0, 'bottom': 35.0, 'soil_type': 'clay', 'gamma_top': 10.0, 'gamma_bot': 10.5, 'Su_top': 100, 'Su_bot': 100}
]
}
]
Expand All @@ -20,18 +20,18 @@
'type': 'driven',
'design': {
'L': 25.0, # Embedded length
'D': 2.0, # Diameter
'zlug': 10.0 # Padeye depth
'D': 2.00, # Diameter
'zlug': 3.0 # Padeye depth
}
},
r = [0.0, 0.0, 0.0]
)

# Assign mooring loads
anchor.loads = {
'Hm': 4.0e6,
'Vm': 2.5e6
}
'Hm': 7.0e5,
'Vm': 2.5e5}

anchor.line_type = 'chain'
anchor.d = 0.16
anchor.w = 5000.0
Expand All @@ -47,8 +47,7 @@
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True
)
plot = True)

print('\nLug Forces Computed:')
print(f'Ha = {Ha:.2f} N')
Expand All @@ -62,9 +61,19 @@
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True
)
plot = True)

print('\nCapacity Results:')
for key, val in anchor.capacity_results.items():
for key, val in anchor.anchorCapacity.items():
print(f'{key}: {val:.2f}')

# --- Step 3: Optimize Anchor Geometry ---
anchor.getSizeAnchor(
geom = [anchor.dd['design']['L'], anchor.dd['design']['D']],
geomKeys = ['L', 'D'],
geomBounds = [(2.0, 50.0), (0.25, 3.5)],
loads = None,
lambdap_con = [3, 50],
zlug_fix = True,
safety_factor = {'SF_horizontal': 1, 'SF_vertical': 1},
plot = True)
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@

from anchor_map import Anchor
from famodel.anchors.anchor import Anchor

# --- Soil profile for helical pile in clay ---
profile_map = [
{
'name': 'CPT_H1',
'x': 0.0, 'y': 0.0,
'layers': [
{'top': 1.0, 'bottom': 3.0, 'soil_type': 'clay', 'gamma_top': 8.0, 'gamma_bot': 9.0, 'Su_top': 60, 'Su_bot': 50},
{'top': 3.0, 'bottom': 7.0, 'soil_type': 'clay', 'gamma_top': 15.0, 'gamma_bot': 25.0, 'Su_top': 100, 'Su_bot': 150},
{'top': 7.0, 'bottom': 15.0, 'soil_type': 'clay', 'gamma_top': 25.0, 'gamma_bot': 50.0, 'Su_top': 200, 'Su_bot': 400}
{'top': 1.0, 'bottom': 3.0, 'soil_type': 'clay', 'gamma_top': 8.0, 'gamma_bot': 9.0, 'Su_top': 60, 'Su_bot': 50},
{'top': 3.0, 'bottom': 7.0, 'soil_type': 'clay', 'gamma_top': 15.0, 'gamma_bot': 25.0, 'Su_top': 100, 'Su_bot': 150},
{'top': 7.0, 'bottom': 25.0, 'soil_type': 'clay', 'gamma_top': 25.0, 'gamma_bot': 50.0, 'Su_top': 200, 'Su_bot': 400}
]
}
]
Expand All @@ -30,9 +30,9 @@

# --- Assign mooring loads and properties ---
anchor.loads = {
'Hm': 80e4,
'Vm': 50e3
}
'Hm': 8e5,
'Vm': 1e5}

anchor.line_type = 'chain'
anchor.d = 0.16
anchor.w = 5000.0
Expand All @@ -48,8 +48,7 @@
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True
)
plot = True)

print('\nLug Forces Computed:')
print(f'Ha = {Ha:.2f} N')
Expand All @@ -63,9 +62,19 @@
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True
)
plot = False)

print('\nCapacity Results:')
for key, val in anchor.capacity_results.items():
for key, val in anchor.anchorCapacity.items():
print(f'{key}: {val:.2f}')

# --- Step 3: Optimize Anchor Geometry ---
anchor.getSizeAnchor(
geom = [anchor.dd['design']['L'], anchor.dd['design']['D']],
geomKeys = ['L', 'D'],
geomBounds = [(6.0, 25.0), (0.5, 2.0)],
loads = None,
lambdap_con = [6, 15],
zlug_fix = True,
safety_factor = {'SF_horizontal': 1, 'SF_vertical': 1},
plot = False)
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

from anchor_map import Anchor
import numpy as np
from famodel.anchors.anchors_famodel_map.capacity_plots_map import plot_load
from famodel.anchors.anchor import Anchor
from famodel.anchors.anchors_famodel.support_plots import plot_load

# --- Define soil profile ---
profile_map = [
Expand All @@ -10,7 +9,7 @@
'x': 0.0, 'y': 0.0,
'layers': [
{'top': 2.0, 'bottom': 4.0, 'soil_type': 'clay', 'gamma_top': 8.0, 'gamma_bot': 8.5, 'Su_top': 10, 'Su_bot': 25},
{'top': 4.0, 'bottom': 6.0, 'soil_type': 'clay', 'gamma_top': 8.5, 'gamma_bot': 9.0, 'Su_top': 25, 'Su_bot': 50},
{'top': 4.0, 'bottom': 6.0, 'soil_type': 'clay', 'gamma_top': 8.5, 'gamma_bot': 9.0, 'Su_top': 15, 'Su_bot': 40},
{'top': 6.0, 'bottom': 16.0, 'soil_type': 'clay', 'gamma_top': 9.0, 'gamma_bot': 9.5, 'Su_top': 50, 'Su_bot': 100},
{'top': 16.0, 'bottom': 25.0, 'soil_type': 'clay', 'gamma_top': 9.5, 'gamma_bot': 9.5, 'Su_top': 100, 'Su_bot': 100}
]
Expand All @@ -19,15 +18,14 @@

# --- Create plate anchor ---
anchor = Anchor(
dd = {'type': 'plate', 'design': {'B': 3.0, 'L': 6.0, 'zlug': 5.0, 'beta': 30.0}},
r = [100.0, 100.0, 0.0]
)
dd = {'type': 'plate', 'design': {'B': 3.0, 'L': 6.0, 'zlug': 14.0, 'beta': 30.0}},
r = [0.0, 0.0, 0.0])

# --- Assign load and mooring properties ---
anchor.loads = {
'Hm': 2.5e6,
'Vm': 1.5e6
}
'Hm': 3.5e6,
'Vm': 2.5e6}

anchor.line_type = 'chain'
anchor.d = 0.16
anchor.w = 5000.0
Expand All @@ -43,8 +41,7 @@
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True
)
plot = True)

print('\nLug Forces Computed:')
print(f'Ha = {Ha:.2f} N')
Expand All @@ -58,9 +55,20 @@
line_type = anchor.line_type,
d = anchor.d,
w = anchor.w,
plot = True
)
plot = True)

print('\nCapacity Results:')
for key, value in anchor.capacity_results.items():
for key, value in anchor.anchorCapacity.items():
print(f'{key}: {value:.2f}')

# --- Step 3: Optimize Anchor Geometry ---
anchor.getSizeAnchor(
geom = [anchor.dd['design']['B'], anchor.dd['design']['L']],
geomKeys = ['B', 'L'],
geomBounds = [(0.5, 6.0), (2.0, 12.0)],
loads = None,
lambdap_con = [2, 4], # less critical for plates
zlug_fix = True,
safety_factor = {'SF_horizontal': 2, 'SF_vertical': 3},
#safety_factor = {'SF_combined': 3},
plot = True)
Loading
Loading