Questions tagged [advection]

To move in some direction (as a fluid does in a pipe). Often contrasted with diffusion, which is a spreading out without necessarily having any movement of the field as a whole.

Filter by
Sorted by
Tagged with
0 votes
0 answers
60 views

Numerical algorithm to compute second order solution of non-linear advection with source

I would like to solve the following equation, $$\frac{\partial f}{\partial t}+\frac{\partial}{\partial x}\left({\mathcal A}f\right)=S(x,t)$$ where $f$ is a function of $x$ and $t$, ${\mathcal A}$ is a ...
Sayan's user avatar
  • 87
3 votes
1 answer
156 views

Numerical scheme for the level set equation that solves inverse mean curvature flow problems

I am considering the problem of simulating the evolution of an interface given as a curve in 2D (or surface in 3D) that evolves according to a velocity specified at the interface of the form: $$\vec{v}...
B0bby31's user avatar
  • 33
3 votes
0 answers
129 views

Discontinuous Galerkin for transport equation with non-constant advection

This question is mainly an inquiry about the usefulness of Discontinuous Galerkin (DG) for the time-independent transport equation of the form $$\sigma u+\beta\cdot\nabla u =f,\;\;\;\text{on }\Omega\...
UserA's user avatar
  • 131
2 votes
1 answer
123 views

Numerical solution of an advection equation, $\frac{\partial P}{\partial t}+\frac{\partial}{\partial x}\left(P^{5/3}\right)=0$, with finite volume

I was trying to solve the following equation numerically, $$\frac{\partial P}{\partial t}+\frac{\partial}{\partial x}\left(P^{5/3}\right)=0$$ I adopted the Godunov approach for discretising the ...
Sayan's user avatar
  • 87
0 votes
0 answers
108 views

Solving compressible euler equations in non-conservative form

I am trying to solve the following compressible 1D system of equations in two non-conservative form PDEs for $\rho, Y$ and one ODE for $v$ \begin{align} \rho_t+(v+Q)\rho_x &= -\rho q(Y,T,\rho)-...
TMW's user avatar
  • 11
1 vote
1 answer
69 views

blown up solution for linear advection in upwind method with finite difference

I am going to solve this advection equation regarding the flow simulation of an energy tower \begin{equation} Y_t+ v(t) Y_x =0 \end{equation} with the following boundary conditions which depend on ...
TMW's user avatar
  • 11
2 votes
3 answers
139 views

Should reaction be taken into account in the CFL condition when solving advection-diffusion-reaction equations numerically?

I'm dealing with the numerical resolution of advection-diffusion-reaction equations. I've encountered references on CFL conditions for conservation laws as well as advection-diffusion equations. I'm ...
Max_89's user avatar
  • 61
4 votes
3 answers
506 views

Why not use the convolution theorem for explicit timestepping?

Consider the advection equation \begin{equation} \frac{\partial C}{\partial t} + u\frac{\partial C}{\partial x} + v\frac{\partial C}{\partial y} = 0 \end{equation} I want to do a forward time, center ...
nalzok's user avatar
  • 141
0 votes
1 answer
105 views

WENO scheme on the advection of a fluid in a compressible porous media

I am working on reactive transport and I need to solve this advection equation: \begin{align} \frac{\partial (\phi C)}{\partial t} = - \nabla \cdot \big(\vec{q}(\phi) C\big) \end{align} with $\phi$ ...
Iddingsite's user avatar
1 vote
1 answer
90 views

Computing Jacobian in WENO scheme for advection in a porous media

