Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [finite-difference]

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

0 votes
0 answers
44 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 ...
GMV871's user avatar
  • 35
0 votes
0 answers
47 views

1D FDTD simulation of plane wave propagation and the Courant stability condition

I'm currently trying to simulate a simple case of wave propagation in free space before adding in more complexities, and already I'm stumped. I understand the Courant stability condition. However, I ...
Jerry Y's user avatar
1 vote
1 answer
130 views

Coupled Partial Differential Equations

I'm trying to solve the following system of coupled differential equations, the two-temperature model for $e$ = electrons and $l$ = lattice. $$ \rho_{e}C_{p,e}\frac{\partial T_{e}}{\partial t} = k_{e}\...
clope99's user avatar
  • 11
0 votes
0 answers
69 views

How can I get more accurate electric scalar potential in 2D closed box?

I am trying to use poisson equation to plot the electric scalar potential in close 2D space. The details in in this video and this one The following in written in Matlab for quick prototype. ...
kile's user avatar
  • 101
2 votes
1 answer
278 views

Asking advice for implementation of Conservative Finite Difference Scheme for numerically solving Gross-Pitaevskii equation

I am trying to numerically solve the Gross-Pitaevskii equation for an impurity coupled with a one-dimensional weakly-interacting bosonic bath, given by (in dimensionless units): \begin{align} i \frac{\...
sap7889's user avatar
  • 21
1 vote
0 answers
33 views

Imposing higher order finite difference schemes for boundary value problems on a finite interval

I have some questions. I'm going to assume everything is in 1d with a Laplacian operator. If I discretize the Laplacian operator using $p = 2a+1$ grid points with periodic boundary conditions, I ...
Cuhrazatee's user avatar
1 vote
0 answers
66 views

Deriving order of accuracy and interpreting a given discretization scheme when underlying method ( finite difference/volume) not known

If a spatial grid is given with time levels like this: to solve the following model problem Now consider the following discretization schemes: Scheme 1 Scheme 2 Usually, to determine order of ...
me10240's user avatar
  • 445
1 vote
0 answers
96 views

Implicit-Explicit Operator Splitting Scheme

I am trying to solve the 2D advection-diffusion equation in cylindrical coordinates: $$ \frac{\partial c}{\partial t} = D\left(\frac{\partial^2 c}{\partial r^2} + \frac{1}{r}\frac{\partial c}{\partial ...
mht's user avatar
  • 11
1 vote
1 answer
202 views

Numerically solving the Advection-diffusion equation with no-flux boundary condition leads to violation of mass conservation

I am trying to solve numerically the advection-diffusion equation of the following form $$\frac{\partial C}{\partial t}=\alpha\frac{\partial^2 C}{\partial x^2}+\beta \frac{\partial C}{\partial x}$$ ...
Ornate's user avatar
  • 11
0 votes
1 answer
142 views

"Cleanest, most professional" approach to implement a finite differences scheme in dimension greater than two

Coding a finite difference algorithm in 1D does not require a complex mesh. In higher dimensions, you would need a mesh and its connectivity graph to compute the differential operators. Finite ...
mle's user avatar
  • 147
0 votes
0 answers
46 views

Vector poisson equation in cylindrical coordinates. What's wrong?

I am trying to solve this equation: $$ \frac{\partial^2 A}{\partial r^2} + \frac{1}{r}\frac{\partial A}{\partial r} - \frac{A}{r^2} + \frac{\partial^2 A}{\partial z^2} = -g $$ This is basically the ...
Physicist137's user avatar
1 vote
1 answer
149 views

Can domain decomposition methods also be applied to linear systems resulting from finite difference discretizations?

Question In general, do domain decomposition methods (DDMs) require a linear system of equations $Au = f$ to be formed by finite element discretization/method (FEM) of a PDE? Or could one simply use a ...
Jared Frazier's user avatar
2 votes
1 answer
116 views

Are there necessary conditions for SOR algorithm to converge when used for 2D discrete Poisson problem, with PBC, besides solvability condition?

I am trying to solve a 2D poisson problem that is supposed to represent diffusion of chemicals on a grid: $\nabla^2 R_{ij}=f_{ij}$. I am discretizing the problem with the standard central ...
Federica Sibilla's user avatar
0 votes
1 answer
51 views

numerical schemes for 1D PDE: for smaller grid size there is an increased roundoff error, larger size more truncation, so sweet spot in between?

I had a discussion with a colleague today. He claimed that usually for a general numerical scheme for solving a general 1D PDE, for smaller grid size there is an increased roundoff error because of ...
Millemila's user avatar
  • 445
2 votes
1 answer
117 views

How to quantify the numerical diffusion term in a second-order upwind advection scheme?

In the first-order upwind scheme, numerical diffusion can be quantified as: $$\frac{dT}{dt} = -w\left(\frac{dT}{dz}\right) + \left(\frac{wdz}{2}\right)\left(\frac{d^2T}{dz^2}\right)$$ For Lax-Wendroff,...
Yoni Verhaegen's user avatar

15 30 50 per page