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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

ARGH! Where is my mistake

Lilli
1-Visitor

ARGH! Where is my mistake

Dear everybody!

You find enclosed my MathCAD file.

My equations depend of THETA, I know by mesure the pressure following THETA.

Why FI"(THETA) isn't a function?

ACCEPTED SOLUTION

Accepted Solutions
Fred_Kohlhepp
23-Emerald I
(To:Lilli)

Actually, if you import both columns your sheet will work as written.

One of the things Mathcad can do isfit functions to data. Before I realized that importingg the whole file solved your problem, I was trying to develop P as a function of theta. That would allow you to use functions instead of vectors.

View solution in original post

14 REPLIES 14
wayne
12-Amethyst
(To:Lilli)

Are the values of Theta in the excell table in degrees?
If so then assign the degree unit to theta ( theta:=theta*deg) and drop the degree assignments in the functions.

Mathcad will convert to radians internally, and do computations in radians.

It's a little confusing using angular velocity in radians/s and funcitons that have theta in degrees combined with functions with theta in radians.

Fred_Kohlhepp
23-Emerald I
(To:Lilli)

The sheet you posted has no data for theta or P(theta); the readfile structuresdon't store the data. As soon as I create values for theta, all the functions develop values.

Lilli
1-Visitor
(To:Lilli)

Thanks all! Unfortunately, the functions don't all develop! If you look your sheet, j"(q) and after doesn't develop, Strangely if I write

j"(q):=(j'(q)*j'(q)-q)*tanj(q) it's develop, why. It's the same thing after ??????

wayne
12-Amethyst
(To:Lilli)

You need to vectorize some of the equations.

Mathcad will automatically vectroize, sometimes. I've see situations where Mathcad appeared to vectorize automatically, because it gave multiple results. But if you then vectorize, the answer is different (and correct).

Some of you equations that don't produce multiple results just need to be vectorized, but others should be checked to see if the result when vectorized is the same.

You could also put Theta=0..rows()Theta and P=0..rows(P) at the beginning and it will do the same thing (I did not try though).

It also looks like you need to assign units to P, P=P*psi, or whatever.

Lilli
1-Visitor
(To:wayne)

Hello Wayne,

I'm not sure to understand. I added the unit for the P value after your fist respond. I come to solved the problem, I suppresed the excel relation for Theta but now I don't know how to use my pressure.

Mathcad will automatically vectroize, sometimes. I've see situations where Mathcad appeared to vectorize automatically, because it gave multiple results. But if you then vectorize, the answer is different (and correct).

It's a very dangerous situation. I had that happen to me recently. It tends to happen when you have two vectors with one equation.

Mike

A simple example of what Wayne was talking about.

Clipboard01.jpg

Mike

Now, I'm block went I try to use my P values.

Mike, I tried to use your sheet, (Previous thread) but without result for this problem.

My problem is the follow:

For q = 2°, P = 0.859 bar,

For q = 4°, P = 0.863 bar,

For q = 6°, P = 0.867 bar,

...

For q = 360°, P = 0.854 bar

How to take into account this point?

Sorry I have come late into this thread. You haven't defined theta or P in your sheet. Firstly you either have to define that or make each function dependant of theta.

I cannot see where in your sheet P is being calculated and therefore cannot see which value of theta relates to which pressure.

Mike

At the begining of the sheet I've q:=2°,4°..360° and Pq:=PV600.xls. I know this relation but I don't know how to put it into MathCAD

wayne
12-Amethyst
(To:Lilli)

Lilli:

See attached; For Theta, use a vector, not a range variable
You imported 2 columns from Excel, you only want the second column.

A few of places you still had the degree unit in the function
I vecotrized everything, don't know if they all needed to be though.

I made no attempt the check the results.

Wayne

Lilli
1-Visitor
(To:wayne)

Hello wayne!

It's strange for me to use the vector, for the graphs I must use the dot representation and not the line.

Unfortunatly I'm always stop on the equation of piston load that is equal to :

-Spiston*Pq-Mpiston*Gpiston(q) with:

Spiston : m²

Pq : Pa

Mpiston : kg

Gpiston(q) : m/s²

How to write this equation?

Additional point :

I have just 179 values for Pq but 360 for Gpiston(q)

Fred_Kohlhepp
23-Emerald I
(To:Lilli)

Actually, if you import both columns your sheet will work as written.

One of the things Mathcad can do isfit functions to data. Before I realized that importingg the whole file solved your problem, I was trying to develop P as a function of theta. That would allow you to use functions instead of vectors.

Lilli
1-Visitor
(To:Lilli)

Thanks at all ! Currently, I continue to improve my systeme. I think that is not finish but for the moment the problem are solve.

Announcements

Top Tags