OpenAeroStruct Aerostructural с Wingbox Walkthrough - PullRequest
0 голосов
/ 15 января 2019

Я делал обходы на веб-сайте OpenAeroStruct и пытался запустить Aerostructural с кодом Wingbox Walkthrough. Я получил эту ошибку.

c:\users\bucke\openaerostruct\openaerostruct\structures\compute_nodes.py:53: ComplexWarning: Casting complex values to real discards the imaginary part
  data[:n] = 1 - w
c:\users\bucke\openaerostruct\openaerostruct\structures\compute_nodes.py:54: ComplexWarning: Casting complex values to real discards the imaginary part
  data[n:] = w
c:\users\bucke\openaerostruct\openaerostruct\transfer\load_transfer.py:57: ComplexWarning: Casting complex values to real discards the imaginary part
  self.fem_origin = np.float(fem_origin)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-2-bb874f64c6d4> in <module>()
    355 
    356 # Set up the problem
--> 357 prob.setup()
    358 
    359 # from openmdao.api import view_model

c:\windows\system32\openmdao\openmdao\core\problem.py in setup(self, vector_class, check, logger, mode, force_alloc_complex, distributed_vector_class, local_vector_class, derivatives)
    801 
    802         model._setup(model_comm, 'full', mode, distributed_vector_class, local_vector_class,
--> 803                      derivatives)
    804 
    805         # Cache all args for final setup.

c:\windows\system32\openmdao\openmdao\core\system.py in _setup(self, comm, setup_mode, mode, distributed_vector_class, local_vector_class, use_derivatives)
    678         self._setup_var_data(recurse=recurse)
    679         self._setup_vec_names(mode, self._vec_names, self._vois)
--> 680         self._setup_global_connections(recurse=recurse)
    681         self._setup_relevance(mode, self._relevant)
    682         self._setup_var_index_ranges(recurse=recurse)

c:\windows\system32\openmdao\openmdao\core\group.py in _setup_global_connections(self, recurse, conns)
    800                 raise NameError(
    801                     "Output '%s' does not exist for connection in '%s' from '%s' to '%s'." %
--> 802                     (prom_out, self.pathname, prom_out, prom_in))
    803 
    804             if (prom_in not in allprocs_prom2abs_list_in and

NameError: Output 'wing.element_mass' does not exist for connection in '' from 'wing.element_mass' to 'AS_point_0.coupled.wing.element_mass'.

Любая помощь, чтобы исправить это, будет очень кстати. Ссылка на код: Аэроструктурный с кодом Wingbox Walkthrough

1 Ответ

0 голосов
/ 16 января 2019

Используете ли вы самую последнюю версию OpenAeroStruct? Произошло недавнее изменение, которое переименовало некоторые переменные. Код на сайте соответствует этой новой версии.

Попробуйте использовать новейшую версию OAS, которая доступна здесь: https://github.com/mdolab/OpenAeroStruct

Код прохождения работает локально на моей машине и удаленно с этой новой версией.

...