本文整理汇总了Python中DLLM.DLLMKernel.DLLMSolver.DLLMSolver.run_adjoint方法的典型用法代码示例。如果您正苦于以下问题:Python DLLMSolver.run_adjoint方法的具体用法?Python DLLMSolver.run_adjoint怎么用?Python DLLMSolver.run_adjoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DLLM.DLLMKernel.DLLMSolver.DLLMSolver
的用法示例。
在下文中一共展示了DLLMSolver.run_adjoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: df
# 需要导入模块: from DLLM.DLLMKernel.DLLMSolver import DLLMSolver [as 别名]
# 或者: from DLLM.DLLMKernel.DLLMSolver.DLLMSolver import run_adjoint [as 别名]
def df(x):
wing_param.update_from_x_list(x)
DLLM = DLLMSolver('Simple',wing_param,OC)
DLLM.run_direct()
DLLM.run_post()
DLLM.run_adjoint()
func_grad=numpy.array(DLLM.get_dF_list_dchi())
return func_grad
示例2: test_DLLM_run_direct_post_adjoint
# 需要导入模块: from DLLM.DLLMKernel.DLLMSolver import DLLMSolver [as 别名]
# 或者: from DLLM.DLLMKernel.DLLMSolver.DLLMSolver import run_adjoint [as 别名]
def test_DLLM_run_direct_post_adjoint(self):
OC,wing_param = self.__init_wing_param()
DLLM = DLLMSolver('test',wing_param,OC, verbose = 2)
try:
print ''
DLLM.run_direct()
DLLM.run_post()
DLLM.run_adjoint()
ok=True
except:
ok=False
assert(ok)
示例3: DLLMSolver
# 需要导入模块: from DLLM.DLLMKernel.DLLMSolver import DLLMSolver [as 别名]
# 或者: from DLLM.DLLMKernel.DLLMSolver.DLLMSolver import run_adjoint [as 别名]
wing_param.set_value("sweep", 34.0)
wing_param.set_value("break_percent", 23.0) # 33.
wing_param.set_value("root_chord", 5.4) # 6.1
wing_param.set_value("break_chord", 4.6)
wing_param.set_value("tip_chord", 1.2) # 1.5
wing_param.set_value("root_height", 0.98)
wing_param.set_value("break_height", 0.70)
wing_param.set_value("tip_height", 0.18)
wing_param.convert_to_design_variable("span", (10.0, 50.0))
wing_param.convert_to_design_variable("sweep", (0.0, 40.0))
wing_param.convert_to_design_variable("break_percent", (20.0, 40.0))
wing_param.convert_to_design_variable("root_chord", (5.0, 7.0))
wing_param.convert_to_design_variable("break_chord", (3.0, 5.0))
wing_param.convert_to_design_variable("tip_chord", (1.0, 2.0))
wing_param.convert_to_design_variable("root_height", (0.7, 1.0))
wing_param.convert_to_design_variable("break_height", (0.45, 0.8))
wing_param.convert_to_design_variable("tip_height", (0.10, 0.26))
# wing_param.build_linear_airfoil(OC, AoA0=-2., Cm0=-0.1, set_as_ref=True)
wing_param.build_meta_airfoil(
OC, "../MetaModelCleaning.xml", relative_thickness=0.12, camber=0.0, Sref=1.0, Lref=1.0, sweep=0.0, set_as_ref=True
)
wing_param.build_airfoils_from_ref()
wing_param.update()
print wing_param
DLLM = DLLMSolver("Meta", wing_param, OC)
DLLM.run_direct()
DLLM.run_post()
DLLM.run_adjoint()