如何解决如何为自动连接的输出设置别名?
我目前有这个代码:
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(),所以我不确定它为什么不起作用。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。