Skip to main content
Share Your Experience: Take the 2024 Developer Survey
44 votes
Accepted

BDF vs implicit Runge Kutta time stepping

Yes, there aren't too many resources on this for some reason. For a very long time, the standard goto was "just use BDF methods". This mantra was set in stone for few historical reasons: for ...
Chris Rackauckas's user avatar
8 votes
Accepted

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

We have the following problem: $$\frac{\partial u}{\partial t}+v\color{red}{\frac{\partial u}{\partial x}}-\nu\color{blue}{\frac{\partial^2u}{\partial x^2}}=0 \tag{*}$$ The function $u$ may represent ...
HBR's user avatar
  • 1,648
6 votes
Accepted

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

The stationary equation you show transports information from the right to the left via the advection term; it also diffuses slightly. If you switch off the diffusion term altogether, then you only ...
Wolfgang Bangerth's user avatar
6 votes
Accepted

Finite difference methods in cylindrical and spherical co-ordinate systems

There are basically two methods: You can disrectize the angular part via grid points, or you can discretize it via basis expansion. I will focus on spherical symmetry here, the cylindrical case is ...
5 votes
Accepted

Impose Neumann Boundary Condition in advection-diffusion equation 1D

First, write out the semi-discrete equation for $u_0$, assuming it's an interior node: $ \frac{d}{dt}(u_0) = - c \frac{\left( u_1 - u_{-1} \right)}{2h} + \alpha \frac{\left(u_1 - 2u_0 + u_{-1}\right)}...
Savithru's user avatar
  • 343
4 votes

How numerical diffusion is related to advection term?

I would like to add that besides the spatial discretization the temporal discretization can also introduce numerical diffusion. Consider the advection equation $$ u_t + cu_x = 0$$ where I use the ...
Dan Doe's user avatar
  • 1,083
4 votes
Accepted

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

I'm assuming the limitation in 2D and 3D is storing the Jacobian. One option is to retain the time derivatives and use an explicit "pseudo" time-stepping to iterate to steady state. Normally the CFL ...
Aditya Kashi's user avatar
4 votes
Accepted

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

The solution you believe to be inaccurate is actually by far the more accurate one; you've simply plotted it in a very deceptive way. For $\nu=2$, the exact solution is actually no bigger than about $...
David Ketcheson's user avatar
4 votes

Choice of grid generation for FDM discretisation methods

Your question mentions both space and time discretization and the problems that can arise due to different choices of one or the other. I think that you might be conflating problems that come from the ...
Daniel Shapero's user avatar
3 votes
Accepted

finite differences on a slanted grid --- advection diffusion equation

In case you can easily implement the roated grid, this is possibly the easist fix, so let me answer your question about the invariance of the convection diffusion equation under rotation of the ...
H. Rittich's user avatar
3 votes
Accepted

CFL condition in Stokes equation

Essentially, the time dependent Stokes equation looks like the heat equation: $$ \frac{\partial u}{\partial t} - \nu\Delta u = f-\nabla p, $$ plus the incompressibility condition $\nabla \cdot u=0$ ...
Wolfgang Bangerth's user avatar
3 votes
Accepted

How to simulate 3D diffusion in python?

You just add the diffusion along the other dimensions. This superposition from orthogonal directions makes some sense, as they are independent. So, going by wikipedia for Fick's second law of ...
hyperpallium's user avatar
3 votes

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

In the time-dependent nonlinear case, if you drop the diffusive term then you have a nonlinear hyperbolic problem. Solutions will naturally generate singularities (discontinuities) in finite time. ...
David Ketcheson's user avatar
3 votes

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

Particles in SPH simulations mimic the motion of material points by simply updating their positions due to their velocities. In situations like heat conduction you don't need to move them, in fact, ...
BalazsToth's user avatar
3 votes
Accepted

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

The cause of the decay is the highly-diffusive, first order, finite difference method used for the spatial discretization Let's ignore the time discretization, as that does not appear to be the ...
Steven Roberts's user avatar
3 votes

Non-conservative advective term in a finite volume scheme

There is a methology for non-conservative products called path-conservative schemes, which might useful for you. The method can be applied to systems of the form \begin{align} \frac{\partial \mathbf{Q}...
ConvexHull's user avatar
  • 1,335
3 votes

Modeling contamination diffusion in a draining container, part 2

In case this helps anyone in the future, I wanted to finish off the problem by showing how I actually implemented it numerically. Forget Newton's method; I just solved the matrix equation for ...
HiddenBabel's user avatar
2 votes

Enforcing bounds and equality constraints for convex optimization

This is just a standard convex Quadratic Programming (QP) problem, which quadprog, or any number of other QP solvers, can solve. There are a variety of algorithms for solving QPs, and I think you ...
Mark L. Stone's user avatar
2 votes

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

A couple of points: Let me start by clearing up a persistent mistake relating to the stability condition of the FTCS method you are using. The correct stability condition, derived using the von ...
Brian Zatapatique's user avatar
2 votes

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

One strategy may be to use a semi-implicit temporal discretion, treating the diffusive term implicitly and the advective term explicitly. Doing so alleviates the extreme timestep restriction typically ...
Tyler Olsen's user avatar
  • 1,512
2 votes

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

There are a number of ways to check if a code is correct. The best way in this instance is to perform a convergence check on your code. This requires that you perform the same computation with ...
Kyle Mandli's user avatar
2 votes

Implementing Robin Boundary condition (finite difference)

I think that the second boundary condition equation is incorrect. The first one should be right for both ends. Following your notation, the flux of mass in the domain should be: $$N = vC - D \frac{\...
KJ Nam's user avatar
  • 81
2 votes
Accepted

Simulating advection - diffusion problem in a network of 1D pipe

Based on the image that you provided in your comment, I believe you formulate your problem as a system of PDEs for each branch in your network and make sure at each connecting node mass is conserved. ...
Mithridates the Great's user avatar
2 votes

Question on comparing the accuracy of numerical schemes

As I wrote in my comment, you have plotted your errors as a function of time, and asked how that relates to the spatial error of the different finite difference methods you've used, that is not the ...
EMP's user avatar
  • 2,089
2 votes

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

Contrary to what @user21's answer, I don't think that you need to do anything special for point loads. Let's see why. A point load can be represented as a Dirac delta "function". So, in your ...
nicoguaro's user avatar
  • 8,515
2 votes

Manufactured solution to 2d convection-diffusion with homogeneous Robin boundary conditions

Usually manufactured solutions are used to verify a solver. As stated in the comment section, you should consider a source term both in the domain $\Omega$ and on the boundary $\partial \Omega$ $$ \...
Francler's user avatar
2 votes

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

I've got a two comments that hope can be of help. In my experience, trying to impose boundary conditions analytically and come up with the corresponding matrices for the interior nodes as you have ...
Martín Maas's user avatar
2 votes
Accepted

Mineral dissolution and solute transport around a solid

Firstly, there are some mistakes in your discretized formulation and the approach you employ to solve this problem: The flow velocity in the advection diffusion Eq. (1) is to be computed from the ...
Sthavishtha Bhopalam's user avatar
2 votes

Solving systems of advection-diffusion-reaction equations with finite element methods

To answer your questions: Yes, multiply the equations by test functions to get a weak form. This should give you a set of ordinary differential equations (ODEs) in time. For each variable, there ...
NNN's user avatar
  • 760
2 votes
Accepted

Solving systems of advection-diffusion-reaction equations with finite element methods

The conceptual framework is to consider your system of equations as a vector of equations, and multiply (dot product) with a vector of test functions. After integration, you then end up with a weak ...
Wolfgang Bangerth's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible