Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
Change variable a from below and look at the V2(t)...Why odesolve block is behaving like this? Is it normal?
Prime 10 file attached.
The expected behaviour is like a =7.
The green curve looks like a solution - but it is not a solution because there is no clearly defined tangent at the upper and lower peaks and there is no first derivative (differential quotient) as a cause. It is possible that the MC algorithm has rounded off the peak internally (e.g. through interpolation).
MC should be able to handle the step-by-step solution described. Unfortunately, I cannot do the programming myself - I am only a theoretician.
It's not an Odesolve BUG, it's just complications of numerically computing the voltages and currents, given the non-linear /discontinuous behaviour of the derivative of the diode function I(Vx).
There are other tools better equipped/specifically geared for this kind of calculations, e.g. LTspice:
(a simple diode model with a breakdown voltage of 20 V) gives:
And with the diode modelled per the I(Vx) function:
we get virtually the same result:
There are minute differences. The top line of V2 here sits at 0.7 V, while with the previous circuit it is at 0.8 V.
Note that the capacitor value is so small, it could just as well be left out. That would render a non-differential equation to be solved.
If the capacitor is increased significantly (as TTokoro did) you'd see some effect of it:
Success!
Luc
Luc, we are talking about a first order differential equation which needs to be solved numerically.
We can see also in your simulation that the simulation algorithm can solve this differential eq in the end without problems, without missing any pulses.
So, I am wondering If such reason with continuity/discontinuity is a reason in this case, as we can see other tools does not have problems in giving the correct solution/plot.
Thus, that I said that maybe odesolve block algorithm in Mathcad is very weak or have some faulty behaviour.
Then If we need to switch to other better tools even for such exercices, which is not so so so complicated (in the end it's a first order differential eq), then what calculations remains to do in Mathcad? Simple school equations? I am wondering why these guys from Mathcad it boasts that Mathcad is an engineering tool? As we can see that with this engineer math tool cannot solve a first order differential eq or a circuit with one resistor, one capacitor, one diode...I think engineering îs much more than this. I know that You and me cannot do anything even If I sau this, but ..
But without having with us Mathcad development team...so that can give an answer even they...