class Test_PitchSystem(unittest.TestCase): def setUp(self): self.pitch = PitchSystem() self.pitch.blade_mass = 17740.0 # kg self.pitch.rotor_diameter = 126.0 # m self.pitch.blade_number = 3 self.pitch.hub_diameter = 3.542 AirDensity = 1.225 # kg/(m^3) Solidity = 0.0517 RatedWindSpeed = 11.05 # m/s self.pitch.rotor_bending_moment = (3.06 * pi / 8) * AirDensity * ( RatedWindSpeed** 2) * (Solidity * (self.pitch.rotor_diameter**3)) / self.pitch.blade_number def test_functionality(self): self.pitch.run() self.assertEqual(round(self.pitch.mass, 1), 13362.4) def test_gradient(self): check_gradient_unit_test(self, self.pitch, display=False)
def setUp(self): self.pitch = PitchSystem() self.pitch.blade_mass = 17740.0 # kg self.pitch.rotor_diameter = 126.0 # m self.pitch.blade_number = 3 self.pitch.hub_diameter = 3.542 AirDensity = 1.225 # kg/(m^3) Solidity = 0.0517 RatedWindSpeed = 11.05 # m/s self.pitch.rotor_bending_moment = (3.06 * pi / 8) * AirDensity * ( RatedWindSpeed** 2) * (Solidity * (self.pitch.rotor_diameter**3)) / self.pitch.blade_number
def setUp(self): self.pitch = PitchSystem() self.pitch.blade_mass = 17740.0 # kg self.pitch.rotor_diameter = 126.0 # m self.pitch.blade_number = 3 self.pitch.hub_diameter = 3.542 AirDensity= 1.225 # kg/(m^3) Solidity = 0.0517 RatedWindSpeed = 11.05 # m/s self.pitch.rotor_bending_moment = (3.06 * pi / 8) * AirDensity * (RatedWindSpeed ** 2) * (Solidity * (self.pitch.rotor_diameter ** 3)) / self.pitch.blade_number
class Test_PitchSystem(unittest.TestCase): def setUp(self): self.pitch = PitchSystem() self.pitch.blade_mass = 17740.0 # kg self.pitch.rotor_diameter = 126.0 # m self.pitch.blade_number = 3 self.pitch.hub_diameter = 3.542 AirDensity= 1.225 # kg/(m^3) Solidity = 0.0517 RatedWindSpeed = 11.05 # m/s self.pitch.rotor_bending_moment = (3.06 * pi / 8) * AirDensity * (RatedWindSpeed ** 2) * (Solidity * (self.pitch.rotor_diameter ** 3)) / self.pitch.blade_number def test_functionality(self): self.pitch.run() self.assertEqual(round(self.pitch.mass,1), 13362.4) def test_gradient(self): check_gradient_unit_test(self, self.pitch,display=False)