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

learn more… | top users | synonyms

0
votes
0answers
47 views

Finite Difference Method Neumann Boundary Condition with Variable Coefficients by Ghost Points

I have found an alternative solution to the problem stated here. Here's the alternative solution link. It says that "A common technique in implementations of $\partial u/\partial x=0$ boundary ...
2
votes
2answers
88 views

Ill-conditioned Jacobian matrix from Nernst-Planck equation with Butler-Volmer reactions

The governing equations are listed here of my notes on page 4. It's a reproduction of other's paper which solves the equations with COMSOL. The problems arise when I want to solve for the consistent ...
3
votes
0answers
30 views

Flux at coarse-fine mesh grid interface?

I am trying to solve one dimensional inviscid Burger's equation using adaptive mesh refinement. This is the PDE: $$\frac{\delta U}{\delta t} + \frac{\delta F}{\delta x} = 0$$ where the flux F of the ...
1
vote
0answers
84 views

Minimal surface finite differences problem - Matlab assemble

I face to the following problem: $$(1+u_x^2)u_{yy} - 2u_xu_yu_{xy} + (1+u_y^2)u_{xx}=0.$$ Problem needs to be discretized and assembled. Does anybody know how to proceed in Matlab?
1
vote
1answer
70 views

I need to scale variables to solve a 2D PDE. What are the physical considerations of scaling?

I am solving a boundary value problem in 2D via an implicit finite difference scheme. Unfortunately, although the problem is well-posed and should have a unique solution, the condition number of the ...
4
votes
1answer
71 views

Comparing finite differences methods

I am currently writing my dissertation on different methods for pricing barrier options. As part of this, I have implemented a finite differences method for solving one partial differential equation, ...
4
votes
1answer
113 views

Accuracy of finite differences

I'm currently reading this paper, and I'm a bit confused about how they compute the accuracy of their algorithm. In the aforementioned paper, they investigate the regularized long-wave equation: $$ ...
0
votes
0answers
27 views

Conservation of mass in advective form of advection equation

