The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [advection-diffusion]

Questions related to solving the advection-diffusion equation using numerical methods, including derivation and implementation of boundary conditions.

Filter by
Sorted by
Tagged with
16
votes
1answer
2k views

BDF vs implicit Runge Kutta time stepping

Are there any reasons for why one should choose high order implicit Runge Kutta (IMRK) over BDF time stepping? BDF seems much easier to me as $q$ stage IMRK needs $q$ linear solves per time step. ...
16
votes
1answer
860 views

How do you debug numerical code, what could be source of this oscillatory error?

Quiet a lot of insight can be gained form experience, I was just wondering if anybody has seen something similar to this before. The plot shows the initial condition (green) for the advection-...
13
votes
3answers
766 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 finite-...
9
votes
3answers
637 views

Methods of solving non-linear advection-diffusion systems beyond Newton-Raphson?

I'm working on a project where I have two adv-diff coupled domains through their respective source terms (one domain adds mass, the other subtracts mass). For brevity, I'm modeling them in steady ...
7
votes
1answer
798 views

How to avoid negative values of numerical solution of transport equation using FEM scheme?

The transport equation is actually an advection-diffussion-reaction equation, which has the form as $$\frac{\partial C}{\partial t} + v_1 \frac{\partial C}{\partial x} + v_2 \frac{\partial C}{\...
7
votes
1answer
701 views

Are we free to choose the position of ghost cells on a non-uniform finite-volume mesh?

Following Hundsdorfer approach the finite volume discretisation of the advection-diffusion equation (conservative form) on non-uniform cell centered grid can be written as, $$ w_j^{\prime} = \frac{w_{...
6
votes
2answers
806 views

What are some of the differences between using a Lagrangian and Eulerian framework to quantify passive scalar dynamics?

On one hand, one may seed the domain with particles and track their trajectories in the Lagrangian sense by implementing a Lagrangian particle tracking model. On the other hand, one may use the ...
6
votes
1answer
428 views

Inverse advection-diffusion problem, solving for a drift coefficient with experimental data?

I am investigating a physical process where I believe the 1-D advection-diffusion equation: \begin{equation} \frac{\partial u}{\partial t} = -\frac{\partial}{\partial x}[\mu(x,t) u(x,t)] + \frac{\...
6
votes
2answers
1k views

Finite-volume method: can Dirichlet boundary conditions be applied to the integral form?

I would like to apply Dirichlet conditions to the advection-diffusion equation using the finite-volume method. This answer, "How should boundary conditions be applied when using finite-volume method?" ...
6
votes
2answers
1k 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 ...
5
votes
2answers
2k views

Does the finite element method impose any restrictions on the Peclet number for numerical stability?

Background on finite volume method When discretising the flux with a central difference stencil of the the advection-diffusion equation restriction $\frac{ah}{d} < 2$ must be observed for the ...
5
votes
2answers
492 views

Solving PDE with spatial and temporal derivatives on left hand side

I wish to solve an equation of the form, $$ \frac{\partial}{\partial t} \left( \frac{\partial \phi}{\partial x} \right) = -\frac{\partial}{\partial x}(\mathcal{F}) $$ for the variable $\phi$ (e.g. ...
5
votes
1answer
377 views

Implementing an adaptive discretisation (upwind/central hybrid) for the advection-diffusion equation on a non-uniform mesh

I am following the approach of Hundsdorfer from Numerical solution of time-dependent advection-diffusion-reaction equations in which they introduce adaptive upwinding. The method can adapt from pure ...
5
votes
1answer
202 views

Finite Differencing schemes for Convection-Diffusion equation

I'm using the Convection(/advection)-Diffusion(-Reaction) equation to calculate the temperature over time in different hydraulic parts like a pipe or a heat exchanger. The flow/convection is always 1D,...
5
votes
0answers
155 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 ...
4
votes
1answer
156 views

What is the origin of the preasymptotic convergence behaviour in FEM?

When you have fine-scale features (e.g. boundary layers) in the solution, its FEM approximation on coarse meshes converge at strange apparent rates. Looking at Cea's lemma, is this behaviour because ...
4
votes
3answers
3k 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 x}\...
4
votes
1answer
518 views

My algorithm for the heat equation is unstable

I have implemented the 2D heat equation with what I thought was the Crank-Nicolson algorithm in the following way: ...
4
votes
1answer
202 views

How can exponential fitting be used with the finite element method?

Restricted to one dimensional problem, is it possible to dynamically adapt the finite element method (FEM) discretisation based on the local value of the Péclet number ($P_e$) for advection-diffusion ...
4
votes
1answer
210 views

The most efficient way to solve diffusion equation with concentrated initial condition

I want to solve the diffusion equation, i.e. $$ \dot{f} - f'' = 0 $$ with a boundary condition $f(0) = f(1) = 0$ and with an initial condition that $f$ is a boxcar function concentrated over some ...
3
votes
2answers
1k views

Does the time-dependent advection-diffusion equation have an analytical solution?

The advection-diffusion problem, where $0<x<1$, $$u_t = (-au + du_x)_x$$ with Dirichlet boundary conditions, $ u(0)=1,~u(1)=0 $ , has the steady-state solution, $$ u(x) = \frac{e^{\lambda} - ...
3
votes
2answers
529 views

In what regime do the continuous and discontinuous Galerkin method become unstable for advection-diffusion systems?

I know that the finite volume method (based around a central different stencil) is unstable for advection dominated advection-diffusion problems. This leads to different adaptive schemes to can be ...
3
votes
2answers
869 views

Slow convergence of Newton's method for finite elements

The application is a simple non-linear advection diffusion problem (steady state) using DGFEM. My error at each iteration is given by $$ e_{n+1} = ||\mathbf{J}^{-1}(\mathbf{u}_{n})\mathbf{F}(\mathbf{u}...
3
votes
1answer
150 views

stabilizing advection-diffusion with multi-grid?

If one chooses to discetize the advection-diffusion (AD) equation using the standard Galerkin finite element method, stability issues may arise in cases of high Peclet number (i.e., high advection to ...
3
votes
1answer
309 views

Convergence of interior penalty DG methods

I’m currently having some issues with my routine for the linear advection-diffusion problem. The model problem is as follows: $$ \nabla\cdot(\mathbf{s} u) - \nabla\cdot(\kappa\nabla u) = f, \;\;\;\...
3
votes
3answers
416 views

Numerical approximation for a known exact solution of advection-dispersion equation

My goal is to create a numerical solution of 1D-solute transport (Convective-dispersion equation, CDE) to match it's analytical solution based on experimental data. The CDE can be written as (where, C=...
3
votes
2answers
284 views

Numerical Solution of the Advection Dispersion equation

I am facing a simple (at first glance) problem. I need to implement a numerical scheme for the solution of the first order wave propagation equation with chromatic dispersion included. My original ...
3
votes
1answer
97 views

Enforcing bounds and equality constraints for convex optimization

In this JCP paper, the authors simultaneously enforce the discrete maximum principles and element-wise mass balance for advection-diffusion equations through convex optimization. The least-squares ...
3
votes
1answer
254 views

Should particles in Smoothed Particle Hydrodynamics (SPH) always move during a simulation?

Or can they just be used as an interpolation points and use some other "transported property" which are just evolved and propagated from boundary conditions like for eg. heat conduction through a ...
3
votes
1answer
360 views

How numerical diffusion is related to advection term?

I have crude idea that numerical diffusion arises while using upwind scheme and causes solution to deviate from its original one. But I am unable to understand how numerical diffusion phenomenon is (...
3
votes
0answers
149 views

Finite Element Stabilization for Drift-Diffusion/Advection-Diffusion Equations

I've tried my best to look through the relevant suggested similar questions when posting this, and hopefully this contains enough new material to not be considered a duplicate. I'm currently trying ...
3
votes
0answers
1k views

CFL Condition and Convection Diffusion Equation in 2D

I am solving the convection-diffusion equation in 2D using Finite Differences with the $\theta$ scheme. The velocity of the fluid and the diffusion coefficient is low in my case (in the range of $10^{-...
2
votes
2answers
973 views

How to solve an advection-diffusion equation

I need to solve an advection-diffusion equation of the form: $\frac{∂u}{∂t}=\frac{1}{x}\frac{∂u}{∂x}+\frac{∂^2 u}{∂x^2 } $ with MATLAB. Could you guide me, please? Is the Crank-Nicolson method ...
2
votes
1answer
884 views

CFL condition in Stokes equation

Does the CFL condition play any role in a pure Stokes flow, i.e. convective term is neglibile, or vanishing? If not, what is the "equivalent" condition for stability? I have read something about the ...
2
votes
1answer
174 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 ...
2
votes
1answer
64 views

1-D boundary value problem: How implement mixed boundary conditions using a FD method?

I have been given a convection-diffusion ODE modeling the steady state temperature of a pipe (through which flows a fluid) as $$-\frac{d}{dz}\left(\kappa \frac{dT}{dz} \right)+v\rho C\frac{dT}{dz}=Q(...
2
votes
1answer
199 views

Analytical Solution of Transport Equation

I'm looking at the analytical solution of the convection-diffusion equation $$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$ with initial ...
2
votes
1answer
105 views

Closed boundary conditions in finite difference method for diffusive-advective equation

I am implementing a finite difference method in solving the diffusive-advective equation: $$ u_t + v \cdot u_x = D\cdot u_{xx} $$ (v, D are constants). Planning to use the operator splitting method (...
2
votes
1answer
119 views

Trignometric/Fourier spectral collocation with zero Dirichlet BC in 2D

I am concerned with numerical solution to the following problem on $[0,1]\times[0,1]$. $\dfrac{\partial\theta}{\partial t}+u(x,t).\nabla \theta(x,t)=\kappa \nabla^2\theta(t,x)$ with Dirichlet ...
2
votes
1answer
342 views

How to write this non-linear PDE with the finite volume method?

I wish to solve a coupled system of non-linear equation of this form, $$ u_t = -(\mathcal{F})_x + f(x,u,w) \\ w_t = \mathcal{F} + g(x,u,w) $$ by stepping the equations forward in time. The first ...
2
votes
0answers
44 views

Finite difference Neumann boundary conditions: uneven weighting of edge nodes?

Originally asked this on math.stackexchange, but I figure it's also appropriate here. I'm reading through some finite difference code for a diffusion equation and came across something odd for the ...
2
votes
0answers
377 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$ ...
1
vote
3answers
173 views

When is it safe to ignore the diffusion term in an advection-diffusion equation?

Given the one dimensional equation: $\epsilon\frac{\partial^2u}{\partial x^2} +\frac{\partial u}{\partial x} = 0 $ with $0\le\epsilon \ll1$ with boundary conditions $u(0) = 0$ and $u(1) = 2$, we ...
1
vote
5answers
425 views

Don't we care about the numerical diffusion in the diffusion term?

In the context of the solution of advection-diffusion equations by finite volume method, many numerical schemes, papers and book chapters are dedicated to address the numerical diffusion and/or ...
1
vote
1answer
228 views

How can I numericaly solve a convection-diffusion equation with a large diffusion term?

I want to numerically solve the advection-diffusion equation: \begin{equation} u_t(x,t) + cu_x(x,t) = v u_{xx}(x,t) \end{equation} for $x \in [0,1]$ and $t \geq 0$ subject to the boundary conditions ...
1
vote
1answer
212 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
3answers
549 views

Solve diffusion equation with linear source term

I would like to solve numerically the diffusion equation, where the sink term depends linearly on the field, and there is field-independent sink: $\frac{\partial^2 u(x)}{\partial x^2} =f(x)u(x) - \...
1
vote
1answer
87 views

finite differences on a slanted grid — advection diffusion equation

I used pretty much all my expertise with finite differences to solve an advection-diffusion equation with space-dependent coefficient with a grid in the $x$,$z$ domain with regular spacings. Something ...
1
vote
2answers
112 views

Relation between Time dependent problem and advection diffusion

Is there a relation between say the heat equation $u_t -\Delta u = f.$ and advection-diffusion equation $-\Delta u + c \cdot \nabla u = f$? I have heard several people use this argument in many talks ...
1
vote
1answer
307 views

Solve steady state reaction-diffusion/Helmholtz equation numerically

I am solving a problem of the form: $\dfrac{\partial u(x,y,t)}{\partial t} = \nabla^2 u(x,y,t) - f(x,y,t)u(x,y,t) - \kappa(x,y,t)$ At the moment, I am solving this at each time step by assuming a ...