@@ -41,20 +41,33 @@ run!(simulation)
4141
4242θt = FieldTimeSeries (" free_convection.jld2" , " θ" )
4343qt = FieldTimeSeries (" free_convection.jld2" , " q" )
44+ times = qt. times
4445Nt = length (θt)
4546
46- using GLMakie
47-
48- fig = Figure (size= (1600 , 400 ))
49- axθ = Axis (fig[1 , 1 ], xlabel= " x (m)" , ylabel= " z (m)" )
50- axq = Axis (fig[1 , 2 ], xlabel= " x (m)" , ylabel= " z (m)" )
47+ using GLMakie, Printf
5148
5249n = Observable (length (θt))
50+
5351θn = @lift θt[$ n]
5452qn = @lift qt[$ n]
53+ title = @lift " t = $(prettytime (times[$ n])) "
54+
55+ fig = Figure (size= (1600 , 400 ), fontsize= 22 )
56+ axθ = Axis (fig[1 , 1 ], xlabel= " x (m)" , ylabel= " z (m)" )
57+ axq = Axis (fig[1 , 2 ], xlabel= " x (m)" , ylabel= " z (m)" )
58+
59+ fig[0 , :] = Label (fig, title, fontsize= 22 , tellwidth= false )
60+
61+ hmθ = heatmap! (axθ, θn, colorrange= (Tₛ, Tₛ+ Δθ))
62+ hmq = heatmap! (axq, qn, colorrange= (0 , 8e-5 ), colormap= :magma )
63+
64+ Label (fig[0 , 1 ], " θ" , tellwidth= false )
65+ Label (fig[0 , 2 ], " q" , tellwidth= false )
66+
67+ Colorbar (fig[2 , 1 ], hmθ, label = " [ᵒC]" , vertical= false )
68+ Colorbar (fig[2 , 2 ], hmq, label = " " , vertical= false )
5569
56- heatmap! (axθ, θn)
57- heatmap! (axq, qn)
70+ fig
5871
5972record (fig, " free_convection.mp4" , 1 : Nt, framerate= 12 ) do nn
6073 n[] = nn
0 commit comments