A finite difference discretisation of the advection equation in flux form is inherently conservative. But is there an explicit, Eulerian scheme in advective form ($\partial \varphi / \partial t + ...
4
votes
2answers
137 views

CFL for high order finite difference

Time-explicit high order finite element/DG methods for the advection equation tend to have a timestep restriction which looks like $$dt < C h/p^2$$ where $h$ is mesh spacing and $p$ is polynomial ...
4
votes
2answers
128 views

How to discretize Burger's equation?

I am trying to solve the very simple one dimensional burgers equation which is: $$\frac{\delta U}{\delta t} + \frac{\delta F}{\delta x} = 0$$ where the flux F of some variable U is defined as$$ F= ...
4
votes
2answers
90 views

Under what circumstances can two (nearly) identical sparse matrices give different solutions to Mx = b?

Suppose I have two sparse matrices, $A$ and $B$, of size $N \times N$. They each have the same sparcity pattern ("footprint"). They each also have values which in theory should be identical, but ...
0
votes
0answers
33 views

Non-overlaping Domain decomposition - assemble of Laplacian

I am dealing with following 2-dimensional problem in the unit square domain $S_2$ $$- \Delta u (x,y) = f \ \text{in} \ S_2, \hspace{1.5cm} u(x,y) = 0 \ \text{on} \ \partial S_2$$ where $f$ is ...
3
votes
0answers
63 views

Is it generally unstable to use in multidimensional simulations finite difference schemes with higher orders than 2?

I'm part of a team trying to generalize a 1D Advection-Diffussion-Reaction code we inherited by extending it to 2D by using dimensional splitting, i.e. solving advection and diffusion for x and y ...
5
votes
2answers
107 views

9-point stencil finite difference Laplacian with variable diffusion coefficients

So I'm trying to implement a 9-point stencil discretization to the 2D difussion equation. The stencil is here. However, most of the literature deals with a Laplacian that has a constant diffusion ...
2
votes
0answers
39 views

Calculating theoretical order of accuracy of least squares fit advection scheme

I'm familiar with finding the order of accuracy using von Neumann analysis for finite difference schemes formulated using Taylor series expansions. But is there a similar technique for finding the ...
4
votes
1answer
57 views

transverse component for multidimensional advection in method of lines

So I inherited from some people a code that solves the advection-diffusion-reaction equation for a particular system. The original code was first implemented in 1D which worked fine in cartesian ...
2
votes
0answers
299 views

Finite difference scheme for solving nonlinear least-squares problem

I am dealing with following problem: $$ \min_{u,\gamma}\Bigg\{ \frac{1}{1000} \iint_{S_2} {\gamma (x,y)^2 dxdy} + \iint_{S_2} {[u(x,y) - u_0 (x,y)]^2 dxdy} + \iint_{S_2} {[\Delta u(x,y) - \gamma ...
2
votes
1answer
143 views

How can I solve wave equation for circular membrabe in polar coordinates?

The original equation is $$\frac{1}{c^2} \frac{\partial^2 u}{\partial t^2} = \frac{\partial^2 u}{\partial r^2} + \frac{1}{r}\frac{\partial u}{\partial r} + \frac{1}{r^2}\frac{\partial^2 u}{\partial ...
2
votes
1answer
122 views

Finite difference for nonlinear system of equation

\begin{equation} \frac{\partial C_i}{\partial t} = D_i \nabla^2 C_i - \frac{I \cdot \nabla t_i}{z_i F} - \sum_{i'} \frac{z_{i'}}{z_i} D_{i'}\nabla \cdot (t_i\nabla C_{i'}) \end{equation} ...
0
votes
0answers
34 views

1D k-epsilon turbulence model in a turbidity current

I am trying to implement a 1D k-$\varepsilon$ turbulent model for a turbidity current, hence the conservation equation for $c$. I'm solving for the variables $u,c,k$ and $\varepsilon$. The remaining ...
2
votes
1answer
86 views

Not getting correct numerical solution for Advection-Diffusion-Reaction eqn

Objective: I am trying to numerically solve $C(x,y,t)$ from the following advection-diffusion-reaction equation in 2D space (x,y) and time. I will be testing my numerical solution with an approximate ...
3
votes
2answers
109 views

Error in result of finite-difference approximation when refining

I have calculated the first derivative of following equation using Euler method (first order), Three point Finite Difference method (second order) and Four point Finite Difference method (third ...
1
vote
1answer
150 views

$AX=B$: How to solve for $X$ if elements of matrix A are matrices

Objective: I am trying to solve for $C$ in 2D space (x,y) and time from following PDE. $$ \text{PDE: }\frac{\partial C}{\partial t} + \nabla\left(v.C - D\nabla{C} \right)= \alpha.C $$ Method: I ...
1
vote
1answer
77 views

ADR equation implicit solution: Penta-diagonal matrix for a 2D $N\times N$ system

Objective: I am trying to simulate the following advection-diffusion-reaction equation in 2D space (x,y) and time. $$\begin{align} \text{ADR Equation: }\frac{\partial C}{\partial t} + \nabla\left(v.C ...
2
votes
2answers
155 views

How to solve a Poisson equation using the finite difference method when there is an object inside a domain?

I'm interested in solving an electrostatics problem in 2d case in some domain with a conductor placed inside the domain. From a mathematical point of view, I have to solve a Poisson equation with ...
2
votes
0answers
37 views

matplotlib contourplot for $\log z$ in the Complex Plane $\mathbb{C}$

I tried using Python's matplotlib on the logarithm and here is what I got, a kind of starburst pattern. Since the angle jumps between $\theta = 0$ and $\theta = 2\pi$, contour assumes there is a ...
-1
votes
1answer
209 views

How to initiate spirals in this model?

I am trying to reproduce Tang & Othmer paper which is related to excitations and oscillations in G-protein model in Dictyostelium discoideum, an amoeba species. The mathematical model in the paper ...
1
vote
0answers
39 views

Nonlinear 2D modeling of Neural Electromagnetic field in Matlab

I am trying to replicate the MATLAB simulation presented in this paper. More specifically, I have to code the solution to this equation $$\frac{a}{2R_i}\frac{\partial^2 V_m}{\partial x^2} - ...
1
vote
1answer
65 views

A doubt in Multigrid V-cycle

Assume I have 3 levels of grids. Finest Grid = level 2, Coarser Grid = level 1, Coarsest Grid = level 0. Relax $u$ on $Au = b$ at level 2 for 3 times. Find residual $r2$ at level 2, then restrict to ...
1
vote
2answers
122 views

How can I prove that two eigenvectors are orthogonal?

I obtained 6 eigenpairs of a matrix using eigs of Matlab. How can I demonstrate that these eigenvectors are orthogonal to each other? I am almost sure that I ...
-2
votes
1answer
62 views

Finite Difference for Fourth-Order PDE

How to discretize the following 4th order PDE using finite difference method? $$\frac{\partial^{2} y}{\partial t^{2}}+\frac{\partial^{4} y}{\partial x^{4}}=0$$ thanks
0
votes
1answer
84 views

Finite Difference method

I'm following the article at http://www.paykin.info/irina/project_2.jsp Finite Difference method. How to interpret this one? How to convert this to pseudo code? $$u(i,j+1) = 2u(i,j) + ...
7
votes
1answer
73 views

Stability analysis of Heun's method

I am using Heun's method with a third order upwind spatial scheme, which is suggested by Shao (2008) to be used for solving the horizontal advection part of the advection-diffusion equation. This is ...
2
votes
0answers
38 views

Rank deficient Jacobian in discretized periodic solutions to autonomous ODE

I'm trying to numerically find periodic solutions to different systems of autonomous nonlinear ordinary differential equations. I decided to use a finite difference scheme and solve the resulting ...
1
vote
1answer
94 views

openfoam - Programming customized PDEs

I am looking for a method to automatically solve custom PDEs on a custom control volume. Specifically I would like to solve equations similar (but not exactly alike) to: $$\frac{\partial y}{\partial ...
1
vote
1answer
91 views

Correct way of computing norm $L_2$ for a finite difference scheme

I am computing the rate of convergence of my finite difference scheme in norm $L_2$. Which is the correct way to compute it? This: \begin{align} L_2 &= ...
2
votes
1answer
132 views

Why a finite difference scheme would give second order of accuracy in norm L2 but 1.5 with L1 (while 1 with Linf)?

My finite difference scheme for the 2D Euler equations is second order accurate in theory, since all the terms are second order accurate, with the advective terms being third order. So I expect a rate ...
0
votes
0answers
53 views

The centered difference operator for fractional function

Recently, I come to a question about the 2nd order centered finite difference approximation of a fractional function, more precisely, we set $\delta^{2}_x u(x,t) = u(x_{i-1},t)-2u(x_i,t) + ...
2
votes
2answers
64 views

Integro-differential PDE and method of lines

Let us consider the following equation : $$\partial_t u = \Delta_x u + K*u$$ where $K$ is a smooth kernel, $u(x,t)$ is the unknown and $x$ is in $\Omega$ a domain in 1d or 2d. I want to numerically ...
0
votes
0answers
44 views

Quick scheme for separable first-order ODE

I'm trying to integrate an incredibly simple ODE: $$ y'(x) = -f(y),\quad y(0) = y_0 \ , $$ from $x=0$ to $x=1$. This is a decay type of equation, $f$ is the (variable) decay rate and $y$ is the ...
1
vote
0answers
98 views

Tips on improving stability in numerical scheme for non-linear PDE

I am solving a non-linear second order system of PDEs in two variables. The equations are too complicated to write out here, but an essential feature is that there is a propagating wave which then ...
6
votes
3answers
111 views

Stability criterion for waves in anisotropic solids

The equations of motion for an elastic solid are given by $$\begin{align} &\nabla \cdot \boldsymbol{\sigma} + \mathbf{f} = \rho \ddot{\mathbf{u}}\\ &\boldsymbol{\sigma} = ...
0
votes
1answer
82 views

Spectral Coefficients of Implicit Finite Difference Solution

This is something I've been trying to figure out for a long time, and all I have is vague numerical results. I'm trying to answer the following question analytically: Suppose I have a time dependent ...
2
votes
2answers
197 views

The meaning of conservative discretization in Galerkin FEM and Discontinuous Galerkin

I do understand the meanning of "conservative discretization" within the FVM/FDM framework, indeed it is well explained in this post. Now, according to the table in this slide (pp.4), it concludes: ...
4
votes
1answer
86 views

Need a good reference for numerical transport phenomena

I'm a chemical engineering undergraduate and I'm currently starting to work in a theoretical transport phenomena/colloid science group. While my group has a nice code base for larger scale ...
3
votes
0answers
77 views

2D wave equation with Mur boundary condition - setting up the RHS and solving (time-steps)

I am trying to solve a 2D wave equation implicitly using FD with central approximations with the following boundary conditions $$\begin{align} &u=2\sin\left(\frac{2\pi}{5}t\right)\quad \text{at ...
0
votes
1answer
148 views

Solving PDE with state and time dependent boundary conditions

I am interested in solving the following PDE (heat equation): $$\frac{\partial u}{\partial t} = \kappa \frac{\partial ^2 u}{\partial x^2}$$ In order to solve it, I discretize space uniformly into $N$ ...
0
votes
2answers
42 views

How to obtain streamslines from velocity field data points

I managed to solved a lid-driven cavity flow using LB code. It gave me the velocity field data points. Now I have to obtain streamlines too, of course from the obtained velocity field. Besides, I ...
2
votes
0answers
112 views

Boundary equations for constant right hand side in Poisson equation (FD)

I am setting up to solve a 2D Poisson equation $\nabla^2u = T$ by the finite difference method. I am using the multigrid method. On the coarsest mesh, where the grid size is 2x2, I want to set up ...
2
votes
1answer
201 views

Can Gauss-Seidel/SOR (preconditioned?) be applied to a non-diagonally dominant matrix?

After applying finite difference method to a Laplace/Poisson problem always arises a diagonal dominant system of equations that can be solved with Gauss-Seidel or SOR methods. If the original PDE does ...