Not Finished!!!!

Various Solvers for (Subscript[u, t])+a (Subscript[u, x])=g

All of the following have periodic boundary conditions in x.

UpWindSolver

UpWindStep[OldU_List,g_List,a_List,Δt_,Δx_]:=Module[
{δXPlusU,δXMinusU, δXUpwindU,aSign,ν},
ν=Δt/Δx;
δXPlusU=RotateLeft[OldU]-OldU;
δXMinusU=OldU-RotateRight[OldU];
aSign=Sign[a];
δXUpwindU=1/2 * (
( aSign+1)*δXPlusU+(aSign-1)*δXMinusU);
OldU+Δt *g + ν*δXUpwindU
]

LaxWendroffSolver

LaxWendroffStep[OldU_List,g_List,a_List,Δt_,Δx_]:=Module[
{ν},
ν=a*Δt/Δx;
 Δt*g +(1/2)( ν*(1+ν)*RotateLeft[OldU]-ν*(1-ν)*RotateRight[OldU])+(1-(ν^2))*OldU 
]

Testing the code on a simple problem

Δx=0.1;
Δt=0.05;
U0=Table[ Sech[x], {x, -10,10,Δx}];
a=Table[1, {Length[U0]}];
g=Table[0, {Length[U0]}];
n=360;
U=Table[0,{n},{Length[U0]}];
U[[1]]=U0;
Do[
U[[i+1]]=LaxWendroffStep[U[[i]],f,a,Δt,Δx],
{i,1,Length[U]-1}
];
Dimensions[U]

ListPlot3D[U]

ListContourPlot[U]

Various Solvers for (Subscript[u, t])+(Subscript[(f(u)), x])=0

All of the following have periodic boundary conditions in x.  In them all a[u]=f'[u].

LaxWendroffSolver

LaxWendroffStep[OldU_List,f_,a_,Δt_,Δx_]:=Module[
{ν,fU},ΔZerofU},
ν=Δt/Δx;
fU=f[OldU];
aU=a[OldU];
RotLfU=RotateLeft[fU];
RotRfU=RotateRight[fU];
ΔZerofU=RotLfU-RotRfU;
δZerofU=RotLfU-2fU+RotRfU;
]

Testing the code an a simple problem

Δx=0.1;
Δt=0.05;
U0=Table[ Sech[x], {x, -10,10,Δx}];
a=Table[1, {Length[U0]}];
f=Table[0, {Length[U0]}];
n=360;
U=Table[0,{n},{Length[U0]}];
U[[1]]=U0;
Do[
U[[i+1]]=LaxWendrofStep[U[[i]],f,a,Δt,Δx],
{i,1,Length[U]-1}
];
Dimensions[U]

ListPlot3D[U]

ListContourPlot[U]