Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello,
I am a beginner in Mathcad using Prime 10.0.0.0 Educational Edition.
I want to calculate the kinetic energy of a mechanical system so I have to define a time-dependant function, but I'm not able to do this.
I want to calculate the symbolic expression.
I write the function as alpha(t):=[function including t as time variable] and I don't get any errors, when I try to use this function later I get the error "The variable is undefined. Check that the label is set properly".
I don't know if I'm using the time variable t wrong or it's an algebra problem.
Any ideas?
Thank you,
Andrea
1) What you define with T is again a function in t, so you have to write T(t):=...
2) Even if you do so you will get an error if you try to evaluate function T for a specific time value
Reason are your definitions of function phi1 and phi2
These definitions don't make sense. Its kind of an infinite recursion.
What did you intend with that definition? What function result value do you expect from, for example, phi1 (2 s) = ???
Oh of curse, by defining it like this T should be T(t), you're right.
I wanted to tell Mathcad that phi1 and phi2 are unknown values, looking around the web I found that should be a viable method, but I am a bit confused.
I guess this isn't the right way, it's basically the core of my post, what would you advice?
Thank you for the response,
Andrea
If phi1 & 2 are 'unknown' variables or functions, then don't define them. But of course you can't expect any numerical result when evaluating functions depending on these unknowns.
Its absolutely unclear to me what you actually want to achieve.
Time for some team work.
Know how to formulate the equation for omega that needs to be solved but no idea how to solve it in Mathcad.
Cheers
Terry
Apologies there was a unit inconsistency in last post.
Stiffnesses k1 and k2 are in the wrong units. They should be N/mm not N*mm
Corrected the units. The originator should check the values?
This means the original equation involving Q(t) was correct after all.
Cheers
Terry
You forgot in one case to urn the "w" into an "omega" and the derivation prime symbols must be applied to the function name, not after the argument parentheses.
But Prime's symbolics is not able to solve this ODE system.
Error message is "No solution found". Either the system really has no (real) solution with the values provided or Prime is not capable enough. I also tried without units with the same result.
To try numerically with "odesolve" we would need initial conditions.
Hi,
Here is the odesolve() solution with boundary conditions supplied.
Cheers
Terry
Its a pity that Prime does not allow the convenient Matrix/vector notation in the odesolve block.
But we don't need do convert the system of second derivatives to a system with four equations in first derivatives.
But we must present the equations without using any vectors and matrices 😞
Modified version of Terry's P10 sheet attached
Thank you Werner learnt a lot.
Cheers
Terry
I'd wish that PTC and Prime would learn a little bit so that future versions would understand and accept the notation
Prime even chokes when I use
BTW, using "Q" on the right hand side works OK.
The solve block also fails when I hide the matrix multiplication in a function
It does not even help if I symbolically evaluate the test function
It still does not work if i manually define
and use this function instead.
Now we are away from matrices and vectors and Prime still moans about too few equations! ???
So it seems that Prime/odesolve doesn't like vectors and matrices in combination with the functions and their derivatives, but it also does not like functions dependent on the derivatives??!
Hello everyone.
I noticed the mistake of the units, I corrected it after having posted the question.
@terryhendicott where didi you get Q(t) from? that was part of what I was trying to calculate in Mathcad, I got the same result (thankfully!) using Lagrange equations by hand.
As @Werner_E was saying it seems to me (I'm a real beginner so probably I don't know the full potential of the software) that Mathcad doesn't allow to use the conventional implicit format that I was trying to use in the first place, I have to explicit all of the equations for it to be able to solve my system.
I'm still a bit confused because when I opened my worksheet today the error "The variable is undefined. Check that the label is set properly" changed, now it's this:
What could this mean?
Thank you,
Andrea
The reason you get a different error message is because you obviously have changed variable T into a function T(t).
But phi1 and phi2 still are undefined.
What kind of result did you expect in the numerical(!) evaluation of T(1 s) = ?
Try to evaluate phi1(1 s) and you will get the very same error message.
You defined phi1(t) as an endless recursion, hence the error message.
@terryhendicott where did you get Q(t) from? that was part of what I was trying to calculate in Mathcad, I got the same result (thankfully!) using Lagrange equations by hand.
"There is nothing new under the sun". So I image searched google with the image from your post and found the enclosed paper that defines Q(t)
The author of the paper is still available at the email address in the paper.
Cheers
Terry