Changeset 18804


Ignore:
Timestamp:
11/18/14 11:25:37 (10 years ago)
Author:
Mathieu Morlighem
Message:

CHG: adding new sliding law for Kevin, Temperature dependent

Location:
issm/trunk-jpl/src
Files:
1 added
5 edited

Legend:

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

    r18778 r18804  
    3030        int frictionlaw;
    3131        iomodel->Constant(&frictionlaw,FrictionLawEnum);
    32         if(frictionlaw==4) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));
     32        if(frictionlaw==4 || frictionlaw==6) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));
    3333}/*}}}*/
    3434void EnthalpyAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
     
    120120                        iomodel->FetchDataToInput(elements,FrictionWaterLayerEnum);
    121121                        break;
     122                case 6:
     123                        iomodel->FetchDataToInput(elements,FrictionCEnum);
     124                        iomodel->FetchDataToInput(elements,FrictionMEnum);
     125                        iomodel->FetchDataToInput(elements,PressureEnum);
     126                        iomodel->FetchDataToInput(elements,TemperatureEnum);
     127                        break;
    122128                default:
    123129                        _error_("not supported");
  • issm/trunk-jpl/src/c/analyses/StressbalanceAnalysis.cpp

    r18778 r18804  
    133133        int frictionlaw;
    134134        iomodel->Constant(&frictionlaw,FrictionLawEnum);
    135         if(frictionlaw==4) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));
     135        if(frictionlaw==4 || frictionlaw==6) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));
    136136
    137137}/*}}}*/
     
    285285                        iomodel->FetchDataToInput(elements,FrictionQEnum);
    286286                        iomodel->FetchDataToInput(elements,FrictionWaterLayerEnum);
     287                        break;
     288                case 6:
     289                        iomodel->FetchDataToInput(elements,FrictionCEnum);
     290                        iomodel->FetchDataToInput(elements,FrictionMEnum);
     291                        iomodel->FetchDataToInput(elements,PressureEnum);
     292                        iomodel->FetchDataToInput(elements,TemperatureEnum);
    287293                        break;
    288294                default:
  • issm/trunk-jpl/src/c/analyses/ThermalAnalysis.cpp

    r18778 r18804  
    2828        iomodel->DeleteData(&requestedoutputs,numoutputs,ThermalRequestedOutputsEnum);
    2929
     30        /*Deal with friction parameters*/
     31        int frictionlaw;
     32        iomodel->Constant(&frictionlaw,FrictionLawEnum);
     33        if(frictionlaw==4 || frictionlaw==6) parameters->AddObject(iomodel->CopyConstantObject(FrictionGammaEnum));
    3034}/*}}}*/
    3135void ThermalAnalysis::UpdateElements(Elements* elements,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/
     
    108112                        iomodel->FetchDataToInput(elements,FrictionWaterLayerEnum);
    109113                        break;
     114                case 6:
     115                        iomodel->FetchDataToInput(elements,FrictionCEnum);
     116                        iomodel->FetchDataToInput(elements,FrictionMEnum);
     117                        iomodel->FetchDataToInput(elements,PressureEnum);
     118                        iomodel->FetchDataToInput(elements,TemperatureEnum);
     119                        break;
    110120                default:
    111121                        _error_("not supported");
  • issm/trunk-jpl/src/c/classes/Loads/Friction.cpp

    r18797 r18804  
    5757                case 5:
    5858                        GetAlpha2WaterLayer(palpha2,gauss);
     59                        break;
     60                case 6:
     61                        GetAlpha2WeertmanTemp(palpha2,gauss);
    5962                        break;
    6063          default:
     
    233236        /*Here, we want to parameterize the friction as a function of temperature
    234237         *
    235          * alpha2 = alpha2_viscous * f(T)
     238         * alpha2 = alpha2_viscous * 1/f(T)
    236239         *
    237240         * where f(T) = exp((T-Tpmp)/gamma)
     
    252255        /*Compute scaling parameter*/
    253256        element->parameters->FindParam(&gamma,FrictionGammaEnum);
    254         alpha2 = alpha2*exp((T-Tpmp)/gamma);
     257        alpha2 = alpha2 / exp((T-Tpmp)/gamma);
    255258
    256259        /*Assign output pointers:*/
     
    318321        *palpha2=alpha2;
    319322}/*}}}*/
     323void Friction::GetAlpha2WeertmanTemp(IssmDouble* palpha2, Gauss* gauss){/*{{{*/
     324        /*Here, we want to parameterize the friction as a function of temperature
     325         *
     326         * alpha2 = alpha2_weertman * 1/f(T)
     327         *
     328         * where f(T) = exp((T-Tpmp)/gamma)
     329         */
     330
     331        /*Intermediaries: */
     332        IssmDouble  f,T,pressure,Tpmp,gamma;
     333        IssmDouble  alpha2;
     334
     335        /*Get viscous part*/
     336        this->GetAlpha2Weertman(&alpha2,gauss);
     337
     338        /*Get pressure melting point (Tpmp) for local pressure and get current temperature*/
     339        element->GetInputValue(&T,gauss,TemperatureEnum);
     340        element->GetInputValue(&pressure,gauss,PressureEnum);
     341        Tpmp = element->TMeltingPoint(pressure);
     342
     343        /*Compute scaling parameter*/
     344        element->parameters->FindParam(&gamma,FrictionGammaEnum);
     345        alpha2 = alpha2 / exp((T-Tpmp)/gamma);
     346
     347        /*Assign output pointers:*/
     348        *palpha2=alpha2;
     349}/*}}}*/
    320350void Friction::GetAlphaComplement(IssmDouble* palpha_complement, Gauss* gauss){/*{{{*/
    321351
  • issm/trunk-jpl/src/c/classes/Loads/Friction.h

    r18770 r18804  
    3535                void  GetAlpha2Temp(IssmDouble* palpha2,Gauss* gauss);
    3636                void  GetAlpha2WaterLayer(IssmDouble* palpha2,Gauss* gauss);
     37                void  GetAlpha2WeertmanTemp(IssmDouble* palpha2,Gauss* gauss);
    3738                void  GetAlphaComplement(IssmDouble* alpha_complement,Gauss* gauss);
    3839};
Note: See TracChangeset for help on using the changeset viewer.