Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 12262

Re: Trying to solve an ODE (nonlinear, first-order)

$
0
0

A first order ODE with 2 boundery conditions???? And Mathematica didn't complain?

 

You also have a unit problem: When calculating exp(X), X must be unitless, that means that B*V(x) is unitless and so the unit of V(x) will have to be Joule (1/UnitsOf(B)). The unit of the RHS is the the unit of A, which is Pascal. When V(x) are Joule, the LHS has the Unit Newton (J/m). You have different units on both sides which is not possible. And to top it your initial conditions say that V(x) should have the unit volt - the second actually says it has unit volt squared - you would have to delete the extra V you added as Vd already are volt. But you can't have two BC for an ODE of first order anyway.

The last argument of odesolve() should have the unit meter.

 

Some additional remarks:

Use the prime symbol instead of the differentiation operator.

Define the range for x (which is only meaningful to be used for the plot) after the solve solve block. To define a range with units, you have to give the unit for the first and second value as well.

 

According to Prime's help the ODE must be linear in the highest derivative for the numeric solver so do its job. This is not the case, so odesolve() will probably fail anyway.


Viewing all articles
Browse latest Browse all 12262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>