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
64 views

How to solve singular non symmetric poisson equation with Neumann boundary condtions?

I am trying to solve 2D Poisson equations with Neumann boundary conditions. When the mesh is uniform, Poisson equation is singular and symmetric, so the method listed in Null Space Projection for ...
1
vote
0answers
73 views

finite volume for diffusion equation with anisotropic (tensor) coefficient

Consider the scalar PDE for $u$ with Dirichlet boundary conditions: $\mathrm{div}(\mathcal{K}\nabla u) = f\; \forall x\; \in \Omega \subset R^2$, $u = 0 \; \forall \; x\;\in \partial\Omega$ ...
3
votes
2answers
96 views

2nd order centered finite-difference approximation of $u_{xy}$

The problem is to find a 2nd order finite difference approximation of the partial derivative uxy, where u is a function of x and y. Page 5 of this pdf I found does a centered difference approximation ...
1
vote
0answers
54 views

Assembling sparse matrix in PETSC for Poisson equation

I am a novice at PETSC, and I have been trying to write an FVM code for steady heat conduction in 2D using PETSC (square, regular grid, Dirichlet boundaries) Since the large matrix , say A, will be ...
1
vote
1answer
40 views

Stiff Equations - What to plot as a qualitative or quantitative measure of stiffness

On a recommendation from Mathematica.SE, I am posting this on Computational Science.SE: I am trying to quantify stiffness of an ODE by relating it to the fine-ness with which NDSolve treats it's ...
0
votes
1answer
58 views

Solving the convection-diffusion equation using finite differences at high Peclet numbers

