Changeset 25771


Ignore:
Timestamp:
11/20/20 15:04:46 (4 years ago)
Author:
Mathieu Morlighem
Message:

CHG: added channel discharge

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

Legend:

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

    r25752 r25771  
    24382438
    24392439                                        /*Vector special case (maybe should go to specific analysis?)*/
    2440                                         case ChannelAreaEnum:{
     2440                                        case ChannelAreaEnum:
     2441                                        case ChannelDischargeEnum:{
    24412442
    24422443                                                        /*Get Number of Channels*/
     
    24552456                                                                if(object->ObjectEnum()==ChannelEnum){
    24562457                                                                        Channel* channel=(Channel*)object;
    2457                                                                         channel->WriteChannelCrossSection(values);
     2458                                                                        if(output_enum==ChannelAreaEnum){
     2459                                                                                channel->WriteChannelCrossSection(values);
     2460                                                                        }
     2461                                                                        else if(output_enum==ChannelDischargeEnum){
     2462                                                                                channel->WriteChannelDischarge(values);
     2463                                                                        }
     2464                                                                        else{
     2465                                                                                _error_("not supported");
     2466                                                                        }
    24582467                                                                }
    24592468                                                        }
  • issm/trunk-jpl/src/c/classes/Loads/Channel.cpp

    r25508 r25771  
    5353        this->S    = channelarea;
    5454        this->Sold = channelarea;
     55        this->discharge = 0.;/*for output only*/
    5556
    5657        /*Get edge info*/
     
    155156        marshallhandle->call(this->id);
    156157        marshallhandle->call(this->S);
     158        marshallhandle->call(this->Sold);
     159        marshallhandle->call(this->boundary);
     160        marshallhandle->call(this->discharge);
    157161
    158162        if(marshallhandle->OperationNumber()==MARSHALLING_LOAD){
     
    511515        IssmDouble rho_ice   = element->FindParam(MaterialsRhoIceEnum);
    512516        IssmDouble rho_water = element->FindParam(MaterialsRhoFreshwaterEnum);
    513         IssmDouble kc        = element->FindParam(HydrologyChannelConductivityEnum);
    514517        IssmDouble g         = element->FindParam(ConstantsGEnum);
    515518        IssmDouble lc        = element->FindParam(HydrologyChannelSheetWidthEnum);
     
    707710        }
    708711
     712        /*Compute new channel discharge for output only*/
     713        IssmDouble Kc = kc * pow(this->S,ALPHA_C) * pow(Ngrad,BETA_C-2.);
     714        this->discharge = -Kc*dphids;
     715
    709716        /*Clean up and return*/
    710717        delete gauss;
     
    712719/*}}}*/
    713720void           Channel::WriteChannelCrossSection(IssmPDouble* values){/*{{{*/
    714 
    715721        _assert_(values);
    716722        values[this->sid] = reCast<IssmPDouble>(this->S);
    717723}
    718724/*}}}*/
     725void           Channel::WriteChannelDischarge(IssmPDouble* values){/*{{{*/
     726        _assert_(values);
     727        values[this->sid] = reCast<IssmPDouble>(this->discharge);
     728}
     729/*}}}*/
  • issm/trunk-jpl/src/c/classes/Loads/Channel.h

    r25508 r25771  
    2222                IssmDouble Sold;
    2323                bool       boundary;
     24
     25                /*output only*/
     26                IssmDouble discharge;
    2427
    2528        public:
     
    8386                ElementMatrix* CreateKMatrixHydrologyGlaDS(void);
    8487                void           WriteChannelCrossSection(IssmPDouble* values);
     88                void           WriteChannelDischarge(IssmPDouble* values);
    8589                /*}}}*/
    8690
  • issm/trunk-jpl/src/c/shared/Enum/Enum.vim

    r25763 r25771  
    10441044syn keyword cConstant ChannelAreaEnum
    10451045syn keyword cConstant ChannelAreaOldEnum
     1046syn keyword cConstant ChannelDischargeEnum
    10461047syn keyword cConstant ClosedEnum
    10471048syn keyword cConstant ColinearEnum
     
    13911392syn keyword cType Cfsurfacesquare
    13921393syn keyword cType Channel
     1394syn keyword cType classes
    13931395syn keyword cType Constraint
    13941396syn keyword cType Constraints
     
    13971399syn keyword cType ControlInput
    13981400syn keyword cType Covertree
     1401syn keyword cType DatasetInput
    13991402syn keyword cType DataSetParam
    1400 syn keyword cType DatasetInput
    14011403syn keyword cType Definition
    14021404syn keyword cType DependentObject
     
    14111413syn keyword cType ElementInput
    14121414syn keyword cType ElementMatrix
     1415syn keyword cType Elements
    14131416syn keyword cType ElementVector
    1414 syn keyword cType Elements
    14151417syn keyword cType ExponentialVariogram
    14161418syn keyword cType ExternalResult
     
    14191421syn keyword cType Friction
    14201422syn keyword cType Gauss
     1423syn keyword cType GaussianVariogram
     1424syn keyword cType gaussobjects
    14211425syn keyword cType GaussPenta
    14221426syn keyword cType GaussSeg
    14231427syn keyword cType GaussTetra
    14241428syn keyword cType GaussTria
    1425 syn keyword cType GaussianVariogram
    14261429syn keyword cType GenericExternalResult
    14271430syn keyword cType GenericOption
     
    14381441syn keyword cType IssmDirectApplicInterface
    14391442syn keyword cType IssmParallelDirectApplicInterface
     1443syn keyword cType krigingobjects
    14401444syn keyword cType Load
    14411445syn keyword cType Loads
     
    14481452syn keyword cType Matice
    14491453syn keyword cType Matlitho
     1454syn keyword cType matrixobjects
    14501455syn keyword cType MatrixParam
    14511456syn keyword cType Misfit
     
    14601465syn keyword cType Observations
    14611466syn keyword cType Option
     1467syn keyword cType Options
    14621468syn keyword cType OptionUtilities
    1463 syn keyword cType Options
    14641469syn keyword cType Param
    14651470syn keyword cType Parameters
     
    14751480syn keyword cType Regionaloutput
    14761481syn keyword cType Results
     1482syn keyword cType Riftfront
    14771483syn keyword cType RiftStruct
    1478 syn keyword cType Riftfront
    14791484syn keyword cType SealevelMasks
    14801485syn keyword cType Seg
    14811486syn keyword cType SegInput
     1487syn keyword cType Segment
    14821488syn keyword cType SegRef
    1483 syn keyword cType Segment
    14841489syn keyword cType SpcDynamic
    14851490syn keyword cType SpcStatic
     
    15001505syn keyword cType Vertex
    15011506syn keyword cType Vertices
    1502 syn keyword cType classes
    1503 syn keyword cType gaussobjects
    1504 syn keyword cType krigingobjects
    1505 syn keyword cType matrixobjects
    15061507syn keyword cType AdjointBalancethickness2Analysis
    15071508syn keyword cType AdjointBalancethicknessAnalysis
     
    15221523syn keyword cType FreeSurfaceBaseAnalysis
    15231524syn keyword cType FreeSurfaceTopAnalysis
     1525syn keyword cType GiaAnalysis
    15241526syn keyword cType GLheightadvectionAnalysis
    1525 syn keyword cType GiaAnalysis
    15261527syn keyword cType HydrologyDCEfficientAnalysis
    15271528syn keyword cType HydrologyDCInefficientAnalysis
  • issm/trunk-jpl/src/c/shared/Enum/EnumDefinitions.h

    r25763 r25771  
    10431043        ChannelAreaEnum,
    10441044        ChannelAreaOldEnum,
     1045        ChannelDischargeEnum,
    10451046        ClosedEnum,
    10461047        ColinearEnum,
  • issm/trunk-jpl/src/c/shared/Enum/EnumToStringx.cpp

    r25763 r25771  
    10461046                case ChannelAreaEnum : return "ChannelArea";
    10471047                case ChannelAreaOldEnum : return "ChannelAreaOld";
     1048                case ChannelDischargeEnum : return "ChannelDischarge";
    10481049                case ClosedEnum : return "Closed";
    10491050                case ColinearEnum : return "Colinear";
  • issm/trunk-jpl/src/c/shared/Enum/StringToEnumx.cpp

    r25763 r25771  
    10701070              else if (strcmp(name,"ChannelArea")==0) return ChannelAreaEnum;
    10711071              else if (strcmp(name,"ChannelAreaOld")==0) return ChannelAreaOldEnum;
     1072              else if (strcmp(name,"ChannelDischarge")==0) return ChannelDischargeEnum;
    10721073              else if (strcmp(name,"Closed")==0) return ClosedEnum;
    10731074              else if (strcmp(name,"Colinear")==0) return ColinearEnum;
     
    11201121              else if (strcmp(name,"FSpressure")==0) return FSpressureEnum;
    11211122              else if (strcmp(name,"FSvelocity")==0) return FSvelocityEnum;
    1122               else if (strcmp(name,"FemModel")==0) return FemModelEnum;
    11231123         else stage=10;
    11241124   }
    11251125   if(stage==10){
    1126               if (strcmp(name,"FileParam")==0) return FileParamEnum;
     1126              if (strcmp(name,"FemModel")==0) return FemModelEnum;
     1127              else if (strcmp(name,"FileParam")==0) return FileParamEnum;
    11271128              else if (strcmp(name,"FixedTimestepping")==0) return FixedTimesteppingEnum;
    11281129              else if (strcmp(name,"FloatingArea")==0) return FloatingAreaEnum;
     
    12431244              else if (strcmp(name,"MeshElements")==0) return MeshElementsEnum;
    12441245              else if (strcmp(name,"MeshX")==0) return MeshXEnum;
    1245               else if (strcmp(name,"MeshY")==0) return MeshYEnum;
    12461246         else stage=11;
    12471247   }
    12481248   if(stage==11){
    1249               if (strcmp(name,"MinVel")==0) return MinVelEnum;
     1249              if (strcmp(name,"MeshY")==0) return MeshYEnum;
     1250              else if (strcmp(name,"MinVel")==0) return MinVelEnum;
    12501251              else if (strcmp(name,"MinVx")==0) return MinVxEnum;
    12511252              else if (strcmp(name,"MinVy")==0) return MinVyEnum;
     
    13661367              else if (strcmp(name,"ThermalAnalysis")==0) return ThermalAnalysisEnum;
    13671368              else if (strcmp(name,"ThermalSolution")==0) return ThermalSolutionEnum;
    1368               else if (strcmp(name,"ThicknessErrorEstimator")==0) return ThicknessErrorEstimatorEnum;
    13691369         else stage=12;
    13701370   }
    13711371   if(stage==12){
    1372               if (strcmp(name,"TotalCalvingFluxLevelset")==0) return TotalCalvingFluxLevelsetEnum;
     1372              if (strcmp(name,"ThicknessErrorEstimator")==0) return ThicknessErrorEstimatorEnum;
     1373              else if (strcmp(name,"TotalCalvingFluxLevelset")==0) return TotalCalvingFluxLevelsetEnum;
    13731374              else if (strcmp(name,"TotalCalvingMeltingFluxLevelset")==0) return TotalCalvingMeltingFluxLevelsetEnum;
    13741375              else if (strcmp(name,"TotalFloatingBmb")==0) return TotalFloatingBmbEnum;
Note: See TracChangeset for help on using the changeset viewer.