Changeset 8549
- Timestamp:
- 06/08/11 11:57:29 (14 years ago)
- Location:
- issm/trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/objects/Elements/Tria.cpp
r8540 r8549 991 991 double Ke_gg_gaussian2[numdof][numdof] ={0.0}; 992 992 double Ke_gg_gaussian3[numdof][numdof] ={0.0}; 993 double hydro_gamma,hydro_p,hydro_q ;993 double hydro_gamma,hydro_p,hydro_q,hydro_CR,hydro_n,rho_water,g; 994 994 double DL_scalar1; 995 995 double DL_scalar2; … … 1005 1005 1006 1006 /*retrieve material parameters: */ 1007 hydro_gamma=matpar->GetGamma(); 1007 // hydro_gamma=matpar->GetGamma(); 1008 g =matpar->GetG(); 1009 rho_water =matpar->GetRhoWater(); 1008 1010 hydro_p =matpar->GetHydroP(); 1009 1011 hydro_q =matpar->GetHydroQ(); 1010 1012 hydro_CR =matpar->GetHydroCR(); 1013 hydro_n =matpar->GetHydroN(); 1014 1015 hydro_gamma=1/(hydro_n*pow(hydro_CR,hydro_p)*pow((rho_water*g),hydro_q)); 1016 1011 1017 /* Start looping on the number of gaussian points: */ 1012 1018 gauss=new GaussTria(2); … … 1018 1024 GetNodalFunctions(&L[0],gauss); 1019 1025 GetNodalFunctionsDerivatives(&dL[0][0],&xyz_list[0][0],gauss); 1020 1026 //printf("NUMVERTICES=%d, Jdettria=%f\n",NUMVERTICES,Jdettria); //BK 1021 1027 for(i=0;i<NUMVERTICES;i++)dLx[i]=dL[0][i]; 1022 for(i=0;i<NUMVERTICES;i++)dLy[i]=dL[1][i]; 1028 for(i=0;i<NUMVERTICES;i++)dLy[i]=dL[1][i]; 1029 /* for(i=0;i<NUMVERTICES;i++) 1030 { dLx[i]=dL[0][i]; 1031 printf("dLx[%d]=%f, L[%d]=%f\n",i,dLx[i]),i,L[i];} 1032 for(i=0;i<NUMVERTICES;i++) 1033 { dLy[i]=dL[1][i]; 1034 printf("dLy[%d]=%f\n",i,dLy[i]);} */ 1023 1035 1024 1036 /*Get K parameter: */ 1025 1037 GetHydrologyK(&K[0],&xyz_list[0][0],gauss); 1026 1038 // printf("K[0]=%g,K[1]=%g\n",K[0],K[1]); 1039 1027 1040 if(dt){ 1028 1041 DL_scalar1=gauss->weight*Jdettria; … … 1049 1062 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian2[i][j]; 1050 1063 for(i=0;i<numdof;i++) for(j=0;j<numdof;j++) Ke->values[i*numdof+j]+=Ke_gg_gaussian3[i][j]; 1064 1051 1065 } 1052 1066 … … 2091 2105 basal_melting_input->GetParameterValue(&basal_melting_g,gauss); 2092 2106 old_watercolumn_input->GetParameterValue(&old_watercolumn_g,gauss); 2093 2107 // printf("ig=%d, old_watercolumn_g=%f,Jdettria=%f\n",ig,old_watercolumn_g,Jdettria);//bk 2108 // if(old_watercolumn_g<0) printf("old_watercolumn_g=%g,Jdettria=%f\n",old_watercolumn_g,Jdettria);//bk 2109 2094 2110 if(dt)for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*(old_watercolumn_g+dt*basal_melting_g)*L[i]; 2095 2111 else for(i=0;i<numdof;i++) pe->values[i]+=Jdettria*gauss->weight*basal_melting_g*L[i]; … … 2699 2715 watercolumn_input->GetParameterValue(&watercolumn,gauss); 2700 2716 values[i]=watercolumn; 2701 if((values[i])<0)values[i]=0;2717 // if((values[i])<0)values[i]=0; 2702 2718 } 2703 2719 … … 2785 2801 K[0]=pow(w,2)*(rho_ice*g*dsdx+(rho_water/rho_ice-1)*rho_ice*g*dbdx) - rho_ice * g * kn* w * (dsdx - dbdx ) * surface_slope; 2786 2802 K[1]=pow(w,2)*(rho_ice*g*dsdy+(rho_water/rho_ice-1)*rho_ice*g*dbdy) - rho_ice * g * kn *w * (dsdy - dbdy ) * surface_slope; 2787 2788 } 2803 2804 //bk 2805 // K[0]=fabs(pow(w,2)*(rho_ice*g*dsdx+(rho_water/rho_ice-1)*rho_ice*g*dbdx) - rho_ice * g * kn* w * (dsdx - dbdx ) * surface_slope); 2806 // K[1]=fabs(pow(w,2)*(rho_ice*g*dsdy+(rho_water/rho_ice-1)*rho_ice*g*dbdy) - rho_ice * g * kn *w * (dsdy - dbdy ) * surface_slope); 2807 // printf("K[0]=%g,K[1]=%g,w=%g\n",K[0],K[1],w); //bk 2808 // if (w<0) {printf("negative w!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"); 2809 // printf("K[0]=%g,K[1]=%g,w=%g\n",K[0],K[1],w);} 2810 2811 2812 } 2813 2789 2814 /*}}}*/ 2790 2815 /*FUNCTION Tria::Gradj {{{1*/ … … 3915 3940 values[i]=solution[doflist[i]]; 3916 3941 if(isnan(values[i])) _error_("NaN found in solution vector"); 3917 //if (values[i]<pow(10,-10))values[i]=pow(10,-10); 3942 // if (values[i]<pow(10,-10))values[i]=pow(10,-10); //correcting the water column to positive values 3943 3918 3944 } 3919 3945 -
issm/trunk/src/c/objects/IoModel.cpp
r8538 r8549 211 211 /*!Get thermal parameters: */ 212 212 IoModelFetchData(&this->beta,iomodel_handle,"beta"); 213 IoModelFetchData(&this->hydro_gamma,iomodel_handle,"hydro_gamma");214 IoModelFetchData(&this->hydro_kn,iomodel_handle,"hydro_kn");215 IoModelFetchData(&this->hydro_p,iomodel_handle,"hydro_p");216 IoModelFetchData(&this->hydro_q,iomodel_handle,"hydro_q");217 213 IoModelFetchData(&this->meltingpoint,iomodel_handle,"meltingpoint"); 218 214 IoModelFetchData(&this->referencetemperature,iomodel_handle,"referencetemperature"); … … 230 226 IoModelFetchData(&this->numforcings,iomodel_handle,"numforcings"); 231 227 228 /*!Get hydrology parameters: */ 229 // IoModelFetchData(&this->hydro_gamma,iomodel_handle,"hydro_gamma"); 230 IoModelFetchData(&this->hydro_kn,iomodel_handle,"hydro_kn"); 231 IoModelFetchData(&this->hydro_p,iomodel_handle,"hydro_p"); 232 IoModelFetchData(&this->hydro_q,iomodel_handle,"hydro_q"); 233 IoModelFetchData(&this->hydro_CR,iomodel_handle,"hydro_CR"); 234 IoModelFetchData(&this->hydro_n,iomodel_handle,"hydro_n"); 232 235 /*qmu: */ 233 236 if(this->qmu_analysis){ -
issm/trunk/src/c/objects/IoModel.h
r8538 r8549 170 170 /*thermal parameters: */ 171 171 double beta; 172 double hydro_gamma;173 double hydro_kn;174 double hydro_p;175 double hydro_q;176 172 double meltingpoint; 177 173 double referencetemperature; … … 230 226 int loadcounter; //keep track of how many loads are being created in each analysis type 231 227 int constraintcounter; //keep track of how many constraints are being created in each analysis type 232 /*}}}*/ 228 229 /*hydrology parameters: */ 230 // double hydro_gamma; 231 double hydro_kn; 232 double hydro_p; 233 double hydro_q; 234 double hydro_CR; 235 double hydro_n; 236 /*}}}*/ 233 237 /*Methods: {{{1*/ 234 238 ~IoModel(); -
issm/trunk/src/c/objects/Materials/Matpar.cpp
r8539 r8549 50 50 matpar_mixed_layer_capacity=iomodel->mixed_layer_capacity; 51 51 matpar_thermal_exchange_velocity=iomodel->thermal_exchange_velocity; 52 matpar_gamma=iomodel->hydro_gamma;52 // matpar_gamma=iomodel->hydro_gamma; 53 53 matpar_kn=iomodel->hydro_kn; 54 54 … … 69 69 this->hydro_p=iomodel->hydro_p; 70 70 this->hydro_q=iomodel->hydro_q; 71 71 this->hydro_CR=iomodel->hydro_CR; 72 this->hydro_n=iomodel->hydro_n; 72 73 } 73 74 /*}}}1*/ … … 414 415 } 415 416 /*}}}1*/ 417 /*FUNCTION Matpar::GetHydroCR {{{1*/ 418 double Matpar::GetHydroCR(){ 419 return hydro_CR; 420 } 421 /*}}}1*/ 422 /*FUNCTION Matpar::GetHydroN {{{1*/ 423 double Matpar::GetHydroN(){ 424 return hydro_n; 425 } 426 /*}}}1*/ 416 427 /*FUNCTION Matpar::TMeltingPoint {{{1*/ 417 428 double Matpar::TMeltingPoint(double pressure){ -
issm/trunk/src/c/objects/Materials/Matpar.h
r8538 r8549 33 33 double hydro_p; 34 34 double hydro_q; 35 35 double hydro_CR; 36 double hydro_n; 36 37 public: 37 38 … … 86 87 double GetHydroP(); 87 88 double GetHydroQ(); 89 double GetHydroCR(); 90 double GetHydroN(); 88 91 double TMeltingPoint(double pressure); 89 92 double PureIceEnthalpy(double pressure); -
issm/trunk/src/c/solutions/hydrology_core.cpp
r7643 r8549 43 43 for(i=0;i<nsteps;i++){ 44 44 45 if(nsteps)_printf_(VerboseSolution(),"time step: 45 if(nsteps)_printf_(VerboseSolution(),"time step:%i/%i\n",i+1,nsteps); 46 46 time=(i+1)*dt; 47 47 48 // printf("time step=%d=============================\n",i+1);//bk 48 49 /*call hydrology_core step: */ 49 50 hydrology_core_step(femmodel,i,time); -
issm/trunk/src/m/classes/version/7.6/model.m
r8497 r8549 282 282 hydro_p=NaN; 283 283 hydro_q=NaN; 284 hydro_gamma=0;284 % hydro_gamma=0; 285 285 hydro_kn=0; 286 286 … … 790 790 md.hydro_p=2; 791 791 md.hydro_q=1; 792 md.hydro_gamma=1/(md.hydro_n*md.hydro_CR^md.hydro_p*(md.rho_water*md.g)^md.hydro_q);792 % md.hydro_gamma=1/(md.hydro_n*md.hydro_CR^md.hydro_p*(md.rho_water*md.g)^md.hydro_q); 793 793 md.hydro_kn=0; 794 794 -
issm/trunk/src/m/classes/version/7.7/model.m
r8497 r8549 282 282 hydro_p=NaN; 283 283 hydro_q=NaN; 284 hydro_gamma=0;284 % hydro_gamma=0; 285 285 hydro_kn=0; 286 286 … … 862 862 md.hydro_p=2; 863 863 md.hydro_q=1; 864 md.hydro_gamma=1/(md.hydro_n*md.hydro_CR^md.hydro_p*(md.rho_water*md.g)^md.hydro_q);864 % md.hydro_gamma=1/(md.hydro_n*md.hydro_CR^md.hydro_p*(md.rho_water*md.g)^md.hydro_q); 865 865 md.hydro_kn=0; 866 866 -
issm/trunk/src/m/model/marshall.m
r8541 r8549 200 200 %Thermal parameters 201 201 WriteData(fid,md.beta,'Scalar','beta'); 202 WriteData(fid,md.hydro_gamma,'Scalar','hydro_gamma');203 WriteData(fid,md.hydro_kn,'Scalar','hydro_kn');204 WriteData(fid,md.hydro_p,'Scalar','hydro_p');205 WriteData(fid,md.hydro_q,'Scalar','hydro_q');206 202 WriteData(fid,md.meltingpoint,'Scalar','meltingpoint'); 207 203 WriteData(fid,md.referencetemperature,'Scalar','referencetemperature'); … … 215 211 WriteData(fid,md.stabilize_constraints,'Integer','stabilize_constraints'); 216 212 213 %Hydrology parameters 214 %WriteData(fid,md.hydro_gamma,'Scalar','hydro_gamma'); 215 WriteData(fid,md.hydro_kn,'Scalar','hydro_kn'); 216 WriteData(fid,md.hydro_p,'Scalar','hydro_p'); 217 WriteData(fid,md.hydro_q,'Scalar','hydro_q'); 218 WriteData(fid,md.hydro_CR,'Scalar','hydro_CR'); 219 WriteData(fid,md.hydro_n,'Scalar','hydro_n'); 220 217 221 %elements type 218 222 WriteData(fid,md.ishutter,'Integer','ishutter');
Note:
See TracChangeset
for help on using the changeset viewer.