Skip to content

Commit

Permalink
add iea 3.4 to regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gbarter committed Dec 2, 2020
1 parent 5f7f614 commit 982b78a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
5 changes: 2 additions & 3 deletions wisdem/test/test_examples/test_examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import unittest
import os
import unittest
import importlib
from pathlib import Path

Expand All @@ -10,13 +10,12 @@
examples_dir = os.path.join(root_dir, "examples")
all_examples = Path(examples_dir).rglob("*.py") if os.path.exists(examples_dir) else []

# 02_ref turbines are regression tested in test_gluecode, no need to duplicate runtime
all_scripts = [
"01_nrel_csm/costs",
"01_nrel_csm/mass",
"01_nrel_csm/mass_and_cost",
"01_nrel_csm/parametric",
"02_reference_turbines/iea15mw_driver",
"02_reference_turbines/nrel5mw_driver",
"03_blade/blade_driver",
"04_openmdao/betz_limit",
"04_openmdao/sellar",
Expand Down
17 changes: 16 additions & 1 deletion wisdem/test/test_gluecode/test_gluecode.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import unittest
import os
import unittest

from wisdem.glue_code.runWISDEM import run_wisdem

test_dir = (
Expand Down Expand Up @@ -27,6 +28,7 @@ def test5MW(self):
self.assertAlmostEqual(wt_opt["re.precomp.blade_mass"][0], 16403.682326940743, 2)
self.assertAlmostEqual(wt_opt["rp.AEP"][0] * 1.0e-6, 24.0801229107, 2)
self.assertAlmostEqual(wt_opt["financese.lcoe"][0] * 1.0e3, 50.982520869210894, 2)
self.assertAlmostEqual(wt_opt["rs.tip_pos.tip_deflection"][0], 4.1949743155, 1)

def test15MW(self):
## IEA 15MW
Expand All @@ -38,6 +40,19 @@ def test15MW(self):
self.assertAlmostEqual(wt_opt["re.precomp.blade_mass"][0], 73310.0985877902, 1)
self.assertAlmostEqual(wt_opt["rp.AEP"][0] * 1.0e-6, 78.0371305939, 1)
self.assertAlmostEqual(wt_opt["financese.lcoe"][0] * 1.0e3, 66.22846083658864, 1)
self.assertAlmostEqual(wt_opt["rs.tip_pos.tip_deflection"][0], 22.7002324979, 1)

def test3p4MW(self):
## IEA 15MW
fname_wt_input = test_dir + "IEA-3p4-130-RWT.yaml"
wt_opt, modeling_options, opt_options = run_wisdem(
fname_wt_input, fname_modeling_options, fname_analysis_options
)

self.assertAlmostEqual(wt_opt["re.precomp.blade_mass"][0], 14555.7435212969, 1)
self.assertAlmostEqual(wt_opt["rp.AEP"][0] * 1.0e-6, 13.7700592288, 1)
self.assertAlmostEqual(wt_opt["financese.lcoe"][0] * 1.0e3, 36.5740341928, 1)
self.assertAlmostEqual(wt_opt["rs.tip_pos.tip_deflection"][0], 6.5292336115, 1)


def suite():
Expand Down

0 comments on commit 982b78a

Please sign in to comment.