New answers tagged finite-difference
4
votes
Accepted
On solving a first order nonlinear differential equation
You can force a solvable explicit differential equation by taking the derivative of the equation
$$
2\cos(2x)x'+3\sin(3x')x''=x'+x''\\~\\
x''=\frac{(2\cos(2x)-1)x'}{1-3\sin(3x')}
$$
For the initial ...
- 4,829
0
votes
Solving 2D Poisson equation with nonhomogeneous boundary conditions (Dirichlet) and a source
Here is a more complex implementation of the explicit SOR iteration with the compact 8-point stencil for higher accuracy. It is also Multithreaded in Cython if you wish to benchmark your CPU and post ...
1
vote
Accepted
Solving 2D Poisson equation with nonhomogeneous boundary conditions (Dirichlet) and a source
Here is a basic implementation of solving the problem $-\Delta u = f$ using matrix-free methods, which are prefereble for large PDE discretizations. The efficiency could be improved in the Laplacian ...
- 1,242
1
vote
Accepted
Why is this scipy.root code not converging?
After playing around with this a bit, I am almost certain that this is a conditioning issue. I discovered this by attempting to solve the problem with the initial guess being the result from ...
- 1,242
3
votes
Why is this scipy.root code not converging?
My suggestion would be to use an ODE solver combined with the method of lines instead of trying to use a non-linear system solver.
Here's an example of what this might look like:
...
- 342
Top 50 recent answers are included
Related Tags
finite-difference × 817pde × 203
numerics × 135
boundary-conditions × 103
fluid-dynamics × 87
matlab × 67
finite-element × 60
python × 55
finite-volume × 53
stability × 52
discretization × 48
advection-diffusion × 46
hyperbolic-pde × 41
nonlinear-equations × 38
advection × 38
poisson × 37
differential-equations × 33
parabolic-pde × 32
wave-propagation × 28
diffusion × 27
linear-algebra × 25
crank-nicolson × 25
computational-physics × 24
ode × 23
navier-stokes × 23