Skip to content

Bug report: src/m/mech/basalstress.m Logic Inconsistency #73

@inwoo-park

Description

@inwoo-park

Hi developers,

According to frcition.m, md.friction.coupling is defined as

0: uniform sheet $N=\rho_i g H + \rho_w z_b g$ ($z_b$ is elevation of ice base)
1: ice pressure only $N=\rho_i H g$
2: water pressure assuming uniform sheet $N=\max(\rho_i g H + \rho_w g z_b, 0)$
3: use provided effective pressure (~ md.friction.effective_pressure)
4: use coupled model (not implemented yet).

However, src/m/mech/basalstress.m contains following logic:

switch(md.friction.coupling)
   case 0
      N = max(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base),0);
   case 3
      N = max(md.friction.effective_pressure, 0);
   otherwise
      error('not supported yet');
end

I believe the above code should be updated to

switch(md.friction.coupling)
   case 0
      N = md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base);
   case 1
      N = md.constants.g*md.materials.rho_ice;
   case 2
      N = max(md.constants.g*(md.materials.rho_ice*md.geometry.thickness+md.materials.rho_water*md.geometry.base),0);
   case 3
      N = max(md.friction.effective_pressure, 0);
   case 4
      error('md.friction.coupling=4 is not supported yet.');
   otherwise
      error('not supported yet');
end

If there is agreement on this change, I will commit the updated code to the main branch.

Best regards,
Inwoo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions