Skip to content

Commit

Permalink
Merge pull request #179 from jbisits/jib-patch
Browse files Browse the repository at this point in the history
Fix `REFERENCE_DENSITY` T value and other `const`ant value updates
  • Loading branch information
jbisits authored Mar 6, 2024
2 parents e9115ed + 279a081 commit 1760bdd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "TwoLayerDirectNumericalShenanigans"
uuid = "40aaee9f-3595-48be-b36c-f1067009652f"
authors = ["Josef Bisits <[email protected]>"]
version = "0.6.2"
version = "0.6.3"

[deps]
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
Expand Down
18 changes: 13 additions & 5 deletions src/constants.jl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
const DOMAIN_EXTENT
Domain extent on which the two layer simulations are run.
Domain extent on which my two layer simulations are run.
"""
const DOMAIN_EXTENT = (Lx = 0.1, Ly = 0.1, Lz = 1)
const DOMAIN_EXTENT = (Lx = 0.1, Ly = 0.1, Lz = -1)
"""
const HIGH_RESOLUTION
Resolution at which to run the DNS sufficient to resolve turbulence on all scales, i.e.
Expand All @@ -15,17 +15,25 @@ const HIGH_RESOLUTION = (Nx = 124, Ny = 124, Nz = 1400)
Diffusivity estimates for the Southern Ocean.
"""
const SO_DIFFUSIVITIES == 1e-6, κ = (S = 1e-9, T = 1e-7))
"""
const EQUAL_ST_DIFFUSIVITIES
Equal salinity and temperature diffusivities. The salinity diffusivity is increased to match
temperature diffusivity. The viscosity and temperature diffusivities are still close to
physical values.
"""
const EQUAL_ST_DIFFUSIVITIES == 1e-6, κ = (S = 1e-7, T = 1e-7))
"""
const REFERENCE_DENSITY
Reference density for use in the two layer DNS. Calculated using the salinity `S₀ˡ` and
temperature `T₀ˡ` of the lower layer .
"""
const REFERENCE_DENSITY = gsw_rho(34.7, -1.5, 0)
const REFERENCE_DENSITY = gsw_rho(34.7, 0.5, 0)
"""
const INTERFACE_LOCATION
Location of the interface (in the vertical) between the upper and lower layers.
Location of the interface (in the vertical) between the upper and lower layers. This
default setting is in the middle of the [`DOMAIN_EXTENT`](@ref).
"""
const INTERFACE_LOCATION = -0.375
const INTERFACE_LOCATION = -0.5
"""
const SIMULATION_PATH
Path to where the simulations are saved by default. If the folder does not exist it will be
Expand Down
2 changes: 1 addition & 1 deletion src/twolayerdns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function DNSModel(architecture, domain_extent::NamedTuple, resolution::NamedTupl

Lx, Ly, Lz = domain_extent.Lx, domain_extent.Ly, domain_extent.Lz
Nx, Ny, Nz = resolution.Nx, resolution.Ny, resolution.Nz
zgrid = zgrid_stretching ? grid_stretching(Lz, Nz, refinement, stretching) : (-Lz, 0)
zgrid = zgrid_stretching ? grid_stretching(-Lz, Nz, refinement, stretching) : (Lz, 0)

grid = RectilinearGrid(architecture,
topology = (Periodic, Periodic, Bounded),
Expand Down

0 comments on commit 1760bdd

Please sign in to comment.