You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a very simple models setup (copied below) where the nonlinear solver does not converge (at all). The model has a prescribed horizontal stress at the top and bottom (traction boundary conditions), and periodic boundary conditions on the sides, and therefore needs nullspace removal. The viscosity is constant and the density is constant, so there is no nonlinearity. When I switch off the nullspace removal, the nonlinear solver converges without any problem (but this is of course not an option in more complex models). The solution is correct in both cases, as far as I can tell.
Specifically, the residual that does not decrease is the Stokes residual (the temperature is constant as well). I think something might be wrong with how we compute the residual when we use nullspace removal, because the nonlinear solver converges when I use the iterated advection and defect correction Stokes solver (which has its own, different residual computation). I found this quite confusing, because removing the nullspace should not change anything about the residual.
I tried a lot of things and could not figure out what exactly the problem was, but I wondered if the problem might be some interaction with setting the constraints (because it seems the degree of freedom in the bottom left corner is constrained in models with nullspace removal, so when I call current_constraints.set_zero and then current_constraints.distribute without solving in between, the velocity would always be zero on that degree of freedom).
set Dimension = 2
set End time = 20
set Output directory = output-constant-visc
set Use years in output instead of seconds = true
set Maximum first time step = 10
set Maximum relative increase in time step = 1
set Nonlinear solver scheme = iterated Advection and Stokes
set Surface pressure = 0
set Adiabatic surface temperature = 1100
set Max nonlinear iterations = 50
subsection Geometry model
set Model name = box
subsection Box
set X extent = 100000
set Y extent = 100000
set X periodic = true
end
end
subsection Boundary temperature model
set Fixed temperature boundary indicators = top,bottom
end
subsection Boundary temperature model
set List of model names = initial temperature
subsection Initial temperature
set Minimal temperature = 1100
end
end
subsection Gravity model
set Model name = vertical
subsection Vertical
set Magnitude = 0.0
end
end
subsection Boundary traction model
set Prescribed traction boundary indicators = top x: function, bottom x: function
subsection Function
set Variable names = x,y
# We want to prescribe a tangential traction of 50 MPa
# at the top boundary and -50 at the bottom boundary.
set Function constants = traction = 50e6, y_extent = 1e5
set Function expression = if (y>y_extent/2, traction, -traction) ; 0
end
end
subsection Boundary velocity model
set Prescribed velocity boundary indicators = top y: function, bottom y: function
subsection Function
set Variable names = x,y
set Function expression = 0;0
end
end
subsection Initial temperature model
set Model name = adiabatic
subsection Adiabatic
set Age top boundary layer = 0
end
end
subsection Material model
set Model name = simpler
subsection Simpler model
set Reference density = 3400
set Thermal conductivity = 0
set Thermal expansion coefficient = 0
set Reference temperature = 1100
set Viscosity = 1e22
end
end
subsection Mesh refinement
set Initial adaptive refinement = 0
set Initial global refinement = 1
set Time steps between mesh refinement = 0
end
subsection Postprocess
set List of postprocessors = visualization
subsection Visualization
set List of output variables = viscosity, density, shear stress, stress, stress second invariant
set Time between graphical output = 0
end
end
subsection Nullspace removal
set Remove nullspace = net x translation
end
Here is the log output from that model run (with the current main):
I have a very simple models setup (copied below) where the nonlinear solver does not converge (at all). The model has a prescribed horizontal stress at the top and bottom (traction boundary conditions), and periodic boundary conditions on the sides, and therefore needs nullspace removal. The viscosity is constant and the density is constant, so there is no nonlinearity. When I switch off the nullspace removal, the nonlinear solver converges without any problem (but this is of course not an option in more complex models). The solution is correct in both cases, as far as I can tell.
Specifically, the residual that does not decrease is the Stokes residual (the temperature is constant as well). I think something might be wrong with how we compute the residual when we use nullspace removal, because the nonlinear solver converges when I use the iterated advection and defect correction Stokes solver (which has its own, different residual computation). I found this quite confusing, because removing the nullspace should not change anything about the residual.
I tried a lot of things and could not figure out what exactly the problem was, but I wondered if the problem might be some interaction with setting the constraints (because it seems the degree of freedom in the bottom left corner is constrained in models with nullspace removal, so when I call
current_constraints.set_zero
and thencurrent_constraints.distribute
without solving in between, the velocity would always be zero on that degree of freedom).Here is the log output from that model run (with the current main):
The text was updated successfully, but these errors were encountered: