Questions tagged [finite-difference-methods]
The finite-difference-methods tag has no usage guidance.
110
questions
1
vote
0
answers
28
views
Acoustic wave equation will be numerically unstable anyway?
Since acoustic wave is longitudinal, its equation is exhibited nonlinear. In particular, I derived an acoustic wave equation within uneven, varying pipe. It goes:
$$
m_{tt} (m_x)^2 -2 m_{tx}m_tm_x + ...
0
votes
0
answers
11
views
Issues with Convergence of Finite Difference Method on Uniform Grid
I've written some code that carries out the central finite difference equation to solve this poisson system:
$\Delta u(x,y) = f, u(x,y) = g$ in domain $[0,1]^2$.
where $u(x,y) = \cos(4𝜋𝑥) \cos(4𝜋𝑦)...
0
votes
0
answers
98
views
+100
What is the solutions of the following 1D diffusion equality using Crank–Nicolson method?
Through my research I faced to the following equality and need to find $c_i^{t+1}$. Moreover, I found that it can be solved by Crank–Nicolson method (see here here: https://en.wikipedia.org/wiki/...
0
votes
0
answers
19
views
Boundary condition at interface
I am trying to solve the parabolic heat equation $\frac{\partial T}{\partial t}=D\frac{\partial^2 T}{\partial x^2}$ in two different regions with an interface (say $\alpha$). The conditions at the ...
0
votes
1
answer
28
views
Finding the CFL condition of second order $u_j^{n+1} =u_j^n +aH(u_{j-1}^n)+bH(u_j^n)+cH(u_{j+1}^n)$ with $u_t=H(u)_{xx}$ and $0\le H'(u)\le d$.
We have the following partial differential equation
$$u_t =H(u)_{xx},~~~ 0\le x<1$$
with an initial condition $u(x,0) = f(x)$ and periodic boundary condition. Here $0 \le H'(u) \le d$. Consider the ...
0
votes
0
answers
36
views
Implicit finite difference scheme for a non-linear PDE
I am trying to write a finite difference scheme to solve numerically a 2-nd order non-linear equation :
$$\boxed{\frac{\partial h}{\partial t} = A\frac{\partial}{\partial x}\left(h^{3}\frac{\partial h}...
0
votes
0
answers
20
views
What is the value of $\frac{\Delta^2}{E}3^xx!$, when x = 3 and h = 1?
I'm studying Numerical Analysis, and I came across a problem like this:
$$(\frac{\Delta^2}{E})3^xx!$$
When $x=3; h = 1$.
Here is what I have so far
$$\Delta = E-1$$
$$\Delta^2 = E^2 - 2E + 1$$
$$\frac{...
2
votes
2
answers
31
views
Numerical Solution of nonlinear P-B Equation in unbounded domain for determining the EDL potential distributions around a spherical particle
For my project I am studying a paper, namely "Perturbation solutions for the nonlinear Poisson–Boltzmann equation with a higher order-accuracy Debye–Huckel approximation" by Cunlu Zhao, ...
0
votes
0
answers
35
views
Solving second order differential equation with finite difference method (boundary conditions)
Hello I am trying to solve this second order differential equation:
$$r\frac{d^{2}y}{dr^{2}}+\frac{dy}{dr}=0$$
where $0\le r\le 1$, with the following boundary conditions:
$$r=0, y=200$$
$$r=1, y=36$$
...
0
votes
1
answer
20
views
Unstable forward difference scheme with cross products
Let $u(t) = (u_1(t), u_2(t), u_3(t))$ be a solution of the ODE
$$\frac{d\mathbf{u}}{dt}=\mathbf{a}\times\mathbf{u}.$$
where $\times$ denotes the cross product and $\mathbf{a} = (a_1, a_2, a_3) \neq 0$....
0
votes
0
answers
67
views
Requesting for Finite Difference Methods reference in Portuguese or English
Crossposted on Computational Science SE
I have been assigned a group project for an introductory Linear Algebra subject on Finite Difference Methods and sparse matrices. Our professor advised we use ...
3
votes
1
answer
87
views
Truncation error, finite differences
Consider the following FDM problem:
Find $u$ such that $$ -u^{\prime \prime}(x)+b(x) u^{\prime}(x)+c(x) u(x)=f(x) ~~\text { in }(0,1), $$ and conditions $u(0) = u(1) = 0$, where $$ b(x)=x^{2}, \qquad ...
0
votes
0
answers
14
views
Discretization of second order nonlinear ODE using finite difference with pseudo-spectral method
I have the following equation that was discretized using pseudo-spectral method in 2D with periodic BCs that works.
$$ \nabla_{\perp} \cdot \left( n \nabla_{\perp} \psi \right) = \textbf{S} $$
...
0
votes
1
answer
121
views
Forward finite difference approximation for second order cross derivatives
I know that the central finite difference approximation for a second-order cross/mixed derivative can be approximated through the 4-point stencil by:
$$
\frac{\partial u(x,y)}{\partial x \partial y} \...
0
votes
0
answers
17
views
Linear scaling transformation between two functions that preserves smoothness and the value at a given point
Let's say I have a monotonic function $f(x)$ defined over the range $a\le x\le b$. I want to apply a scaling transformation to $f\rightarrow g$ so that $\frac{g(a)}{f(a)}\lt1$ while $\frac{g(b)}{f(b)}=...
0
votes
0
answers
17
views
Will Multigrid method be faster than ordinary iteration on just the coarsest grid for Poisson equation?
I am using the Jacobi iterative solver to solve Poisson heat equation discretised using the finite difference method? I am currently using the coarsest mesh I can that has a grid spacing small enough ...
0
votes
1
answer
83
views
Nonuniform finite difference grid for a PDE where the x points depends on y coordinate
I'm currently working on a solution of a second-order nonlinear PDE adopting a finite difference approximation. For this, I'm using 5 and 9-point stencils in order to approximate the partial ...
0
votes
0
answers
64
views
Consistency finite differences vs finite elements
Whether a discretisation is consistent (and the order of consistency) in the FDM setting is defined by the the truncation term, e.g.:
$$\partial_{xx} = \frac{1}{h^2}\begin{bmatrix}1 & -2 & 1\...
2
votes
1
answer
27
views
Determining if a difference operator is of positive type
My question is about c.
As per the definition, a difference operator $L_hU_m:=-a_mU_{m-1}+b_mU_m-c_mU_{m+1}$ is positive type if $a_m\geq0$, $c_m\geq0,$ $b_m\geq a_m+c_m$, and $b_m>0$.
Application ...
0
votes
0
answers
34
views
Finite difference derivative in 2D
I am having a little difficulty understanding the concept of the two-dimensional finite difference method. I would be very thankful if somebody can clarify my confusion.
Let $f(\mathbf{r})$ and $g(\...
0
votes
0
answers
43
views
Square of numerical first-order derivative
I wish to obtain the square of the numerical derivative of a variable $\phi(x)$, i.e. $\left(\frac{d\phi}{dx} \right)^2$. For this, I am using the central difference technique as shown below.
$$ \left(...
0
votes
1
answer
63
views
How to approximate Heaviside function by finite difference?
I want to write the numerical scheme of
\begin{equation*}
\frac{\partial u}{\partial t} = \alpha \Delta u - u H(u - u_c)+f(x,y,t)
\end{equation*}
Where $H$ is a Heaviside function and $u_c$ is a ...
2
votes
1
answer
28
views
Change in a weighted average due to exit
I've been struggling with this for a while, but I am not smart enough to figure it out.
Suppose I have a weighted average of an economic variable $x$ across $n$ firms:
$$x=\sum_{i=1}^{n}x_i\lambda_i$$
...
1
vote
1
answer
77
views
Reducing FDM formulation of BVP to single equation
I would like to inquire about a certain approach to numerically solve the equations that result from a finite difference method (FDM) discretization of boundary value problems (BVPs). For concreteness,...
0
votes
1
answer
33
views
Truncation Error in Mixed Derivative
In Pattern Recognition and Machine Learning Ch 5.4.4 Finite Differences equation 5.90 gives a finite difference approximation to a mixed partial derivative:
$$\frac{\partial^2E}{\partial w_{ji}\...
1
vote
1
answer
111
views
Finite Differences Metods for the Laplace's Equation.
My question is not about content, but I would like to ask for references to a topic I have never studied. I need to do research on the following topic:
"Finite Difference Methods for the One-...
0
votes
1
answer
94
views
Implementing discrete boundary condition for 2D poisson equation using finite difference method
I'm trying to discretise the following 2D poisson equation:
$-(u_{xx} + u_{yy}) = f(x,y)$ with boundary condition
$u(x,y) = g(x,y)$.
I'm aiming to solve it using the finite difference method, ...
1
vote
0
answers
43
views
Why does this finite difference schema converge even though it should be unstable?
Consider $u''+u=0$ with the boundary conditions $u(0)=1$ and $u(\frac{3\pi}{2})=-1$. One possible finite difference formula is $u(x)+\frac{u(x-h)-2u(x)+u(x+h)}{h^2}$, which gives the matrix
$\begin{...
1
vote
1
answer
81
views
Numerically solving the Schrödinger equation on the real line using coordinate transformation
Consider the (dimensionally reduced) Schrödinger equation on the real line
$$\left\{\begin{aligned}-&\phi''(x)+V(x)\phi(x)=E\phi(x), \ x \in \mathbb{R} \\ &\lim_{x \to \pm \infty} \phi(x) = 0 \...
0
votes
0
answers
43
views
Derivative estimation on non-standard stencil $j-1, \dots, j+2$
Let's say I want to obtain the finite difference representation of the differential operator $(dU/dx)_j$ at the nodal point $j$ (or $j\Delta x$). I'm also interested in the mentioned finite difference ...
1
vote
0
answers
32
views
Stability of KdV equation
I want to find the stability of
$$u_t + (1 + \pi^2)u_x + u_{xxx} = 0$$
Applying forward euler method with forward and central differenve schemes, I get
$$
\frac{U_n^{j+1} - U_n^j}{k} + (1 + \pi^2)\...
0
votes
1
answer
16
views
Clarification on Difference Formula for nodes near boundary
The above is an extract from my precis on numerical solutions to PDE, finite difference method giving explanation for difference formula for nodes near boundary when step length is not equal (...
4
votes
1
answer
54
views
Discrete entropy inequality for scalar conservation laws
Consider a scalar conservation law $u_t+f(u)_x=0.$
A three point monotone scheme given by,
\begin{eqnarray}
u_i^{n+1}=u_i^{n}-\lambda (F(u_i^n,u_{i+1}^n)-F(u_{i-1}^n,u_i^n))
\end{eqnarray}
where $F(u,...
0
votes
0
answers
29
views
How can I verify the energy conservation of a finite difference scheme for Navier--Stokes equations in 2D?
How can I verify the energy conservation of a finite difference scheme for Navier--Stokes equations in 2D? I think that the answer with any finite difference scheme is enough to understand. Thanks in ...
1
vote
0
answers
26
views
Resources to study Nyström methods and their error analysis
I'm working on a problem that states that:
The Nyström methods have the form:
$$u_{n+r} = u_{n+r-2} + \Delta t \sum_{j=0}^{r}\beta_h f(u_{n+j}).$$
The problem is: Find the two step explicit and ...
1
vote
0
answers
19
views
Error of differencing schemes
I'm using 6th order tri-diagonal differencing scheme as described in Lele for a turbulence DNS. I want to find out the smallest possible turbulent structure that can be run in the DNS. My questions ...
2
votes
0
answers
112
views
Implementing Crank-Nicolson scheme for 1-D wave equation
I am trying to implement the Crank-Nicolson scheme directly for the second order wave equation by replacing $E^n$ terms in spatial derivative with $(E^(n-1)+2E^(n)+E^(n+1))/4$. I am sure I have ...
0
votes
0
answers
60
views
Deduce the order of convergence of explicit Euler
I'm reading the following lecture slides : https://courses.maths.ox.ac.uk/node/view_material/1191. See Page $86$ for my question. In the slides, they are verifying order of convergence of explicit ...
1
vote
1
answer
182
views
Lax-Wendroff and Crank-Nicolson Matlab simulation of linear advection
I am implementing two schemes: Lax-Wendroff and Crank Nicolson to solve the PDE linear advection in Matlab. My simulation seems to run; however, between the transition in time space the numerical ...
1
vote
0
answers
65
views
stability of finite difference schemes for nonlinear pdes
I know that forward euler is probably not the most accurate approach for discretizing a PDE. However, due to its simplicity, it can be a good starting step.
It is easy to code, however, it is also ...
1
vote
1
answer
164
views
Chain rule in DARTS – Differentiable Architecture Search
For https://arxiv.org/pdf/1806.09055.pdf#page=4 , could anyone help to see how equation (7) is the chain rule result of equation (6) ?
1
vote
1
answer
768
views
Fourth order finite difference
I am studying fourth order central finite difference (CFD) for space discretization of the Black Scholes PDE.
I understood that the standard fourth order CFD for $N-1$ points is given by
$$\frac{\...
1
vote
1
answer
33
views
Why is inter/extrapolation technique on finite difference table different than taylor's expansion of FDM?
I am studying finite difference methods on my free time.
Finite Difference table
So based on the table, if I want to extrapolate the next value of my function, I have to use ...
$$f(x+dx)=f(x)+f'(x)+...
2
votes
0
answers
37
views
How can I linearize sine-Gordon PDE to apply Von Neumann stability analysis?
Specifically, I have this equation
$\frac{\partial^{2}u}{\partial t^{2}}(x, t) = \frac{\partial^{2}u}{\partial x^{2}}(x, t) -sen(u(x, t)); \quad L_{0} \le x \le L_{1}; \quad
t \geq t_{0}$
and them I ...
1
vote
0
answers
37
views
Aproximate equation with Neumman's boundary conditions by using implicit finite difference method
I have this equation for $\rho$
$$
\frac{\partial \rho}{\partial t} + \frac{\partial}{\partial x}(\rho u) = \varepsilon\frac{\partial^2 \rho}{\partial x^2},\quad 0\leq x\leq 1,\quad 0\leq t\leq T\\
\...
0
votes
0
answers
36
views
What finite difference method do I use for below data?
The data in the table below represents the altitude $H$ (in feet) of a small rocket that is launched vertically upward as a function of time $t$ (in seconds):
$$\begin{array}{c|cccccccc}
t\text{ (s)}&...
0
votes
1
answer
208
views
Finite Difference: Non-linear diffusion coefficient
$$ u_t = \nabla \cdot (k(u) \nabla u) $$
I have read some posts on FDM for $k=k(x)$. How does the method extend in the non-linear case: $k = k(u)$.
I have attempted the following:
\begin{align*}
\...
7
votes
3
answers
3k
views
Finite differences second derivative as successive application of the first derivative
The finite difference expressions for the first, second and higher derivatives in the first, second or higher order of accuracy can be easily derived from Taylor's expansions. But, numerically, the ...
0
votes
0
answers
42
views
Finite-difference method: Hints on how to solve this system of 1D differential equations?
I am trying to solve the following differential equation describing the steady-state carrier density and photon density in a laser diode:
$$AN(z)+BN(z)^2+CN(z)^3=\frac{\eta_iI}{qV}-v_gg(N)(S^+(z)+S^-(...
1
vote
1
answer
94
views
Solving Boundary Value Problem using the Finite Difference Method - What Values to Substitute for $y'$?
I am given a boundary value problem of the form $y'' = f(y', y, x)$ and asked to solve the system subject to boundary conditions using the finite difference method.
I proceed to develop a system of ...