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
0
votes
1answer
135 views

How to make a less diffusive code to solve 2D advection equation?

I would like to solve the following differential equation numerically in 2D, $$\frac{\partial z^-}{\partial t}+(\vec{B}\cdot\vec{\nabla})z^-=0,$$ see Wikipedia if you are curious about what the ...
1
vote
0answers
56 views

FDM discretization of equation on the boundary

In order to simulate the following equation using FDM $$u_t(t,x)-u_{xx}(t,x)=0, \quad (t,x) \in (0,1)\times (0,1)$$ $$(u_t(t,x)-u_{x}(t,x))\rvert_{x=0}=0, \quad t \in (0,1)$$ $$(u_t(t,x)+u_{x}(t,x))\...
6
votes
1answer
420 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{\...
5
votes
2answers
490 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. ...
0
votes
1answer
66 views

Error for the finite differences scheme — Advection equation

Consider the advection equation (1D in space) $$ \frac{\partial u}{\partial t} + V\, \frac{\partial u}{\partial x}=0 $$ and we solve it numerically on $[0,1]\times [0,1]\ni (t,x)$ using a forward ...
0
votes
0answers
41 views

Advection-Diffusion by using Lattice Boltzmann Method, Is it practical for engineering applications?

I want to use lattice Boltzmann method to solve advection-diffusion in three-dimensional space. In fact, my problem is related to drug release in human blood vessels and as a results, I'm interested ...
0
votes
1answer
53 views

Simulating Brownian motion in 3-D for first hitting time?

I want to simulate Brownian motion in 3-D for the following conditions: $$p(x=0,y=0,z=0,t=0)=1$$ $$p(x,y,z=c,t)=0$$ where $p$ is the probability of finding molecules in the 3-D environment. I want to ...
2
votes
1answer
171 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 ...
0
votes
1answer
396 views

Analytical solution of 1D advection -diffusion equation

I am looking for the analytical solution of 1-dimensional advection-diffusion equation with Neumann boundary condition at both the inlet and outlet of a cylinder through which the fluid flow occurs. $$...
0
votes
1answer
249 views

Cauchy problem with a change of variables

Consider an advection-diffusion problem $$u_t+au_{xx}+bu_{x}=0,\quad x>0.$$ Now I want to remove the drift and rewrite the problem for the new domain. I use the change of variables $y=x-bt$, and ...
0
votes
1answer
229 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 ...
1
vote
1answer
179 views

How write a integration loop in fortran, leapfrog scheme to solvind PDE (advection)?

I want to resolve numerically this equation using of difference finite method with Leapfrog Scheme $$\frac{\partial{u}}{\partial t}+ v \frac{\partial{u}}{\partial x}= 0 $$ I'm trying to write a code ...
1
vote
0answers
119 views

Inflow and outflow boundary conditions for advection-diffusion equation

I'm trying to solve this advection-diffusion equation (ADE): $$\frac{\partial \phi}{\partial t} + \nabla \cdot (-D \nabla \phi + \mathbf{u} \phi) = 0$$ In fact, this ADE framework is coupled to a ...
5
votes
1answer
180 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,...
2
votes
0answers
43 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 ...
9
votes
3answers
625 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 ...
1
vote
0answers
48 views

Jacobian Elements for Coupled Drift-Diffusion System using Vertex-Centered Finite Volume

I'm trying to solve the fully coupled drift-diffusion system using Newton's Method. Although I eventually plan to potentially use a Jacobian-Free Newton-Krylov approach, this is still something that I ...
2
votes
1answer
92 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 (...
3
votes
0answers
141 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 ...
1
vote
1answer
83 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 ...
16
votes
1answer
851 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-...
1
vote
5answers
390 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 ...
3
votes
1answer
251 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 ...
1
vote
0answers
346 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
831 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 ...
1
vote
1answer
3k views

How to simulate 3D diffusion in python?

I want to simulate a simple 3D diffusion (e.g., an ink released from one side of a vessel) using SciPy. There are some tutorials for one-dimensional diffusion. ...
1
vote
0answers
105 views

Jacobian of the electron and hole drift diffusion equations with respect to potential in semiconductors

These are the discretized drift diffusion equations as taken from the book "Analysis and Simulation of Semiconductor Devices". The electron continuity equation is: $$((\Delta_{j-1}^y+\Delta_j^y)/2\...
1
vote
0answers
78 views

How to formulate Poisson's equation into flux eqution

I have a small 2D system I'm trying to model using a non-linear extension of Darcy's law for fluid flow in porous media. I'm primarily interested in the local flow velocity, not necessarily the ...
1
vote
1answer
135 views

Can this nonlinear advection-diffusion equation be discretized as to only have to solve SPD systems?

Consider a nonlinear advection-diffusion equation of the form $$ \frac{\partial u}{\partial t} = \nabla \cdot (a(u) \nabla b(u) - \vec{c}(u)u) \tag{1} $$ on a rectangular domain with Dirichlet ...
1
vote
0answers
43 views

Solve ODE with two unknown functions

I want to solve a diffusion-convection problem numerically. I start from a PDE of the form $$\partial_t f(x,t) = \partial_x(K(x)\;f(x,t))+\partial_{xx}\;f(x,t)^{m}\;.$$ It is possible to calculate a ...
15
votes
1answer
1k 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. ...
1
vote
3answers
169 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
1answer
224 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
180 views

Finite-difference form of the reaction-term in the solute transport equation

The partial differential equation is a combination of the diffusion plus convective trans­port equations and an adsorption sink. The equation for one-dimensional solute transport model is: $$\frac{\...
1
vote
0answers
80 views

Implementing initial conditions into the solution domain of a 1-D advection-diffusion equation

I have the following PDE. $\frac{\partial c}{\partial t} + v\frac{\partial c}{\partial x} - D\frac{\partial^2 c}{\partial x^2} = 0 \\$. I have discretized it such that i now have $\frac{dC}{dt} = ...
3
votes
3answers
409 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=...
1
vote
0answers
262 views

Finite Difference advection-reaction-diffusion in spherical coordinates, problem with Diffusion

I have a problem with the following equation: $$ V_r\frac{\partial C_A}{\partial r} + \frac{V_\theta}{r}\frac{\partial C_A}{\partial \theta} = \frac{2}{Pe_A} \left[ \frac{\partial ^2 C_A}{\partial r ...
3
votes
1answer
348 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
1answer
96 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 ...
1
vote
1answer
211 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
253 views

Unfolding folded trajectories for Diffusivity calculation - MD

I have just started using dl_poly classic to work in Molecular Dynamics simulations. It produces a HISTORY file which records the trajectory after applying boundary conditions. Now, here I don't ...
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
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^{-...
1
vote
0answers
261 views

Solving the transient advection-diffusion equation analytically

Can the following 1D transient advection diffusion and corresponding initial and boundary conditions: $$ \frac{\partial c}{\partial t} + v\frac{\partial c}{\partial x} - D\frac{\partial^2 c}{\partial ...
4
votes
1answer
154 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 ...
1
vote
1answer
416 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 ...
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 ...
3
votes
1answer
148 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 ...
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 ...
1
vote
2answers
111 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 ...