I am trying to solve the 2D convection-diffusion equation, which in non-dimensional variables can be expressed for my problem as: $\frac{\partial c}{\partial t} = \lambda^2\frac{\partial^2c}{\partial ...
3
votes
1answer
80 views

Numerical derivative and finite difference coefficients: any update of the Fornberg method?

When one want to compute numerical derivatives, the method presented by Bengt Fornberg here (and reported here) is very convenient (both precise and simple to implement). As the original paper date ...
3
votes
1answer
169 views

Free open source C/C++ library to solve 2d Poisson equation using the finite difference method

I have been writing some code in C for particle-in-cell simulation. One of the steps of the PIC algorithm requires to solve (numerically) Poisson's equation $$ \Delta \varphi = - 4 \pi \rho. $$ ...
3
votes
2answers
176 views

Developing finite volume (FVM) code in C . General advice

I need to develop a FVM code in C (The multiscale FVM method for heterogeneous media). I know that: Only uniform rectangular grids will be considered (2d now, later 3d) Sparse systems will be large ...
1
vote
1answer
70 views

Implicit finite difference scheme for LWR-v PDE

I want to discretize the LWR(Lighthill-Whitham-Richards)-v partial differential equation (as shown in 1) $$ \frac{\partial u}{\partial t} + \frac{\partial R(u)}{\partial x} = 0 \quad \text{i.e.,} ...
1
vote
1answer
65 views

large symmetric positive band matrix

I use gpbsv command from Intel MKL to solve symmetric positive band system. But unfortunately when the system is large I get an error Access violating writing location in VisualStudio. Could someone ...
1
vote
0answers
115 views

Derivation of a Higher Order Compact Alternating Direction Implicit Method

I dont understand how this Higher Order Compact ADI scheme, which is fourth order in time and space, for the wave equation is derived: I go through the following Using Tylor's expansion $u(t+h,x,y)$ ...
0
votes
0answers
51 views

Exchange the position of two particles using Matlab

need to exchange the position of two particles in order to test the symmetry of the wave-function $\psi(x_1,x_2)$ using Matlab. Can anyone tell me if there is a certain command I have to use? and if ...
6
votes
0answers
52 views

Implementation of convection scheme given by normalized variable diagram

In finite difference and finite volume methods, convection schemes (upwind, central, quick, ...) are usually shown in a normalized variable diagram. The diagram gives the normalized face variable as a ...
5
votes
0answers
97 views

FDTD Poynting Vector

I'm attempting to validate my FDTD code against Meep by calculating the Poynting vector field across a simulation consisting of a monochromatic point source within a box (no boundary conditions ...
1
vote
1answer
156 views

Reconstructing fluxes

Given a standard advection equation, we write the update as $$ q_i^{n+1}=q_i^n+\frac{\Delta t}{\Delta x}\left(F_i^{n+1/2}-F_{i+1}^{n+1/2}\right) $$ with $F_i^{n+1/2}=F\left(q_i^n,\,q_i^*\right)$ and ...
2
votes
1answer
84 views

Finite Differencing of a Strange Advection-Reaction Problem

comp! I'm trying to solve the advection-reaction problem $ dg/dt = dg/dx + x\cdot g \qquad on~~x \in \Omega = (-\infty, +\infty)$ supplemented with the boundary conditions $ \lim_{\lvert x \rvert ...
2
votes
1answer
107 views

One finite difference scheme

There is PDE: $$\frac{\partial u(r,\varphi,\psi,t)}{\partial t}=\operatorname{div}A(r,\varphi,\psi)\nabla u +f(r,\varphi,\psi,t) $$ We solve numerically IBVP for the ball $B_{1}(0)\subset ...
3
votes
1answer
131 views

Problem in Discretizing Convection-Diffusion-Reaction equation

I'm trying to solve the Convection-Diffusion-Reaction (CDR) equation on a rectangular domain, using cylindrical coordinates and Finite Difference Methods (FDM) (this approximates a flow reactor). ...
1
vote
0answers
50 views

Stability question (finite difference): dealing with corner nodes

Consider one initial boundary value problem for sphere. $$\frac{\partial u}{\partial t}=\operatorname{div}A\nabla u +f$$ Here is explicit numerical scheme (we consider that it is stable): ...
2
votes
1answer
81 views

variational formulation

I would like to minimize: $$J = \int_{\Omega} \|\nabla u - \nabla g\|^2 + \lambda \|\frac{\partial u}{\partial t} + \nabla u.v||^2 ~\text{dx dy dt}$$ where $u(x,y,t)$ is the unknown function, the ...
4
votes
3answers
465 views

Conservation of Mass in 1D Advection-Diffusion Equation

My long-term goal is to numerically solve the 1D advection-diffusion equation of the form: $$\frac{\partial u}{\partial t}=\frac{\partial }{\partial x}\left( v(x,t) u+D\frac{\partial u}{\partial ...
2
votes
1answer
172 views

Partial derivatives of a 3D array in Matlab

I'm interested in taking some partial derivatives of a 3 dimensional array in Matlab - say $A(i,j,k)$ approximates $f(x_i,y_j,z_k)$. I need to approximate things like $\partial_{xy}f$, ...
2
votes
2answers
73 views

How to impose a constant constraint PDE

What is the best way to impose a "constant constraint" for a PDE? Specifically, I want to solve an eigenvalue problem $Au=\lambda u$ on the rectangle $(0,2\pi)\times(-\pi/2,\pi/2)$ with periodicity ...
9
votes
3answers
304 views

How to deal with curved boundary condition when using finite difference method?

I'm trying to learn about numerically solving PDE by myself. I've been beginning with finite difference method(FDM) for some time because I heard that FDM is the fundament of numerous numerical ...
3
votes
1answer
172 views

Finite difference method (diffusion equation) for 3D spherical case

There is one 3D-diffusion IBVP for sphere (Dirichlet problem with zero conditions on the surface of sphere). The equation has the following view: $$\frac{\partial u}{\partial ...
1
vote
1answer
58 views

How to allocate memory for successive iterative solutions with potentially different non-zero structure?

Background I am solving the unsteady heat equation in 3D using an alternating direction implicit (ADI) method. This means that I am solving three different tridiagonal systems within a single ...
4
votes
1answer
103 views

Is is possible to mix finite-volume and finite-difference discretisations when solving a coupled non-linear system?

In my last question I noticed a peculiar error when solving the Poisson equation using finite volume method (FVM), Peculiar error when solving the Poisson equation on a non-uniform mesh (1D only) ...
5
votes
1answer
134 views

Riemann Solver in WENO methods

I'm reading now Shu, C.-W. (1999). High Order ENO and WENO Schemes for Computational Fluid >Dynamics. (T. J. Barth & H. Deconinck, Eds.)Lecture Notes in Computational >Science and Engineering, ...
2
votes
0answers
50 views

Finite Difference for Hamilton Jacobi Belman

I have hjb equation where $V=V(x,t)$ and $u=u(x,t)$ $V_t + \sup(u) [A(x,u)V_x + B(x,u)V_{xx}]=0$ for $x$ in $[0,1]$ and $t$ in $[0,1]$ I have been able to successfuly resolve it numerically having ...
3
votes
2answers
266 views

Object-oriented programming on finite difference method

generally, it is natural to use procedural programming approach (PP) to solve a partial differential equation by finite difference method (FDM). That is, one (1) defines matrices to store the ...
0
votes
1answer
101 views

max speed <--> time discretization

I'm working on a heat diffusion problem, $$ \frac{\partial T}{\partial t}=\vec{\nabla}\cdot\left(\kappa T^{5/2}\,\vec{\nabla}T\right) $$ I know that, after discretization, the time step for the 1D ...
2
votes
2answers
176 views

How can i solve this first order system of differential equations

Edit: I am trying to solve $$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}=\nu\frac{\partial^{2}u}{\partial x^{2}}\\ u(0,t)=0\nonumber \\ u(1,t)=0\nonumber \\ u(x,0)=\sin(\pi x)\\ ...
5
votes
1answer
712 views

How to add reaction and source terms to a diffusion PDE solver written with MATLAB's pdepe function?

I have the following system of equations which I'm trying to solve using Matlab's pdepe solver. The 1-D spherical heat diffusion equation with heat generation ...
6
votes
2answers
280 views

Solid mechanics with finite differences: How to handle “corner nodes”?

I have a question concerning coding boundary conditions for solid mechanics (linear elasticity). In the special case I have to use finite differences (3D). I am very new to this topic, so perhaps some ...
3
votes
1answer
305 views

Stability of numerical method for 1D Burger's equation

I am trying to solve 1D viscous Burger's equation numerically and I cannot apply von Neumann analysis because the equation is non-linear. How do I predict the stability criteria for my system? I also ...
0
votes
1answer
281 views

Abaqus *ORIENTATION

What do you actually type into the *ORIENTATION entry in an input file? Is it a rotation matrix w.r.t. the Global axes?
1
vote
0answers
261 views

Crank-Nicolson for 2nd- and 4th-order finite differences

I modeled the heat equation, $$ u_t = au_{xx} $$ using the common 2nd-order Crank-Nicolson scheme, $$ \frac{u^{n+1}_i-u^{n}_i}{dt} = \frac{a}{2\,dx}\left(u_{i-1}^{n+1}+u_{i+1}^{n+1}-2u_i^{n+1} + ...
3
votes
1answer
169 views

Finite difference equations versus boundary integral equations for elliptic pdes

In certain cases, boundary integral methods are preferred for elliptic partial differential equations as opposed to finite difference methods. For instance, for solving the Poisson equation in a ...
0
votes
1answer
309 views

Implicit heat diffusion with kinetic reactions

I am using the implicit finite difference method to discretize the 1-D transient heat diffusion equation for solid spherical and cylindrical shapes: $$ \frac{1}{\alpha}\frac{\partial T}{\partial t} = ...
0
votes
0answers
170 views

Any note on Immersed boundary finite difference method?

For parts of a talk, I need a note on "Immersed boundary finite difference method", mainly about the reason of appearing this branch in the finite difference methods, considering mathematical ...
2
votes
1answer
105 views

Error norm in finite difference calculation

I've used an explicit finite difference scheme to model the 1D time dependent temperature distribution in a friction weld. I want to now verify the consistency and convergence of my algorithm. I have ...
6
votes
1answer
1k views

Matlab solution for implicit finite difference heat equation with kinetic reactions

I am trying to model heat conduction within a wood cylinder using implicit finite difference methods. The general heat equation that I'm using for cylindrical and spherical shapes is: Where p is ...
6
votes
1answer
435 views

Automatically generating finite difference matrices for systems of PDEs

Suppose that you have a system of PDEs to solve. At least for simplicity, let's assume it's time independent, quasi-linear (linear in its derivatives) solved on a rectangular grid in (x,y) space, and ...
7
votes
2answers
218 views

Convergence/stagnation of BiCGStab(l)

I am solving 3D time-harmonic Maxwell FDFD problems (which result in huge sparse linear systems) using BiCGStab(l). I have tried out a bunch of different methods and for my specific use case, it seems ...
3
votes
1answer
519 views

Numerical solution of non-linear diffusion equation via finite-difference with the Crank-Nicolson method

I want to numerically solve the non-linear diffusion equation: $$ \frac{\partial}{\partial t} T(x,t)= \frac{\partial}{\partial x}\left(T^{5/2} \frac{\partial T}{\partial x} \right) $$ I want to use ...
3
votes
1answer
90 views

Definition of TV in TVD finite difference methods

TVD (total variation diminishing) finite difference methods that produce non-oscillatory solutions are based on the total variation. In LeVeque's book the total variation of a function $q(x)$ is ...
4
votes
2answers
191 views

What is the basic requirement to understand the PETSc library?

I want to use the PETSc library to do some numerical work on finite element and parallel computing, but I wonder what I should know first to use these libraries. Could you give me some guiding ...
3
votes
1answer
634 views

Finite Difference Method Neumann Boundary Condition with Variable Coefficients

Disclaimer In the process of typing up this question, I determine its solution. Since I went through the trouble of typing up the question in its entirety, I will post its answer as well. It may ...
10
votes
3answers
317 views

What are the basic principles behind generating a moving mesh?

I am interested in implementing an moving mesh for an advection-diffusion problem. Adaptive Moving Mesh Methods gives a good example of how to do this for Burger's equation in 1D using ...