Changeset 16360


Ignore:
Timestamp:
10/10/13 07:29:57 (11 years ago)
Author:
jbondzio
Message:

CHG: exclude buggy drainage of water for now. Update archives.

Location:
issm/trunk-jpl
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/modules/PostprocessingEnthalpyx/PostprocessingEnthalpyx.cpp

    r16322 r16360  
    1919
    2020        /*drain excess water fraction: */
    21         for (i=0;i<femmodel->elements->Size();i++){
     21        /*for (i=0;i<femmodel->elements->Size();i++){
    2222                element=dynamic_cast<Element*>(femmodel->elements->GetObjectByOffset(i));
    2323                element->DrainWaterfraction();
    2424        }
     25        */
    2526
    2627        /*Update basal dirichlet BCs for enthalpy: */
  • issm/trunk-jpl/src/c/shared/Elements/DrainageFunctionWaterfraction.cpp

    r16359 r16360  
    99/*FUNCTION IssmDouble DrainageFunctionWaterfraction()*/
    1010IssmDouble DrainageFunctionWaterfraction(IssmDouble waterfraction, IssmDouble dt=0.){
    11     /* DrainageFunctionWaterfraction returns how much of the waterfraction is drained per year */
    12     _assert_(waterfraction>=0.);
    13     _assert_(dt>=0.);
     11        /* DrainageFunctionWaterfraction returns how much of the waterfraction is drained per year */
     12        _assert_(waterfraction>=0.);
     13        _assert_(dt>=0.);
    1414
    15     IssmDouble w0=0.01, w1=0.02, w2=0.03;
    16     IssmDouble Dret, D0=0, D1=0.005, D2=0.05;
    17                 IssmDouble yts=365*24*60*60;
    18                 dt/=yts;
     15        IssmDouble w0=0.01, w1=0.02, w2=0.03;
     16        IssmDouble Dret, D0=0, D1=0.005, D2=0.05;
     17        IssmDouble yts=365*24*60*60;
     18        dt/=yts;
    1919
    20     /*get drainage function value*/
    21     if((w0==w1)||(w1==w2)||(w0==w2))
    22         _error_("Error: equal ordinates in DrainageFunctionWaterfraction -> division by zero. Abort");
    23     if(waterfraction<=w0)
    24         Dret=D0;
    25     if((waterfraction>w0) && (waterfraction<=w1))
    26         Dret=(D1-D0)/(w1-w0)*(waterfraction-w0)+D0;
    27     if((waterfraction>w1) && (waterfraction<=w2))
    28         Dret=(D2-D1)/(w2-w1)*(waterfraction-w1)+D1;
    29     else
    30         Dret=D2;
     20        /*get drainage function value*/
     21        if((w0==w1)||(w1==w2)||(w0==w2))
     22                _error_("Error: equal ordinates in DrainageFunctionWaterfraction -> division by zero. Abort");
     23        if(waterfraction<=w0)
     24                Dret=D0;
     25        if((waterfraction>w0) && (waterfraction<=w1))
     26                Dret=(D1-D0)/(w1-w0)*(waterfraction-w0)+D0;
     27        if((waterfraction>w1) && (waterfraction<=w2))
     28                Dret=(D2-D1)/(w2-w1)*(waterfraction-w1)+D1;
     29        else
     30                Dret=D2;
    3131
    32     /*check if dt*Dret>waterfraction. If so, drain whole waterfraction*/
    33     if(dt==0.){
    34       if(Dret>waterfraction)
    35         return waterfraction;
    36       else
    37         return Dret;
    38     }
    39     else{
    40       if(dt*Dret>waterfraction)
    41         return waterfraction;
    42       else
    43         return dt*Dret;
    44     }
     32        /*check if dt*Dret>waterfraction. If so, drain whole waterfraction*/
     33        if(dt==0.){
     34                if(Dret>waterfraction)
     35                        return waterfraction;
     36                else
     37                        return Dret;
     38        }
     39        else{
     40                if(dt*Dret>waterfraction)
     41                        return waterfraction;
     42                else
     43                        return dt*Dret;
     44        }
    4545}
Note: See TracChangeset for help on using the changeset viewer.