
Re: ARGH! Where is my mistake
wayne Feb 14, 2012 9:34 AM (in response 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.

Re: ARGH! Where is my mistake
FredKohlhepp Feb 14, 2012 9:36 AM (in response 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.

SWOBODA data.xmcd.zip 50.5 K


Re: ARGH! Where is my mistake
Lilli Feb 15, 2012 12:07 AM (in response 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 ??????

Re: ARGH! Where is my mistake
wayne Feb 15, 2012 6:54 AM (in response 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.

Re: ARGH! Where is my mistake
Lilli Feb 15, 2012 7:12 AM (in response 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.

Re: ARGH! Where is my mistake
MikeArmstrong Feb 15, 2012 7:20 AM (in response to wayne)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


Re: ARGH! Where is my mistake
Lilli Feb 15, 2012 7:40 AM (in response to MikeArmstrong)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?

Re: ARGH! Where is my mistake
MikeArmstrong Feb 15, 2012 7:47 AM (in response to Lilli)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

Re: ARGH! Where is my mistake
Lilli Feb 15, 2012 7:55 AM (in response to MikeArmstrong)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

PV600.xls 21.5 K

SWOBODAtest1.xmcd.zip 69.4 K

Re: ARGH! Where is my mistake
wayne Feb 15, 2012 9:51 AM (in response 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

SWOBODAtest1.xmcd.zip 111.4 K

Re: ARGH! Where is my mistake
Lilli Feb 16, 2012 1:27 AM (in response 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*PqMpiston*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)

SWOBODAtest2.xmcd.zip 37.2 K

Re: ARGH! Where is my mistake
FredKohlhepp Feb 16, 2012 4:10 AM (in response 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.

SWOBODAtest2fk.xmcd.zip 83.5 K











Re: ARGH! Where is my mistake
Lilli Feb 16, 2012 4:28 AM (in response 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.