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

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Question on undefined function block

ptc-5116202
1-Newbie

Question on undefined function block

Hello , i have a a set of undefined functions phi1(t) , phi2(t) , phi3(t) and i would like to use them as variables throughout my calculations without having that red undefined functions set.

The objectives of the worksheet;

- define f(x,t)=phi(t) * g(x,t)

- compute some intermediate KE , Ums , Ubs with f(x,t)

-assemble KE , UMS , UBS in L(t) -- > L(t):= K2*phi(t)^2+K1*phi(t)+K1*phi^2(t)+K0d/dt(phi(t))

- find d/dt( phi(t)) in L(t)

-use result to compute D(t,phi) ---> can't extract from "find" array

- solve using RKadapt

What puzzles me more is that computations are working fine from the start and it stops working right where i need it most.

1 ACCEPTED SOLUTION

Accepted Solutions

D0 would not be available for numeric evaluation and calculation as it still contains undefined variables phi1, phi2 and phi3 (which you substituted for the appropriate functions in L()).

But in your case D0 would not even evaluate symbolically! It seems that Mathcads symbolics do not like the if-statements in your definition of q(t).

I replaced them by summing multiplying with the boolean expressions and D0 will evaluate symbolically. I haven't tried but I guess that using the Heaviside function to define q(t) would work as well. I suspect that using the if function instead of the programming if will have no effect.

View solution in original post

3 REPLIES 3

D0 would not be available for numeric evaluation and calculation as it still contains undefined variables phi1, phi2 and phi3 (which you substituted for the appropriate functions in L()).

But in your case D0 would not even evaluate symbolically! It seems that Mathcads symbolics do not like the if-statements in your definition of q(t).

I replaced them by summing multiplying with the boolean expressions and D0 will evaluate symbolically. I haven't tried but I guess that using the Heaviside function to define q(t) would work as well. I suspect that using the if function instead of the programming if will have no effect.

Just read your post more carefully and realized, that you intend to rewrite your worksheet to avoid the red errors thrown from Mathcads numeric processor.

To do so you will have to use the function names (phi1 to phi3) as parameters of all functions which have to deal with them like so:

Plate1.png

That way you could omit the symbolic binding which is necessary at the moment in your sheet.

Nevertheless I guess you will have to provide concrete functions phi1..phi3 before using the numeric routine Rkadapt(), but on the other hand it could be that you can parameterize it by writing S1(phi1,phi2,phi3):=Rkadapt(....). Not sure about that, though, and too lazy to try. 😉

I already tried that to replace u1(x,y,t,phi) and so on in every equations. But it was too long and the problem was still persistent.

The heavyside function was a very good tip.However ,now i'm wondering how to use rkadapt with it

Thanks a lot

Top Tags