Questions tagged [finite-difference-methods]

The tag has no usage guidance.

53 questions
20 views

How to implement Finite Difference Method ODE Boundary Value Problem in Python?

I implemented the Finite Differences Method for an ODE with Boundary Value Problem. Here is the approximations I used for the FDM: And here is the balk problem: with u(0) = u(L) = 0 (attached on ...
18 views

99 views

30 views

Finite difference method in 2d

I know the value of a function, u, in N points on the boundary of a disk (i.e. a circle). I need to find the value of its gradient, $\nabla u$, in those points. How can I use the Finite Difference ...
76 views

16 views

Error estimate of a two-point boundary valued problem using the central finite difference method

I met the following problem in my homework and I have no idea how to start it. Consider the following two-point boundary value problem $$-u''+q(x)u=f(x), \ \ u(0)=u(1)=0$$ with $f\in L^2([0,1])$, ...
39 views

How to solve Fick's second law of diffusion (second order differential in space and first order in time ) for a ternary or higher order systems?

For a binary system Fick's second law can be solved, using Crank-Nicholson scheme followed by Gauss elimination and substitution (Thomas Algorithm). However, for a ternary system, there will be two ...
50 views

Approximating finite differences by higher order derivatives of continuous functions

In a mathematical physics exercise, some discrete fields can conveniently be expressed using finite difference schemes as follows: \begin{align} A_6 &= \phi_{i+1}+\phi_{i-1}+4\phi_i \, , \\ A_7 &...
43 views

Finite difference method in an infinite domain

I am trying to simulate the Schrodinger equation for a system inside a region that is finite in the vertical direction (so there is a boundary condition that must be satisfied) but infinite in the ...
142 views

Crank-Nicolson for coupled PDE's

$\newcommand{\T}{T}$ $\newcommand{\partiald}{\frac{\partial #1}{\partial #2}}$ $\newcommand{\partialdd}{\frac{\partial^2 #1}{\partial #2^2}}$ I am trying to solve a set of coupled PDE's with ...
517 views

53 views

Finite difference method, boundaries

I have a problem solving this problem. $$−3u''(x) + (x + 2)u(x) = 4x, \hspace{10pt} x \in (−1, 1),$$ subject to $$u'(−1) + 4u(−1) = 3, \hspace{10pt} −u'(1) + 2u(1) = 0,\hspace{10pt} h=0.001$$ ...
220 views

53 views

Solving the PDE for elastic filament in viscous liquid

I want to solve the following 4th order PDE with the boundary conditions as written. It would be really helpful if someone could guide me on how to solve this. I have tried implicit finite ...
I am studying the 1D wave equation: $$\frac{\partial^2u}{\partial t^2} - a^2 \frac{\partial^2u}{\partial x^2} = 0$$ And solving it numerically with this implicit finite differences discretization: ...