Timeline for NDSolve - sampling for result during the computation
Current License: CC BY-SA 3.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 30, 2014 at 9:43 | vote | accept | Karolis | ||
Apr 29, 2014 at 2:03 | comment | added | xzczd♦ |
@drN OP has chosen method "FixedStep" , so the step size can be controlled by StartingStepSize , I think MaxStepFraction and MaxStepSize will also work (haven't tested yet), but I don't know how to control time step size in more general cases (for example PDEs), too.
|
|
Apr 28, 2014 at 12:26 | comment | added | dearN |
@xzczd Didn't know one could do that. However, how would one control the time step size? I imagine it would be thro' MaxStepFraction or MaxStepSize ?
|
|
Apr 28, 2014 at 0:03 | answer | added | Michael E2 | timeline score: 4 | |
Apr 25, 2014 at 12:44 | comment | added | xzczd♦ |
Have you considered doing the simulation piece by piece i.e. first calculate {t, 0, 10^-4} , then {t, 10^-4, 2 10^-4} and so on?
|
|
Apr 25, 2014 at 11:56 | comment | added | dearN | I performed simulations on MD for my Master's degree and I am curious, if you don't mind. Are you simulating Argon? With periodic BCs? Is the eqn you are solving the convection-diffusion equation? In 2012 I had a similar question on SE and I am wondering if it would help you. Good luck! | |
Apr 24, 2014 at 23:40 | comment | added | Karolis | It is a simple 1D Molecular Dynamics model for free diffusion | |
Apr 24, 2014 at 23:23 | comment | added | dearN | May I ask if this molecular dynamics or some such? What is the physical phenomena that you are trying to model? | |
Apr 24, 2014 at 22:32 | comment | added | Karolis | Hi, the 'values' variable is used to store parameters k1 and k2. I do not trust the automatic solvers of Mathematica because 'R[t]' is not a continuos function. For me $t \sim 1$ is a long time behaviour. The problem presented here has a damping of momentum (second term) that happens on the timescale of $10^{-9}$. The momentum has to relax from thermal kicks obtained from 'R[t]' term. For this reason I am using constant time sampling. | |
Apr 24, 2014 at 22:26 | history | edited | Karolis | CC BY-SA 3.0 |
deleted 7 characters in body
|
Apr 24, 2014 at 13:46 | comment | added | dearN |
Have you tried [Mma's RandomVariate[...]](reference.wolfram.com/mathematica/ref/RandomVariate.html)? What does values do? Is there a reason you are using ExplicitEuler ? You would benefit by letting Mathematica choose the solver automatically or use perhaps the magic-wand Method->"LSODA" . Also, why not just let t range from 0 to a very large number (for long term behavior)?
|
|
Apr 23, 2014 at 21:29 | history | asked | Karolis | CC BY-SA 3.0 |