Skip to content

Commit af2c41c

Browse files
committed
QTF calculation back to each sea state + MCF and KAY less strick
- Basically reverted commit 49079c9. I had moved the QTFs to be computed before solving for the different sea states, but this can be achieved by precomputing the QTFs with a previous RAFT run and using that as if the QTFs were computed from WAMIT. So, the QTFs are back to being computed for each sea state. This is more computationally expensive, but more versatile. The user have both options and can decide which one they prefer. - MacCamy-Fuchs correction and Kim and Yue correction (MCF for second-order) are less strict now. They just required the member to be cylindrical. It can be inclined, tapered, or submerged. Clearly, they work worse for cases that are far from the original hypothesis of a vertical surface piercing circular cylinder. - Moved Kim and Yue correction to member class - Output name for the QTFs and RAOs now include Case and head in the name We still need to include the mean drift for the second-order force component due to the quadratic acceleration.
1 parent f6f15f6 commit af2c41c

File tree

7 files changed

+453
-10004
lines changed

7 files changed

+453
-10004
lines changed

examples/OC3spar-WAMITQTF.yaml renamed to examples/OC4semi-slenderBodyQTF.yaml

Lines changed: 74 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
type: input file for RAFT
2-
name: 5MW with OC3-Hywind spar
2+
name: 5MW with OC4-DeepCWind semi-sub
33

44

55
settings: # global Settings
66
min_freq : 0.00025 # [Hz] lowest frequency to consider, also the frequency bin width
7-
max_freq : 0.40 # [Hz] highest frequency to consider
7+
max_freq : 0.25 # [Hz] highest frequency to consider
88
XiStart : 0 # sets initial amplitude of each DOF for all frequencies
99
nIter : 10 # sets how many iterations to perform in Model.solveDynamics()
1010

@@ -16,20 +16,22 @@ site:
1616
shearExp : 0.12 # shear exponent
1717

1818
cases:
19-
keys : [wind_speed, wind_heading, turbulence, turbine_status, yaw_misalign, wave_spectrum, wave_period, wave_height, wave_heading ]
19+
keys : [wind_speed, wind_heading, turbulence, turbine_status, yaw_misalign, wave_spectrum, wave_period, wave_height, wave_heading, current_speed, wave_gamma ]
2020
data : # m/s deg % or e.g. 2B_NTM string deg string (s) (m) (deg)
21-
- [ 0, 0, 0, operating, 0, JONSWAP, 10, 6, 0 ]
21+
- [ 0, 0, 0, operating, 0, constant, 0, 5, 0, 0, 0]
22+
23+
2224

2325

2426
turbine:
25-
27+
2628
mRNA : 350000 # [kg] RNA mass
2729
IxRNA : 35444067 # [kg-m2] RNA moment of inertia about local x axis (assumed to be identical to rotor axis for now, as approx) [kg-m^2]
2830
IrRNA : 26159984.0 # [kg-m2] RNA moment of inertia about local y or z axes [kg-m^2]
2931
xCG_RNA : 0 # [m] x location of RNA center of mass [m] (Actual is ~= -0.27 m)
3032
hHub : 90.0 # [m] hub height above water line [m]
3133
Fthrust : 800.0E3 # [N] temporary thrust force to use
32-
34+
3335
I_drivetrain: 318628138.0 # full rotor + drivetrain inertia as felt on the high-speed shaft <<< not correct! <<<
3436

3537
nBlades : 3 # number of blades
@@ -41,9 +43,9 @@ turbine:
4143
aeroServoMod : 1 # 0 aerodynamics off; 1 aerodynamics on (no control); 2 aerodynamics and control on
4244

4345
env:
44-
rho : 1.225 # air density [kg/m^3]
45-
mu : 1.81e-05 # air dynamic viscosity
46-
shearExp: 0.2 # shear exponent
46+
rho : 1.225 # air density [kg/m^3]
47+
mu : 1.81e-05 # air dynamic viscosity
48+
shearExp : 0.2 # shear exponent
4749

4850
blade:
4951
precurveTip : 0.0 #
@@ -1014,7 +1016,6 @@ turbine:
10141016

10151017

10161018

