# Ecuación de Burgers

Author
Affiliation
David Gómez-Castro

# 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)$

using Plots, LaTeXStrings, Printf

N  = 64;
x  = range(-1.0,1.0,N+1); x = vec(x[1:end-1])
Δx = x[2] - x[1]
ρ0(x) = min.(1,max.(-4*abs.(x).+2,0))

plot(x,ρ0(x),ylim=[0.0,1.5],
title=L"\rho_0", linewidth=2, thickness_scaling = 1.5,label="")

# 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)$$

y = copy(x)

@gif for t=0:0.01:2
plot( y + ρ0(y)*t ,ρ0(y),
xlim=[-1.0,2.0],ylim=[0.0,1.5],
title="t = \$t",
linewidth=2,thickness_scaling = 1.5,label="")
end