Skip to content

Commit

Permalink
Use ∇f2c operator
Browse files Browse the repository at this point in the history
  • Loading branch information
charleskawczynski committed Aug 24, 2021
1 parent 2597be9 commit c3341b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ end
∇f2c(f::SVector, grid::Grid, ::InteriorTag) = (f[2] - f[1]) * grid.dzi
∇f2c(f::SVector, grid::Grid, ::TopBCTag, bc::SetValue) = (bc.value - f[1]) * grid.dzi
∇f2c(f::SVector, grid::Grid, ::TopBCTag, bc::SetGradient) = bc.value
∇f2c(f::SVector, grid::Grid, ::BottomBCTag, bc::SetValue) = (f[2] - bc.value) * grid.dzi
∇f2c(f::SVector, grid::Grid, ::BottomBCTag, bc::SetValue) = (f[1] - bc.value) * grid.dzi
∇f2c(f::SVector, grid::Grid, ::BottomBCTag, bc::SetGradient) = bc.value

function ∇c2f(f, grid::Grid, k::Int)
Expand Down
3 changes: 2 additions & 1 deletion src/Turbulence_PrognosticTKE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,8 @@ function compute_updraft_closures(self::EDMF_PrognosticTKE, GMV::GridMeanVariabl
a_kfull = interpc2f(self.UpdVar.Area.values, grid, k, i)
if a_kfull > 0.0
b_kfull = interpc2f(self.UpdVar.B.values, grid, k, i)
∇w_up = ∇f2c(self.UpdVar.W.values, grid, k, i)
w_dual = dual_faces(self.UpdVar.W.values, grid, k, i)
∇w_up = ∇f2c(w_dual, grid, k; bottom = SetValue(0), top = SetGradient(0))
asp_ratio = 1.0
self.nh_pressure_b[i, k], self.nh_pressure_adv[i, k], self.nh_pressure_drag[i, k] =
perturbation_pressure(
Expand Down

0 comments on commit c3341b3

Please sign in to comment.