1017-
10181019
pitch_control: # NOTE: these values from IEA 15 - not updated for NREL 5 MW yet
10191020
GS_Angles: [0.08951732571568687, 0.11113133201402342, 0.12982917355231283, 0.1466420801733839, 0.16211366466881905, 0.17655839335287876, 0.19019635501633186, 0.2031735797715147, 0.2155988980768675, 0.22755610891787487, 0.23910432007046029, 0.25029505429019794, 0.261175108296815, 0.2717701141434908, 0.2821130743895577, 0.2922299908966622, 0.30213155066939196, 0.3118425748263288, 0.32137789704483055, 0.3307503670667345, 0.3399699865577445, 0.3490461860239008, 0.3579880322509144, 0.3668047339186282, 0.37550289814624044, 0.3840890078940221, 0.3925675520014984, 0.4009446279452681]
10201021
GS_Kp: [-1.3577105502989462, -1.2022843685437077, -1.0708549194177244, -0.9582630743745694, -0.8607297095205451, -0.7754232092569442, -0.7001800303510133, -0.6333186502486411, -0.5735124113109392, -0.5197005998242658, -0.47102498684717165, -0.42678371240552293, -0.3863972240349146, -0.3493827470593987, -0.3153348933114633, -0.2839107527034031, -0.25481830344353146, -0.22780730986914496, -0.20266210648191768, -0.17919582739515136, -0.1572457543239439, -0.13666953808436225, -0.11734210805288207, -0.09915312775509398, -0.0820048872139108, -0.06581054702303714, -0.05049266752014871, -0.035981970477687836]
@@ -1059,105 +1060,130 @@ turbine:
10591060
#cap_d_in : [ ] # [m] inner diameter of internal structures (0 for full cap/bulkhead, >0 for a ring shape)
10601061

10611062

1062-
10631063
platform:
10641064

10651065
min_freq_BEM : 0.03 # [Hz] lowest frequency and frequency interval to use in BEM analysis
10661066
dz_BEM : 3.0 # [m] axial discretization panel length target for BEM analysis
10671067
da_BEM : 2.0 # [m] azimuthal discretization panel length target for BEM analysis
1068-
potSecOrder : 2 # [int] master switch for computing second-order wave forces; 0=do not compute, 1=compute QTFs using slender body approximation, 2=read QTF file in WAMIT format (.11d or .12d)
1069-
qtfPath : './examples/oc3_hywind.12d' # path to the qtf file for the platform
10701068
potModMaster : 1
1071-
1072-
yaw_stiffness : 98340000.0 # [N-m/rad] additional yaw stiffness to apply if not modeling crowfoot in the mooring system
1069+
potSecOrder : 1 # [int] master switch for computing second-order wave forces; 0=do not compute, 1=compute QTFs using slender body approximation, 2=read QTF file in WAMIT format (.11d or .12d)
1070+
min_freq2nd : 0.040 # [Hz] minimum frequency for second-order wave forces
1071+
df_freq2nd : 0.008 # [Hz] frequency step for second-order wave forces
1072+
max_freq2nd : 0.350 # [Hz] maximum frequency for second-order wave forces
1073+
outFolderQTF : './examples' # Output folder for storing the QTFs computed by RAFT. Written in .12d format.
1074+
10731075

10741076
members: # list all members here
10751077

