Skip to main content

Questions tagged [finite-difference]

Referring to the discretization of derivatives by Finite differences, and its applications to numerical solutions of partial differential equations.

3 votes
0 answers
149 views

Population of the coefficient matrix of a linear system Ax=b stemming from the finite differences of an arbitrary geometry

I've been looking into solving a linear system $$Ax=b$$ where $A\in\mathbb{R}$ is the sparse coefficient matrix of size $K\times K$, $b\in\mathbb{R}$ is the right-hand side (i.e., the source term) of ...
Akhaim's user avatar
  • 83
2 votes
1 answer
94 views

Creating nonuniform grids for FDM with multiple points of concentration

If I am creating a grid in the $S_i$ direction with $N_S+1$ grid points. If I want more steps around some $K$, I can use: $$ S_i=K+c \sinh \left(\xi_i\right), \quad i=0,1, \ldots, N_S $$ where $c=\...
THATS MY QUANT MY QUANTITATIVE's user avatar
0 votes
0 answers
39 views

Convergence of Modified Crank-Nicolson Scheme

I'm dealing with a particular reaction-diffusion equation having the form $$ c_t = \alpha \nabla^2 c + F(c,x,t). \tag{1}$$ where $F$ is nonlinear. I would like to solve (1) with a finite-difference ...
zaccandels's user avatar
2 votes
0 answers
102 views

Numerical solution for inviscid Burgers' equation seems to have no breaking time?

So I'm trying to use the Lax-Friedrichs method to solve the inviscid burgers' equation with initial condition $$u(x,0) = \sin(x)$$, using $$u_m^{n+1} = \frac{1}{2}(u_{m+1}^n + u_{m-1}^n) - \frac{\...
Applesauce44's user avatar
0 votes
1 answer
85 views

My toy Laplace equation solver using finite-difference is unstable and I'm not sure why

I am trying to solve the variable-coefficient Laplace equation $$\partial(\epsilon\partial u) = (\partial\epsilon)(\partial u) + \epsilon\partial^2 u = 0$$using a finite difference scheme: $$\left(\...
DJames's user avatar
  • 417
0 votes
0 answers
109 views

Solving a steady-state PDE

I'm working on trying to solve a steady state PDE in python and I am quite new to python and I am slightly confused on the implementation details. I have an example implementation of solving a non-...
blov's user avatar
  • 43
4 votes
1 answer
148 views

Burger's equation (PDE) does not work with downwind difference?

I'm working on implementing the discretised Burger's equation. I am quite confused as to why it does not work when using a step-function and downwind difference formula. When using a step-function and ...
blov's user avatar
  • 43
1 vote
1 answer
156 views

Finite Difference method, ADI Scheme of Douglas and Rachford

I am trying to implement the ADI scheme of Douglas and Rachford. For $p(X,Z,t)$, there is: $$ \begin{gathered} A=p^{n-1}+\Delta t_n\left[F_0\left(p^{n-1}, t_{n-1}\right)+F_1\left(p^{n-1}, t_{n-1}\...
Xerium's user avatar
  • 11
2 votes
1 answer
340 views

Where am I making a mistake in solving the heat equation using the spectral method (Chebyshev's differentiation matrix)?

I would like to numerically solve the following heat equation problem: $$ u_t = \Bigg(2{a \over l}\Bigg)^2 u_{xx} \tag 1$$ $$ x \in [ -1, 1 ] \tag 2$$ $$ u(x, 0) = 0 \tag 3$$ $$ u(1, t) = A \sin \Bigg(...
FriendlyNeighborhoodEngineer's user avatar
0 votes
0 answers
56 views

ENO-Runge-Kutta discretization

One beginner's question about discretization of a Hamilton-Jacobi equation(non-linear) $$ u_t = H(u_x) $$ $u_x$ is discreated with 2nd order ENO-FD 1st order: $D_1^{\pm}u = \pm [u_{x\pm1} - u_x ] / \...
solanin's user avatar
0 votes
0 answers
45 views

Which numerical method can I use to solve this system of hyperbolic PDEs?

Backround The mathematical model I am trying to numerically solve models wave propagation inside a cylinder with specific material properties suited for dynamic loading. The cylinder's upper base is ...
FriendlyNeighborhoodEngineer's user avatar
3 votes
1 answer
280 views

Finite difference problem

I have a problem to resolve with the Finite Difference method in $[a,b]$: $$-\frac{d}{dx}(\alpha(x)\frac{du}{dx})= g(x),$$ with $\alpha(x) \in L^{\infty}$ continuous in $]a,c[$ and $]c,b[$ and ...
Kaneki Ken's user avatar
0 votes
0 answers
48 views

Is a sort of "z-drift" the result of numerical precision errors in FDM?

Upon solving the 2D wave equation with Neumann boundary conditions $u_x = u_y = 0$ on a rectangular $10 \times 10 \times 10$ grid, I noticed something odd - $u$ seemed to shift upwards with time. This ...
JS4137's user avatar
  • 133
3 votes
1 answer
186 views

Stability of Euler forward method

I am trying to solve a linear system of ODEs of the form: $$ \frac{du}{dt} = A u, \quad u(0)=k$$ where $A$ is a 2x2 matrix and $u(t)$ is a 2x1 column vector. I want to solve this numerically, using ...
rainbow's user avatar
  • 31
1 vote
1 answer
85 views

derivative matrix and the Dirac delta distribution

For a project I'm working on, I was working with the following equation $$ w(x) = \int k(x,y)v(y)dy $$ I noticed that if I choose $$ k(x,y) = -\delta'(x-y) $$ Then we probably get (I haven't touched ...
NNN's user avatar
  • 760

15 30 50 per page
1 2
3
4 5
60