## MathCAD Stress Grapher Error

## MathCAD Stress Grapher Error

(OP)

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!

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!

## RE: MathCAD Stress Grapher Error

## RE: MathCAD Stress Grapher Error

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

## RE: MathCAD Stress Grapher Error

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!