Replies: 1 comment 10 replies
-
Try grid = RegularRectilinearGrid(size = (128, 128), x=(-5, 5), y=(-5, 5), topology=(Periodic, Periodic, Flat))
model = NonhydrostaticModel(grid = grid, tracers=:c, buoyancy=nothing)
initial_c(x, y, z) = exp(-x^2 - y^2)
set!(model, u=1, c=initial_c) this initializes a uniform velocity from left to right, with a Gaussian tracer profile: using UnicodePlots
heatmap(interior(model.tracers.c)[:, :, 1]') producing stepping the model forward shows the effect of advection by a uniform flow on the tracer distribution: simulation = Simulation(model, Δt=1e-2, stop_iteration=100)
run!(simulation)
heatmap(interior(model.tracers.c)[:, :, 1]') |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Per the approach above I have started with a uniform condition.
What would the initial condition have to be, if a laminar flow was to enter left and leave right?
Beta Was this translation helpful? Give feedback.
All reactions