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
20 votes
1 answer
4k 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. ...
user107904's user avatar
17 votes
1 answer
1k 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-...
boyfarrell's user avatar
  • 5,369
13 votes
3 answers
1k 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-...
boyfarrell's user avatar
  • 5,369
10 votes
3 answers
932 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 ...
cbcoutinho's user avatar
8 votes
1 answer
1k 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_{...
boyfarrell's user avatar
  • 5,369
7 votes
2 answers
1k 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 ...
Isopycnal Oscillation's user avatar
7 votes
1 answer
1k 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}{\...
winterfly's user avatar
6 votes
1 answer
596 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{\...
Loonuh's user avatar
  • 253
6 votes
2 answers
2k 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?" ...
boyfarrell's user avatar
  • 5,369
6 votes
2 answers
4k 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 ...
mathdummy's user avatar
  • 323
5 votes
2 answers
3k 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 ...
boyfarrell's user avatar
  • 5,369
5 votes
2 answers
603 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. ...
boyfarrell's user avatar
  • 5,369
5 votes
3 answers
4k 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}\...
tom's user avatar
  • 231
5 votes
1 answer
455 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 ...
boyfarrell's user avatar
  • 5,369
5 votes
1 answer
652 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,...
JE_Muc's user avatar
  • 255
5 votes
0 answers
2k 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^{-...
Paulinchen2's user avatar
5 votes
0 answers
181 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 ...
mathdummy's user avatar
  • 323
4 votes
1 answer
168 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 ...
gokturk's user avatar
  • 73
4 votes
1 answer
3k views

Finite difference methods in cylindrical and spherical co-ordinate systems

I am quite familiar with finite difference schemes in cartesian coordinates. The key point here is that every point in the cartesian grid is treated equally as the spacing between consecutive points ...
Babaji's user avatar
  • 195
4 votes
3 answers
797 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 (...
Ather Cheema's user avatar
4 votes
1 answer
621 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: ...
Daniel's user avatar
  • 85
4 votes
1 answer
271 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 ...
boyfarrell's user avatar
  • 5,369
4 votes
1 answer
325 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 ...
Echows's user avatar
  • 207
3 votes
2 answers
2k 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} - ...
boyfarrell's user avatar
  • 5,369
3 votes
2 answers
679 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 ...
boyfarrell's user avatar
  • 5,369
3 votes
2 answers
1k 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}...
Justin Dong's user avatar
3 votes
1 answer
203 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 ...
Justin's user avatar
  • 781
3 votes
1 answer
401 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, \;\;\;\...
Justin Dong's user avatar
3 votes
3 answers
662 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=...
ToNoY's user avatar
  • 143
3 votes
2 answers
148 views

Non-conservative advective term in a finite volume scheme

I am interested in solving this set of nonlinear couples advection-diffusion equations using a finite volume scheme: $$ \frac{\partial f(x,y)}{\partial t}=-(\boldsymbol{u}+\nabla\eta)\cdot\nabla f +\...
BitterDecoction's user avatar
3 votes
2 answers
401 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 ...
kenny's user avatar
  • 31
3 votes
1 answer
327 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 ...
vkumar's user avatar
  • 213
3 votes
1 answer
132 views

Mineral dissolution and solute transport around a solid

I am trying to simulate solute transport of acid (HCl) and consequent mineral dissolution around a grain (calcite). The governing equation for transport is the advection-diffusion equation, given as: ...
oma11's user avatar
  • 55
3 votes
1 answer
76 views

Instability at the boundary of a finite difference simulation of a hyperbolic PDE

I want to simulate the hyperbolic partial differential equation $$W_{tt} + V W_{tx} + k_E V W_x + k W_t = 0,$$ but I am having trouble finding a discrete analog of this equation which is numerically ...
kevinkayaks's user avatar
3 votes
1 answer
148 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 ...
Justin's user avatar
  • 781
3 votes
0 answers
235 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 ...
Chronum's user avatar
  • 311
2 votes
2 answers
1k 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 ...
Niloo's user avatar
  • 21
2 votes
3 answers
409 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 ...
balborian's user avatar
  • 601
2 votes
1 answer
464 views

Why is my Runge-Kutta 4 solution to the 1-D advection equation decaying so quickly?

I am trying to numerically solve the advection equation $y_t + y_x = 0$ using a the "classical" Runge-Kutta 4 explicit timestepping method, along with a left-hand finite difference ...
bosco98's user avatar
  • 23
2 votes
2 answers
583 views

How to implement point source or volume source in finite element implementations

I'm trying to do a simple implementation to study the advection-diffusion-reaction dynamics in a straight pipe. I have points positioned along the length of the pipe (blue dots in the image above). I ...
Natasha's user avatar
  • 461
2 votes
1 answer
1k views

Impose Neumann Boundary Condition in advection-diffusion equation 1D

when solving the advection equation in 1D that is: $$ \frac{\partial u}{\partial t} + c\frac{\partial u}{\partial x} = 0 $$ with $ u'(t,0) = 0$ and $u(t,L) = 0$ , $u(0,x) = u_{0} $ one numerical ...
tnt235711's user avatar
  • 253
2 votes
1 answer
2k 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 ...
nabber's user avatar
  • 45
2 votes
1 answer
265 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 ...
user avatar
2 votes
1 answer
127 views

Solving a set of mixed conservative/non-conservative equations with the finite volume method

I want to solve this set of 2D advection-diffusion equations of this form in spherical coordinates: $$ \frac{\partial f}{\partial t}=-\mathbf{u}\cdot\nabla f+\eta\nabla^2f+\eta_1(\mathbf{e}_1\cdot\...
BitterDecoction's user avatar
2 votes
1 answer
235 views

Finite element (1D) for steady state non-linear problem

I need to solve with linear finite elements the equation $$\frac{\partial }{\partial x}\Bigl(\text{sgn}(x) u \Big) +\frac{\partial}{\partial x} \Bigl[ \sqrt{u} \frac{\partial u}{\partial x} \Bigr] =0$...
Vefhug's user avatar
  • 289
2 votes
1 answer
761 views

Weak formulation for advection diffusion reaction

I need a check on the following exercise about weak formulations and finite elements. Consider the advection diffusion system $$ \begin{cases} -(\mu u')' + \beta u' + \gamma u = f \\ u(a)=0 \\ u(b) = ...
andereBen's user avatar
  • 153
2 votes
1 answer
541 views

Robin Boundary Condition with Implicit Upwind - Finite Difference Method for 2D Convection-Diffusion Equation

I am trying to solve a problem with 2D Convection-Diffusion equation with U = Concentration ($mg/m^{2}$) using Implicit Upwind Finite Difference Method like this $$ \frac{\partial U}{\partial t} + ...
Tan Phan's user avatar
2 votes
1 answer
354 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(...
SimpleProgrammer 's user avatar
2 votes
1 answer
677 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 ...
Natasha's user avatar
  • 461
2 votes
1 answer
435 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 (...
Gabriele's user avatar
  • 173