# Questions tagged [finite-difference]

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

791 questions
Filter by
Sorted by
Tagged with
1 vote
60 views

### Can the standard multigrid performance be used for time-dependent PDEs?

Consider a time dependent pde(i.e u(x,t)).I know when only space-coarsening is used the standard multigrid performance can be applied but what if instead we use only time-coarsening?Can we apply the ...
• 471
1 vote
173 views

### Simulating advection - diffusion problem in a network of 1D pipe

I'm interested in solving the following advection-diffusion system in a 1D network of pipes. $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$ ...
• 447
1 vote
85 views

### Solving a system of PDEs with no-flux boundary conditions (finite difference discretization)

I am interested in solving a system of linear PDEs with the finite difference method and I'm having trouble to solve the no-flux boundary condition correctly. \begin{align} \frac{\partial n}{\partial ...
• 11
1 vote
83 views

### Solving diffusion equation using finite difference method

I am solving an 1-dimensional diffusion equation with Neumann boundary condition at outlet and constant concentration, C, at the inlet. In the end, I want to observe how the concentration diffuses ...
• 447
2k views

### Lattice Boltzmann methods vs Navier stokes/ other eulerian methods for *water* simulation

Note, there is already a question here, however the answers don't answer the original question, let alone specific considerations when dealing with nearly in-compressible fluids (water). Another ...
• 151
88 views

135 views

### Confusion about Zabusky and Kruskal's stepper for the KdV equation

In Zabusky and Kruskal's paper about solitons, they derive the following update for the Korteweg de Vries equation (their footnote 6): \begin{align*} u_{i}^{j+1} = u_{i}^{j-1} - \frac{1}{3} \frac{k}{...
• 2,031
1 vote
36 views

• 123
1 vote
144 views

108 views

### What method of Finite difference is this?

I am reviewing Numerical Recipes method on solving ODEs via relaxation (Chapter 18.3 in the 3rd edition) and they chose a finite difference method I am unfamiliar with (Equation 18.3.2): \begin{...
• 135
154 views

### Interpolating the gradient of a cylindrically symmetric potential field expected obey the Laplace equation, especially near/across r=0

The script below tries to implement a Jacobi iterative relaxation of a potential field for an electrostatic lens. In order to plot electric field lines and calculate trajectories for charged particles,...
• 872
1 vote
47 views

### Dealing with spurious oscillations in particle tracking methods

I work on modelling high intensity discharge xenon-filled lamps. The model governing the discharge is quite complex and sadly includes fluid dynamics. After some time, I managed to implement a finite-...
• 131
1 vote
108 views

### Finite difference methods

I am currently applying the finite difference method to the solution of the diffusion equation. I think that a problem has occurred, and is as follows, my explicit method is the most accurate when ...
• 33
54 views

### Neumann boundary conditions on arbitrary surface for finite difference diffusion

I am facing the following problem, formulated in practical terms: I have a region $\Omega$ in two or three dimensions, represented as a binary mask, and an initial density $u_0$ within that region ...
1 vote
271 views

### Second derivative using Fornberg finite difference method

I have some discrete data, non-equispaced in $x$, $y=f(x)$. I want to use a numerical finite difference method to calculate the second derivatives of $y$, at some point. I am using the Fornberg ...
• 201
82 views

### How to determine the order of convergence of the Euler-Maruyama method?

This question is originally posted in Quant.StackExchange but has been unanswered for some time so I ask in here. To make this simple let us consider the Geometric Brownian Motions (GBM). My ...
• 255
120 views

301 views

### Numerically solving a non-linear PDE

I have this non-linear partial differential equation. $$\frac{\partial C}{\partial t}=\left(\frac{\partial C}{\partial x}\right)^2+C\frac{\partial^2 C}{\partial x^2}$$ I want to use the finite ...
• 33
156 views

### Double mach reflection at a inclined wedge

I am running into a strange problem when solving the 2D compressible Euler equations on a inclined wedge. To elaborate, my top boundary condition seems to emitting some type of instability. I have ...
• 75
103 views

### Numerical Stability of a Generalized Spatial Discretization Scheme

After reading the matrix stability chapter (10) of Hirsch , I decided to dive in the reference list of the chapter. One of the papers , which is cited as reference shows an very interesting ...
• 77
110 views

85 views

### Numerical methods for the continuity equation with Sobolev vector field

Consider the continuity equation $$\partial_t \rho(x,t) + \operatorname{div} (b(x,t) \rho(x,t)) = 0, \qquad t \in [0,T], \quad x \in \mathbb R^N,$$ with $b \in L^1((0,T), W^{1,p}(\mathbb R^N))$. ...
• 51
1 vote
151 views

### How to obtain linear tridiagonal system from PDE

I'm trying to re-solve the governing equations in hydraulic fracturing modeling as instructed step by step in a paper. After (A-9), the author stated that by substituting A-6, A-8 and A-9 into ...
1 vote
936 views

### CFL equation for non-linear equation

I am trying to solve numerically (obviously) inviscid Burgers' equation with the finite difference method. The equation is the following: $$\displaystyle \partial_t u + u \, \partial_x u = 0$$ ... 219 views

### Good C, C++ library for efficient grid search / tuples, ideally with bindings to Eigen

I have a $q$-dimensional grid, known at run, not compile-time, that has $50$ points in each direction and hence $50^3$ combinations that I would like to first build and then call a function with each ...
• 183
65 views

• 216