Skip to main content
deleted 7 characters in body
Source Link
Karolis
  • 1.6k
  • 1
  • 12
  • 25

I am using NDSolve for a Langevin dynamics problem. I want to the know long term behaviour of my system ($t>1$) but it has to be simulated with very small time steps ($dt\sim 10^-9$$dt\sim 10^{-9}$). An example code:

R[t_Real]:= RandomVariate[NormalDistribution[0,1]] NDSolve[ {(-x''[t] - k1*x'[t] + k2*R[t])==0, x[0]==0, x'[0]==0} //.values, x, {t, 0, 10}, StartingStepSize-> 10^-9, Method->{"FixedStep",Method->"ExplicitEuler"}, MaxSteps->\[Infinity] ] 

Where is R[t] is just random number from normal distribution.

The Problem: My computer runs out memory when trying to store $10^{10}$ data points necessary for this computation. Is there a way to sample and store only a small subset of all the integration points?

I am using NDSolve for a Langevin dynamics problem. I want to the know long term behaviour of my system ($t>1$) but it has to be simulated with very small time steps ($dt\sim 10^-9$). An example code:

NDSolve[ {(-x''[t] - k1*x'[t] + k2*R[t])==0, x[0]==0, x'[0]==0} //.values, x, {t, 0, 10}, StartingStepSize-> 10^-9, Method->{"FixedStep",Method->"ExplicitEuler"}, MaxSteps->\[Infinity] ] 

Where is R[t] is just random number from normal distribution.

The Problem: My computer runs out memory when trying to store $10^{10}$ data points necessary for this computation. Is there a way to sample and store only a small subset of all the integration points?

I am using NDSolve for a Langevin dynamics problem. I want to the know long term behaviour of my system ($t>1$) but it has to be simulated with very small time steps ($dt\sim 10^{-9}$). An example code:

R[t_Real]:= RandomVariate[NormalDistribution[0,1]] NDSolve[ {(-x''[t] - k1*x'[t] + k2*R[t])==0, x[0]==0, x'[0]==0} //.values, x, {t, 0, 10}, StartingStepSize-> 10^-9, Method->{"FixedStep",Method->"ExplicitEuler"}, MaxSteps->\[Infinity] ] 

The Problem: My computer runs out memory when trying to store $10^{10}$ data points necessary for this computation. Is there a way to sample and store only a small subset of all the integration points?

Source Link
Karolis
  • 1.6k
  • 1
  • 12
  • 25

NDSolve - sampling for result during the computation

I am using NDSolve for a Langevin dynamics problem. I want to the know long term behaviour of my system ($t>1$) but it has to be simulated with very small time steps ($dt\sim 10^-9$). An example code:

NDSolve[ {(-x''[t] - k1*x'[t] + k2*R[t])==0, x[0]==0, x'[0]==0} //.values, x, {t, 0, 10}, StartingStepSize-> 10^-9, Method->{"FixedStep",Method->"ExplicitEuler"}, MaxSteps->\[Infinity] ] 

Where is R[t] is just random number from normal distribution.

The Problem: My computer runs out memory when trying to store $10^{10}$ data points necessary for this computation. Is there a way to sample and store only a small subset of all the integration points?