Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

The value must be a scalar - Mathcad prime 9 3

Status
Not open for further replies.

mathiasfp

Student
Sep 8, 2023
8
DK
Hi

Im trying to calculate the bending moment and shear force depending on the distance x along the beam.

billede_2023-09-08_144452209_rhj9tl.png


I tried making "a" into another matrix but then its either not a scalar or it says the number of rows and collums isnt the same.
billede_2023-09-08_144707685_fbnyk4.png


I saw a similar problem on here but didnt quite understand the solution.

Please help.

Best regards
Mathias
 
Replies continue below

Recommended for you

but the beam is only 4m long ... so xi>4 should "bail out"

you've defined xi as "i"m, this is shown by the first 5 results being "real"

"Hoffen wir mal, dass alles gut geht !"
General Paulus, Nov 1942, outside Stalingrad after the launch of Operation Uranus.
 
I think the interval is 4 m, not 40 m. Use x[sub]1[/sub]:=0.1*i*m
 
Yeah, I was going to do that, but got distracted. It's better, but it's still not smooth like it's supposed to be, but it's not my homework, so I'm done

beam_xedwdx.png




TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
IRstuff said:
Yeah, I was going to do that, but got distracted. It's better, but it's still not smooth like it's supposed to be, but it's not my homework, so I'm done

Your diagrams look precisely as they should. There is a concentrated load of 1 kN at midspan, so the shear diagram has a sudden drop of 1 kN at midspan and the moment diagram has a slight cusp at midspan.

It may not be your homework, but I would give you 100%.
 
nah ... nothing over 90% ... that direct shear input should be vertical ... but the method doesn't lend itself to two points for the same x.

and should rise to 0 at the end (but that's being pedantic).

"Hoffen wir mal, dass alles gut geht !"
General Paulus, Nov 1942, outside Stalingrad after the launch of Operation Uranus.
 
rb1957 said:
...that direct shear input should be vertical ... but the method doesn't lend itself to two points for the same x.

If we check shear at x values of 2.000 and 2.001 it would be nearly vertical because only one of those values is greater than 2.
 
if you drew the SF curve from the other end you'd get a different result.

if we say the discrete force is distributed over a very short span, like 2+- 0.001, then ok ... but we have a concept of a point load for a reason, and I wouldn't want to change it (nor encourage sloppy programing).

And IMHO the programming is sloppy. Some sloppiness is hidden in the loading point. I wouldn't divide the beam into 40 points. I'd distribute the points over the two spans, "a" and "b", maybe modify the nearest evenly distributed point to align with the load (which in this case it does).

Better I'd do as you did, develop the general loading equations, know that the curve is linear or parabolic and plot that.

To me it is important to understand that the shear is discontinuous at the load point and that the SF and BM curves are the same whether you plot them from one end or the other.

I know this is being pedantic, but this is a student forum, and students are learning the basis, the foundation, of the rest of their career.

"Hoffen wir mal, dass alles gut geht !"
General Paulus, Nov 1942, outside Stalingrad after the launch of Operation Uranus.
 
Interesting commentary, rb1957.

The title is interesting too. The value must be a scalar - Mathcad prime 9

What value must be a scalar? As opposed to what...a vector? A mathematical vector or an engineering vector? Why? Darned if I know!
 
This inequality operator is only for scalars; x is not a scalar.
 
which is why "x subi" worked ... identifying a element within the x array

"Hoffen wir mal, dass alles gut geht !"
General Paulus, Nov 1942, outside Stalingrad after the launch of Operation Uranus.
 
3DDave said:
This inequality operator is only for scalars; x is not a scalar.

I have been treating x as a variable and a scalar. The OP seems to be doing the same. See below.

Capture_fogrj9.jpg


Is this in conflict with Mathcad Prime 9?
 
No, x is a 1 x m matrix, if you will. As with such constructions you can reference the entire matrix as in state matrix math A*x == I sort of things. There is no conflict. However, if you want to compare a single value with the matrix to a, you must use the indexing operator.

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

Thanks alot.

I really appreciate your solutions.

I have used your solution BA and it works great!

I just really wanted to understand the programming part, thats why i kept asking, and i should have said that.

IRstuff have made what i wanted initially, thanks.

I dont quite understand the thought process behind "i" and "xi"

Why is it neccesary to make "i" and then "xi", does this turn it into a matrix?

I added some stuff, but besides that it is great.

billede_2023-09-11_213346431_jg10at.png


Btw im in the middle og my bachelor and havent had basic programming or any advanced beam theory yet, so even though this might seem simple for veterans its not the same for me. Im not making this as homework, im simply trying to become a better engineer.

rb1957 in your comments, you mention a way to make it "vertical" in the point of the pointload ( and varius ways to make it more correct?), how would you do that if you had to dumb it down a bit?

Best regards
Mathias
 
I'm sorry but as an engineer, even pre-grad, you should understand what an array means.

If you need help with MathCad programming, have to tried online help/tutorials ?

You've "seeded" the x array very simply, as multiples of 0.1m. To get a vertical line, you need two x values at 2m. "no one" cares what the values a X are, but keeping them in order helps the graphing. so you need to change how you've loaded the values into the array. "Many ways to skin cats" ... you could have twenty one points <= a and twenty one points a <= x <= L. For SF you have one expression 0 <= x <= a, and a different one for a <= x <= L. You'll need a slightly clever piece of programming to get the two values at x = a; the easy (dumb, lazy) way is to say SF(21) is the +ve shear value that you know (or can calc) and SF(22) is the -ve value. The moment values (M21) and M(22) are the same.

"Hoffen wir mal, dass alles gut geht !"
General Paulus, Nov 1942, outside Stalingrad after the launch of Operation Uranus.
 
Thank you.

I will try it tomorrow, tonight i just started by adding more points, then it also becomes more precise depending on where i put the point load
billede_2023-09-11_225445861_fjjjim.png


I have probably used or heard about it before, but i find it difficult to translate all the terms from danish to english.
I wanted to learn to calculate the deflection equation the same way i did with SF and BM, so it also depends on the "xi", do you have an easy way to do this?
 
I dont quite understand the thought process behind "i" and "xi"

Why is it neccesary to make "i" and then "xi", does this turn it into a matrix?

YOU created a vector called "x", wherein there are 21 elements. How did you think you were going to access the individual (scalar) values?

The subscripted x values, x[i notation can be found in any math textbook that even mentions vectors and matrices; there shouldn't be any unfamiliarity with the notation if you are in high school or beyond.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
mathiasfp said:
I wanted to learn to calculate the deflection equation the same way i did with SF and BM, so it also depends on the "xi", do you have an easy way to do this?

Yes, indeed! Use the principle of superposition. You have a uniform load and a concentrated load. If you know the deflection at any x due to each type of load, the combined deflection is the sum of the two. Just add 'em together.

 
you calculate deflections from the same loading diagrams ...

start with distributed loads,
integrate and add point loads from Shear Force diagram,
integrate and add point moments for the Bending moment diagram,
then integrate M/EI for slope along the beam (EI is typically constant but can be function of x, finally
integrate slope for deflection.

For simple loading (like point load at a or uniform distributed loads then are readily available solutions (try Roark or any text).
You may need to superimpose two separate loading to get your solution.

"Hoffen wir mal, dass alles gut geht !"
General Paulus, Nov 1942, outside Stalingrad after the launch of Operation Uranus.
 
Hi

I tried the superposition principle, and it works great!
billede_2023-09-13_094624546_xzkkgo.png


The other one seems a bit complicated, but im guessing it works for when i do not have the equations from a book.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top