Skip to content

Commit

Permalink
Merge pull request #202 from IEAWindTask37/develop
Browse files Browse the repository at this point in the history
Fix nacelle mass properties
  • Loading branch information
gbarter committed Apr 29, 2024
2 parents e2585e1 + 272d720 commit 7e87640
Show file tree
Hide file tree
Showing 12 changed files with 262 additions and 244 deletions.
Binary file modified Documentation/IEA-15-240-RWT_tabular.xlsx
Binary file not shown.
6 changes: 3 additions & 3 deletions HAWC2/IEA-15-240-RWT/IEA_15MW_RWT_WTG_bodies_noFPM.htc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
nbodies 1 ;
node_distribution c2_def ;
damping_posdef 0.0 0.0 0.0 7.00E-04 7.00E-04 7.00E-04 ; dummy values (stiff body)
concentrated_mass 1 0.00 0.00 0.00 28280 0.00 0.00 0.00 ; yaw system
concentrated_mass 1 0.00 -4.720 -4.275 646895 7.674778e+06 1.055686e+07 8.127143e+06 ; nacelle: NR+R mass; NR inertia
concentrated_mass 1 0.00 0.00 0.00 28249 0.00 0.00 0.00 ; yaw system
concentrated_mass 1 0.00 -5.125 -4.315 644857 7.674778e+06 1.055686e+07 8.127143e+06 ; nacelle: NR+R mass; NR inertia
begin timoschenko_input;
filename ../IEA-15-240-RWT/IEA_15MW_RWT_Dummy_st.dat ;
set 1 1 ;
Expand Down Expand Up @@ -46,7 +46,7 @@
node_distribution c2_def ;
damping_posdef 0.0 0.0 0.0 4.65E-04 4.65E-04 5.971406e-04 ; Kx=Ky=dummy; Kz tuned to 5% critical for free-free Ig, Ir
concentrated_mass 1 0.0 0.0 0.0 0.0 0.0 0.0 1836784 ; generator inertia about shaft
concentrated_mass 2 0.0 0.0 0.0 69360 0.0 0.0 973520 ; hub mass/inertia;
concentrated_mass 2 0.0 0.0 0.0 69131 0.0 0.0 969952 ; hub mass/inertia;
begin timoschenko_input;
filename ../IEA-15-240-RWT/IEA_15MW_RWT_Shaft_st.dat ;
set 1 1 ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
-12.097571763912535 OverHang - Distance from yaw axis to rotor apex [3 blades] or teeter pin [2 blades] (meters)
0.0 ShftGagL - Distance from rotor apex [3 blades] or teeter pin [2 blades] to shaft strain gages [positive for upwind rotors] (meters)
-6.0 ShftTilt - Rotor shaft tilt angle (degrees)
-4.720 NacCMxn - Downwind distance from the tower-top to the nacelle CM (meters)
-5.125 NacCMxn - Downwind distance from the tower-top to the nacelle CM (meters)
0.0 NacCMyn - Lateral distance from the tower-top to the nacelle CM (meters)
4.275 NacCMzn - Vertical distance from the tower-top to the nacelle CM (meters)
4.315 NacCMzn - Vertical distance from the tower-top to the nacelle CM (meters)
0.0 NcIMUxn - Downwind distance from the tower-top to the nacelle IMU (meters)
0.0 NcIMUyn - Lateral distance from the tower-top to the nacelle IMU (meters)
0.0 NcIMUzn - Vertical distance from the tower-top to the nacelle IMU (meters)
Expand All @@ -71,12 +71,12 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
0.0 TipMass(1) - Tip-brake mass, blade 1 (kg)
0.0 TipMass(2) - Tip-brake mass, blade 2 (kg)
0.0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
69360 HubMass - Hub mass (kg)
973520 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
69131 HubMass - Hub mass (kg)
969952 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
1836784 GenIner - Generator inertia about HSS (kg m^2)
646895 NacMass - Nacelle mass (kg)
29600436 NacYIner - Nacelle inertia about yaw axis (kg m^2)
28280 YawBrMass - Yaw bearing mass (kg)
644857 NacMass - Nacelle mass (kg)
32929058 NacYIner - Nacelle inertia about yaw axis (kg m^2)
28249 YawBrMass - Yaw bearing mass (kg)
0.0 PtfmMass - Platform mass (kg)
0.0 PtfmRIner - Platform inertia for roll tilt rotation about the platform CM (kg m^2)
0.0 PtfmPIner - Platform inertia for pitch tilt rotation about the platform CM (kg m^2)
Expand All @@ -98,8 +98,8 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
---------------------- DRIVETRAIN ----------------------------------------------
100.0 GBoxEff - Gearbox efficiency (%)
1.0 GBRatio - Gearbox ratio (-)
51140939610.0 DTTorSpr - Drivetrain torsional spring (N-m/rad)
42676833.0 DTTorDmp - Drivetrain torsional damper (N-m/(rad/s))
69737644900.0 DTTorSpr - Drivetrain torsional spring (N-m/rad)
49418406.0 DTTorDmp - Drivetrain torsional damper (N-m/(rad/s))
---------------------- FURLING -------------------------------------------------
False Furling - Read in additional model properties for furling turbine (flag) [must currently be FALSE)
"unused" FurlFile - Name of file containing furling properties (quoted string) [unused when Furling=False]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ MemberID MJointID1 MJointID2 MPropSetID1 MPropSetID2 MDivSize MCoefMod P
(-) (-) (-) (-) (-) (m) (switch) (flag)
1 1 2 1 1 0.5 1 FALSE
---------------------- FILLED MEMBERS ------------------------------------------
0 NFillGroups - Number of filled member groups (-) [If FillDens = DEFAULT, then FillDens = WtrDens; FillFSLoc is related to MSL2SWL]
1 NFillGroups - Number of filled member groups (-) [If FillDens = DEFAULT, then FillDens = WtrDens; FillFSLoc is related to MSL2SWL]
FillNumM FillMList FillFSLoc FillDens
(-) (-) (m) (kg/m^3)
1 1 0.0 DEFAULT
---------------------- MARINE GROWTH -------------------------------------------
0 NMGDepths - Number of marine-growth depths specified (-)
MGDpth MGThck MGDens
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
-12.098 OverHang - Distance from yaw axis to rotor apex [3 blades] or teeter pin [2 blades] (meters)
0.0 ShftGagL - Distance from rotor apex [3 blades] or teeter pin [2 blades] to shaft strain gages [positive for upwind rotors] (meters)
-6.0 ShftTilt - Rotor shaft tilt angle (degrees)
-4.7201 NacCMxn - Downwind distance from the tower-top to the nacelle CM (meters)
-5.125 NacCMxn - Downwind distance from the tower-top to the nacelle CM (meters)
0.0 NacCMyn - Lateral distance from the tower-top to the nacelle CM (meters)
4.2751 NacCMzn - Vertical distance from the tower-top to the nacelle CM (meters)
4.315 NacCMzn - Vertical distance from the tower-top to the nacelle CM (meters)
0.0 NcIMUxn - Downwind distance from the tower-top to the nacelle IMU (meters)
0.0 NcIMUyn - Lateral distance from the tower-top to the nacelle IMU (meters)
0.0 NcIMUzn - Vertical distance from the tower-top to the nacelle IMU (meters)
Expand All @@ -71,12 +71,12 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
0 TipMass(1) - Tip-brake mass, blade 1 (kg)
0 TipMass(2) - Tip-brake mass, blade 2 (kg)
0 TipMass(3) - Tip-brake mass, blade 3 (kg) [unused for 2 blades]
69360 HubMass - Hub mass (kg)
973520 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
69131 HubMass - Hub mass (kg)
969952 HubIner - Hub inertia about rotor axis [3 blades] or teeter axis [2 blades] (kg m^2)
1836784 GenIner - Generator inertia about HSS (kg m^2)
646895 NacMass - Nacelle mass (kg)
24240914 NacYIner - Nacelle inertia about yaw axis (kg m^2)
28280 YawBrMass - Yaw bearing mass (kg)
644857 NacMass - Nacelle mass (kg)
32929058 NacYIner - Nacelle inertia about yaw axis (kg m^2)
28249 YawBrMass - Yaw bearing mass (kg)
1.7838E+07 PtfmMass - Platform mass (kg)
1.2507E+10 PtfmRIner - Platform inertia for roll tilt rotation about the platform CM (kg m^2)
1.2507E+10 PtfmPIner - Platform inertia for pitch tilt rotation about the platform CM (kg m^2)
Expand All @@ -98,8 +98,8 @@ True PtfmYDOF - Platform yaw rotation DOF (flag)
---------------------- DRIVETRAIN ----------------------------------------------
100 GBoxEff - Gearbox efficiency (%)
1 GBRatio - Gearbox ratio (-)
51140939610 DTTorSpr - Drivetrain torsional spring (N-m/rad)
42676833 DTTorDmp - Drivetrain torsional damper (N-m/(rad/s))
69737644900 DTTorSpr - Drivetrain torsional spring (N-m/rad)
49418406 DTTorDmp - Drivetrain torsional damper (N-m/(rad/s))
---------------------- FURLING -------------------------------------------------
False Furling - Read in additional model properties for furling turbine (flag) [must currently be FALSE)
"unused" FurlFile - Name of file containing furling properties (quoted string) [unused when Furling=False]
Expand Down Expand Up @@ -243,4 +243,4 @@ END of input file (the word "END" must appear in the first 3 columns of this las
"TDy" - local edgewise (translational) deflection (relative to the undeflected position) of node
"RDz"
END of input file (the word "END" must appear in the first 3 columns of this last OutList line)
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
1 change: 1 addition & 0 deletions WISDEM/run_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def run_15mw(fname_wt_input):
nacDF.loc['Blades'] = np.r_[blades_mass, hub_cm, blades_I, blades_I_TT].tolist()
nacDF.loc['Hub_System'] = np.r_[hub_mass, hub_cm, hub_I, hub_I_TT].tolist()
nacDF.loc['RNA'] = np.r_[rna_mass, rna_cm, rna_I, rna_I_TT].tolist()
print(nacDF)

# Tabular output: Tower
water_depth = prob['env.water_depth']
Expand Down
8 changes: 5 additions & 3 deletions WT_Ontology/IEA-15-240-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assembly:
rotor_orientation: Upwind
number_of_blades: 3
hub_height: 150.
rotor_diameter: 242.23775645
rotor_diameter: 241.94
rated_power: 15.e+6
lifetime: 25.0
components:
Expand Down Expand Up @@ -416,8 +416,8 @@ components:
distance_tt_hub: 5.614
overhang: 12.0313
drag_coefficient: 0.5
distance_hub2mb: 1.0
distance_mb2mb: 1.2
distance_hub_mb: 1.0
distance_mb_mb: 1.2
lss_diameter: [3.0, 3.0]
lss_wall_thickness: [0.1, 0.1]
nose_diameter: [2.2, 2.2]
Expand Down Expand Up @@ -748,6 +748,7 @@ materials:
S: 0
Xy: 345.e+6
m: 3
A: 3.5534648443719767e10 #DOI 10.1016/j.proeng.2013.12.061 eqn 5
unit_cost: 0.7
- name: steel_drive
description: Steel of the drivetrain ASTM 4140 40Cr1Mo28
Expand All @@ -766,6 +767,7 @@ materials:
S: 0
Xy: 485.e+6
m: 3
A: 3.5534648443719767e10 #DOI 10.1016/j.proeng.2013.12.061 eqn 5
unit_cost: 0.9
- name: cast_iron
description: Cast iron for hub and nacelle components
Expand Down
8 changes: 5 additions & 3 deletions WT_Ontology/IEA-15-240-RWT_VolturnUS-S.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ assembly:
rotor_orientation: Upwind
number_of_blades: 3
hub_height: 150.
rotor_diameter: 242.23775645
rotor_diameter: 241.94
rated_power: 15.e+6
lifetime: 25.0
components:
Expand Down Expand Up @@ -416,8 +416,8 @@ components:
distance_tt_hub: 5.614
overhang: 12.0313
drag_coefficient: 0.5
distance_hub2mb: 1.0
distance_mb2mb: 1.2
distance_hub_mb: 1.0
distance_mb_mb: 1.2
lss_diameter: [3.0, 3.0]
lss_wall_thickness: [0.1, 0.1]
nose_diameter: [2.2, 2.2]
Expand Down Expand Up @@ -1001,6 +1001,7 @@ materials:
S: 0
Xy: 345.e+6
m: 3
A: 3.5534648443719767e10 #DOI 10.1016/j.proeng.2013.12.061 eqn 5
unit_cost: 0.7
- name: steel_drive
description: Steel of the drivetrain ASTM 4140 40Cr1Mo28
Expand All @@ -1019,6 +1020,7 @@ materials:
S: 0
Xy: 485.e+6
m: 3
A: 3.5534648443719767e10 #DOI 10.1016/j.proeng.2013.12.061 eqn 5
unit_cost: 0.9
- name: cast_iron
description: Cast iron for hub and nacelle components
Expand Down
105 changes: 57 additions & 48 deletions tests/test_hawc2_openfast_rnaprops.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,65 @@

import _test_functions as tstf
from _test_functions import FROOT
import unittest

class TestConsistency(unittest.TestCase):

def test_of_h2_onshore():
"""Check RNA properties in OF Monopile model versus H2 onshore, UMaine, monopile
"""
def test_of_h2_onshore(self):
"""Check RNA properties in OF Monopile model versus H2 onshore, UMaine, monopile
"""

ed_path = FROOT / 'OpenFAST'/ 'IEA-15-240-RWT-Monopile'/ 'IEA-15-240-RWT-Monopile_ElastoDyn.dat'
h2_dir = FROOT/ 'HAWC2'/ 'IEA-15-240-RWT-Onshore'
h2_path = h2_dir/ 'htc'/ 'IEA_15MW_RWT_Onshore.htc'
ed_path = FROOT / 'OpenFAST'/ 'IEA-15-240-RWT-Monopile'/ 'IEA-15-240-RWT-Monopile_ElastoDyn.dat'
h2_dir = FROOT/ 'HAWC2'/ 'IEA-15-240-RWT-Onshore'
h2_path = h2_dir/ 'htc'/ 'IEA_15MW_RWT_Onshore.htc'

h2_dir = h2_dir.as_posix() # wetb requires strings, not Path objects...
h2_path = h2_path.as_posix()

ed_dict = weio.read(str(ed_path))
htc = HTCFile(h2_path, modelpath=h2_dir)

htc_struc = htc.new_htc_structure

# tower
z_towerbottom = -htc_struc.orientation.base.inipos[2] # location of tower bottom in space
twrht_h2 = tstf.get_body_length(htc_struc, 'tower') + z_towerbottom
assert np.isclose(ed_dict['TowerHt'], twrht_h2) # tower height

# nacelle and yaw bearing masses and inertias
assert np.isclose(ed_dict['YawBrMass'], htc_struc.get_subsection_by_name('towertop').concentrated_mass__1.values[4]) # yaw bearing mass
assert np.isclose(ed_dict['NacCMxn'], htc_struc.get_subsection_by_name('towertop').concentrated_mass__2.values[2], atol=1e-3) # nacelle cm
assert np.isclose(ed_dict['NacCMzn'], -htc_struc.get_subsection_by_name('towertop').concentrated_mass__2.values[3], atol=1e-3) # nacelle cm
assert np.isclose(ed_dict['NacMass'], htc_struc.get_subsection_by_name('towertop').concentrated_mass__2[4]) # nacelle mass

# generator and hub inertia
assert np.isclose(ed_dict['GenIner'], htc_struc.get_subsection_by_name('shaft').concentrated_mass__1.values[-1]) # generator inertia
assert np.isclose(ed_dict['HubMass'], htc_struc.get_subsection_by_name('shaft').concentrated_mass__2.values[4]) # hub mass
assert np.isclose(ed_dict['HubIner'], htc_struc.get_subsection_by_name('shaft').concentrated_mass__2.values[-1]) # hub inertia

# hub radius, shaft tilt and coning
assert np.isclose(ed_dict['HubRad'], htc_struc.get_subsection_by_name('hub1').c2_def.sec__2.values[-2]) # hub radius
assert np.isclose(-ed_dict['ShftTilt'], htc_struc.orientation.relative__2.mbdy2_eulerang__2.values[0]) # tilt
h2_dir = h2_dir.as_posix() # wetb requires strings, not Path objects...
h2_path = h2_path.as_posix()

ed_dict = weio.read(str(ed_path))
htc = HTCFile(h2_path, modelpath=h2_dir)

htc_struc = htc.new_htc_structure

# tower
z_towerbottom = -htc_struc.orientation.base.inipos[2] # location of tower bottom in space
twrht_h2 = tstf.get_body_length(htc_struc, 'tower') + z_towerbottom
np.testing.assert_allclose(ed_dict['TowerHt'], twrht_h2) # tower height

# nacelle and yaw bearing masses and inertias
np.testing.assert_allclose(ed_dict['YawBrMass'], htc_struc.get_subsection_by_name('towertop').concentrated_mass__1.values[4], rtol=2e-3) # yaw bearing mass
np.testing.assert_allclose(ed_dict['NacCMxn'], htc_struc.get_subsection_by_name('towertop').concentrated_mass__2.values[2], atol=1e-3) # nacelle cm
np.testing.assert_allclose(ed_dict['NacCMzn'], -htc_struc.get_subsection_by_name('towertop').concentrated_mass__2.values[3], atol=1e-3) # nacelle cm
np.testing.assert_allclose(ed_dict['NacMass'], htc_struc.get_subsection_by_name('towertop').concentrated_mass__2[4]) # nacelle mass

# generator and hub inertia
np.testing.assert_allclose(ed_dict['GenIner'], htc_struc.get_subsection_by_name('shaft').concentrated_mass__1.values[-1]) # generator inertia
np.testing.assert_allclose(ed_dict['HubMass'], htc_struc.get_subsection_by_name('shaft').concentrated_mass__2.values[4]) # hub mass
np.testing.assert_allclose(ed_dict['HubIner'], htc_struc.get_subsection_by_name('shaft').concentrated_mass__2.values[-1]) # hub inertia

# hub radius, shaft tilt and coning
np.testing.assert_allclose(ed_dict['HubRad'], htc_struc.get_subsection_by_name('hub1').c2_def.sec__2.values[-2]) # hub radius
np.testing.assert_allclose(-ed_dict['ShftTilt'], htc_struc.orientation.relative__2.mbdy2_eulerang__2.values[0]) # tilt

# hub height
tilt = 6 * np.pi / 180
z_hub = 150
ttop_length = tstf.get_body_length(htc_struc, 'towertop')
conn_length = tstf.get_body_length(htc_struc, 'connector')
shaft_length = tstf.get_body_length(htc_struc, 'shaft')
z_hub_h2 = twrht_h2 + ttop_length + conn_length*np.sin(tilt) + shaft_length*np.sin(tilt)
z_hub_of = ed_dict['TowerHt'] + ed_dict['Twr2Shft'] + -ed_dict['OverHang']*np.tan(tilt)
np.testing.assert_allclose(z_hub_h2, z_hub, atol=1e-2)
np.testing.assert_allclose(z_hub_of, z_hub, atol=1e-2)

# overhang distance (measured along tilted axis)
overhang_h2 = shaft_length + conn_length
overhang_of = -ed_dict['OverHang']
assert overhang_h2 == overhang_of



if __name__ == "__main__":
unittest.main()

# hub height
tilt = 6 * np.pi / 180
z_hub = 150
ttop_length = tstf.get_body_length(htc_struc, 'towertop')
conn_length = tstf.get_body_length(htc_struc, 'connector')
shaft_length = tstf.get_body_length(htc_struc, 'shaft')
z_hub_h2 = twrht_h2 + ttop_length + conn_length*np.sin(tilt) + shaft_length*np.sin(tilt)
z_hub_of = ed_dict['TowerHt'] + ed_dict['Twr2Shft'] + -ed_dict['OverHang']*np.tan(tilt)
assert np.isclose(z_hub_h2, z_hub, atol=1e-2)
assert np.isclose(z_hub_of, z_hub, atol=1e-2)

# overhang distance (measured along tilted axis)
overhang_h2 = shaft_length + conn_length
overhang_of = -ed_dict['OverHang']
assert overhang_h2 == overhang_of
np.testing.assert_allclose
Loading

0 comments on commit 7e87640

Please sign in to comment.