The Gitlab server is succesfully updated to version 14.4.0

Many users are receiving emails regarding excessive amounts of log-in attempts, which are brute-force attempts to crack your password. We are working on a 2FA solution, so no action is needed yet. If you receive emails regarding "sign-in from new location", please check the IP address and if unknown, notify frza@dtu.dk immediately.

Commit ded6e1d4 authored by Frederik Zahle's avatar Frederik Zahle
Browse files

Merge branch 'test' into 'master'

Adding test files for AEP

See merge request !3
parents 5fb6832c d3ecee05
__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