I am trying to implement an advection equation for a coupled system of a two-phase flow in a porous media using a WENO scheme [1]. My equation is of the form: \begin{align} \frac{\partial (\phi(x,t) C(...
Iddingsite's user avatar
2 votes
2 answers
482 views

WENO Scheme for 1D linear advection equation

I have been stuck for a while now on a WENO scheme implementation and I have a few questions concerning the implementation, but also the theory behind it. For context: I'm currently working on ...
prickly's user avatar
  • 71
1 vote
0 answers
45 views

Semi-lagrangian method for compressible fluid (non divergence free)

I am looking for a semi-Lagrangian method for advection with a non divergence free velocity field. The equation is \begin{align} \frac{\partial C(x,t)}{\partial t} &= - \nabla \cdot (\vec{v}(x,t) ...
Iddingsite's user avatar
1 vote
0 answers
154 views

Solving 1D Advection Equation Using Midpoint-Rule and Finite-Differences

I want to solve the advection equation ($v_0 \in \mathbb R$) $$ \frac{\partial f}{\partial t} + v_0 \frac{\partial f}{\partial x} = 0 $$ using 2nd order Runge Kutta like the midpoint rule for the time ...
xotix's user avatar
  • 241
1 vote
0 answers
87 views

Chemical advection of a fluid in a porous media

I am trying to solve an equation for chemical advection of a fluid in a porous media with this equation: $\begin{align} \frac{\partial (\phi(x,t) C(x,t))}{\partial t} = - \nabla . (\vec{q(\phi, t, x)} ...
Iddingsite's user avatar
3 votes
1 answer
169 views

Stepping over a rapid oscillation in advection

As a model of a more complex problem, I am studying a linear advection equation with a rapidly oscillating velocity $$ \partial_t u + a \cos(\omega t) \partial_x u = 0 $$ with initial condition $u(x,0)...
Endulum's user avatar
  • 725
1 vote
0 answers
103 views

Attempt on 2d Advection with FDM - With Code

I tried to implement the 2d advection problem with a velocity field, that is not constant in space. My problem is, that the "mass" of my shifted density gets "eroded" or just ...
dba's user avatar
  • 295
4 votes
0 answers
83 views

Global reconstruction defined elementwise in a-posteriori error estimator

This question is a follow-up of this previous one. In "Error Control for Discontinuous Galerkin Methods for First Order Hyperbolic Problems" by Georgoulis et al., an error estimator is ...
FEGirl's user avatar
  • 261
2 votes
1 answer
116 views

Discontinuous Galerkin order of convergence on arbirary refined mesh: step-12 deal.ii tutorial

I'm learning DG methods and in order to practice a little bit I'm using the deal.ii library. In particular, I'm looking at step-12, where they solve $$\operatorname{div}(\beta u) = 0$$ $$u = g_D \text{...
FEGirl's user avatar
  • 261
4 votes
1 answer
219 views

Discontinuous Galerkin: confusion about the weak formulation for linear advection equation

In an introduction to Discontinuous galerkin methods, I have some problems in checking the weak formulation. I'm looking at page 16 here The context is the advection reaction equation: $$\operatorname{...
FEGirl's user avatar
  • 261
3 votes
0 answers
173 views

TVD Lax-Wendroff with non-constant velocity

I am dealing with a linear advection equation with a non-constant velocity, where I would like to apply a TVD Lax-Wendroff scheme in 1D. The equation is the following: \begin{equation} \frac{\...
Iddingsite's user avatar
0 votes
0 answers
91 views

Transient advection equation with stabilized FEM

I am interested in solving the transient advection equation $\left\{\begin{array}{ll}\partial_{t} u+\beta \cdot \nabla u=f & \text { in } \Omega, t>0 \\ u=0 & \text { on } \partial \Omega^{-...
balborian's user avatar
  • 601
4 votes
1 answer
110 views

Why do we have to resort to Higher order schemes for solving the 1-D advection equation/ continuity equation?

\begin{equation} \begin{aligned} \frac{\partial N}{\partial t} &+ \frac{\partial J}{\partial r} = 0, \\ \frac{\partial N}{\partial t} &+ \frac{\partial }{\partial r}(N \upsilon ...
Ronnie1993's user avatar
1 vote
0 answers
94 views

Comparison between stability and accuracy of various Finite Difference schemes

I`m Analyzing the 1D convection equation (PDE) for stability, consistency, and accuracy. I know Both upwind schemes (explicit and implicit) show better stability with a higher number of waves for ...
Abdelrahman Mabrouk's user avatar
1 vote
0 answers
57 views

Stability plot of upward difference implicit time

I am analyzing the stability of 1D convection (advection) equation as shown in the picture. When I derive the equations as shown I want to get rid of the complex number. I`m asking if those stability ...
Abdelrahman Mabrouk's user avatar
1 vote
0 answers
130 views

Integrating a wavelike equation with absorbing boundary conditions

I am trying to numerically solve the following equation: $\frac{\partial^{2} \phi}{\partial t^{2}}-\frac{\partial^{2} \phi}{\partial x^{2}}+V(x) \phi(x, t)=0$ On some domain, with: $\phi(x, 0) = I(x)$ ...
Joel's user avatar
  • 11
-1 votes
1 answer
186 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) = \...
Winabryr's user avatar
0 votes
1 answer
282 views

Why this error occurs in my code for Lax Wendroff?

I want to implement the Lax Wendroff method for a non linear advection equation which is $$\frac{u_{i}^{n+1}-u_{i}^{n}}{t} + \frac{f(u_{i+1}^{n})-f(u_{i-1}^{n}) }{2h} -\frac{t}{2h} \left( F_{i+1/2}^{n}...
user avatar
1 vote
1 answer
554 views

What is wrong in the code for this upwind method?

I want to implement the upwind method in following advection equation problem : $$ u_{t}+2 u_{x} =0 ,$$ for $0\leq t \leq 1,$ $0\leq x \leq 1 $ $$ u(0,x) = u_{0}(x) = \begin{cases} 10^4 (0.1-...
user avatar
1 vote
1 answer
156 views

Finite Difference for Advection Equation With Source

I'm trying to find a convergent finite difference scheme for the PDE \begin{equation} \begin{split} u_t + (x-1) u_x &= (x-1)u, \hspace{.5cm} x \in [0,1] \\ u(x,0) &= 1 \\ u(1,t) &= 1. \\ \...
Mike D's user avatar
  • 141
0 votes
0 answers
171 views

discretizing advection equation with variable wave speed + stability

I currently have a code that solves $u_t+ cu_x=0$ with periodic boundary conditions, and constant $c$ (using an upwind method). I'm wondering how I would alter this code to solve something of the form ...
lrs417's user avatar
  • 11
0 votes
0 answers
81 views

numerical solution to pde on an ellipse

Looking for advice on discretization (preferably finite difference) schemes for pdes on curves in general, but in this case it is an ellipse (so given by $(a\cos(r), b\sin(r)$). The problem is the ...
lrs417's user avatar
  • 11
2 votes
1 answer
283 views

Order of Accuracy Measurements on 1D Advection Methods

I am trying to learn about basics of computational fluid dynamics, at the moment on the simple example of linear advection in 1D. I am am currently testing the theoretical predictions of the order of ...
mivkov's user avatar
  • 203
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 ...
Natasha's user avatar
  • 491
2 votes
1 answer
311 views

Upwind finite difference: Matrix Implementation

I want to implement the upwind finite difference scheme for the 1D linear advection equation using a finite difference matrix in python: $$ A =\begin{pmatrix} 1-a\cfrac{\Delta t}{\Delta x} & 0 &...
ABCCHEM's user avatar
  • 21
0 votes
1 answer
2k views

Implementing structured grid boundary conditions using NumPy arrays?

I am making a toy code in Python to solve the advection equation $$u_t + cu_x = 0$$ with, for example, periodic boundary conditions. Background information The numerical grid is specified like this: ...
EssentialAnonymity's user avatar
0 votes
0 answers
101 views

Is semi-Lagrangian 1D advection identical to upwind Euler, when $|u|<\Delta x/\Delta t$?

This looked true to me, I worked through the algebra for 1D and confirmed it. But no one seems to mention it, so maybe I'm missing something... I'm using Bridson's SIGGRAPH 2007 course notes. [5MB ...
hyperpallium's user avatar
1 vote
1 answer
421 views

How to calculate the analytical solution of linear advection equation with Dirichlet's boundary conditions?

I am trying to find the solution of linear advection equation of the form: $\frac {\partial c}{\partial t}+u\frac {\partial c}{\partial x}=0$ $c(x,0)=0$ $c(0,t)=\{c_0 \ \text{for}\ t \leq t_1 \text{...
Adnan Hayat Khan's user avatar
2 votes
1 answer
199 views

Why the numerical solution of advection-dominant problem is challenging

In many CFD text books, usually there is a dedicated chapter for advection term discretization. Why discretization of such term in advection-dominated problems and near the discontinuities is ...
Rik's user avatar
  • 21
2 votes
0 answers
81 views

Efects from the boundary in advection equation [duplicate]

I am implementing the advection equation $u_x+(1/c)u_t=0$ following a Crank-Nicholson finite difference scheme. The equation for this is \begin{eqnarray*} -\frac{\gamma}{4} w_{n-3 j+1} + w_{n-2 j+1} ...
Herman Jaramillo's user avatar
1 vote
0 answers
506 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 ...
GGG's user avatar
  • 173
2 votes
4 answers
1k views

Finite volume piecewise linear 2D advection develops instability

I'm developing a finite volume solver for the simple twodimensional advection equation with constant velocities $u, v$ and constant mesh spaces $\Delta x$: $$ \frac{\partial \rho}{\partial t} + u \...
mivkov's user avatar
  • 203
1 vote
1 answer
594 views

Advection equation in 2D using finite differences - the scheme works, but the pulse loses "energy"

I am trying to solve the following equation $ \partial_t g(x,y,t) = - v\left(\partial_x + \partial_y\right) g(x,y,t)$ using finite differences (here $v>0$). The equation is also solvable ...
Michele Cotrufo's user avatar
1 vote
1 answer
810 views

Is there a general analytic solution to 1D advection of velocity, $u_t=-uu_x$?

This is to help me relate continuous and discrete, predict what my scheme should be doing, and move toward using the method of manufactured solutions. There's a solution for constant velocity $c$ ...
hyperpallium's user avatar
7 votes
1 answer
341 views

Solving the Advection Equation with Forcing using the Discontinuous Galerkin Method

I've been learning about the Discontinous Galkerin Method by reading the book by Hesthaven and Warburton and have ran into a problem with the advection equation with forcing $u_t + u_x = g(x,t)$ ...
user3209427's user avatar
5 votes
4 answers
3k views

Advection equation with finite difference: importance of forward, backward or centered difference formula for the first derivative

I am a newbie in finite difference methods, so I apologize in advance if the question is trivial. I am trying to solve the advenction equation, i.e. $\frac{\partial \phi(x,t)}{\partial t} + v \frac{\...
Michele Cotrufo's user avatar
1 vote
0 answers
76 views

Extrapolating to non-fluid cells (for Shallow Water Equations), for a shore/beach?

The water height $h$ and 2d velocity field $(u,w)$ are "extrapolated to non-fluid-cells, i.e., setting $h$ equal to the value in the nearest fluid cell." [Bridson] I'm using finite differences. ...
hyperpallium's user avatar
2 votes
1 answer
294 views

Finite difference method not working for advection PDE with negative coefficient

I'm trying to solve a very simple advection PDE $\frac{\partial u}{\partial t}+c\frac{\partial u}{\partial x}=0$ where $c<0$. I have been able to implement a simple Modelica code to solve the ...
Foad's user avatar
  • 147
1 vote
0 answers
337 views

Crank-Nicolson scheme in space for advection equation

Consider the equation $$\frac{\partial}{\partial t}v(t,x)=\frac{\partial}{\partial x}v(t,x)$$, for $t,x\in\mathbb{R}$. I'd like to solve this equation forward in space and backward in time, ...
Jason Born's user avatar
0 votes
3 answers
3k views

Neumann boundary conditions for the upwind scheme applied to the advection equation (Python)

I'm trying to solve the linear advection equation $$u_{t} = cu_{x}, \\ x \in [x_{0}, x_{e}], \quad t \in (0, T], \quad c \in \mathbb{R} \\ u(x,0) = f(x)$$ Note that for $c > 0$, the solution is a ...
Matthew Cassell's user avatar
1 vote
0 answers
310 views

Why can I not solve the negative advection equation (backwards in time)?

Suppose we have the negative, inhomogeneous advection equation: $$\left(\frac{\partial}{\partial x}-\frac{1}{c}\frac{\partial}{\partial t}\right)v(t,x)=u(t,x)\qquad(t\in\mathbb{R}_{+},x\in\mathbb{R})$$...
Jason Born's user avatar