New answers tagged

2

I will try to give an answer that balances in a practical aspect to this. There are a few major pitfalls one must make sure to avoid: Sampling bias; if we just work on the solution lists $\phi_i$, we are likely to get a huge bias where the time steps of the ODE solver happens to be small. Changing the number of sample points (i.e. smaller timesteps) should ...


6

Finite difference approximations of the Jacobian are really only good if the step lengths are chosen appropriately for each coordinate. But a black-box solver like CVODE has no way of knowing what these step lengths should be, and so has to use heuristics to choose them. This may or may not work. You are almost always better off if you provide an ...


1

As stated there's no re-rejection mechanism, i.e. ability to decrease the stepsize after a step has potentially failed. This is required for implicit methods which have Newton steps since there's a chance the $\Delta t$ is large enough that the (quasi-)Newton is unstable, in which case it needs to pullback on time. This instability can sometimes be seen via ...


1

I do not think this is a bad approach, but it is not a very precise way to select timesteps either. Admittedly, I have not come across this sort of timestep heuristic before, but looking at a linear test problem provides some insight as to why this is reasonable. For $y' = \lambda y$, the conditions becomes $\Delta t = \frac{\alpha}{\lambda}$. This looks ...


0

I don't see what you're not seeing. You've written out a perfectly good non-linear weak form of the PDE in your last two equations. If you invert $M$ and apply it, then you have a non-linear equation for $\dot{u}(t)$ that you can try to solve. It's a continuous in space and time PDE that you would need to discretize in space to then have only an ODE, with $M$...


3

Your particle is a rounded proton (mass m = 2e-27 kg instead of 1.672e-27 kg). The equation of motion is $$ \dot x=v,~~~ m\dot v = q\,v\times B, $$ where $B=(0,0,B_z)$ with $B_z=4T=4N/(m\,A)$ and $q=1e=1.602·10^{-19} C$, $C=A\,s$ This then gives for the acceleration m=2e-27 e_charge = 1.6e-19 q=+1*e_charge Bz = 4 ax = q/m*vy*Bz; ay = -q/m*vx*Bz; az = 0 For ...


Top 50 recent answers are included