All Questions
Tagged with finite-difference ode
24
questions
0
votes
0
answers
43
views
Solve beam equation with elastic term using scipy solve_bvp
I want to solve the beam equation with distributed load and elatic term (which depends on how much the beam interact with the terrain) :
$$
EI\frac{d^4w}{dx^4}+k*(w(x)-t(x))=q(x)
$$
where $q(x)$ is a ...
1
vote
1
answer
107
views
Isolating decaying solutions to nonlinear second-order ode
I need to solve a nonlinear ODE of the form
$$
\frac{d^2 y}{dx^2} + \frac{1}{x}\frac{dy}{dx}-\frac{1}{x^2}\sin(y)\cos(y)+\frac{2}{\alpha}\frac{\sin^2(y)}{x}-\sin(y)=0
$$
numerically, subject to the ...
1
vote
0
answers
241
views
How to apply Neumann boundary conditions in Newton's method [closed]
Suppose that I have a very long and tedious set of differential equations. After discretization, I can get a mapping $f:\mathbb{R}^N \to \mathbb{R}^N$ such that solutions $\phi =(\phi_0,...,\phi_{N-1})...
7
votes
1
answer
748
views
Why is the central difference method dispersing my solution?
I am solving numerically the ODE $\ddot x(t)=-c\dot x(t) -\sin(x(t))+F\cdot \cos(\omega t), \;\dot x(0)=x(0)=0$ for $t\in [0,20\pi]$ on an $N=2000$ dimensional grid. I am working on Python, and I ...
2
votes
1
answer
201
views
Why can bad jacobians sometimes works better for implicit ODE method?
I'm solving a system of stiff ODEs describing atmospheric chemistry and transport. I am using CVODE BDF from Sundials Computing. I have two ways to approximate the jacobian:
Allow CVODE to ...
3
votes
0
answers
102
views
Solving PDEs: What is the best way to deal with non-banded/dense jacobians?
I have a system of PDEs describing atmospheric chemistry and transport. I use finite-differences to make my system of PDEs into a system of ~10,000 ODEs. I then integrate the ODEs forward in time with ...
3
votes
1
answer
136
views
Maintain unitary time evolution for a nonlinear ODE
I want to solve a nonlinear ODE of matrix $A(t)$
$$\mathrm{i}\dot A = A(t)M(t),\:\mathrm{with}\: M(t)=A^\dagger(t)H(t)A(t)$$ where $H(t)$ and hence $M(t)$ are Hermitian. Therefore, I presume the time ...
0
votes
0
answers
840
views
"This DAE appears to be of index greater than 1" daeic12 (line76) error code
Hi I am trying to solve a set of pde converted into ODE and DAE using central finite difference method. I have used the MATLAB 'solve' command to determine the coefficients of fictitious nodes for ...
0
votes
2
answers
656
views
Non-linear Boundary Value Problem. How to compute the Jacobian?
Consider a Boundary Value Problem:
$$
\delta u''+u(u'-1) =0 \Leftrightarrow u''=\frac{-u(u'-1)}{\delta}=:f(t,u',u), \\
u(0)=a, u(1)=b
$$
$\delta,a,b$ are known parameters. I want to implement Newton'...
0
votes
1
answer
210
views
Actual global error vs theoretical global error: How to combine theory with practice
I have implemented an Adams Bashforth 4 method to solve an Initial Value Problem for an ODE and I am testing it against the test equation:
$y'=\lambda y$ with $y(0)=1$ with the exact solution: $y(t)=...
1
vote
1
answer
251
views
Can a second-order ODE be "inconsistent" with its boundary conditions?
I am trying to solve a set of coupled, nonlinear ODEs. The only dependent variable is a 1-dimensional spatial coordinate, let's call it $x$. For now, I've managed to approximate away some of the ...
2
votes
0
answers
148
views
Finite differenced eigenvalue prob. of inhomogeneous boundary conditions?
I am basically asking about eigenvalue problems of differential equations using some finite difference method (FDM). Usually the system is subject to some boundary conditions (BC), e.g., Dirichlet or ...
3
votes
0
answers
110
views
How to account for the interface between two different phases in a discretized diffusion model?
I have tried to set up a model for the diffusion of a gas into a liquid. The two media are next to each other and the geometry is spherical because the system should simulate the diffusion out of a ...
0
votes
2
answers
81
views
Finite difference for 2nd order ode $y'^2+y y''+\frac{2}{x} y y' -0.1 y^2=0$ with $y'(1)=0$ and $y(1)=1$
How to solve second order non-linear ODE
$$y'^2+y y''+\frac{2}{x} y y' -0.1 y^2=0$$ subject to $y'(1)=0$ and $y(1)=1$ over the interval $0 < x \le 1$.
I turned the equation to a PDE $y'^2+y y''+\...
6
votes
2
answers
309
views
Why naively chopped finite difference matrix works for different ODE boundary conditions
We know finite difference method (FDM) can replace $y''(x)$ as $\frac{1}{h^2}[y(x+h)+y(x-h)-2y(x)]$ or so. One naive way to write down the matrix of the differential operator is like the following, ...