Closed pohlan closed 3 years ago
It is not the case for other initial conditions in ϕ (here it was ϕ0 = 0 everywhere) but something is still wrong since the final ϕ seems to depend a lot on the initial condition.
If it is run like this, the hydraulic potential (phi) is negative in a few lines next to the x=0 boundary, leading to a glacier-upwards flux (in positive x direction) since the boundary condition at x=0 is pw = 0 (hence phi=0 for zb=0).
I just ran the "A1" case and it does not produce negative ϕ values. I get ϕ[1,:]=0
but as I understand your comment it is expected.
I just ran the "A1" case and it does not produce negative ϕ values.
That was because I changed the initial conditions in between, see my previous comment.
In the end the problem was that the damping parameters and scaling factors above (which are quite extreme), in combination with the definition of phi over phi_previous = phi_current, allowed for super quick convergence (~ 50 iterations), but somehow the solution stayed very close to the initial condition and did not produce the correct result. I'm not sure why though. Now, with more reasonable parameters, the solution is as expected, but the number of iterations is in the order of ~1'000.
Could it be that the updates were so small that the solver thought it converged? The 1000 iterations are to reach steady state?
@luraess: 1000 iterations, is that reasonable?
1000 iterations, is that reasonable?
Depends. For steady state may be fine. Could check if one can make it smaller maybe - order 500 or so may be ok. maybe doing the physical time implicit could help, as discussed.
https://github.com/pohlan/SheetModel.jl/blob/fa03e42fbe84dfcedd56ad35c8ef01b5121b083b/examples/run_SHMIP.jl#L1-L4
If it is run like this, the hydraulic potential (phi) is negative in a few lines next to the x=0 boundary, leading to a glacier-upwards flux (in positive x direction) since the boundary condition at x=0 is pw = 0 (hence phi=0 for zb=0).