Skip to main content
1-Visitor
February 25, 2018
Question

ODE solve with Stiffr and Parameter

  • February 25, 2018
  • 2 replies
  • 6042 views

Hi,

 

I have a question about Mathcad. I want to solve an ODE-system with Parameters. I want to use of Stiffr or Stiffb as a ODE-Solver. I have a minimal example in the file. See also the screenshot. What can i do, to find the error in the code?

 

grafik.png

 

I hope someone can help. Thanks

 

 

2 replies

fgörlich1-VisitorAuthor
1-Visitor
February 25, 2018

Hi,

 

I found a solution. The post helps me a lot:

https://community.ptc.com/t5/PTC-Mathcad-Questions/Solving-of-ODE-with-variable-parameter/td-p/43366 

 

The problem was the Jacob matrix. Is there a solution without programming? Is this possible?

 

Now my solution looks like that

test.PNG

 

25-Diamond I
February 25, 2018

@fgörlich wrote:

Hi,

 

I found a solution. The post helps me a lot:

https://community.ptc.com/t5/PTC-Mathcad-Questions/Solving-of-ODE-with-variable-parameter/td-p/43366 

 

The problem was the Jacob matrix. Is there a solution without programming? Is this possible?

 

Now my solution looks like that


It looks to me that you don't use any programming structures anyway. So what you do inside your "program" "lsg" you could as well do directly on worksheet level.

fgörlich1-VisitorAuthor
1-Visitor
February 25, 2018

And how do you do that? I had try different solution but only that works.

24-Ruby III
March 1, 2018

Please attach your Mathcad Prime worksheet in archive to the message.

fgörlich1-VisitorAuthor
1-Visitor
March 2, 2018

Here is the file,

 

can I write it without the programming part?

 

best Regards,

Fabian

25-Diamond I
March 2, 2018

@fgörlich wrote:

Here is the file,

 

can I write it without the programming part?


Yes, but are you sure about the correctness of the result. The values in the last column quickly exceed  Primes numeric limit (around 10^307) and so just get NaN's .

Without the symbolic evaluation we get an unknown error and I have no clue what the sybolic eval does and why its presence is necessary to get a numeric result.

Bild.PNG