Changeset 27253
- Timestamp:
- 08/31/22 13:25:48 (3 years ago)
- Location:
- issm/trunk-jpl/src/c
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r27252 r27253 845 845 int use_parameter=-1; 846 846 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; 848 848 849 849 /* Get node coordinates and dof list: */ … … 874 874 this->FindParam(&vel_upper, CalvingVelUpperboundEnum); 875 875 this->FindParam(&vel_threshold, CalvingVelThresholdEnum); 876 this->FindParam(&vel_max, CalvingVelMaxEnum); 876 877 877 878 /* Start looping on the number of vertices: */ … … 891 892 sl_input->GetInputValue(&sealevel,gauss); 892 893 arate_input->GetInputValue(&arate,gauss); 894 /* reduce the arate by a factor depends on a fixed velocity threshold */ 893 895 vrate = 1.0; 894 896 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 } 895 904 896 905 /*Compute strain rate and viscosity: */ … … 925 934 case 3: 926 935 /* 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);928 936 gamma = yoffset - 0.5*theta*tanh(alpha*(truncateVrate+xoffset)); 929 937 break; 930 938 case 4: 931 939 /* 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);933 940 gamma = 0.5*theta*(tanh(alpha*xoffset) - tanh(alpha*(truncateVrate+xoffset))); 934 941 break; -
issm/trunk-jpl/src/c/cores/movingfront_core.cpp
r27252 r27253 54 54 /* compute the maximal velocity over the whole domain */ 55 55 femmodel->MaxVelx(&maxVel); 56 femmodel->parameters->SetParam(maxVel, CalvingVel ThresholdEnum);56 femmodel->parameters->SetParam(maxVel, CalvingVelMaxEnum); 57 57 58 58 /* start the work from here */ -
issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h
r27252 r27253 119 119 CalvingYoffsetEnum, 120 120 CalvingVelLowerboundEnum, 121 CalvingVelMaxEnum, 121 122 CalvingVelThresholdEnum, 122 123 CalvingVelUpperboundEnum,
Note:
See TracChangeset
for help on using the changeset viewer.