openmdao - 如何为自动连接的输出设置别名?
问题描述
我目前有这个代码:
self.add_subsystem('IntegrateForTheta2Ue6', utilities.CumulativeIntegrateTrapeziums(n=n),
promotes_inputs=[('x', 'panel_lengths'),
('x0', 'stagnation_point_position'),
('y', 'ue5'),
('y0', 'panel_start_external_tangential_velocity')],
promotes_outputs=[('cumulative_integral', 'intue5')])
self.add_subsystem('ThwaitesCalculateMomentumThickness', ThwaitesCalculateMomentumThickness(n=n),
promotes_inputs=['external_tangential_velocities',
'intue5',
'kinematic_viscosity'],
promotes_outputs=['momentum_thickness'])
它在运行时不会抛出任何错误,但在调试时很明显intue5
aka的输出cumulative_integral
没有被传递到 ThwaitesCalculateMomentumThickness - 它显示为所有错误。当我尝试上述方法时self.connect('IntegrateForTheta2Ue6.intue5', 'ThwaitesCalculateMomentumThickness.intue5')
,我得到Attempted to connect from 'IntegrateForTheta2Ue6.intue5' to 'ThwaitesCalculateMomentumThickness.intue5', but 'IntegrateForTheta2Ue6.intue5' doesn't exist.
我在输出别名中犯了错误,还是这是一个错误?
解决方案
更新到最新版本的 OpenMDAO 有效。我相信我已经在调用 run_model(),所以我不确定它为什么不起作用。
推荐阅读
- ansible - 通过 Ansible 创建 Azure Keyvault 机密
- xamarin.forms - 使用 Xamarin.Essentials 的文件附件
- c - 为什么以下c程序的输出是-10
- wordpress - 如何覆盖 WordPress 插件文件
- c# - 即使在 Azure 应用服务中发布后,JSON 文件数据也不会改变
- php - 如何使用外部 URL 或链接打开自定义选项卡及其 div?
- python - Django Rest Framework - 如何将图像导入为 JPEG 并使用序列化程序将其保存为 base 64?
- javascript - 如何将嵌套的 json 数据绑定到 angularjs 下拉列表中?
- jsf - 通过调用 javaScript 函数来中断 Bean 方法?
- python - 如何在使用 testinfra 库的失败测试中返回 stderr=?