using Plots, LaTeXStrings, Printf
= 64;
N = range(-1.0,1.0,N+1); x = vec(x[1:end-1])
x = x[2] - x[1]
Δx ρ0(x) = min.(1,max.(-4*abs.(x).+2,0))
plot(x,ρ0(x),ylim=[0.0,1.5],
=L"\rho_0", linewidth=2, thickness_scaling = 1.5,label="") title
Ecuación de Burgers
Métodos Numéricos Avanzados. 2022-2023
Ecuación de Burgers
La ecuación de Burgers corresponde a un fluido que se mueve con velocidad \(v = \rho/2\), es decir \(F = v \rho\) y
\[ \frac{\partial \rho}{\partial t} = - \frac{\partial}{\partial x} \frac {\rho^2} 2 \]
El \(2\) procede de \(\frac{\partial \rho}{\partial t} =- \rho \frac{\partial \rho }{\partial x}\).
Pongamos como dato inicial
\[ \rho_0 = \min\Big(1,\max(2-4|x|,0)\Big) \]
Soluciones exactas. Shocks
Si intentamos buscar soluciones exactas \(\rho_t (X_t ) = \rho_0 (y)\) deducimos que \[ \frac{dX_t}{dt} (t) = \rho_0(y) \]
Luego \(\rho_t (y + \rho_0(y) t) = \rho_0(y)\)
= copy(x)
y
@gif for t=0:0.01:2
plot( y + ρ0(y)*t ,ρ0(y),
=[-1.0,2.0],ylim=[0.0,1.5],
xlim="t = $t",
title=2,thickness_scaling = 1.5,label="")
linewidthend