本文整理汇总了Python中sympy.physics.continuum_mechanics.beam.Beam.remove_load方法的典型用法代码示例。如果您正苦于以下问题:Python Beam.remove_load方法的具体用法?Python Beam.remove_load怎么用?Python Beam.remove_load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sympy.physics.continuum_mechanics.beam.Beam
的用法示例。
在下文中一共展示了Beam.remove_load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_remove_load
# 需要导入模块: from sympy.physics.continuum_mechanics.beam import Beam [as 别名]
# 或者: from sympy.physics.continuum_mechanics.beam.Beam import remove_load [as 别名]
def test_remove_load():
E = Symbol('E')
I = Symbol('I')
b = Beam(4, E, I)
try:
b.remove_load(2, 1, -1)
# As no load is applied on beam, ValueError should be returned.
except ValueError:
assert True
else:
assert False
b.apply_load(-3, 0, -2)
b.apply_load(4, 2, -1)
b.apply_load(-2, 2, 2, end = 3)
b.remove_load(-2, 2, 2, end = 3)
assert b.load == -3*SingularityFunction(x, 0, -2) + 4*SingularityFunction(x, 2, -1)
assert b.applied_loads == [(-3, 0, -2, None), (4, 2, -1, None)]
try:
b.remove_load(1, 2, -1)
# As load of this magnitude was never applied at
# this position, method should return a ValueError.
except ValueError:
assert True
else:
assert False
b.remove_load(-3, 0, -2)
b.remove_load(4, 2, -1)
assert b.load == 0
assert b.applied_loads == []