New answers tagged

2 votes

Non-Uniform Grids: Approximation Quality: First Order Finite Difference vs. First Order Finite Volume

The advection with constant velocity is a special (simple) case of the general advection equation in conservative (divergence) and non-conservative (non-divergent) form. For the nonconservative case ...
4 votes
Accepted

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

Your discretization with the upwind scheme looks correct. One reason why you get oscillations might be that you are choosing an incorrect time step. Another one is if you have some complicated and not ...
  • 56
3 votes

Gmsh Python: Specify mesh regularity conditons

If you're prepared to be a little more flexible with your definition of cell "centres", it's possible to achieve the regularity constraints you seek via Delaunay Triangulations and Voronoi ...

Top 50 recent answers are included