1076-
- name : center_spar # [-] an identifier (no longer has to be number)
1077-
type : 2 # [-]
1078-
rA : [ 0, 0, -120] # [m] end A coordinates
1078+
- name : main_column # [-] an identifier (no longer has to be number)
1079+
type : 2 # [-] (1=turbine, >1=substructure, for now)
1080+
rA : [ 0, 0, -20] # [m] end A coordinates
10791081
rB : [ 0, 0, 10] # [m] and B coordinates
10801082
shape : circ # [-] circular or rectangular
10811083
gamma : 0.0 # [deg] twist angle about the member's z-axis
10821084
potMod : True # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
1083-
1085+
MCF : True
10841086
# --- outer shell including hydro---
1085-
stations : [-120, -12, -4, 10 ] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB
1086-
d : [ 9.4, 9.4, 6.5, 6.5] # [m] diameters if circular or side lengths if rectangular (can be pairs)
1087-
t : 0.027 # [m] wall thicknesses (scalar or list of same length as stations)
1088-
Cd : 0.8 # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
1089-
Ca : 1.0 # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
1090-
# (neglecting axial coefficients for now)
1091-
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
1092-
CaEnd : 0.6 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
1093-
rho_shell : 8500 # [kg/m3]
1094-
1087+
stations : [-20, 10 ] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB
1088+
d : [ 6.5, 6.5] # [m] diameters if circular or side lengths if rectangular (can be pairs)
1089+
t : 0.03 # [m] wall thicknesses (scalar or list of same length as stations)
1090+
Cd : 0.56 # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
1091+
Ca : 0.63 # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
1092+
CdEnd : 0.6 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
1093+
CaEnd : 1.0 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
1094+
rho_shell : 7850 # [kg/m3] material density
1095+
# --- handling of end caps or any internal structures if we need them ---
1096+
# (These will only be *within* the inner diameter of the outer shell, so they don't interrupt the outer shell.)
1097+
cap_stations : [ -20 ] # [m] location along member of any inner structures (in same scaling as set by 'stations')
1098+
cap_t : [ 0.03 ] # [m] thickness of any internal structures
1099+
cap_d_in : [ 0 ] # [m] inner diameter of internal structures (0 for full cap/bulkhead, >0 for a ring shape)
1100+
1101+
1102+
- name : offset_column # [-] an identifier (no longer has to be number)
1103+
type : 3 # [-] (1=turbine, >1=substructure, for now)
1104+
rA : [ 28.86 , 0, -20] # [m] end A coordinates
1105+
rB : [ 28.86 , 0, 12] # [m] and B coordinates
1106+
heading : [ 60, 180, 300] # [deg] heading rotation of column about z axis (for repeated members)
1107+
shape : circ # [-] circular or rectangular
1108+
gamma : 0.0 # [deg] twist angle about the member's z-axis
1109+
potMod : True # [bool] Whether to model the member with potential flow (BEM model) plus viscous drag or purely strip theory
1110+
MCF : True
1111+
# --- outer shell including hydro---
1112+
stations : [-20, -14, -14, 12 ] # [-] location of stations along axis. Will be normalized such that start value maps to rA and end value to rB
1113+
d : [ 24, 24, 12, 12] # [m] diameters if circular or side lengths if rectangular (can be pairs)
1114+
t : 0.06 # [m] wall thicknesses (scalar or list of same length as stations)
1115+
Cd : [0.68, 0.68, 0.61, 0.61] # [-] transverse drag coefficient (optional, scalar or list of same length as stations)
1116+
Ca : [0.4, 0.4, 0.63, 0.63] # [-] transverse added mass coefficient (optional, scalar or list of same length as stations)
1117+
CdEnd : 2.3 # [-] end axial drag coefficient (optional, scalar or list of same length as stations)
1118+
CaEnd : 0.7 # [-] end axial added mass coefficient (optional, scalar or list of same length as stations)
1119+
rho_shell : 7850 # [kg/m3] material density
10951120
# --- ballast ---
1096-
l_fill : [52.9, 0.0, 0.0] # [m]
1097-
rho_fill : [1800.0, 0.0, 0.0] # [kg/m3]
1098-
1121+
l_fill : [5.0418, 0, 7.77] # [m]
1122+
rho_fill : [1025.0, 0, 1025.0] # [kg/m3]
10991123
# --- handling of end caps or any internal structures if we need them ---
11001124
# (These will only be *within* the inner diameter of the outer shell, so they don't interrupt the outer shell.)
1101-
cap_stations : [-120 ] # [m] location along member of any inner structures (in same scaling as set by 'stations')
1102-
cap_t : [ 0.2 ] # [m] thickness of any internal structures
1103-
cap_d_in : [ 0 ] # [m] inner diameter of internal structures (0 for full cap/bulkhead, >0 for a ring shape)
1125+
cap_stations : [ -20, -14, -14, 12] # [m] location along member of any inner structures (in same scaling as set by 'stations')
1126+
cap_t : [ 0.06, 0.06, 0.06, 0.06 ] # [m] thickness of any internal structures
1127+
cap_d_in : [ 0 , 12, 0, 0 ] # [m] inner diameter of internal structures (0 for full cap/bulkhead, >0 for a ring shape)
1128+
1129+
# temporarily removed bracing members <<<
11041130

