本文整理汇总了Python中sfepy.fem.ProblemDefinition.set_equations_instance方法的典型用法代码示例。如果您正苦于以下问题:Python ProblemDefinition.set_equations_instance方法的具体用法?Python ProblemDefinition.set_equations_instance怎么用?Python ProblemDefinition.set_equations_instance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfepy.fem.ProblemDefinition
的用法示例。
在下文中一共展示了ProblemDefinition.set_equations_instance方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: FieldVariable
# 需要导入模块: from sfepy.fem import ProblemDefinition [as 别名]
# 或者: from sfepy.fem.ProblemDefinition import set_equations_instance [as 别名]
t2 = FieldVariable('t', 'parameter', field_t, 1,
primary_var_name='(set-to-None)')
t2.set_data(t() - T0)
term1 = Term.new('dw_lin_elastic_iso(m.lam, m.mu, v, u)',
integral, omega, m=m, v=v, u=u)
term2 = Term.new('dw_biot(m.alpha, v, t)',
integral, omega, m=m, v=v, t=t2)
eq = Equation('temperature', term1 - term2)
eqs = Equations([eq])
u_bottom = EssentialBC('u_bottom',
bottom, {'u.all' : 0.0})
u_top = EssentialBC('u_top',
top, {'u.[0]' : 0.0})
pb.set_equations_instance(eqs, keep_solvers=True)
pb.time_update(ebcs=Conditions([u_bottom, u_top]))
displacement = pb.solve()
out.update(displacement.create_output_dict())
pb.save_state('thermoelasticity.vtk', out=out)
view = Viewer('thermoelasticity.vtk')
view(vector_mode='warp_norm',
rel_scaling=1, is_scalar_bar=True,
is_wireframe=True,
opacity={'wireframe' : 0.1})