Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X
Hi Guys, need your help!. I am trying to create a spreadsheet in mathcad to calculate shaft. So far, I've been able to create shear and moment diagrams for the kength of the shaft using singularity functions. Now, I am stucked in deflections and slope. I am considering Castigliano's theorem to do it without success.... Castigliano's theorem uses a Heaviside Function and dummy loads at any point on the length of the beam/shaft... First, I defined the heaviside function and then put into the moment equation but then I couldnt do the partial derivate of this equation with respect the dummy load Q, so I had to do it manually (this way the spreadsheet is no longer parametric and will create errors if I change some inputs values). Then when having all the equations to go for integration, it seems that something is undefined..
do you think there is a fancy way to do this?. At this point I am bit frustraded I don't know where the problem is..
Another thing is, because Castigliano's Theorem needs of a secondary axis, I am not pretty sure how I am going to use when trying to plot the diagram. Do I need 2 variable ranges? x:0...L and x':0..L
Please let me know, and thanks in advance
Solved! Go to Solution.
Different Method, just for fun Prime 4.0 Express
Welcome to this forum.
1. You cannot differentiate the if() function, so your definition of H will not work. Fortunately you don't need to define the Heaviside step function, it's built- in as:
If you need it to step at any other point then 0, say a, then use:
An example with a=2:
And the built-in can be differentiated, although the result generally will contain the delta function for which there is nu numerical functionality defined in Prime.
2. Your variable Q is undefined. If you want to differentiate a function to a particular variable, that variable had better be defined as a (formal) parameter/variable to that function. So apart from x and xi, M should also be a function of Q, and I guess R1 should also be a function of that variable.
3. I guess something similar holds true for your variable a.
4. While there is some support in prime for symbolic operations where variables have numeric values, even with units, it is generally better to first do all symbolic operations and then fill in the numeric values.
5. Be careful with the constant (?) c in your definition of R1. At present it's undefined, so Prime has a tendency to autolabel it to a constant, then it becomes green, and its value equal to the speed of light in vacuum...
Success!
Luc
Hi Luc, thanks for your help!. where can I find this built-in function ?
c and a variables are actually errors, they shouldn't be there, they suppose to be the distance where the force is applied, sorry about that. but yes generally speaking I got your point!
just to clarify on c and a errors, The correct equation must be:
You find function(s) in the help, or use the ribbon: Functions, then pick the right category, or select 'all functions' , then select AtoZ. Phi is at the bottom of the list...
To type greek letters, type the 'corresponding' Latin letter followed by [Ctl-G], so to get Phi, type
F [Ctl-G]
Success!
Luc
thanks Luc, much appreciated , I will try your suggestion and come back to you if solution is found or not.
The symbolic approach might look like:
Then
Success!
Luc
Luc, I have a question for you.. do you know how can I translate this logic (image below) into mathcad?
I've created a program to emulate this as shown below:
but when I try to plot this together the general equation, the curve looks like this:
which is wrong and I am assuming that the error is somewhere in the program to determine diam(x)
would you please help me with these one?
Can't comment on the curve, but your function dia(x) looks good to me. Apart from the fact that it does not return a value for x>=315.
Furthermore I don't understand why you start with index 2 and not with index 1 (I assume you have set ORIGIN to 1 ?)
You may give a lookup function a try. The following suggestion also fails for x>=315 🙂
Hi Werner! thanks for your help!. I am changing the ORIGIN to 0.. and I will try the lookup function.. just one question, what does "gt" mean?
I did not mean that ORIGIN=1 would be a problem. I was just wondering why the first index you used in your dia(x) function for Ls and Da was index 2.
My suggestion using "lookup" should work no matter how ORIGIN is set because I use "ORIGIN" itself as vector index.
Different Method, just for fun Prime 4.0 Express
Hey Fred!, this is so cool, I just need to understand a bit the process in the region at top of the spreasheet.. Why do I need this? to create the Linterp and solve for the constants of integration? or if this something else?.. will this work if I put more forces acting on the shaft?
I just need to understand a bit the process in the region at top of the spreasheet.. Why do I need this? to create the Linterp and solve for the constants of integration?
I have only Express, the free version of Mathcad, the "premium" functions (like 'Re', 'Im', 'mean', 'Linterp' etc. are disabled. The closed region (the red line) at the top of the sheet contains the fabricated replacements for some of those functions, as well as some additional features like the ability to add gridlines to the built-in plots. If you have a full version of Prime you wouldn't need that region.
will this work if I put more forces acting on the shaft?
The math is basic. The differential equation for deflection of a beam is:
You need an equation for the shear in the shaft; your case with two supports and one load is simple. Then moment is the integral of shear.
Now slope is the integral of moment, but your inertia is also a function of position. I could get Mathcad to compute the slope but it's a fairly nasty looking graph:
So I elected to digitize a vector of points and use trapezoidal integration for both slope and displacement. But (remember your calculus) each integration generates an unknow constant, so we need to use the available constraints to find those constants for this specific case. The deflection at the supports must be zero, so:
If you have a full version of Prime (your sheet with programming shows you must) you could use a solve block to do this problem without all the hoopla! But solve blocks are "premium features"!