Commit 0b4561e3 authored by Frederik Zahle's avatar Frederik Zahle
Browse files

added test assembly

parent b26346cc
from openmdao.main.api import Assembly
from openmdao.lib.datatypes.api import Float, Enum
from SEAMCosts.SEAMCAPEX import SEAMCAPEX
class SEAMLevelOne(Assembly):
d2e = Float(0.73, iotype='in', desc='Dollars to Euro ratio')
rated_power = Float(3., iotype='in', units='W', desc='Turbine rated power')
hub_height = Float(100., iotype='in', units='m', desc='Hub height')
rotor_diameter = Float(110., iotype='in', units='m', desc='Rotor diameter')
site_type = Enum('onshore', values=('onshore', 'offshore'), iotype='in',
desc='Site type: onshore or offshore')
tower_cost_per_mass = Float(4.0, iotype='in', desc='Tower cost per mass')
blade_cost_per_mass = Float(15., iotype='in', desc='Blade cost per mass')
hub_cost_per_mass = Float(3.5, iotype='in', desc='Hub cost per mass')
spinner_cost_per_mass = Float(4.5, iotype='in', desc='Spinner cost per mass')
bearing_cost_per_mass = Float(14.0, iotype='in', desc='Bearing cost per mass')
turbine_cost = Float(iotype='out', desc='Total turbine CAPEX')
infra_cost = Float(iotype='out', desc='Total infrastructure CAPEX')
total_cost = Float(iotype='out', desc='Total CAPEX')
def configure(self):
self.add('capex', SEAMCAPEX())
self.driver.workflow.add('capex')
for name in self.list_inputs():
try:
self.connect(name, 'capex.%s' % name)
except:
pass
for name in self.list_outputs():
try:
self.connect('capex.%s' % name, name)
except:
pass
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