Linked Questions

31 votes
3 answers
4k views

1D Euler equations (fluid dynamics) with NDSolve

Is it possible to accurately solve the 1D Euler equations in Mathematica using NDSolve? For example, let us consider the Sod shock tube problem. Introduction to ...
partition_of_unity's user avatar
22 votes
2 answers
1k views

NDSolve uses different difference order for different spatial derivative when solving PDE

I found something this tutorial for method of line doesn't tell us. Consider the following toy example: ...
xzczd's user avatar
  • 66.2k
16 votes
2 answers
2k views

Finite difference method not converging to correct steady state or conserving area?

I am working with the following PDE, which is an advection-diffusion type equation. It describes the movement of a fluid-fluid interface inside an annulus of inner radius $R_1$ and outer $R_2$ under ...
mch56's user avatar
  • 723
13 votes
2 answers
2k views

Water Hammer - Numerically solving system of PDEs

I'm trying to use Mathematica to solve the water hammer effect. ...
Ivan's user avatar
  • 2,207
16 votes
2 answers
820 views

Conservation of area solving a PDE via finite difference scheme

I have two PDEs that describe the movement of fluid: $h_t + [h^3(1-h)^3((1+\varepsilon h)\sin \theta - \varepsilon h_\theta \cos \theta]_\theta$ = 0 $h_t - [h^3(1-h)^3 \varepsilon h_\theta]_\theta$ = ...
mch56's user avatar
  • 723
11 votes
2 answers
1k views

Wonky Solutions to Schrödinger Equation with Box Barrier

I'm trying to solve the Schrödinger equation using NDSolve in a case where there is a potential box barrier. The initial condition is a cosine wave, and for ...
Buddhapus's user avatar
  • 581
4 votes
2 answers
1k views

How to avoid this kind of numerical error caused by extreme parameters when using NDSolve?

Here I use a one-dimensional heat conduction equation as the example. I found that when the thermal diffusion coefficient is small enough, Mathematica will give a result against the second law of ...
xzczd's user avatar
  • 66.2k
5 votes
2 answers
2k views

2d heat conduction equation: Boundary and initial conditions are inconsistent

I have the following code for a 2d heat c equation: ...
user12353's user avatar
4 votes
2 answers
604 views

Unstable solution of 2D+1 time PDE with periodic boundary condition

Now I am trying to solve the following 2D+1 type of PDE: $\partial_t u(t,x,y)=-y\partial_{x}u+\partial_{y}\left[a y+b sin(x)u+c\partial_{y}u\right]$ with $u(0,x,y)=\frac{1}{2\pi}e^{-((x-\pi/4)^2+y^2)...
Bob Lin's user avatar
  • 445
5 votes
1 answer
1k views

Using NDSolve to solve a system of coupled PDEs

I am trying to solve the Gross-Neveu model in one dimension for a specific soliton initial condition. I am trying ...
mrmrob003's user avatar
4 votes
1 answer
703 views

Solving a system of partial differential and algebraic equations? setting the step-size to get reasonable results

I'm trying to use Mathematica to get some early approximate solutions to a system of algebraic and partial differential equations. It is actually 1D model of an ideal gas in a tube. I'll divide my ...
Foad's user avatar
  • 605
5 votes
1 answer
917 views

How to choose MaxStepFraction for optimal speed of NDSolve

I'm trying to use NDSolve to solve a 1D Schrodinger's equation, and it seems that MaxStepFraction has huge effect on the ...
xslittlegrass's user avatar
3 votes
1 answer
256 views

Free vibrations of square plate with bi-harmonic equation

I am still playing with the wave bi-harmonic equation. My question is very similar to another question I posted few weeks ago on this site (Solving rectangular plates vibrations wave equation). I want ...
Pascal77's user avatar
  • 195
1 vote
0 answers
106 views

Numerical instabilities in a solution to a partial differential equation

I have been trying to solve a partial differential equation known as KdV (Korteweg-de Vries) equation using NDSolve. KdV equation is written as: $\frac{\partial u(x,t)}{\partial t}+\frac{\partial^3 u(...
bt89's user avatar
  • 11