Skip to content
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 `Beam_3d` class #14883

Merged
merged 11 commits into from Jul 23, 2018

Conversation

Projects
None yet
4 participants
@jashan498
Copy link
Contributor

jashan498 commented Jul 9, 2018

Brief description of what is fixed or changed

Beam_3d can be used to find Shear force, Bending moment, Slope and Deflection in the beam.

Equations used
From the Reference, following equations are used:

  • To find Shear force and Bending moment
    shear
    where [N, Qy, Qz] and [Mx, My, Mz] are shear force and bending moment along x-y-z axes respectively (q and m are applied load and moment).
  • To find Slope and Deflection:
    def_1
    def_2
    where [wx, wy, wz] and x, θy, θz] are deflection and slope along three axes respectively.

Other comments

As Beam_3d doesn't use SingularityFunction, I was unable to find a way to represent point load/moments (also I wasn't able to find any online resource regarding it). So for now Beam_3d only supports continous load applied over whole span of beam.

@parsoyaarihant parsoyaarihant added the GSoC label Jul 10, 2018



class Beam_3d(Beam):
"""

This comment has been minimized.

@parsoyaarihant

parsoyaarihant Jul 10, 2018

Contributor

I dont think you need to explain what is beam? here because this has already been explained in class Beam().

This comment has been minimized.

@jashan498

jashan498 Jul 10, 2018

Author Contributor

Ok, I will change it. Btw should Beam_3d inherit from Beam class?
The only methods they both share are setter methods for length and elastic_modulus. Rest all methods are different for both of the classes.

This comment has been minimized.

@parsoyaarihant

parsoyaarihant Jul 12, 2018

Contributor

I actually think the Beam (2D beam) class should inherit from Beam_3d class because all 2D beams can be modelled as a 3D beam. We can discuss this possibility in the future when Beam_3D is complete.

For now, keep the Beam_3d class inherit from Beam class. We could potentially inherit class functions in the future.

jashan498 added some commits Jul 10, 2018

Added test case fro Beam_3d
Few changes in the Docstring

@jashan498 jashan498 force-pushed the jashan498:3dbeam branch from 2263e6c to 9f08b56 Jul 11, 2018

@jashan498 jashan498 changed the title [WIP] continuum_mechanics: added `Beam_3d` class continuum_mechanics: added `Beam_3d` class Jul 11, 2018

@jashan498

This comment has been minimized.

Copy link
Contributor Author

jashan498 commented Jul 11, 2018

eq1 = Derivative(E*I_z*Derivative(theta(x), x), x) + (integrate(-load[1], x) + C_i) + moment[2]
slope_z = dsolve(Eq(eq1, 0)).args[1]

#solve for constants originated from using dsolve on eq1

This comment has been minimized.

@Abdullahjavednesar

Abdullahjavednesar Jul 11, 2018

Member

Must have a whitespace after #

This comment has been minimized.

@Abdullahjavednesar

Abdullahjavednesar Jul 14, 2018

Member

You should repair all such cases.

@jashan498 jashan498 force-pushed the jashan498:3dbeam branch from 6f3ba51 to 378d9fe Jul 15, 2018

@parsoyaarihant

This comment has been minimized.

Copy link
Contributor

parsoyaarihant commented Jul 16, 2018

Are you planning to add anything else in this PR?

@jashan498

This comment has been minimized.

Copy link
Contributor Author

jashan498 commented Jul 17, 2018

I have implemented the relevant material from this reference but there can be need for some improvements in Beam_3d class, which I am struggling to do myself due to lack of relevant material online regarding 3dbeams.

@jashan498 jashan498 force-pushed the jashan498:3dbeam branch from 75fa18e to b582043 Jul 23, 2018

@jashan498

This comment has been minimized.

Copy link
Contributor Author

jashan498 commented Jul 23, 2018

@parsoyaarihant have a look. I made the changes we discussed.

@parsoyaarihant parsoyaarihant merged commit b32d904 into sympy:master Jul 23, 2018

1 check passed

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



class Beam_3d(Beam):

This comment has been minimized.

@moorepants

moorepants Jul 28, 2018

Member

Don't use underscores in class names. This should be "Beam3D".

This comment has been minimized.

@jashan498

jashan498 Jul 29, 2018

Author Contributor

Oh, I don't know what I was thinking while using underscore. Changed it in #14967

variable : Symbol, optional
A Symbol object that will be used as the variable along the beam
while representing the load, shear, moment, slope and deflection
curve. By default, it is set to ``Symbol('x')``.

This comment has been minimized.

@moorepants

moorepants Jul 28, 2018

Member

should have default assumptions on x

This comment has been minimized.

@jashan498

jashan498 Jul 30, 2018

Author Contributor

Changed it in #14967

+ 12*E*I*q)/(8*E*I*(A*G*l**2 + 12*E*I)) + l*m*x**2/(4*E*I) - l*x**3*(A*G*l**2*q
- 2*A*G*l*m + 12*E*I*q)/(12*E*I*(A*G*l**2 + 12*E*I)) - m*x**3/(6*E*I) + q*x**4/(24*E*I)
+ l*x*(A*G*l**2*q - 2*A*G*l*m + 12*E*I*q)/(2*A*G*(A*G*l**2 + 12*E*I))
- q*x**2/(2*A*G), 0]

This comment has been minimized.

@moorepants

moorepants Jul 28, 2018

Member

It'd be nice to see some varying examples to test this code out. I doubt that one test is sufficient.

This comment has been minimized.

@jashan498

jashan498 Jul 29, 2018

Author Contributor

Actually, I was unable to find more examples for test cases online. Maybe 3D beams are not very common.

This comment has been minimized.

@moorepants

moorepants Jul 30, 2018

Member

Here are some resources I found that may have some examples or test problems:

@moorepants

This comment has been minimized.

Copy link
Member

moorepants commented Jul 28, 2018

@jashan498 I've added some comments post merge here. Please have a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.