Skip to content
Snippets Groups Projects
Commit 0f52d416 authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

test files for mainbody

parent 9924af94
No related branches found
No related tags found
No related merge requests found
'''
Created on 01/08/2016
@author: MMPE
'''
import unittest
import os
from wetb.hawc2.bladeData import H2AeroBladeData, H2BladeData
tfp = os.path.join(os.path.dirname(__file__), 'test_files/') # test file path
class TestBladeData(unittest.TestCase):
def testBladedata(self):
#bd = H2AeroBladeData(tfp + "h2aero_tb/htc/h2aero.htc", '../')
#bd = H2AeroBladeData(r'C:\mmpe\programming\python\Phd\pitot_tube\tests\test_files\swt36_107\h2a\htc\templates/swt3.6_107.htc', "../../")
#print (bd.pcFile.chord(36))
#bd = H2BladeData(r"C:\mmpe\HAWC2\models\SWT3.6-107\original_data\SWT4.0-130\dlc12_wsp06_wdir010_s18002.htc", ".")
bd = H2BladeData(r"C:\mmpe\HAWC2\models\SWT3.6-107\htc/stat6/stat6_10.0_0.htc", "../../")
#bd = H2BladeData(r"C:\mmpe\HAWC2\models\NREL 5MW reference wind turbine_play/htc/NREL_5MW_reference_wind_turbine_heli_step.htc", "../")
if 1:
bd.plot_geometry()
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testBladedata']
unittest.main()
...@@ -118,8 +118,8 @@ begin main_body; ...@@ -118,8 +118,8 @@ begin main_body;
node_distribution c2_def; node_distribution c2_def;
damping_posdef 0.0 0.0 0.0 0.00153 0.00255 0.00033; damping_posdef 0.0 0.0 0.0 0.00153 0.00255 0.00033;
begin timoschenko_input; begin timoschenko_input;
filename data/2Bdown-rR1.08_blade_st.dat; filename ./data/dtu_10mw_rwt_blade_st.dat;
set 1 1; set 1 1; set subset
end timoschenko_input; end timoschenko_input;
begin c2_def; begin c2_def;
nsec 20; nsec 20;
...@@ -326,9 +326,9 @@ begin aero; ...@@ -326,9 +326,9 @@ begin aero;
hub_vec shaft -3; rotor rotation vector (normally shaft composant directed from pressure to sustion side) hub_vec shaft -3; rotor rotation vector (normally shaft composant directed from pressure to sustion side)
link 1 mbdy_c2_def blade1; link 1 mbdy_c2_def blade1;
link 2 mbdy_c2_def blade2; link 2 mbdy_c2_def blade2;
; link 3 mbdy_c2_def blade3; link 3 mbdy_c2_def blade3;
ae_filename ./data/2Bdown-rR1.08_ae.dat; ae_filename ./data/dtu_10mw_rwt_ae.dat;
pc_filename ./data/2Bup_AEP095_pc.dat; pc_filename ./data/dtu_10mw_rwt_pc.dat;
induction_method 1; 0=none, 1=normal induction_method 1; 0=none, 1=normal
aerocalc_method 1; 0=ingen aerodynamic, 1=med aerodynamic aerocalc_method 1; 0=ingen aerodynamic, 1=med aerodynamic
aerosections 50; def. 50 aerosections 50; def. 50
......
'''
Created on 01/08/2016
@author: MMPE
'''
import unittest
import os
from wetb.hawc2.mainbody import MainBody, Blade
tfp = os.path.join(os.path.dirname(__file__), 'test_files/') # test file path
class TestMainBody(unittest.TestCase):
def test_MainBody(self):
mainbody = MainBody(tfp+"htcfiles/test.htc", "../", "towertop")
if 0:
import matplotlib.pyplot as plt
plt.figure()
mainbody.plot_xz_geometry(plt)
plt.figure()
mainbody.plot_yz_geometry(plt)
plt.show()
def test_Blade(self):
blade = Blade(tfp+"htcfiles/test.htc", "../")
if 0:
import matplotlib.pyplot as plt
plt.figure()
blade.plot_xz_geometry(plt)
plt.figure()
blade.plot_yz_geometry(plt)
plt.show()
# def testBladedata(self):
# #bd = H2AeroBladeData(tfp + "h2aero_tb/htc/h2aero.htc", '../')
# #bd = H2AeroBladeData(r'C:\mmpe\programming\python\Phd\pitot_tube\tests\test_files\swt36_107\h2a\htc\templates/swt3.6_107.htc', "../../")
# #print (bd.pcFile.chord(36))
# #bd = H2BladeData(r"C:\mmpe\HAWC2\models\SWT3.6-107\original_data\SWT4.0-130\dlc12_wsp06_wdir010_s18002.htc", ".")
# bd = H2BladeData(r"C:\mmpe\HAWC2\models\SWT3.6-107\htc/stat6/stat6_10.0_0.htc", "../../")
# #bd = H2BladeData(r"C:\mmpe\HAWC2\models\NREL 5MW reference wind turbine_play/htc/NREL_5MW_reference_wind_turbine_heli_step.htc", "../")
# if 1:
# bd.plot_geometry()
#
#
if __name__ == "__main__":
#import sys;sys.argv = ['', 'Test.testBladedata']
unittest.main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment