-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
[GSOC] Draw method for Cable class #26640
Conversation
✅ Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes. Your release notes are in good order. Here is what the release notes will look like:
This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.14. Click here to see the pull request description that was parsed.
Update The release notes on the wiki have been updated. |
@Ishanned @AdvaitPote this draft PR will track my Draw method progress. I will make a final PR when eveything is ready. |
Benchmark results from GitHub Actions Lower numbers are good, higher numbers are bad. A ratio less than 1 Significantly changed benchmark results (PR vs master) Significantly changed benchmark results (master vs previous release) Full benchmark results can be found as artifacts in GitHub Actions |
Can you please check its working out once, I will move forward to adding the docstring for the new method and its usage if the diagrams are satisfactory. |
Shape of cable under UDL however the method does not ensure the provided lowest point will be the lowest point of the formed equation. For example, in the case of same height of supports the solver would accept In [1]: from sympy.physics.continuum_mechanics.cable import Cable
...: c=Cable(("A", 0, 10),("B", 20,10))
...: c.apply_load(0, ("X", 850))
...: c.solve(5,0)
In [2]: c.tension
Out[2]: {'distributed': 19125*sqrt((4*X/15 - 4/3)**2 + 1)/2}
In [3]: c.draw().show()
I have fixed the issue with the magnitude symbols disappearing and bad support shapes. For running draw use the order given above as without using solve , draw does not work. |
Hi @shishir-11, can you share what happens if you call the |
The solve method takes arguements for the lowest point of the cable which is used to form the equation later. So calling draw without solve works fine for point loads , for distributed loads we would get an error trying to access the lowest point coordinates. |
I just ran this example locally. I am getting a good and correct diagram as expected. However, it's giving me a Runtime Warning: |
Can
I'm unable to reproduce this warning on my system , can you provide any specifications or method to reproduce this. |
That's odd. If it's something with my device then no problem. Just focus on the 'adding distributed loads' feature. I am looking for possible changes and might post another review. |
I have implemented the 'adding distributed load' feature in an earlier PR, please check. mag = 0
for key in self._loads['distributed']:
mag += self._loads['distributed'][key]
force_arrows.append(
{
'text':f'{mag} N/m',
'xy':((self._left_support[0]+self._right_support[0])/2,self._lowest_y_global - max_diff*0.15)
}
) |
I don't see any more changes function wise. @Ishanned ? |
I'll have a final look and let you know |
LGTM. After yesterday's discussion, I think we should merge this PR. |
References to other Issues or PRs
Brief description of what is fixed or changed
This PR aims to track the progress of Phase 1 of GSOC project aimed to Extend the continuum_mechanics module.
Draw method is implemented for Cable and changes to the solver for consistency of equation with the lowest point.
Plot for tension also added .
Other comments
Release Notes