Skip to content

Commit

Permalink
Move to verification folder and bump up to 128^2
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ramadhan committed Oct 15, 2019
1 parent 1872357 commit 6ae31ce
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Oceananigans, PyPlot, Printf
using Oceananigans: NoPenetrationBC, NonDimensionalModel

Nx, Ny, Nz = 1, 64, 64
Nx, Ny, Nz = 1, 128, 128
Lx, Ly, Lz = 1, 1, 1

vbcs = ChannelBCs(top = BoundaryCondition(Value, 1),
Expand All @@ -21,14 +21,14 @@ model = NonDimensionalModel(N=(Nx, Ny, Nz), L=(Lx, Ly, Lz), Re=Re, Ri=0, Pr=Inf,

fig, ax = subplots(nrows=1, ncols=1, figsize=(10, 10))

Δt = 1e-3
Δt = 2e-4
Δ = max(model.grid.Δy, model.grid.Δz)
CFL = Δt / Δ
dCFL = (1/Re) * Δt / Δ^2
@show CFL
@show dCFL

while model.clock.time < 5
# while model.clock.time < 1
time_step!(model; Δt=Δt, Nt=100, init_with_euler=model.clock.time == 0 ? true : false)
@printf("Time: %.4f\n", model.clock.time)

Expand All @@ -44,12 +44,12 @@ while model.clock.time < 5
ζ = reverse(log10.(abs.(ζ)), dims=1)

# ax.streamplot(y, z, v, w)
pcolormesh(y, z, ζ, vmin=1e-2, cmap="inferno")
pcolormesh(y, z, ζ, vmin=1e-3, cmap="viridis"); title(); xlabel("y"); ylabel("z");
# fig.colorbar(im, ax=ax)

ax.set_title(@sprintf("Time: %.4f", model.clock.time))
ax.set_title(@sprintf("Lid-driven cavity vorticity log₁₀(ζ): Re=%d, t=%.4f", Re, model.clock.time))
ax.set_xlabel("\$y\$"); ax.set_ylabel("\$z\$");
ax.set_xlim([0, 1]); ax.set_ylim([-1, 0]);
ax.set_aspect(1)
gcf();
end
# end

0 comments on commit 6ae31ce

Please sign in to comment.