Questions tagged [advection-diffusion]
Questions related to solving the advection-diffusion equation using numerical methods, including derivation and implementation of boundary conditions.
113
questions
1
vote
0
answers
33
views
Implementation of operator splitting method for Wigner equation
I am dealing with the integro-differential equation for Wigner function,
$$\frac{\partial f}{\partial t}+p\frac{\partial f}{\partial x}+\\+\frac{1}{\chi}\left\{\int_{-\pi}^{+\pi}dy\,\int_{-\infty}^{+\...
1
vote
2
answers
180
views
Modeling contamination diffusion in a draining container, part 2
Part 1, but I'll repeat here. This time we'll move the top boundary.
I have a container of water with initial volume $V_0$ and height $L$, open at the top which receives a constant mass flux $\phi$. A ...
2
votes
1
answer
137
views
Modeling contamination diffusion in a draining container
I asked this on the Physics site, but it fits much better here, and I now can ask a more specific question.
For the scope of the problem, I have a 250-mL bottle filled with pure water and a sampling ...
3
votes
1
answer
191
views
First derivative central differences with reflecting boundary conditions
I have the following problem in 1-D:
\begin{equation}
\partial_t u(t,x) = v(x)\partial_x u(t,x) + \kappa(x) \partial_{xx} u(t,x),\,x\in\Omega;\quad \partial_{\nu}u(t,x) = 0, \,x\in\partial\Omega.
\end{...
3
votes
2
answers
167
views
Solving systems of advection-diffusion-reaction equations with finite element methods
I have been doing a lot of self-study on numerically solving PDEs so that I can solve system of linear and nonlinear Advection-Diffusion-Reaction (ADR) systems on complex meshes.
I have been watching ...
0
votes
0
answers
56
views
Finite volume method using Chebyshev polynomials
I want to solve the following set of coupled advection-diffusion equations:
$$
\frac{\partial f}{\partial t}=\nabla\cdot(\kappa\nabla f)+\nabla\cdot(\boldsymbol{u}f)+s_f(g),
$$
$$
\frac{\partial g}{\...
3
votes
2
answers
173
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 +\...
0
votes
1
answer
103
views
Choice of grid generation for FDM discretisation methods
I'm currently revisiting some FDM schemes for convection-diffusion equations in 1D, 2D and 3D and getting up to speed with the industry-standard methods again. The application is derivatives pricing, ...
1
vote
0
answers
151
views
Solving PDE on a non-uniform grid with Crank-Nicolson scheme
I am solving a 1D diffusion-type equation with the finite-difference Crank-Nicolson (CN) scheme, and I need to densify the spatial grid around the central point. One could change the spatial variable ...
1
vote
0
answers
206
views
Closed (Robin) boundaries in advection-diffusion equation with FDM
I am solving the equation
$$
\frac{\partial \phi}{\partial t} = \frac{\partial}{\partial x} \left( D \frac{\partial \phi}{\partial x} + v\phi \right)
$$
using finite differences. I want to include ...
2
votes
1
answer
138
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\...
2
votes
1
answer
586
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 ...
3
votes
1
answer
138
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:
...
2
votes
0
answers
121
views
Advection diffusion equation using Crank-Nicolson with total flux and Diriclet BCs
I am trying to model the 1D advection-diffusion equation:
$${\partial c \over \partial t} = D_c{\partial^2 c \over \partial x^2} -u{\partial c \over \partial x}.$$
With Robin boundary conditions that ...
2
votes
0
answers
113
views
Solute transport around a solid obstacle
I am a newbie in CFD and single/multiphase flow and transport in general. As part of my quest to learn, I am trying to model solute transport around a solid object in the center of a 2D domain. The ...
3
votes
1
answer
82
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 ...
0
votes
1
answer
102
views
Manufactured solution to 2d convection-diffusion with homogeneous Robin boundary conditions
I am looking for a manufactured (or analytical if it exists) solution to the 2d boundary-value problem
$$\frac{\partial u}{\partial t} = \mathbf{a} \cdot \nabla u + D \nabla^2 u \quad \quad \mbox{in } ...
2
votes
0
answers
428
views
2d advection-diffusion: cell Péclet number and numerical stability
I am studying the numerical resolution of 2d advection-diffusion problems with finite element methods.
$$\frac{\partial u}{\partial t} + \beta\cdot\nabla u = \nabla\cdot(\nabla u) \, .$$
It is said in ...
2
votes
0
answers
100
views
Does the time-dependent 1D advection-diffusion with point sources have an analytical solution?
I am looking for the analytical solution of 1-dimensional advection-diffusion equation with several point sources, Q, along the axial length of a cylinder through which the fluid flow occurs. Neumann ...
2
votes
2
answers
664
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 ...
1
vote
0
answers
106
views
Why is this Advection-convection model with insulating boundary losing mass?
I am trying to model a 1-d advection-convection numerically, using an upwind scheme. I'm using the following equation to calculate the value of internal cells:
$$C_x^{t+1} = C_x^{t} + D\frac{\Delta t}{...
5
votes
0
answers
311
views
Galerkin Least-Squares stabilization for FEM solution advection (hyperbolic) equations
I am playing with Galerkin Least-Squares stabilization to solve advection diffusion problem in the context of the finite element method. This works very well for steady-state advection-diffusion ...
2
votes
0
answers
32
views
Semi-analytical/empirical modelling of wall boundary conditions in advection-diffusion-reaction equation with distributed source
Let's suppose I need to numerically solve a 3D steady-state transport equation of the form
$$
\nabla \cdot (\mathbf{u} c) = \nabla \cdot (D \nabla c) - \lambda c + S
$$
where $c$ is the transported ...
2
votes
0
answers
85
views
Linearising Nonlinear Coupled Partial Differential Equations - Alfvénic Diffusion
I am trying to solve the following coupled partial differential equations with a finite difference scheme:
$$\partial_tf+v\partial_zf+\partial_z\frac{1}{W}\partial_zf=0$$
$$\partial_tW+v\partial_zW-\...
0
votes
1
answer
356
views
Implementing Dirichlet BC for the Advection-Diffusion equation using a second-order Upwind Scheme finite difference discretization
i am implementing a Matlab code to solve the following equation numerically :
$$
(\frac{\partial c}{\partial t} =-D_{e} \frac{\partial^2 c}{\partial z^2} +U_{z}\frac{\partial c}{\partial z})
$$
with ...
-1
votes
1
answer
206
views
Numerical solution of the advection equation with Crank–Nicolson finite difference method
I need to implement a numerical scheme for the solution of the one-dimensional advection equation
$$\\\frac{\partial u}{\partial t} + C(x, t) \frac{\partial u}{\partial x} = 0 \\\\$$
$$ \\ C(x,t) = \...
2
votes
1
answer
243
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$...
2
votes
1
answer
904
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) = ...
1
vote
0
answers
50
views
Effect of reducing flux consistency order at boundary on convergence order
Consider the 1D nonstationary convection-diffusion PDE
$$
\begin{alignat}{2}
\partial_t u &= -a \partial_x u + D \partial_{xx}u, &\qquad x \in (0,1), t \in (0,T), \\
f(t) &= \left.\left( a ...
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 ...
1
vote
0
answers
48
views
Comparison of convection time - theoretical value vs computed
This is a follow up to my previous post here,
I'm solving for convection in 1D
$$\frac{\partial C}{\partial t} = - v\frac{\partial C}{\partial x}$$
The discretization of the above equation is ...
0
votes
1
answer
197
views
Question on comparing the accuracy of numerical schemes
This is a follow up to my previous post here
I'm solving the following 1D transport equation .
$$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2}-v\frac{\partial C}{\partial x}$$...
1
vote
1
answer
285
views
Crank-Nicholson for diffusion-advection vs diffusion equation
Let's consider the following 1D diffusion equation:
$\frac{\partial u}{\partial t} = xk \frac{\partial}{\partial x}(\frac{1}{x}\frac{\partial u}{\partial x})$
where we assume that the diffusion ...
1
vote
1
answer
198
views
Simulating advection - diffusion problem in a network of 1D pipe
I'm interested in solving the following advection-diffusion system in a 1D network of pipes.
$$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\partial C}{\partial x}$$
...
2
votes
1
answer
1k
views
Implementing Robin Boundary condition (finite difference)
I'm interested in applying Robin boundary condition to a convection-diffusion problem in 1D.
In the following system,
$$\frac{\partial C}{\partial t} = D\frac{\partial ^2 C}{\partial x^2} - v\frac{\...
1
vote
1
answer
1k
views
Imposing periodic boundary condition for linear advection equation - Node problem
I've spent the whole day trying to figure out what is the correct way to impose (and implement) periodic boundary conditions $u(0,t)=u(1,t)$ for all $t>0$ for the simple advection equation $u_t + v ...
2
votes
1
answer
580
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} + ...
2
votes
1
answer
400
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(...
1
vote
0
answers
38
views
Finite difference/element method : time step and spatial resolution close to a finite singularity
I'm using the finite element method (FEM), but my question is quite a global question. It's related to this question but it is not the same.
Let's assume we have this equation : $$\partial_t c - u\...
1
vote
0
answers
179
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))\...
1
vote
1
answer
213
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 ...
1
vote
3
answers
1k
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 ...
2
votes
1
answer
743
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
1
answer
154
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 ...
0
votes
1
answer
2k
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.
$$...
3
votes
1
answer
2k
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
0
answers
522
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 ...
1
vote
1
answer
663
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 ...
5
votes
1
answer
714
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
0
answers
66
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 ...