简体   繁体   中英

OpenAeroStruct Aerostructural with Wingbox Walkthrough

I have been doing the walk throughs on the OpenAeroStruct Website and when trying to run the Aerostructural with Wingbox Walkthrough code. I got this error.

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'.

Any help to fix this would be greatly appericated. Link to code: Aerostructural with Wingbox Walkthrough code

Are you using the most recent version of OpenAeroStruct? There was a recent change that renamed some variables. The code on the website corresponds to that new version.

Try using the newest version of OAS, which is available from here: https://github.com/mdolab/OpenAeroStruct

The walkthrough code works locally on my machine and remotely with that new version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM