Skip to content

Commit

Permalink
Added member test cases + minor fix for tapered rectangular members
Browse files Browse the repository at this point in the history
- Added tests for
     - Floating pitched (0deg, 30deg, 0deg) circular cylinder (mem_srf_pitch_circ_cyl.yaml).
     - Floating pitched (0deg, 30deg, 0deg) rectangular cylinder (mem_srf_pitch_rect_cyl.yaml)
     -Floating inclined (30deg, 30deg, 30deg) circular cylinder (mem_srf_inc_rect_cyl.yaml)
     - Submerged horizontal circular cylinder (mem_subm_horz_circ_cyl.yaml) )
     - Submerged horizontal circular cylinder (mem_subm_horz_circ_cyl.yaml) )
     - Floating vertical tapered circular cylinder (mem_srf_vert_tap_circ_cyl.yaml)
     - Floating vertical tapered rectangular cylinder (mem_srf_vert_tap_rect_cyl.yaml)

- Fixed a minor bug in RectangularFrustumMOI within raft_member.py. The bug only affected rectangular elements tapered along both sides (i.e. La != Lb and Wa != Wb)
  • Loading branch information
lucas-carmo committed Mar 13, 2024
1 parent 33d1bbb commit ee11af5
Show file tree
Hide file tree
Showing 12 changed files with 368 additions and 26 deletions.
4 changes: 2 additions & 2 deletions raft/raft_member.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,10 @@ def RectangularFrustumMOI(La, Wa, Lb, Wb, H, p):

elif La!=Lb and Wa!=Wb: # if it's a truncated pyramid for both side lengths

