mdolab / openconcept

OpenConcept: A toolkit for conceptual MDAO of aircraft with unconventional propulsion architectures
MIT License
37 stars 32 forks source link

Update docs, add thermal and hybrid integration test #14

Closed bbrelje closed 4 years ago

bbrelje commented 4 years ago

Purpose

Expand integration test to include more airplanes Update docs to reflect OpenMDAO 3.0 dependency

Type of change

What types of change is it?

Testing

Adds new integration test covering thermal components.

Checklist

bernardopacini commented 4 years ago

When running the examples, I run into the following error message for the HybridTwin.py case:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py", line 468, in __setitem__
    meta = self._dict[name]
KeyError: 'dynamic_simul_derivs'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "HybridTwin.py", line 279, in <module>
    prob.driver.options['dynamic_simul_derivs'] = True
  File "/usr/local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py", line 472, in __setitem__
    self._raise(msg.format(name), exc_type=KeyError)
  File "/usr/local/lib/python3.8/site-packages/openmdao/utils/options_dictionary.py", line 263, in _raise
    raise exc_type(full_msg)
KeyError: "ScipyOptimizeDriver: Option 'dynamic_simul_derivs' cannot be set because it has not been declared."

Interestingly this also fails for the current master branch but with a different error:

Traceback (most recent call last):
  File "HybridTwin_thermal.py", line 416, in <module>
    print(nice_print_names[i]+': '+str(prob.get_val(thing,units=units[i])[0])+' '+str(units[i]))
  File "/usr/local/lib/python3.8/site-packages/openmdao/core/problem.py", line 397, in get_val
    val = self.model._get_val(name, units=units, indices=indices, get_remote=get_remote)
  File "/usr/local/lib/python3.8/site-packages/openmdao/core/system.py", line 4246, in _get_val
    abs_name, typ = name2abs_name(self, name)
  File "/usr/local/lib/python3.8/site-packages/openmdao/utils/name_maps.py", line 149, in name2abs_name
    if name in system._var_allprocs_prom2abs_list['output']:
TypeError: 'NoneType' object is not subscriptable

Given that the error is different on this PR, I am adding this here as these changes are changing the behavior.

The remaining examples run without issues.