Changeset 24057


Ignore:
Timestamp:
07/01/19 06:45:47 (6 years ago)
Author:
Mathieu Morlighem
Message:

CHG: use alpha and beta in thickness update and channel area update

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

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/analyses/HydrologyGlaDSAnalysis.cpp

    r23972 r24057  
    425425
    426426        /*Intermediaries */
    427         IssmDouble  Jdet,w,v,vx,vy,ub,h_old,N,h_r;
     427        IssmDouble  Jdet,vx,vy,ub,h_old,N,h_r;
    428428        IssmDouble  A,B,n;
     429        IssmDouble  alpha,beta;
    429430
    430431        /*Fetch number vertices for this element*/
     
    462463                ub = sqrt(vx*vx + vy*vy);
    463464
    464                 /*Compute cavity opening w*/
    465                 w  = 0.;
    466                 if(h_old<h_r) w = ub*(h_r-h_old)/l_r;
    467 
    468                 /*Compute closing rate*/
     465                /*Get A from B and n*/
    469466                A=pow(B,-n);
    470                 v = 2./pow(n,n)*A*h_old*pow(fabs(N),n-1.)*N;
     467
     468                /*Define alpha and beta*/
     469                if(h_old<h_r){
     470                        alpha = -ub/l_r - 2./pow(n,n)*A*pow(fabs(N),n-1.)*N;
     471                        beta  = ub*h_r/l_r;
     472                }
     473                else{
     474                        alpha = - 2./pow(n,n)*A*pow(fabs(N),n-1.)*N;
     475                        beta  = 0.;
     476                }
    471477
    472478                /*Get new sheet thickness*/
    473                 h_new[iv] = h_old + dt*(w-v);
     479                h_new[iv] = ODE1(alpha,beta,h_old,dt,0);
     480
     481                /*Make sure it is positive*/
    474482                if(h_new[iv]<1.e-12) h_new[iv] = 1.e-12;
    475483        }
  • issm/trunk-jpl/src/c/classes/Loads/Channel.cpp

    r24054 r24057  
    648648        if(Ngrad<1.e-12) Ngrad = 1.e-12;
    649649
    650         /*Compute the effective conductivity Kc = k h^alpha |grad Phi|^{beta-2} (same for sheet)*/
    651         IssmDouble Kc = kc * pow(this->S,ALPHA_C) * pow(Ngrad,BETA_C-2.);
    652         IssmDouble Ks = ks * pow(h      ,ALPHA_S) * pow(Ngrad,BETA_S-2.);
    653 
    654         /*Approx. discharge in the sheet flowing folwing in the direction of the channel ofver a width lc*/
    655         IssmDouble qc = - Ks * dphids;
    656 
    657650        /*d(phi - phi_m)/ds*/
    658651        IssmDouble dPw = dphids - dphimds;
     652
     653        /*Approx. discharge in the sheet flowing folwing in the direction of the channel ofver a width lc*/
     654        IssmDouble qc = - ks * pow(h,ALPHA_S) * pow(Ngrad,BETA_S-2.) * dphids;
    659655
    660656        /*Compute f factor*/
     
    664660        }
    665661
    666         /*Compute total discharge*/
    667         IssmDouble Q = -Kc*dphids;
    668 
    669         /*Compute Pi and Xi*/
    670         IssmDouble Pi = -C_W*c_t*rho_water*(Q+fFactor)*dPw;
    671         IssmDouble Xi = fabs(Q*dphids) + fabs(lc * qc * dphids);
    672 
    673         /*Compute closing rate*/
    674662        A=pow(B,-n);
    675         IssmDouble vc = 2./pow(n,n)*A*this->S*pow(fabs(phi_0 - phi),n-1.)*(phi_0 - phi);
    676 
    677         /*Compute new S based on Forward Euler (explicit)*/
    678         this->S = this->S + dt*( (Xi - Pi)/(rho_ice*L) - vc);
    679         if(this->S<0.) this->S = 0.;
     663
     664        IssmDouble C = C_W*c_t*rho_water;
     665        IssmDouble Qprime = -kc * pow(Ngrad,BETA_C-2.)*dphids;
     666        IssmDouble N = phi_0 - phi;
     667
     668        IssmDouble alpha = 1./(rho_ice*L)*(
     669                                fabs(Qprime*pow(this->S,ALPHA_C-1.)*dphids)
     670                                + C*Qprime*pow(this->S,ALPHA_C-1.)*dPw
     671                                ) - 2./pow(n,n)*A*pow(fabs(N),n-1.)*N;
     672
     673        IssmDouble beta = 1./(rho_ice*L)*( fabs(lc*qc*dphids) + C*fFactor*dPw );
     674
     675        /*Solve ODE*/
     676        this->S = ODE1(alpha,beta,this->S,dt,0);
    680677
    681678        /*Clean up and return*/
Note: See TracChangeset for help on using the changeset viewer.