0
$\begingroup$

I have a large system of boundary value problems of the form $$ \frac{d^2 y }{dt^2} = C(t) y + b(t), $$ where the variable $y$ is a vector that has anywhere from 50 to around 500 components, $C$ is a dense matrix whose entries come from data from a simulation, so there is no closed form for the entries, and $b$ also comes from simulation data.

My boundary conditions are $$y'(0)=y'(T)=0,$$ and I have on the order of 100 or 1000 time steps.

Is there a good python package/environment that could be used to solve this efficiently (or at all)? I would also be willing to use a solver in a different language if necessary.

I have tried to use the solver in Scipy, which works well when the number of components of $y$ is less than 100 but has memory problems if there are more. I have also tried to use Fenics to solve this, but Fenics cannot create a tensor space large enough to deal with $C$.

$\endgroup$
  • $\begingroup$ 500 is still a pretty small number. deal.II should not have trouble with this. (Disclaimer: I'm one of the authors of deal.II.) $\endgroup$ – Wolfgang Bangerth Jun 30 at 3:29
  • $\begingroup$ How many times steps do you have? $\endgroup$ – nicoguaro Jun 30 at 4:52
  • $\begingroup$ I have on the order of 100-1000 time steps. I have edited the question to reflect this. $\endgroup$ – leebs92 Jun 30 at 10:10
  • 2
    $\begingroup$ If you set this up using finite differences you'll get a linear system of equations at each time step of size 500 by 500. There's no reason that you should run out of memory solving problem like this, so there's obviously something wrong about how you implemented this in Python. Please provide a more detailed description of how you tried to solve this and what variables became too big to store. $\endgroup$ – Brian Borchers Jun 30 at 14:08
  • 1
    $\begingroup$ By $y'(0)=0$ and $y'(T)=0$, are your saying that for each $y_{i}(t)$, the derivatives of $y_{i}(t)$ with respect to $t$ are 0 and $t=0$ and $T=t$, or are you referring to derivatives of $y$ with respect to $x$? $\endgroup$ – Brian Borchers Jul 1 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.