Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/351.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python OpenAeroStruct Aerostructure带翼盒漫游_Python_Optimization_Openmdao - Fatal编程技术网

Python OpenAeroStruct Aerostructure带翼盒漫游

Python OpenAeroStruct Aerostructure带翼盒漫游,python,optimization,openmdao,Python,Optimization,Openmdao,我一直在OpenAeroStruct网站上进行演练,并尝试使用Wingbox运行Aerostructure演练代码。我犯了这个错误 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\buck

我一直在OpenAeroStruct网站上进行演练,并尝试使用Wingbox运行Aerostructure演练代码。我犯了这个错误

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'.
c:\users\bucke\openaerostruct\openaerostruct\structures\compute\u nodes.py:53:ComplexWarning:将复数值强制转换为实数将丢弃虚部
数据[:n]=1-w
c:\users\bucke\openaerostruct\openaerostruct\structures\compute\u nodes.py:54:ComplexWarning:将复数值强制转换为实数将丢弃虚部
数据[n:]=w
c:\users\bucke\openaerostruct\openaerostruct\transfer\load\u transfer.py:57:ComplexWarning:将复数值强制转换为实数会丢弃虚部
self.fem_origin=np.float(fem_origin)
---------------------------------------------------------------------------
NameError回溯(最近一次呼叫上次)
在()
355
356#设置问题
-->357问题设置()
358
359#来自openmdao.api导入视图#模型
设置中的c:\windows\system32\openmdao\openmdao\core\problem.py(self、向量类、检查、记录器、模式、强制分配复杂、分布式向量类、局部向量类、派生)
801
802型号。设置(型号通信、“完整”、模式、分布式向量类、本地向量类、,
-->803(衍生工具)
804
805#缓存所有参数以进行最终设置。
c:\windows\system32\openmdao\openmdao\core\system.py in\u设置(self、comm、设置模式、模式、分布式向量类、本地向量类、使用派生)
678自设置变量数据(递归=递归)
679自我设置向量名称(模式、自我向量名称、自我vois)
-->680自身设置全局连接(递归=递归)
681自我设置相关性(模式、自我相关)
682自设置变量索引范围(递归=递归)
c:\windows\system32\openmdao\openmdao\core\group.py in\u setup\u global\u connections(self、recurse、conns)
800提升名称错误(
801“在'%s'中从'%s'到'%s'的连接不存在输出'%s'。”
-->802(prom_out,self.pathname,prom_out,prom_in))
803
804如果(prom\U in不在所有PROC\U PROM2AB\U列表中)和
NameError:从“wing.element\u mass”到“AS\u point\u 0.coupled.wing.element\u mass”的“”中的连接不存在输出“wing.element\u mass”。
任何解决这一问题的帮助都将大受欢迎。
代码链接:

您使用的是OpenAeroStruct的最新版本吗?最近发生了一项更改,重命名了一些变量。网站上的代码与该新版本相对应

尝试使用最新版本的OAS,可从以下位置获得:


演练代码在我的机器上本地运行,并在新版本上远程运行。

欢迎使用SOl。如果您能提供我们可以帮助您的代码,将非常有帮助。:)