Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

MathCAD Stress Grapher Error

Status
Not open for further replies.

quammstah

Mechanical
Dec 15, 2017
2
Hello All,
I'm having a minor issue with Mathcad, and I was just using my resources to see if anyone could help me out.

Essentially, I'm generating shear and moment diagrams with the help of step functions, using a singularity function type approach. I can make those functions easy enough, and plot those shear and moment diagrams easily, as well as finding stresses at a point along the x axis.

However, when I attempt to the shear stress equation into a plot-able format, I get errors, and am unable to do so, using the proper tau sign. I would like to be able to do this, so in the future, when I have stresses along changing areas, I can see the greatest stresses with regards to area changes.

The funny thing is that I am able to plot these by just using V(x)/A(x). When I do this outside the plot, I receive the large matrix with all the function values at every point, and as I stated before I can plot those. The only thing is it's not very clean or concise, and I would rather be able to use the tau symbol. But when I set τ=V(x)/A(x) I get an error, and am unable to. Does anyone know how to fix this? In the same regard, I'd rather be able to put σ instead of "MC/I" for my formal reports.

Basically I set my constants such as total length, length to a point load, length to a distributed load, etc.

then:
A(x)=2m^2 (for here I set this, so I can figure out if everything's working before I attempt it on variable areas)

x:=0m, 0.005*L, L <------ Sets my "x" lengths
S(x,z):=if(x≥z,1,0) <------ Sets my step functions
V(x):=R1*S(x,0 m)- w*S(x,a)(x-a)+R2*S(x-b)-F*S(x-a) <-------Essentially is my singularity function for the beam

If I do: V(x)/A(x)= I receive a matrix

If I do: τ:=V(x)/A(x) I receive the error "the variable [x for the shear] is undefined."

Thank you for your help!

 
Replies continue below

Recommended for you

you need to define it as tau(x):=V(x)/A(x). Since tau is based on both V(x) and A(x) it also varies with x so must be defined as such.
 
Agreed, the root of the problem is that "tau" is a scalar variable that can only hold one value, and "tau(x)" is the function you need for continuous graphed solutions.

I also noticed the way that function "S(x,z)" is used in the function "V(x)". Two things to note here:
- First (major issue) the third and fourth instances of function S used in evaluating V do not include both arguments of S.
- Second (minor issue) the function V(x) does not have a second argument, written such as "V(x,z)" corresponding to S, preventing subsequent use of the second argument in S after you've defined it. Depending on the rest of your sheet's calculations, you may not need to worry about changing values of "z", but if you do, you could have problems with the values delivered by function V(x) without giving it the second argument, too. If S needs two arguments, then I would also define "V(x,z)" and use both arguments even if I wasn't sure I would need the second one in V.

Something else to watch out for, when working with step functions, is the denominator term A(x) and preventing its range from crossing zero. Mathcad doesn't handle divide-by-zero errors well. The way the error is presented may lead you to believe there's a problem in the arguments entered in the graph, when actually it's a div-0 error in the function being evaluated in the range of the graph.


STF
 
I guess I had forgot to mention that I am in fact using the tau(x)=V(x)/A(x) to receive the error specified. It says the "x" in V(x) is undefined. I must have just forgot to write tau(x) in this post, and just wrote tau instead. My bad.

The "a" and "b" correspond to lengths I had previously defined, I just didn't write them here for the sake of shortening the post (for the singularity functions of the beam).
a=0.4m
b=0.6m
L=1m
and then all the reactions are defined as well.


Also, I appreciate your help!
 
What keystroke are you actually using to define x? In classic MathCAD, it was something other than the colon, I think.

Not sure about Prime...I'm still sorting out the new key commands in Prime.
 
The OP hasn't returned to check on the thread since posting in December. I assume they've solved their problem to their satisfaction by now.

WT: the basic keystrokes are the same, even in Prime, aren't they? I haven't used it in a while, though...

STF
 
Nope, they're not; I just checked because of the other thread. For example, a literal subscript was "." and is now <CTRL>+"-", which is possibly a nit, but it is a more complicated keystroke combination that before.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor