SetDirectory[$HomeDirectory<>"/Documents/handouts/math467/Derivations"]

Gas Flow

Graphics3D[{Opacity[1/2],Cylinder[{{0,0,0},{3,0,0}},1],Cylinder[{{3,0,0},{5,0,0}},1],Cylinder[{{5,0,0},{8,0,0}},1]},Axes->{Automatic,None,None},Ticks->{{{3,"(Subscript[x, 0])"},{5,"(Subscript[x, 0])+Δx"}},None,None},Boxed->False]

Export["gas.pdf",%,"PDF"]

Export["gas.eps",%%,"EPS"]

Case: Constant v

Plot3D[Exp[-(((x-t))^2)],{x,-5,5},{t,0,3},AxesLabel->{"x","t","ρ(t,x)"},PlotPoints->50]

Export["constantv.pdf",%,"PDF"]

Export["constantv.eps",%%,"EPS"]

Case: v(t,x)=α x

(Subscript[ρ, 0])[x_]:=Exp[-(x^2)]

ρ[t_,x_]:=(Subscript[ρ, 0])[x Exp[-t]]Exp[-t]

ρ[t,x]

Plot3D[ρ[t,x],{x,-5,5},{t,0,3},AxesLabel->{"x","t","ρ(t,x)"},PlotPoints->50,PlotRange->All]

Export["valphax.pdf",%,"PDF"]

Export["valphax.eps",%%,"EPS"]

Heat Flow

Show[RevolutionPlot3D[1+BesselJ[0,x],{x,3,10},BoundaryStyle->None,RevolutionAxis->{1,0,0},MeshFunctions->{#4&},Ticks->{{{3,"0"},{10,"L"}},None,None},Boxed->False,Axes->{True,False,False},AxesLabel->{"x","",""},PlotStyle->Opacity[0.25]],Graphics3D[{Text["A(x)",{7,0,0}]}]]

Export["heatrod.pdf",%,"PDF"]

Export["heatrod.eps",%%,"EPS"]

Graphics3D[{Opacity[1/4],Cylinder[{{0,0,0},{5,0,0}},1],Cylinder[{{5/4,0,0},{7/4,0,0}},1],Opacity[1],Black,Text["Δx",{7/4,0,7/4}],Text["A(x)Q(x,t)dx",{14/4,0,0}],Text["ϕ(a,t)A(a)",{-3/2,0,0}],Text["ϕ(b,t)A(b)",{13/2,0,0}],Black,Arrow[{{-1,0,0},{0,0,0}}],Arrow[{{5,0,0},{6,0,0}}]},Boxed->False,Axes->{True,False,False},AxesLabel->{"x","",""},Ticks->{{{0,"a"},{5,"b"}},None,None},PlotRange->{{-2,7},Automatic,Automatic}]

Export["heatrodab.pdf",%,"PDF"]

Export["heatrodab.eps",%%,"EPS"]

Wave Equation

Show[Plot[ArcTan[x],{x,2,3},PlotStyle->Directive[Thick,Black]],Graphics[{Black,Dashed,Line[{{2,ArcTan[2]},{3,ArcTan[2]},{3,ArcTan[3]},{4,ArcTan[3]}}],Text["Δx",{2.5,ArcTan[2]},{0,1}],Text["T(x,t)",{2,ArcTan[2]}-{1,ArcTan'[2]}0.5,{0,1}],Text["u(x,t)",{1.8,ArcTan[2]},{0,-1}],Text["θ(x,t)",{2,ArcTan[2]}+{0.35,0.025},{-1,0}],Text["T(x+Δx,t)",{3,ArcTan[3]}+{1,ArcTan'[3]},{0,-1}],Text["-T(x,t)sin θ(x,t)",{2,ArcTan[2]-0.1},{-1.1,0}],Text["T(x+Δx,t)sin θ(x+Δx,t)",{3,ArcTan[3]+0.1},{1,0}],Text["u(x+Δx,t)",{2.6,ArcTan[3]}+{0,-0.01},{0,-1}],Text["θ(x+Δx,t)",{3,ArcTan[3]}+{0.5,0.025},{-1,0}],Text["Δu",{3,(ArcTan[2]+ArcTan[3])/2},{-1,0}]}],Graphics[{Black,Arrow[{{2,ArcTan[2]},{2,ArcTan[2]-0.1}}],Arrow[{{3,ArcTan[3]},{3,ArcTan[3]+0.1}}]}],Graphics[{Black,Arrow[{{2,ArcTan[2]},{2,ArcTan[2]}-{1,ArcTan'[2]}0.5}],Arrow[{{3,ArcTan[3]},{3,ArcTan[3]}+{1,ArcTan'[3]}}]}],AxesLabel->{"x","u(x,t)"},PlotRange->{{1,90/20},{19/20,28/20}},AxesOrigin->{1,19/20},Ticks->{{{2,"x"},{3,"x+Δx"}},None}]

Export["string.pdf",%,"PDF"]

Export["string.eps",%%,"EPS"]