Skip to content

Commit

Permalink
initialize viscosity with ones to avoid NaNs (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat authored Feb 14, 2024
1 parent 872c178 commit 886ab7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function main2D(igg; ar=8, ny=16, nx=ny*8, figdir="figs2D", save_vtk =false)
@parallel init_P!(stokes.P, ρg[2], xci[2])

# Rheology
η = @zeros(ni...)
η = @ones(ni...)
args = (; T = thermal.Tc, P = stokes.P, dt = Inf)
@parallel (@idx ni) compute_viscosity!(
η, 1.0, phase_ratios.center, @strain(stokes)..., args, rheology, (-Inf, Inf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function main3D(igg; ar=8, ny=16, nx=ny*8, figdir="figs3D", save_vtk =false)
@parallel init_P!(stokes.P, ρg[3], xci[3])

# Rheology
η = @zeros(ni...)
η = @ones(ni...)
args = (; T = thermal.Tc, P = stokes.P, dt = Inf)
@parallel (@idx ni) compute_viscosity!(
η, 1.0, phase_ratios.center, @strain(stokes)..., args, rheology, (-Inf, Inf)
Expand Down
2 changes: 1 addition & 1 deletion miniapps/convection/Particles2D/Layered_convection2D.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ function main2D(igg; ar=8, ny=16, nx=ny*8, figdir="figs2D", save_vtk =false)
@parallel init_P!(stokes.P, ρg[2], xci[2])
end
# Rheology
η = @zeros(ni...)
η = @ones(ni...)
args = (; T = thermal.Tc, P = stokes.P, dt = Inf)
@parallel (@idx ni) compute_viscosity!(
η, 1.0, phase_ratios.center, @strain(stokes)..., args, rheology, (1e16, 1e24)
Expand Down

0 comments on commit 886ab7e

Please sign in to comment.