Skip to content

Commit

Permalink
Update lid_driven_cavity.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ramadhan committed Sep 12, 2020
1 parent 539cda3 commit d060385
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions verification/lid_driven_cavity/lid_driven_cavity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ using Oceananigans.Diagnostics
using Oceananigans.OutputWriters
using Oceananigans.AbstractOperations

function simulate_lid_driven_cavity(; Re, end_time=10.0)
function simulate_lid_driven_cavity(; Re, end_time)
Ny = Nz = 128
Ly = Lz = 1.0

topology = (Flat, Bounded, Bounded)
domain = (x=(0, 1), y=(0, Ly), z=(0, Lz))
domain = (x=(0, 1), y=(0, 1), z=(0, 1))
grid = RegularCartesianGrid(topology=topology, size=(1, Ny, Nz); domain...)

v_bcs = VVelocityBoundaryConditions(grid,
Expand All @@ -29,7 +28,7 @@ function simulate_lid_driven_cavity(; Re, end_time=10.0)
tracers = nothing,
coriolis = nothing,
boundary_conditions = (v=v_bcs, w=w_bcs),
closure = ConstantIsotropicDiffusivity(谓=1/Re)
closure = IsotropicDiffusivity(谓=1/Re)
)

u, v, w = model.velocities
Expand All @@ -48,7 +47,7 @@ function simulate_lid_driven_cavity(; Re, end_time=10.0)
output_attributes = Dict("" => Dict("longname" => "vorticity", "units" => "1/s"))

field_output_writer =
NetCDFOutputWriter(model, fields, filename="lid_driven_cavity_Re$Re.nc", interval=0.1,
NetCDFOutputWriter(model, fields, filename="lid_driven_cavity_Re$Re.nc", time_interval=0.1,
global_attributes=global_attributes, output_attributes=output_attributes,
dimensions=dims)

Expand All @@ -59,7 +58,7 @@ function simulate_lid_driven_cavity(; Re, end_time=10.0)
dcfl = DiffusiveCFL(wizard)

simulation = Simulation(model, 螖t=wizard, stop_time=end_time, progress=print_progress,
progress_frequency=20, parameters=(cfl=cfl, dcfl=dcfl))
iteration_interval=20, parameters=(cfl=cfl, dcfl=dcfl))

simulation.output_writers[:fields] = field_output_writer

Expand Down

0 comments on commit d060385

Please sign in to comment.