x2 = (1/12)*p* ( (Lb-La)**3*H*(Wb/5 + Wa/20) + (Lb-La)**2*La*H(3*Wb/4 + Wa/4) + \
x2 = (1/12)*p* ( (Lb-La)**3*H*(Wb/5 + Wa/20) + (Lb-La)**2*La*H*(3*Wb/4 + Wa/4) + \
(Lb-La)*La**2*H*(Wb + Wa/2) + La**3*H*(Wb/2 + Wa/2) )

y2 = (1/12)*p* ( (Wb-Wa)**3*H*(Lb/5 + La/20) + (Wb-Wa)**2*Wa*H(3*Lb/4 + La/4) + \
y2 = (1/12)*p* ( (Wb-Wa)**3*H*(Lb/5 + La/20) + (Wb-Wa)**2*Wa*H*(3*Lb/4 + La/4) + \
(Wb-Wa)*Wa**2*H*(Lb + La/2) + Wa**3*H*(Lb/2 + La/2) )

z2 = p*( Wb*Lb/5 + Wa*Lb/20 + La*Wb/20 + Wa*La*(1/30) ) * H**3
Expand Down
27 changes: 27 additions & 0 deletions tests/test_data/mem_srf_inc_circ_cyl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: input file for RAFT
name: surface piercing vertical circular cylinder
comments: Used to perform some tests on member class functionality. This file should contain a single RAFT member.

members: # list all members here

- name : cylinder # [-] an identifier (no longer has to be number)
type : 2 # [-]
dlsMax : 0.1 # maximum node splitting section amount for platform members; can't be 0
rA : [-12.500, 4.3301, -15.00] # [m] end A coordinates
rB : [ 9.375, -3.2476, 11.25] # [m] and B coordinates
shape : circ # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction
# --- 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 : 9.85 # [m] diameters if circular or side lengths if rectangular (can be pairs)
t : 0.05 # [m] wall thicknesses (scalar or list of same length as stations)
Cd : 0.6 # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
Ca : 0.85 # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 6.19
rho_fill : 5000 # [kg/m3]
2 changes: 1 addition & 1 deletion tests/test_data/mem_srf_inc_rect_cyl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ members: # list all members here
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 2.71 # [m]
l_fill : 2.71
rho_fill : 5000 # [kg/m3]
27 changes: 27 additions & 0 deletions tests/test_data/mem_srf_pitch_circ_cyl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: input file for RAFT
name: surface piercing vertical circular cylinder
comments: Used to perform some tests on member class functionality. This file should contain a single RAFT member.

members: # list all members here

- name : cylinder # [-] an identifier (no longer has to be number)
type : 2 # [-]
dlsMax : 0.1 # maximum node splitting section amount for platform members; can't be 0
rA : [-10.0, 0, -17.321] # [m] end A coordinates
rB : [ 7.5, 0, 12.990] # [m] and B coordinates
shape : circ # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction
# --- 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 : 9.85 # [m] diameters if circular or side lengths if rectangular (can be pairs)
t : 0.05 # [m] wall thicknesses (scalar or list of same length as stations)
Cd : 0.6 # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
Ca : 0.85 # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 6.19
rho_fill : 5000 # [kg/m3]
27 changes: 27 additions & 0 deletions tests/test_data/mem_srf_pitch_rect_cyl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: input file for RAFT
name: surface piercing vertical rectangular cylinder
comments: Used to perform some tests on member class functionality. This file should contain a single RAFT member.


members: # list all members here
- name : cylinder # [-] an identifier (no longer has to be number)
type : 2 # [-]
dlsMax : 0.1 # maximum node splitting section amount for platform members; can't be 0
rA : [-10.0, 0, -17.321] # [m] end A coordinates
rB : [ 7.5, 0, 12.990] # [m] and B coordinates
shape : rect # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction
# --- 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 : [9.85, 6] # [m] diameters if circular or side lengths if rectangular (can be pairs)
t : 0.05 # [m] wall thicknesses (scalar or list of same length as stations)
Cd : [2, 1] # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
Ca : [1.50, 1.25] # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 2.71
rho_fill : 5000 # [kg/m3]
2 changes: 1 addition & 1 deletion tests/test_data/mem_srf_vert_circ_cyl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ members: # list all members here
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 6.19 # [m]
l_fill : 6.19
rho_fill : 5000 # [kg/m3]
2 changes: 1 addition & 1 deletion tests/test_data/mem_srf_vert_rect_cyl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ members: # list all members here
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 2.71 # [m]
l_fill : 2.71
rho_fill : 5000 # [kg/m3]
27 changes: 27 additions & 0 deletions tests/test_data/mem_srf_vert_tap_circ_cyl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: input file for RAFT
name: surface piercing vertical circular cylinder
comments: Used to perform some tests on member class functionality. This file should contain a single RAFT member.

members: # list all members here

- name : cylinder # [-] an identifier (no longer has to be number)
type : 2 # [-]
dlsMax : 0.1 # maximum node splitting section amount for platform members; can't be 0
rA : [ 0, 0, -20] # [m] end A coordinates
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 : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction
# --- 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 : [9.85, 4] # [m] diameters if circular or side lengths if rectangular (can be pairs)
t : 0.05 # [m] wall thicknesses (scalar or list of same length as stations)
Cd : 0.6 # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
Ca : 0.85 # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 6.19
rho_fill : 5000 # [kg/m3]
27 changes: 27 additions & 0 deletions tests/test_data/mem_srf_vert_tap_rect_cyl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: input file for RAFT
name: surface piercing vertical rectangular cylinder
comments: Used to perform some tests on member class functionality. This file should contain a single RAFT member.


members: # list all members here
- name : cylinder # [-] an identifier (no longer has to be number)
type : 2 # [-]
dlsMax : 0.1 # maximum node splitting section amount for platform members; can't be 0
rA : [ 0, 0, -20] # [m] end A coordinates
rB : [ 0, 0, 15] # [m] and B coordinates
shape : rect # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction
# --- 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 : [[9.85, 6], [4, 3]] # [m] diameters if circular or side lengths if rectangular (can be pairs)
t : 0.05 # [m] wall thicknesses (scalar or list of same length as stations)
Cd : [2, 1] # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
Ca : [1.50, 1.25] # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 2.71
rho_fill : 5000 # [kg/m3]
27 changes: 27 additions & 0 deletions tests/test_data/mem_subm_horz_circ_cyl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: input file for RAFT
name: surface piercing vertical circular cylinder
comments: Used to perform some tests on member class functionality. This file should contain a single RAFT member.

members: # list all members here

- name : cylinder # [-] an identifier (no longer has to be number)
type : 2 # [-]
dlsMax : 0.1 # maximum node splitting section amount for platform members; can't be 0
rA : [-17.5, 0, -20.0] # [m] end A coordinates
rB : [ 17.5, 0, -20.0] # [m] and B coordinates
shape : circ # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction
# --- 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 : 9.85 # [m] diameters if circular or side lengths if rectangular (can be pairs)
t : 0.05 # [m] wall thicknesses (scalar or list of same length as stations)
Cd : 0.6 # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
Ca : 0.85 # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 6.19
rho_fill : 5000 # [kg/m3]
27 changes: 27 additions & 0 deletions tests/test_data/mem_subm_horz_rect_cyl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
type: input file for RAFT
name: surface piercing vertical rectangular cylinder
comments: Used to perform some tests on member class functionality. This file should contain a single RAFT member.


members: # list all members here
- name : cylinder # [-] an identifier (no longer has to be number)
type : 2 # [-]
dlsMax : 0.1 # maximum node splitting section amount for platform members; can't be 0
rA : [-17.5, 0, -20] # [m] end A coordinates
rB : [ 17.5, 0, -20] # [m] and B coordinates
shape : rect # [-] circular or rectangular
gamma : 0.0 # [deg] twist angle about the member's z-axis
potMod : False # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
MCF : False # [bool] Whether to correct the inertia coefficient using the MacCamy and Fuchs correction
# --- 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 : [9.85, 6] # [m] diameters if circular or side lengths if rectangular (can be pairs)
t : 0.05 # [m] wall thicknesses (scalar or list of same length as stations)
Cd : [2, 1] # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
Ca : [1.50, 1.25] # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
rho_shell : 7850 # [kg/m3]
# --- ballast ---
l_fill : 2.71
rho_fill : 5000 # [kg/m3]
Loading

0 comments on commit ee11af5

Please sign in to comment.