Skip to content

Commit

Permalink
cap charecteristic dt for subgrid diffusion
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat authored Mar 10, 2024
1 parent 2ebc10c commit aa1a486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Physics/subgrid_diffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ end
pTᵢ = @cell pT[ip, I...]

# subgrid diffusion of the i-th particle
pΔTᵢ = (pTᵢ - pT0ᵢ) * (1 - exp(-d * dt / @cell(dt₀[ip, I...])))
pΔTᵢ = (pTᵢ - pT0ᵢ) * (1 - exp(-d * dt / max(@cell(dt₀[ip, I...]), 1e-9))
@cell pT0[ip, I...] = pT0ᵢ + pΔTᵢ
@cell pΔT[ip, I...] = pΔTᵢ
end
Expand Down

0 comments on commit aa1a486

Please sign in to comment.