cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

RE: producing a 2D graph from 2 variables

gbradley
1-Newbie

RE: producing a 2D graph from 2 variables

I'll try and explain this the best I can and also the fact that I don't know if Mathcad can actually do what I require

I'm trying to produce a 2D graph from two varibles which can change. The graph is for a design of a beam where:-

  • The load applied to the beam is known.
  • The moment capacity of the beam is known.
  • However the span can change
  • The adjacent beam centers can change.

The unity ratio of the beam passing <1.0 and failing >1.0

I've attached a what I think it should look like and the formula. I believe this may require some sort of programming or I'm not sure whether Mathcad can actually do something like this.

Please bear in mind I'm using Mathcad 14

Thanks

16 REPLIES 16

This should be straightforward in Mathcad. You can rearrange your formula to get CC = ... with SPAN on the right-hand side - you would then put in values of SPAN, get out the corresponding values of CC and plot one vs the other.

However, I'm puzzled because your formula suggests CC is inversely proportional to SPAN squared (which is nothing like what you've drawn!

Alan

The reason for the sqaured is to get the top part of the division into kN.m and the bottom part of the equation is kN.m therefore giving an answer of no units and just a number i.e. 1.0

Gareth Bradley wrote:

The reason for the sqaured is to get the top part of the division into kN.m and the bottom part of the equation is kN.m therefore giving an answer of no units and just a number i.e. 1.0

I understand that. What I was referring to was the fact that your graph shows CC increasing as SPAN increases (I assume the x-axis is SPAN); but your formula has CC decreasing as SPAN increases!

Alan

awww I see what you mean, in all honesty I'm probably wrong. this is something I'm just trying to produce so I haven't even considered that.

Do you know how I should proceed to produce the chart, any help will do. I'm still reletively new at mathcad. I'll make a start tho.

You will need the correct formula! Set it up as a function CCfn(SPAN):= ....whatever the formula is.

Then use a vector of values of SPAN, say:

i = 0..100 (index counter)

Span[i:= i*5/100

CC[i:= CCfn(Span[i)

Then just plot CC vs Span.

(NB The [ gives you a true subscript in Mathcad)

The first essential is to get the correct formula!! When you get this, if you post it here, someone will undoubtedly plot it for you if that's the part that is causing difficulty.

Alan

for some reason I'm getting a divide by 0 in the last formula...any ideas

Your "Test" post disappeared as I was answering. Attached has been fixed to develop your plot.

Thanks Fred, I'll have a look at it

Couple questions fred..........

could you explain the X[i := 3/100*i+1mm please and what its doing? is it saying the maximum span is 3.0m and then checking at every 1mm

I'm assuming the CcC[is the formula for the y axis and CcC[0 is the formula for X-axis

No, it's creating the vector X (you were doing Span) that ranges from 0 m to 3 m (what your PDF graph showed. Then I got the "divide by zero" error, so X ranges from 1 mm (to get rid of the error) to 3001 mm (three meters plus 1 mm). You can change the range of your span variable by changing the 3 meters.

CcC is the vector of solutions to your function CC(X), one for each CC(X_i). there is only one column. The plot shows CcC plotted against X.

Yes I got the divide by 0, this is where I was stumped. is there anyway where I can limit say CcC to a maximum of 3m as currently this is 1000m.

Gareth Bradley wrote:

Yes I got the divide by 0, this is where I was stumped. is there anyway where I can limit say CcC to a maximum of 3m as currently this is 1000m.

Not sure if you need a vector for your further calculations. if yes then you have to avoid a zero in the X-vector.

If the goal is just plotting, then you won't need vectors and the plot region will handle the divisoon by zero itself.

See attachment.

Got exactly what I'm after on the attached file. There's just two little things I'm trying to do.

I have a graph which gives me a ratio of 1.0 if I was to somehow want to minus say 0.3 (unitless) of this and the graph re-adjust itself, is this possible?????????

I have a formula of (all unitless)

1.0 - xx = 1.0

where xx is a unitless figure I want to take off.

not sure if I gone the right way about doing this.

The other thing is, somehow find the ratio at a given length on the beam as well as the beam centers?

Apologies if this doesn't make sense

Gareth Bradley wrote:

Got exactly what I'm after on the attached file. There's just two little things I'm trying to do.

I have a graph which gives me a ratio of 1.0 if I was to somehow want to minus say 0.3 (unitless) of this and the graph re-adjust itself, is this possible?????????

I have a formula of (all unitless)

1.0 - xx = 1.0

Huhh??? Quite nonsense unless xx=0.

where xx is a unitless figure I want to take off.

not sure if I gone the right way about doing this.

Not sure if I understand what you mean by this. Something like the attched?

The other thing is, somehow find the ratio at a given length on the beam as well as the beam centers?

Absolutely no clue what you are talking about. Give the exact equation and formulate your question using the varaible names used there.

Q E D

The other thing is, somehow find the ratio at a given length on the beam as well as the beam centers?

Apologies if this doesn't make sense

Fred an me have both shown you the way to make the ratio an additional argument of your function CC which seemed to be waht your first question was.

Fred also showed on top of his sheet how to solve symbolically for the ratio which seems to be what your second question is all about.

Find attached a way to turn this into a function of X and CC and also an alternative numerical approach using a solve block. I would prefer the symbolic way in your case but the latter has the advantage that it will work for more complex function, which Mathcads symbolics would choke on, too.

Top Tags