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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

ODE solve block functions in MathCad prime

MBuck2
1-Newbie

ODE solve block functions in MathCad prime

Can someone explain to me why this ODE solve block procedure (see worksheet attached) is not working with MathCad Prime 1? I did a similar exercise in MathCad 15 (see image) 31-12-2011 8-25-44 AM.pngusing an equivalent formulation and all was OK. What I am trying to do is a sensitivity analysis with the parameter k which in this case is the thermal conductivity of the insulation material. For some reason the variable k does not seem to recognised by the solve block and thus the matrix of functions is not being returned to the variable.

1 ACCEPTED SOLUTION

Accepted Solutions

Mark Buckton wrote:

Also, try as I might, I cannot get rkfixed to accept Tf as a function based on time Tf(t) this is necessary as it represents the temperature rise in a furnace which as you would expect is a function of time i.e. the temperature increased with time.something like Tf(t) = 20+345*LOG(8*t+1) as soon as you do this one gets an error see:

/servlet/JiveServlet/downloadImage/2-173291-27452/1-01-2012+10-33-26+PM.png

See my solution with t/s in the empirical formula for Tf:

odemcp-kkk.png

View solution in original post

18 REPLIES 18

I think you must solve the task for one point and than for a set of point.

What is it W in your task? Watt or an user variable. See the attch please.

Valery

Thank you for your reply but it looks as if the file you have attached has become corrupted could you send it again.

Thanking you in advance.

Regards Mark

Sorry - it was Prime 2. Check your units please! See the picture:

odemcp.png

...and it will be good at first to solve this task in Mathcad 15 without units and at second in Mathcad Prime with units!

See also - http://communities.ptc.com/message/173128#173128

Valery;

You were correct it appears the units were not correct. This sheet is a subset of a much larger template and unfortunately I forgot to paste all values. I have fixed this now and simplified the equation i.e. cs is no longer a function of T- temperature i.e. now cs is a constant. In answer to your question W is the weight of one lineal metre of steel beam. Note I have attached the revised sheet but note I can still not calculate for each value of k. Have you any suggestions? If so please save it in Prime 1.0 version.

Kind regards, Mark

This ODE has a symbolic solution too:

odemcp3.png

MikeArmstrong
5-Regular Member
(To:ValeryOchkov)

Nice example Valery,

This is a massive improvement in my opinion.

Mike

Valery or Mike;

Unfortunately this is not the answer that I am looking for i.e. I know I one can solve the ODE for a single value of k, like you I had already done that (noting that this is a simple extract from a larger example). In fact the actual problem requires that the fire temperature is a function of t, and the specific heat of the steel beam is also a function of temperature but this is not the problem as that has been considered in the actual problem. My particular problem, to which my question relates, is NOT how to obtaining a single solution to the ODE, but RATHER I want to solve the ODE multiple times i.e. for successive values of k. then graph each solution vector. (see image below) i.e. each case is a different value of k.

This is why I initially made PSteelTemp a function of k - 1-01-2012 7-59-25 AM.png

PSteelTemp(k). As I said this is easy to do in MathCad 15 (see initial image on this thread). What I am saying and probably didn't make clear is the same methodology FAILS in MathCad Prime1.0. What I don't know is if this is a limitation in MathCad Prime 1.0 or there is a procedural difference i.e. a work-around way of doing the same thing in MathCad Prime 1.0?

Regards, Mark

You must use in this case not the function odesolve but the function rkfixed for example and create an user function based on ODE nymerical solution.

See http://twt.mpei.ac.ru/ochkov/Mathcad_12/5_12_RKfixed_Funct_MC_12.png

Or you must use the symbolic solustion of your ODE y'=a*(1-y)

Valery Ochkov wrote:

You must use in this case not the function odesolve but the function rkfixed for example and create an user function based on ODE nymerical solution.

I have made this calculation but I see one unit error in Mathcad Prime - we must have K not s*K:

odemcp-k.png

May be so:

odemcp-kk.png

Your result looks to have the correct shape for the curve but it seems a very convoluted way to do this exercise i.e. not very understandable or explicit - to me anyway. I thought MathCad Prime aim was to make things simpler not more complicated, so are you saying that MathCad Prime is not as capable as MC 15 when it comes to ODEs i.e. one cannot pass variables back to the solve block and recalculate solve block function based on a new independent variable and obtain a new solution vector?

Also, try as I might, I cannot get rkfixed to accept Tf as a function based on time Tf(t) this is necessary as it represents the temperature rise in a furnace which as you would expect is a function of time i.e. the temperature increased with time.something like Tf(t) = 20+345*LOG(8*t+1) as soon as you do this one gets an error see:

1-01-2012 10-33-26 PM.png

Thanking you for your forbearance.

Mark

Mark Buckton wrote:

Also, try as I might, I cannot get rkfixed to accept Tf as a function based on time Tf(t) this is necessary as it represents the temperature rise in a furnace which as you would expect is a function of time i.e. the temperature increased with time.something like Tf(t) = 20+345*LOG(8*t+1) as soon as you do this one gets an error see:

/servlet/JiveServlet/downloadImage/2-173291-27452/1-01-2012+10-33-26+PM.png

See my solution with t/s in the empirical formula for Tf:

odemcp-kkk.png

Mark Buckton wrote:

Thanking you for your forbearance.

Mark

No problem! I work with students

Valery;

It looks like I was on the right track in the first place it appears you can in fact pass parameters to a solve block and get them to recalculate the result (maybe a undocumented feature). See attached.

Note as you can see I am still having problems with your method i.e. when I include a function within the rkfixed ODE solver. If you could show me the way to fix this I would appreciate it.

Regards, Mark

I think the empirical ISO-formula must be in Mathcad in this form:

TISO.png

I think you must correct your formula for Cp:

Cp.png

Common remark!

We can have a symbolic solution of this problem - ... + exp(...) etc

But!

cp is not a constant - it is a function of T

k is not a constant - it is a function of T

Etc

We cannot have a symbolic solution with this functions!

Top Tags