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

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Need help putting this into Mathcad (railgun)

msu12181
1-Newbie

Need help putting this into Mathcad (railgun)

Hi guys

I think I can do this using rkfixed or odesolve, but it has been a while since I have done such a thing and need a bit of a refresher.

This is what I am trying to do...

I have the following

Untitled.jpg

Am I on the right track thinking I can used some rkfixed?

Any help would be appreciated...

1 ACCEPTED SOLUTION

Accepted Solutions

Fine slution! Thanks!

Now I think - do we need 2d, 3d, 4th etc y-axis in Mathcad (Prime) - see the picture!?

Sometime I need secons x-axis - for the temperature in K and in °C.

4-axes.PNG

View solution in original post

15 REPLIES 15

Ok guys this is what I am trying but I don't know if I going about it the right way...

Looks to be a good starting point.

2 minor problems with the sheet that I have noticed.

1. the number of intervals is set at 2 so the ODE doesn't give an accurate output, I've changed that to 2000 but you could leave the parqameter out it will default to 1000,

2. the ODE now gives a very fast response & I guess that this will be correct. So I have modified the end time to 20us so the graphs are showing the overall curves.

Whether the result is representative or not, I can't say.

Hope it helps

regards

Andy

Hi Andy,

Thank you for your response. I think this has got me going on the right track. Do you know if Mathcad will allow you to carry units through the Odesolver or is it better just to leave it as is?

Thanks again.

Addison Mauldin

Addison Mauldin wrote:

Hi Andy,

Do you know if Mathcad will allow you to carry units through the Odesolver?

Thanks again.

Addison Mauldin

In Mathcad Prime! See please http://communities.ptc.com/message/167830#167830

The ODE solvers don't handle units. (That's one of Prime's selling features--it eventually will, we're told.)

The best way to do this (IMHO) is to divide each term by "UnitsOf(what the units should be)" and leave the units on the values. This will ensure that the problem scales correctly, if the length of the rails changes from 10 meters to 50 feet, the value will still report correctly to the problem. You can then multiply the solution by "UnitsOf(the correct unit)" to restore units to the answer.

Fred Kohlhepp wrote:

The best way to do this (IMHO) is to divide each term by "UnitsOf(what the units should be)" and leave the units on the values.

Yes - see one example:

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

Thank you for the example Valery!!

Addison Mauldin wrote:

Thank you for the example Valery!!

You welcome!

Sorry for the Russian comments.

On the Mathcad Server

http://twtmas.mpei.ac.ru/mas/worksheets/MAS_Rolling.mcd

you can see English comments too.

See the video too - http://communities.ptc.com/videos/1699

Finally, something that Prime 2.0 can do better than MC15 ...

Ode with units is possible - just needs a little thought.

Regards

Andy

Fine slution! Thanks!

Now I think - do we need 2d, 3d, 4th etc y-axis in Mathcad (Prime) - see the picture!?

Sometime I need secons x-axis - for the temperature in K and in °C.

4-axes.PNG

Ok so here is the other part (and by the way final question) of this project...how would you take care of the index i from 2 to N. By the way the Rt is 0.02 ohm.

Capture.GIF

Capture1.GIF

Ok here was the attempt...See file attached

By the way I know the initial voltages are not zero....there has to be some initial voltage applied for the thing to work. I just don't know the values yet...

You have a number of issues here. The main one is that Odesolve doesn't like true subscripts. Better to set up the problem as a matrix equation (dY/dt = AY+B where Y is a vector of all your V's and I's, A is a matirx containing all the constants multiplying the V's and I's and B is a vector of any remaining constants). Then use one of the separate solvers like rkadapt, say.

I don't think your deltaz should be a function of time; surely it's just lt/N?

Zload should probably have units of ohms to make the last expression consistent.

Alan

Thanks Alan. I will see where I can get with your help.

Top Tags