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

Radial wave-function using Finite Differences

I want to solve an equation of the form $$\left[\frac{d^2}{d r^2} + \frac{1}{r}\frac{d}{d r}\right]\psi = 0$$ where $\psi$ is a wave function using finite difference method. The equation is more ...
0
votes
1answer
46 views

Exact finite difference method for advection equation

I want to solve the advection equation: $u_t+au_x=0, a > 0$. Here is our method: $$U_j^{n+1}=U_{j-1}^n-\left(\frac{ak}{h}-1\right)(U_{j-1}^n - U_{j-2}^n)$$ I am trying to answer the following ...
6
votes
2answers
121 views

PetSc vs Sundials for serial numerical computations?

I am currently working on a physics problem that turns into a non-linear boundary value problem. I need an efficient numerical solver that I could run on my laptop with i5 dual core CPU. I am ...
3
votes
0answers
43 views

Corner Transport Upwind for Linear Advection in Arbitrary Velocity Field

I need to implement a 3D version of the Corner Transport Upwind (CTU) finite volume method (in python); and so I've been reading Leveque, "Finite Volume Methods for Hyperbolic Problems" which I think ...
0
votes
0answers
38 views

Multigrid for cell-centered finite difference

Let's say I'm trying to solve a problem of the form: $$ \frac{\partial^2\psi}{\partial x^2} + C \psi = f $$ The problem is discretized with cell-centered finite difference (not something I can ...
1
vote
2answers
32 views

Approximate Neumann BVP operator by a matrix

I am considering approximating the operator of the BVP \begin{cases} -u''+u'=g,&\quad x\in [a,b]\\ u'(a)=-1, u'(b)=1, \end{cases} by a matrix. I tried to use the idea of finite difference ...
0
votes
1answer
52 views

Implementing temperature depending viscosity in a finite-difference scheme

I have a little question that might be basic for some experts, but right now, its not clear for me. I want to implement temperature depending viscosity in a finite difference scheme (incompressible ...
0
votes
1answer
44 views

Discretized matrix from the integral kernel function

Recently, I read a paper [1] and then I want to handle the two-dimensional linear integro-differential equation \begin{equation*} -\triangle u + q\Big(\frac{\partial u}{\partial x} + \frac{\partial u}{...
1
vote
0answers
34 views

Finite differences for incompressible viscous fluid equations

I am working with the equations for incompressible viscous fluid: $$ \partial_t \vec{\omega} + (\vec{u}\cdot\nabla)\vec{\omega} = \nu\nabla^2\vec{\omega} $$ $$ \nabla^2 \vec{\psi} = -\vec{\omega} $$ $...
0
votes
0answers
48 views

Collocated Grid Navier Stokes Solver

I want to solve Navier Stokes equations on a collocated grid. Earlier, I was using a MacCormick scheme based solver where I discretized predictor step in forward differences and corrector step in ...
1
vote
1answer
54 views

How to set the temperature at the vertices points for a rectangular domain?

Suppose I have to solve the 2-D heat equation in a rectangular domain using the finite difference method, for the boundary conditions say: $T_1$ is the temperature of the right side of the rectangle, ...
0
votes
1answer
127 views

Three body problem in C++

I am in a begginers programming course and we got a little project. I chose to simulate the three body problem using the Euler method. Even though the system is chaotic there are some special cases ...
3
votes
1answer
97 views

Second order interpolation scheme

On a grid I am having the values of a physical quantity say for example Temperature, at the E,W,N,S and P node all of them being calculated using a second order discretization scheme. I want a second ...
0
votes
0answers
51 views

Gauss-Seidel iteration weighted by change

In general, I can use Gauss-Seidel iteration for finite difference solution of partial differential equations. In my case I am only solving an analog of steady-state heat transfer, so there is no ...
1
vote
1answer
111 views

How to define residual in multigrid approach?

I wish to solve the two-dimensional Navier Stokes equations using multigrid method on a collocated grid using the Predictor-Corrector method mentioned below. But first, let me elaborate on what I had ...
3
votes
1answer
115 views

Discretize Poisson equation with derivative of delta function as source

Consider the PDE \begin{equation} \frac{d^2}{dx^2} g(x) = \frac{d}{dx} \delta(x-x_0), \end{equation} with $x, x_0 \in [0,1]$ and $g(0)=g(1)=0$. What is the best method to discretise the derivative of ...
1
vote
0answers
114 views

Unwanted Oscillation in FDM simulation of elastic wave equation

I am using staggered grid FDTD for solving elastic wave equation. A description of which can be found at (geodynamics.usc.edu/~becker/teaching/557/reading/Virieux1987.pdf). I have generated a ...
3
votes
1answer
125 views

Is this finite difference approach correct?

I am solving incompressible 2D Navier-Stokes equations with zero y-component velocity. The geometry is a simple 2D pipe of a length $L$ and diameter $W$ and there is only two boundary conditions: ...
3
votes
1answer
99 views

Stability Criterion for this Explicit Scheme

I am solving an unsteady flow using the dual-time Navier-Stokes equation in which I write my momentum equation as: $$\frac{\partial u}{\partial \tau} + \frac{\partial u}{\partial t} + \frac{\partial u^...
1
vote
0answers
71 views

CFD implementation in software [closed]

I've been learning CFD theory for 4 months (which includes FEA, FDM AND FVM) and now I want to start running simulations. As a novice to CFD software, I would appreciate some advice on where to start, ...
0
votes
0answers
138 views

how to solve a 2D non-linear Poisson equation?

I am trying to solve the following equation for $P(x,y)$: $$I = P \nabla \cdot \frac{1}{P^2} \nabla{P}$$ where $P$ and $I$ are functions of x and y. $I(x,y)$ and $P(x,y)$ I want to understand ...
1
vote
1answer
24 views

Suitable method for simulation of in-fiber interferometer

I am trying to simulate an optic-fiber sensor (in-fiber interferometer) to study its respond to temperature. The method I am using is finite-difference time-domain (FDTD), and I come out with a large ...
0
votes
0answers
70 views

Solving Lid-driven Cavity on a Collocated grid

I want to solve the two dimensional lid driven cavity flow on a collocated grid. I already have used a staggered grid and validated my results with Ghia (1982). Recently, I came across this paper (...
0
votes
1answer
61 views

Boundary conditions generalized eigenvalue problem

Consider the following eigenvalue problem \begin{equation} \mathcal {L} x(s) = \lambda x(s), \end{equation} where \begin{equation} \mathcal {L} = \alpha \partial^4_s + (s^2-1)\partial^2_s + s \...
2
votes
1answer
123 views

How do I program periodic boundary conditions? [duplicate]

Hi I have a code below that solves non linear coupled PDE's given Dirichlet boundary conditions. However I need to implement periodic boundary conditions. The periodic boundary conditions are ...
1
vote
0answers
35 views

Representing a 3D system in 2D (Electromagnetic modelling)

Ok so I'm a complete beginner in computational modelling (I use analytical methods of physics typically) but I would like to model an anisotropic, aperiodic (but not random) finite array of metallic ...
-1
votes
1answer
83 views

Stability analysis for coupled nonlinear system of partial differential equations

I'm trying to solve a nonlinear partial differential equation \begin{equation} L(u_{xxtt},u_{xx}u_{tt},u_{xt}^2,u_{xt},u_{tt})=0 \end{equation} using finite difference methods. In order to remove the ...
6
votes
1answer
168 views

What does the Von Neumann's stability analysis tell us about non-linear finite difference equations?

I am reading a paper [1] where they solve the following non-linear equation \begin{equation} u_t + u_x + uu_x - u_{xxt} = 0 \end{equation} using finite difference methods. They also analyse the ...
4
votes
1answer
58 views

Boltzmann equation and equilibrium distribution function

The free-streaming term in stationary 1D Boltzmann equation satisfies the equilibrium distribution function, that is: \begin{equation} \text{Fr}\{f\} := v(k)\dfrac{\partial f(x,k)}{\partial x} - \...
1
vote
1answer
71 views

Finite difference scheme for Webster equation

Webster equation is a popular generalization of 1D wave equation used for ducts of variable cross-section $S \equiv S(x)$. Assuming harmonicity in time, the spatial equation for propagation of ...
5
votes
0answers
74 views

The numerical solution of a (very ugly) set of integro-diferential equations

I've been having fun playing around with a simple model for reaction in a co-flow fluidized bed (I'm afraid I'm a chemical engineer, not a computer scientist). Unfortunately, simple physical ...
7
votes
1answer
127 views

Finite difference recursion and higher order

This may be a trivial question, but I've always wondered... For the classical, central finite difference schemes, if I'm interested in determining the second derivative, does applying the first ...
0
votes
0answers
41 views

Using Periodic BC for Taylor Green Vortex Flow Simulation

I want to solve the very simple case of two dimensional Taylor Green Vortex Flow. I am using incompressible Navier Stokes equations and Artificial Compressibility Method as my solver where I introduce ...
0
votes
0answers
50 views

Periodic boundary conditions for solving Navier Stokes Equations on a Staggered Grid

I want to solve two dimensional Navier Stokes equations on a staggered grid for the case of Taylor-Green Vortex. My initial conditions are standard sine and cosine functions. As I am aware, I should ...
0
votes
0answers
125 views

Heat equation from implicit scheme with Neumann B.C

To solve the heat equation from implicit scheme subject to Neumann boundary condition we can write: $$ T_i^{j+1}-T_i^{j}=\alpha (T_{i+1}^{j+1}-2T_{i}^{j+1}+T_{i-1}^{j+1}) $$ $$ \textbf{A} T^{n+1} = T^...
3
votes
1answer
85 views

Stability in discretization of a PDE

Suppose I want to numerically solve for $f(x,k)$ the one-dimensional Boltzmann equation for electrons in steady-state condition, given as: \begin{equation} \left( \dfrac{\hbar k}{m} \right) \dfrac{\...
0
votes
3answers
271 views

Numerical simulation of a reaction-diffusion system on MATLAB with finite difference discretization of spatial derivative

I have a model of a system which consists of diffusing reactants and intermediates. For each variable, $u_i$, the final representative equation looks like the standard reaction-diffusion form: $$\...
1
vote
0answers
51 views

PDE discretization (via finite difference sheme) question

So after posting this question and reading all your comments I would like to make this new question (update). If you consider the three equations presented here: $$\frac{\partial \rho}{\partial t} +\...
1
vote
1answer
56 views

Non-uniform finite difference Adaptive Mesh Refinement

Assuming that the crosses in the figure below are unknowns in a vertex-centered finite difference scheme in an Adaptive Mesh, how can I calculate the double derivate (Laplacian) at the Red x ? The Red ...
4
votes
0answers
73 views

discrete definitions of curl $\nabla \times F$?

I have some data defined in an array (an image) and I need to find the curl of a certain function. Wikipedia has an integral definition of curl that I like, maybe it can be discrete. $$ \nabla \...
1
vote
0answers
83 views

3D Diffusion Equation in Fourier space

I'm solving the 3D Diffusion equation $$u_t=k(u_{xx}+u_{yy}+u_{zz})$$ in MATLAB using Fourier techniques. I assume a 3D Fourier expansion $(e^{-ipx},e^{-imy},e^{-imz})$of the solution. Physical ...
3
votes
1answer
121 views

Implementing Finite Difference Adaptive Mesh Refinement code

For a start I need to implement a 2-D, vertex centered, finite difference scheme, Adaptive mesh refinement serial code. I have the following doubts before starting: Is the input to AMR (say 2-D) ...
3
votes
1answer
99 views

Generating a non-uniform grid

I am interested in generating a 1D non-uniform grid on the interval [0, L] with N points, where a region of width $\sigma$ and ...
3
votes
2answers
148 views

Are the Finite Difference and Finite Volume Methods different after the application of the Gauss Divergence theorem on the FVM?

I have a rudimentary question about the differences between finite difference (FDM) and finite volume methods (FVM). In FDM we concentrate on the nodes (points) in space while in FVM we concentrate ...
1
vote
1answer
135 views

1D uniform flow test case for compressible flow

Are there any one dimensional hyperbolic test cases for a 1D uniform flow? (I need the test case for the purpose of showing the satisfaction of geometric conservation law on a moving mesh).
1
vote
1answer
73 views

Implementation of Neumann boundary condition with method of lines - 1D diffusion/reaction equation

I am solving the monodimensional diffusion/reaction equation by discretization using the well-known method of lines ${\partial c\over\partial t}=D{\partial^2 c\over\partial x^2}+ r\text{ for t&...
0
votes
0answers
46 views

Solving a nonlinear problem with CDF

I'm trying to solve this problem: $\begin{cases} \partial_t E=-k\left([f(\rho)-i.\left[\delta+\frac{1}{2}a\left[\dfrac{\nabla^2_{\bot}}{4}+1-\rho^2\right]\right]]E - 2CP\right)\\ \partial_t P=-\...
6
votes
1answer
178 views

Poisson equation finite-difference with pure Neumann boundary conditions

I'm trying to solve a 1D Poisson equation with pure Neumann boundary conditions. I've found many discussions of this problem, e.g. 1) Poisson equation with Neumann boundary conditions 2) Writing the ...
4
votes
1answer
113 views

How to calculate dispersion relation from a Finite Difference (FD) wave simulation

I have a python code that calculates the solution of the inhomogeneous acoustic wave equation for a 2D medium with any velocity and source configuration. It was implemented using Finite Differences ...
0
votes
1answer
135 views

Finite-difference approximation of the 2nd derivative operator matrix for a staggered grid

I'm working on a computational physics assignment and I was looking for some help as I've got stuck! The question is: Write a function to create the finite-difference approximation of the 2nd ...