11051131

11061132
mooring:
1107-
water_depth: 320 # [m] uniform water depth
1133+
water_depth: 200 # [m] uniform water depth
11081134

11091135
points:
11101136
- name: line1_anchor
11111137
type: fixed
1112-
location: [853.87, 0.0, -320.0]
1138+
location: [418.8, 725.38, -200.0]
11131139
anchor_type: drag_embedment
11141140

11151141
- name: line2_anchor
11161142
type: fixed
1117-
location: [-426.935, 739.47311, -320.0]
1143+
location: [-837.6, 0.0, -200.0]
11181144
anchor_type: drag_embedment
11191145

11201146
- name: line3_anchor
11211147
type: fixed
1122-
location: [-426.935, -739.47311, -320.0]
1148+
location: [418.8, -725.38, -200.0]
11231149
anchor_type: drag_embedment
11241150

11251151
- name: line1_vessel
11261152
type: vessel
1127-
location: [5.2, 0.0, -70.0]
1153+
location: [20.434, 35.393, -14.0]
11281154

11291155
- name: line2_vessel
11301156
type: vessel
1131-
location: [-2.6, 4.5033, -70.0]
1157+
location: [-40.868, 0.0, -14.0]
11321158

11331159
- name: line3_vessel
11341160
type: vessel
1135-
location: [-2.6, -4.5033, -70.0]
1161+
location: [20.434, -35.393, -14.0]
11361162

11371163
lines:
11381164
- name: line1
11391165
endA: line1_anchor
11401166
endB: line1_vessel
11411167
type: main
1142-
length: 902.2
1168+
length: 835.5
11431169

11441170
- name: line2
11451171
endA: line2_anchor
11461172
endB: line2_vessel
11471173
type: main
1148-
length: 902.2
1174+
length: 835.5
11491175

11501176
- name: line3
11511177
endA: line3_anchor
11521178
endB: line3_vessel
11531179
type: main
1154-
length: 902.2
1180+
length: 835.5
11551181

11561182
line_types:
11571183
- name: main
1158-
diameter: 0.09
1159-
mass_density: 77.7066
1160-
stiffness: 384.243e6
1184+
diameter: 0.0766
1185+
mass_density: 113.35
1186+
stiffness: 753.6e6
11611187
breaking_load: 1e8
11621188
cost: 100.0
11631189
transverse_added_mass: 1.0

examples/example-slenderBodyQTF.py

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,25 @@
77
import os.path as path
88

99
# open the design YAML file and parse it into a dictionary for passing to raft
10-
flNm = 'OC3spar-SlenderBodyQTF'
10+
flNm = 'OC4semi-slenderBodyQTF'
1111
with open('./examples/' + flNm + '.yaml') as file:
1212
design = yaml.load(file, Loader=yaml.FullLoader)
1313

1414
# Create the RAFT model (will set up all model objects based on the design dict)
15-
model = raft.Model(design)
15+
model = raft.Model(design)
1616

1717
# Evaluate the system properties and equilibrium position before loads are applied
1818
model.analyzeUnloaded()
1919

20-
# Compute natural frequencie
21-
model.solveEigen()
22-
23-
# Simule the different load cases
20+
# Due to the linearization of the quadratic drag term in RAFT, the QTFs depend
21+
# on the sea state specified in the input file.
22+
# If more than one case is analyzed, the outputs are numbered sequentially.
23+
# Two output files are generated:
24+
# - The QTF, following WAMIT .12d file format. File name is qtf-slender_body-total_Head#p##[email protected]
25+
# - The RAOs used to computed the QTFs, following WAMIT .4 file format.
26+
# The #p## in the file name indicates the wave heading in degrees and @ is used to differentiate
27+
# between different cases.
2428
model.analyzeCases(display=1)
2529

26-
# Plot the power spectral densities from the load cases
27-
model.plotResponses()
28-
29-
# Visualize the system in its most recently evaluated mean offset position
30-
model.plot(hideGrid=True)
31-
32-
# Save the response to a given output folder
33-
outFolder = './examples/'
34-
model.saveResponses(path.join(outFolder, flNm))
35-
36-
plt.show()
37-
3830
# 0.02
3931
# 12.37

0 commit comments

Comments
 (0)