Commit d3ecee05 authored by Nicholas Noble's avatar Nicholas Noble
Browse files

test_aep was in the wrong folder

parent 371b82b2
__author__ = 's127504'
import numpy as np
import unittest
from openmdao.main.api import Assembly
from SEAMAero.aep_unit import SEAM_AEP
# data from Kenneth's model
AEP = 14.50 #[GWh / year]
Total_AEP = 290.04 #[GWh]
class AEP_Assembly(Assembly):
def configure(self):
self.add('aep',SEAM_AEP())
self.driver.workflow.add('aep')
self.aep.NWspPC = 26
self.aep.MeanWSP = 6 # [m/s]
self.aep.AirDensity = 1.225 # [kg / m^3]
self.aep.TurbulenceInt = 0.1 # Fraction
self.aep.RatedPower = 3 # [MW]
self.aep.Diameter = 101 # [m]
self.aep.MaxCp = 0.49 # Fraction
self.aep.GearLossConst = 0.01 # Fraction
self.aep.GearLossVar = 0.014 # Fraction
self.aep.GenLoss = 0.03 # Fraction
self.aep.ConvLoss = 0.03 # Fraction
self.aep.WeibullInput = 1 # 1(true) or 0 (false) if true WeiA and WeiC overrules MeanWSP. If false MeanWSP is used with Rayleigh distribution
self.aep.WeiA_input = 11. #[m/s]
self.aep.WeiC_input = 2.00 #[-]
self.aep.min_wsp = 0 #[m/s]
self.aep.max_wsp = 25 #[m/s]
self.aep.NYears = 20
class SEAM_AEPTestCase(unittest.TestCase):
def setUp(self):
self.top = AEP_Assembly()
self.top.run()
def test_SEAM_AEP(self):
self.assertAlmostEqual(self.top.aep.Total_AEP, 290.043156004, places = 8)
if __name__ == '__main__':
unittest.main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment