To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/1795A385-4AEA-44FD-BEE8-8115D53DA14B%40gmail.com.
You, as the designer, will get to choose whatever names you want. We will discuss the naming of functions during deeper discussions. For now just pick whatever you think is appropriate.On Sun, Feb 28, 2016 at 1:53 AM, SAMPAD SAHA <sampa...@gmail.com> wrote:Jason,Thank you for giving me a direction to think over this project.Would it be fine if we name the module as Singularity?As you said, I will now focus on creating object which would help us to use standard operators on different types of singularity functions.I will also focus on creating a timeline to implement different functionalities . I will let you know shortly about what i am upto.
RegardsSampad Kumar SahaMathematics and ComputingI.I.T. Kharagpur
On Sun, Feb 28, 2016 at 12:11 AM, Jason Moore <moore...@gmail.com> wrote:JasonBut you'll need to implement the singularity function stuff first before the later.b.moment_sing_func() # returns the singularity funcsb.shear_moment_diagram() # uses the plot module to plot the piecewise functoinb.moment() # finds the moment vs x using singularity funcs in the backgroundb.apply(PointLoad(location=l/3, value=p)b.apply(DistrubutedLoad(start=l/2, end=l, value=w)b = Beam(length=l)from sympy import Beam, DistributedLoad, PointLoadI could also imagine a higher level abstraction where you could do something like:Do some beam bending problems by hand and then think about how you'd like it to work if you could do it all with SymPy. For every example problem you do, write out pseudo code like above.-3 * <x - 0>**0 + 6 * <x - 2>**1 - 9 * <x - 4>**0>>> integrate(w)-3 * f<x - 0>**(-1) + 6 * <x - 2>**0 - 9 * <x - 4>**-1>>> pprint(w)>>> w = -3 * f(x - 0)**(-1) + 6 * f(x - 2)**0 - 9 * f(x - 4)**-1>>> from sympy import SingularityFunction as fI'd suggest writing up some psuedo code that would give an idea of what a sympy session might look like to solve some beam problems. Maybe something like:Sampad,You will likely need to create objects that represent different types of singularity functions. These objects should be able to be assembled into full expressions using standard operators: plus, minus, etc. Additionally you'll need some methods that can convert these expressions into the continuous piecewise forms and allow evaluation with .evalf(). The integrate and Integral objects should be able to integrate them.
Jason,I have started working on my proposal. After adding some ideas on how to proceed with this project from myside , I will send you the link.Can you please suggest me , where should I write my proposal so that I can send it to you for reviewing?
RegardsSampad Kumar SahaMathematics and ComputingI.I.T. Kharagpur
Yah, That would be great. After drafting my proposal on wiki, I will let you know.
RegardsSampad Kumar SahaMathematics and ComputingI.I.T. Kharagpur
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/C90AF03D-B317-46BA-9BDF-D9F7688E9A39%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6JiW6zhx%3DcTahjcugKaR3jOTrYOnFJWYRr-%2BNiS-2zcLQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CANzav4HrH7YbrOm4%3D9s2%2BHevCnCv4vz1RbuU%2BZWwLWLnCZpbcw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAKgW%3D6KrEOoZ-CvGJ_HTBVSpTLVkW6geUfvXdP8GAiBNO4y8qQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CANzav4EeosCsLaP55dwMpKxOxBkGhW6ZAkeCQiSvQnXtieU6PQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CANzav4HzA3vObqax9d4GJaW%2BYbs1z0ME2m4-wgs0EAFW9wnCqw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/B66DECFB-0205-41DC-A09D-342BBDF6FAC4%40gmail.com.
Hi,
Do you know the integration and differentiation rules for singularity functions? They’re pretty straightforward.
As for boundary conditions, the beam will have supports (or a free end) at each end of the beam and as part of the beam creation each end type is specified. Each type corresponds to a specific set of conditions on that end (either at x=0 or x=L). You substitute those conditions in the appropriate equation and solve for the integration constant as necessary. All of the conditions should be in any decent mechanics of deformable solids text book.
You’ll want to do sums of forces and moments as well to solve for reaction forces as well.
The only trick is making sure you don’t double count things. If you have a step function due to a reaction force at the start of the beam and assume it’s zero at x=0 (effectively the limit at x=0^-) you can get a non-zero integration constant that can be double counting that reaction since at x=0^+ that reaction force is non-zero. Note that you can get a non-zero integration constant (even when including reaction forces in the loading function) for shear and moment equations if you have non-polynomial loads (e.g., sine and cosine). You’ll also have to think about the other end as well. I leave it up to you to reason that out. Make sure you completely document how you’ve implemented it for the user (and why).
Beam coordinate systems must start at the left end and increase to the right. The definition of the singularity functions require this.
I hope this helps.
Cheers,
Tim.
> On Mar 18, 2016, at 8:17 AM, SAMPAD SAHA <sampa...@gmail.com> wrote:
>
> I am also confused about implementing the boundary conditions for getting the deflection curve.
>
> Any suggestions on how to implement it.
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Fri, Mar 18, 2016 at 5:36 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> Yah, you are right multiplication of singularity functions are not needed for solving beam problems. Mathematically, it is also not used that much. So lets leave this multiplication and powers part.
>
> I was thinking about the integrate and diff methods. I feel that we should define instance methods diff and integrate in the singularity function module which would internally use the existing diff and integrate function for Differentiation and Integration respectively.
>
> I need your suggestions.
>
>
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Fri, Mar 18, 2016 at 3:14 AM, Jason Moore <moore...@gmail.com> wrote:
> I think you need to override the operators. I'm not sure if multiplying singularity functions is needed (at least for beam problems), even if it is mathematically correct, you don't have to implement it. If it is easy to implement then, sure, do so.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> On Thu, Mar 17, 2016 at 1:34 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
>
> Jason,
>
> For implementing Additon , Multiplication Do we need to over ride __mul__ , __add__ these methods inside the class SingularityFunction or we can just use simplify for getting the results.
>
> I am really confused.
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Fri, Mar 18, 2016 at 1:59 AM, SAMPAD SAHA <sampa...@gmail.com> wrote:
>
> I was thinking about multiplication of two singularity functions. It is possible and it is mathematically significant. We can implement this too in Sympy. Similarly with powers.
>
> I need your suggestions.
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Wed, Mar 16, 2016 at 9:41 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> Yah , You are right . A software having good documentations about all the functionality is preffered more over the others by the users. I will be spending a good amount of time in preparing the documentation citing plenty of examples and tutorials.
>
> Here is link to my proposal. I have almost added all the things which we have disscussed. I still need to add the example and many more "TODO"s are left. I am working on those.
>
>
> Suggestions are welcomed.
>
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Wed, Mar 16, 2016 at 6:18 AM, Jason Moore <moore...@gmail.com> wrote:
> Looks good. I think you should have plenty of examples in the docs. People tend to use software more if the docs are top notch. So plenty of examples and tutorials will really help.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> On Tue, Mar 15, 2016 at 5:25 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> You are right. delta_function.py needs to be improved. I will to be using only DiracDelta and Heaviside for generating almost all the Singularity Functions.
>
> I was also thinking to complete this project in four phases:
> • Improving existiing Functions.
> • Creating Singularity Functions module
> • Creating beam Module
> • Documentation
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Wed, Mar 16, 2016 at 5:44 AM, Jason Moore <moore...@gmail.com> wrote:
> https://www.python.org/dev/peps/pep-0008/
>
> I think you will need a pure singularity function module and then you will need a beam module that utlizes the singularity function module. You will also likely need to improve the discontinuous functions that are already in sympy. There are at least three layers to this in my eyes.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> On Tue, Mar 15, 2016 at 5:07 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> Jason
>
> Pardon please. I couldn't get you by "You will need to follow PEP8 for the method and class names".
>
> and yah, i also felt that it would be better if i use the input and output values of the example problem done by hand.
>
> So , what do you suggest, Would it be better if we create a different module ,other than the singularity function module, for solving beam problems? That module would import the singularity function module for using them.
>
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Wed, Mar 16, 2016 at 5:22 AM, Jason Moore <moore...@gmail.com> wrote:
> I think it is a good start. You will need to follow PEP8 for the method and class names. But I just want to see desired functionality. The more you can think up, the better. I would suggest doing a beam problem by hand and then translating that to a desired API. You can mock up what you think the inputs and outputs should be for that example problem.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> On Tue, Mar 15, 2016 at 4:46 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> Ok Jason,
>
> And what about the API I have posted just before the earlier post?
>
> Any suggestions
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Wed, Mar 16, 2016 at 5:10 AM, Jason Moore <moore...@gmail.com> wrote:
> The file locations and method class names are just fine details that can be worked out later. They are generally not important for your proposal. Just focus on describing what the future modules should do.
>
>
> Jason
> moorepants.info
> +01 530-601-9791
>
> On Tue, Mar 15, 2016 at 4:36 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> Hi Jason,
>
> As I am thinking to create a another module for solving especially beam problems (suppose beambending.py) , what will be its file location?
> Similarly for Singularity Functions (suppose singularity_function.py), What will be its location?
>
> And what about the names of methods and classes, Can I give any name or we will be discussing it at the time of developing them?
>
>
>
> ---------------------
> Regards,
> Sampad
>
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Wed, Mar 16, 2016 at 3:56 AM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> Thank You Tim and Jason for your suggestions and clearing my doubts.
>
> We can also have an another module for solving beam problems. As Jason Have suggested earlier.
>
> Some of its classes would be Beam, DistributedLoad, PointLoad, Moment.
>
> We can have the API as:-
>
> from sympy import SingularityFunction,Beam,DistributedLoad,PointLoad,Moment
> b = Beam(length = 1, E = 1.87, I = 12)
> Load1 = DistrubutedLoad(start=l/2, end=l, value= 50)
> Load2 = PointLoad(location=l/3, value=60)
> Load3 = Moment(locaton = 1, value = 40, anticlockwise = True)
> b.apply(Load1,Load2,Load3)
> b.loadDistribution # Outputs the loading function in the form of singularity function
> b.shearForce # Outputs the Shear Force Function
> b.bendingMoment # Outputs the bending Moment Function
> b.slope # Outputs the Slope Function
> b.deflection # Outputs the deflection Function
>
> b.plotLoadDistribution # Outputs the plot of load Distribution Curve
> b.plotBendingMoment # Outputs the plot of Bending Moment Curve
> b.plotDeflection # Outputs the plot of Deflection Curve
>
>
>
>
>
Yah you are correct. Differentiation of heaviside and diracdelta also exists.It was my mistake. Thanks for rectifying me.
RegardsSampad Kumar SahaMathematics and ComputingI.I.T. Kharagpur
On Fri, Mar 18, 2016 at 8:02 PM, Tim Lahey <tim....@gmail.com> wrote:For differentiation you’re missing a case,
if n = 0 or n = -1
return Singularity(x, a, n-1)
else if n < -1
return error
In other words, you can still differentiate for the n = 0 and n = -1 cases.
Cheers,
Tim.
> On Mar 18, 2016, at 10:22 AM, SAMPAD SAHA <sampa...@gmail.com> wrote:
>
> And what about the pseudocode of integration and differentiation i have posted earlier , is it alright?
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Fri, Mar 18, 2016 at 7:51 PM, SAMPAD SAHA <sampa...@gmail.com> wrote:
> Thanks Tim,
>
> It is really a nice and effective solution.
>
>
>
>
>
> Regards
> Sampad Kumar Saha
> Mathematics and Computing
> I.I.T. Kharagpur
>
> On Fri, Mar 18, 2016 at 7:46 PM, Tim Lahey <tim....@gmail.com> wrote:
> Add the constants when you integrate in your beam class.
>
>
> On 2016-03-18, at 10:12 AM, SAMPAD SAHA <sampa...@gmail.com> wrote:
>
>> Thanks TIm,
>>
>> Integration and Differentiation are really very straight forward that is why i am thinking to add diff and integrate method to the Singularity function class itself.
>>
>> For integrate the pseuesocode will be :-
>>
>> if(n<0)
>> return SingularityFunction(x , a, n+1)
>> else
>> return (1/n+1 * SingularityFunction(x , a, n+1))
>>
>> Similarly for differentiation:
>>
>> if (n>0)
>> return n * SingularityFunction(x , a, n - 1)
>> else
>> Error message
>>
>>
>> My doubt regarding Boundary condition was actually was that since sympy don't provide constant of integration while performing indefinite integration on any expression, how to use the boundary conditions to find the exact values of constant of integration?
>>
>>
>>
>>
>>
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CANzav4GGN1PyV%2B8ekiPKgEurqCHf15CU3HuoZYS3THoChL54PA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAC%2BH8-H43g%2BrjCZ5Oqv9oghKa9TVXT5goBX_HfaK4gb5L2twzA%40mail.gmail.com.
Can you please give a final review.. and i didn't get you by this comment "Comment from Jason: You will need to make sure everything is backwards compatible. See the wiki for our policy."
RegardsSampad Kumar SahaMathematics and ComputingI.I.T. Kharagpur
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1AiuP1c2LxKte0%3DEV3BYAb-TYEi1wDBfNXg4E5YV1e64Aw%40mail.gmail.com.
In [20]: x = Symbol('x', nonnegative=True)
In [21]: Heaviside(x).rewrite(Piecewise) Out[21]: ⎧ 1 for x > 0⎪ ⎨1/2 for x = 0⎪ ⎩ 0 otherwise
...
--
You received this message because you are subscribed to the Google Groups "sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
To post to this group, send email to sy...@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/1271931a-6b6f-4352-8b21-82621cb06842%40googlegroups.com.