New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

continuum_mechanics : Added applied_loads and remove_load methods #14751

Merged
merged 1 commit into from May 30, 2018

Conversation

Projects
None yet
3 participants
@jashan498
Contributor

jashan498 commented May 28, 2018

Brief description of what is fixed or changed

This PR implements remove_load method to remove previously applied loads on the beam object.
This is little different from adding a negative load to make net equal to zero and would work only if that particular load exists on beam. example:

>>> b.apply_load(4, 2, -1)
>>> b.remove_load(1, 2, -1)  # will give ValueError as no such load was present on beam
>>> b.remove_load(4, 2, -1)  # will remove the load

I also implemented applied_loads method which keeps a track of all load applied on beam.
It is different from b.load as it treat each load as a separate entity. load property would sum up all the loads at a particular point but applied_loads will still show them as separate loads. For example

>>> b.apply_load(4, 2, -1)
>>> b.apply_load(2, 2, -1)
>>> b.load
6*SingularityFunction(x, 2, -1)
>>> b.applied_loads
[(4, 2, -1, None), (2, 2, -1, None)]

ping @parsoyaarihant @moorepants

@parsoyaarihant

This comment has been minimized.

Contributor

parsoyaarihant commented May 28, 2018

Looks good.

@parsoyaarihant parsoyaarihant merged commit 00beb46 into sympy:master May 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@parsoyaarihant parsoyaarihant added the GSoC label Jun 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment