Skip to content

Conversation

@andrewdnolan
Copy link
Owner

@andrewdnolan andrewdnolan commented Jan 10, 2025

This PR alters the Stokes solver and thermomechanical coupling strategy, in an attempt to address the persistent failure of some beta value in the 03_PeriodicSurge experiment. There is no clear pattern of simulation failures as a function of beta value too suggest it's a numerical stability problem. The failures manifests through the Stokes solver diverging and the large resulting velocities producing NaN strain heating values.

Per personal communication with Adrien Gilbert, he has made two suggestion, which have been implemented in this PR:

  1. Stop using steady-state iterations
  2. switch to the vectorized Stokes solver

Upside to both of these changes is they'll dramatically reduce simulation runtimes.

@andrewdnolan
Copy link
Owner Author

andrewdnolan commented Jan 14, 2025

Steady-State Testing

Running the steady-state initialization experiments with the new solver settings results in:

vec-stokes_compate

From trial and error we will need to change the reference glaciers $\Delta\dot{b}$ value from $0.36$ to $0.35$ $\text{m a}^{-1}$

The hope is this will help with convergence issues for the
periodic surging experiments.
With new solver setting, depth is not written on the first timestep
if using a restat. This previously was treated as zero depth, resulting
in infinite volumes. Now use backfilling of first non-zero volume to
before relaitve volume is calculated inorder to avoid infs/nans
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

source ./periodic_surge.sh

parse_params()
{
  IFS=" " read -r QP beta NT T_0<<< $(sed -n "${1}p" "run/${KEY}/${KEY}.commands" | cut -d " " -f 7,9,11,13)
}

parse_runtime(){
    runtime=$(tail logs/${KEY}/${KEY}_52723013_${1}.out | awk '/[S]OLVER TOTAL/ {print $5}')
}

SP=2
KEY='crmpt12'
offset=-0.35
# get the number of simulations to process
N=$(wc -l < "run/${KEY}/${KEY}.commands")

parse_json "params/${KEY}.json"

for j in $(seq $N);do
    parse_params $j
    parse_runtime $j

  log_runtime $KEY $dx $T_ma $offset $ST_dt $SD_dt $QT_dt $QD_dt $SP $QP $TT $beta $runtime
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants