Changeset 27253


Ignore:
Timestamp:
08/31/22 13:25:48 (3 years ago)
Author:
Cheng Gong
Message:

CHG: separate velmax and velthreshold for calving parameterization

Location:
issm/trunk-jpl/src/c
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/Elements/Tria.cpp

    r27252 r27253  
    845845        int                     use_parameter=-1;
    846846        IssmDouble  gamma, theta, alpha, xoffset, yoffset;
    847         IssmDouble  vel_lower, vel_upper, vel_threshold, vrate, truncateVrate;
     847        IssmDouble  vel_lower, vel_upper, vel_threshold, vrate, truncateVrate, vel_max;
    848848
    849849        /* Get node coordinates and dof list: */
     
    874874        this->FindParam(&vel_upper, CalvingVelUpperboundEnum);
    875875        this->FindParam(&vel_threshold, CalvingVelThresholdEnum);
     876        this->FindParam(&vel_max, CalvingVelMaxEnum);
    876877
    877878        /* Start looping on the number of vertices: */
     
    891892                sl_input->GetInputValue(&sealevel,gauss);
    892893                arate_input->GetInputValue(&arate,gauss);
     894                /* reduce the arate by a factor depends on a fixed velocity threshold */
    893895                vrate = 1.0;
    894896                if (vel < vel_threshold) vrate = vel / vel_threshold;
     897                /* parameter used in the calving law: real time max vel, or predefined vel range*/
     898                if (vel_upper <= vel_lower) {
     899                        truncateVrate = vel / vel_max;
     900                }
     901                else {
     902                        truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
     903                }
    895904
    896905                /*Compute strain rate and viscosity: */
     
    925934                        case 3:
    926935                                /* 3 tanh(normal vel): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
    927                                 truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
    928936                                gamma = yoffset -  0.5*theta*tanh(alpha*(truncateVrate+xoffset));
    929937                                break;
    930938                        case 4:
    931939                                /* 4 tanh(normal vel), cross (0,0): f(x)=y_{o}-\frac{\theta}{2}\tanh(\alpha(x+x_{o})) */
    932                                 truncateVrate = (min(vel_upper, max(vel_lower, vel))-vel_lower) / (vel_upper - vel_lower);
    933940                                gamma = 0.5*theta*(tanh(alpha*xoffset) - tanh(alpha*(truncateVrate+xoffset)));
    934941                                break;
  • issm/trunk-jpl/src/c/cores/movingfront_core.cpp

    r27252 r27253  
    5454        /* compute the maximal velocity over the whole domain */
    5555        femmodel->MaxVelx(&maxVel);
    56         femmodel->parameters->SetParam(maxVel, CalvingVelThresholdEnum);
     56        femmodel->parameters->SetParam(maxVel, CalvingVelMaxEnum);
    5757
    5858        /* start the work from here */
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r27252 r27253  
    119119        CalvingYoffsetEnum,
    120120        CalvingVelLowerboundEnum,
     121        CalvingVelMaxEnum,
    121122        CalvingVelThresholdEnum,
    122123        CalvingVelUpperboundEnum,
Note: See TracChangeset for help on using the changeset viewer.