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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Direction Field of Lotka-Volterra ODE

ptc-5335362
1-Visitor

Direction Field of Lotka-Volterra ODE

Dear PTC Community,

for my studies I have to analyse the Lotka-Volterra ODE System. Now I want to use some plot like the following:

LV_phase.jpg

There you can see the Direction Field of the ODE in a phase plot. The standard equations are like:

LV_eq.jpg

Also I found the invariant of the System:

LV_invariant.jpg

Question is: how to make such nice looking direction field plot? From which equation is this going out? I am using Prime 2

Thanks so far

Patrick

PS: I come across this

http://communities.ptc.com/docs/DOC-3503

but dont know anything to do...

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:ptc-5335362)

I fumbled around with this and came up with the attached. As I don't like Prime because its too uncomfortable for me and I am missing too many features there, I did it in Mathcad 15. It wouldn't had helped if I would have done it in Prime as I have Prime 3 installed and there is no way to vonvert P3 to P2.

I guess you can get a couple of solutions drawn by using a contour plot of the invariant but not the slope field with arrows.

So its possibly better to stick with the ODE system (or use the solution you already got).

I used the numerical ODE solver from Mathcad with good results.

I attach a pdf of the file for your information as well along with a small animation, just for fun. But as you have MC15 installed anyway you can have a look at it and can try to convert it to Prime 2 format.

If the scale on both axis is not the same, the arrow will get distorted. I once created a sheet and posted it here where I added scaling parameters at mk_Field to cope with that problem. Unfortunately I wasn't able to find the file or the thread at the moment.

Directionfield_VL_WE_1.png

View solution in original post

4 REPLIES 4
Werner_E
25-Diamond I
(To:ptc-5335362)

First you will have to setup a worksheet, providing specific values for your coefficients.

Then you either may let Mathcad solve your system of ODEs or as an alternative you may use the already known solution of that system.

As you are still using Prime 2 you have to be aware that there are not so much people around using that version. And there is no way to convert a Prime 3 or a Mathcad 15 sheet to Prime 2 format (unless you have Mathcad 15 AND Prime 2, but NOT Prime 3 installed on your system).

On the other hand, if you bought Prime 2, you are entitled to use Mathcad 15, too. They will share the same license file. As Mathcad 15 still is much superior compared to any Prime version, this will be a good choice anyway.

Thank you for the fast answer!

I solved the ODE already for specific coefficients, also I can draw a phase diagramm. Only the direction field is missing.... I thought recently that this direction field has to go out from the invariant equation; but that seems wrong.

Mathcad 15 is installed, but I dont like the input of some way...so I am using Prime 2 mainly with a license from my university.

The sheet named "VectorField_P2" seems promising. I just realized that this is from you. So thanks for that! Playing around with this sheet and I think I am on to something.

Werner_E
25-Diamond I
(To:ptc-5335362)

I fumbled around with this and came up with the attached. As I don't like Prime because its too uncomfortable for me and I am missing too many features there, I did it in Mathcad 15. It wouldn't had helped if I would have done it in Prime as I have Prime 3 installed and there is no way to vonvert P3 to P2.

I guess you can get a couple of solutions drawn by using a contour plot of the invariant but not the slope field with arrows.

So its possibly better to stick with the ODE system (or use the solution you already got).

I used the numerical ODE solver from Mathcad with good results.

I attach a pdf of the file for your information as well along with a small animation, just for fun. But as you have MC15 installed anyway you can have a look at it and can try to convert it to Prime 2 format.

If the scale on both axis is not the same, the arrow will get distorted. I once created a sheet and posted it here where I added scaling parameters at mk_Field to cope with that problem. Unfortunately I wasn't able to find the file or the thread at the moment.

Directionfield_VL_WE_1.png

Wow I am speechless! Thank you so much! I can open it with my Mathcad15 and it looks awesome!

I had to smile because of the video; so nice what you can do!

Keep up the extremely good work and thanks again once more!!

Announcements

Top Tags