Changeset 17248
- Timestamp:
- 02/10/14 14:38:22 (11 years ago)
- Location:
- issm/trunk-jpl
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/classes/Elements/Element.cpp
r17242 r17248 283 283 284 284 this->StrainRateFS(&epsilon[0],xyz_list,gauss,vx_input,vy_input,vz_input); 285 this-> material->GetViscosity3dFS(&viscosity,&epsilon[0]);285 this->ViscosityFS(&viscosity,3,xyz_list,gauss,vx_input,vy_input,vz_input); 286 286 this->GetPhi(&phi,&epsilon[0],viscosity); 287 287 … … 303 303 IssmDouble epsilon3d[6]; /* epsilon=[exx,eyy,ezz,exy,exz,eyz];*/ 304 304 IssmDouble epsilon2d[3]; /* epsilon=[exx,eyy,exy]; */ 305 IssmDouble eps_eff; 306 IssmDouble eps0=1.e-27; 305 307 306 308 if(dim==3){ 307 /* 3D*/309 /* eps_eff^2 = exx^2 + eyy^2 + exy^2 + exz^2 + eyz^2 + exx*eyy */ 308 310 this->StrainRateFS(&epsilon3d[0],xyz_list,gauss,vx_input,vy_input,vz_input); 309 material->GetViscosity3dFS(&viscosity, &epsilon3d[0]);311 eps_eff = sqrt(epsilon3d[0]*epsilon3d[0] + epsilon3d[1]*epsilon3d[1] + epsilon3d[3]*epsilon3d[3] + epsilon3d[4]*epsilon3d[4] + epsilon3d[5]*epsilon3d[5] + epsilon3d[0]*epsilon3d[1]+eps0*eps0); 310 312 } 311 313 else{ 312 /* 2D*/314 /* eps_eff^2 = exx^2 + eyy^2 + 2*exy^2 */ 313 315 this->StrainRateSSA(&epsilon2d[0],xyz_list,gauss,vx_input,vy_input); 314 material->GetViscosity2dvertical(&viscosity,&epsilon2d[0]); 315 } 316 eps_eff = sqrt(epsilon2d[0]*epsilon2d[0] + epsilon2d[1]*epsilon2d[1] + 2.*epsilon2d[2]*epsilon2d[2]); 317 } 318 319 /*Get viscosity*/ 320 material->GetViscosity(&viscosity,eps_eff); 316 321 317 322 /*Assign output pointer*/ … … 384 389 IssmDouble epsilon3d[5];/* epsilon=[exx,eyy,exy,exz,eyz];*/ 385 390 IssmDouble epsilon2d[2]; /* epsilon=[exx,exy]; */ 391 IssmDouble eps_eff; 386 392 387 393 if(dim==3){ 394 /* eps_eff^2 = exx^2 + eyy^2 + exy^2 + exz^2 + eyz^2 + exx*eyy */ 388 395 this->StrainRateHO(&epsilon3d[0],xyz_list,gauss,vx_input,vy_input); 389 material->GetViscosity3d(&viscosity, &epsilon3d[0]);396 eps_eff = sqrt(epsilon3d[0]*epsilon3d[0] + epsilon3d[1]*epsilon3d[1] + epsilon3d[2]*epsilon3d[2] + epsilon3d[3]*epsilon3d[3] + epsilon3d[4]*epsilon3d[4] + epsilon3d[0]*epsilon3d[1]); 390 397 } 391 398 else{ 399 /* eps_eff^2 = exx^2 + exy^2 */ 392 400 this->StrainRateHO2dvertical(&epsilon2d[0],xyz_list,gauss,vx_input,vy_input); 393 material->GetViscosity2dverticalHO(&viscosity, &epsilon2d[0]); 394 } 401 eps_eff = sqrt(epsilon2d[0]*epsilon2d[0] + epsilon2d[1]*epsilon2d[1]); 402 } 403 404 /*Get viscosity*/ 405 material->GetViscosity(&viscosity,eps_eff); 395 406 396 407 /*Assign output pointer*/ … … 402 413 IssmDouble viscosity; 403 414 IssmDouble epsilon[3];/* epsilon=[exx,eyy,exy]; */ 404 415 IssmDouble eps_eff; 416 417 /*Get effective strain rate 418 * eps_eff^2 = exx^2 + eyy^2 + exy^2 + exx*eyy+*/ 405 419 this->StrainRateSSA(&epsilon[0],xyz_list,gauss,vx_input,vy_input); 406 material->GetViscosity2d(&viscosity, &epsilon[0]); 420 eps_eff = sqrt(epsilon[0]*epsilon[0] + epsilon[1]*epsilon[1] + epsilon[2]*epsilon[2] + epsilon[0]*epsilon[1]); 421 422 /*Get viscosity*/ 423 material->GetViscosityBar(&viscosity,eps_eff); 407 424 408 425 /*Assign output pointer*/ -
issm/trunk-jpl/src/c/classes/Elements/Penta.cpp
r17236 r17248 254 254 /*Compute strain rate viscosity and pressure: */ 255 255 this->StrainRateFS(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 256 material->GetViscosity3dFS(&viscosity,&epsilon[0]);256 this->ViscosityFS(&viscosity,3,&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 257 257 pressure_input->GetInputValue(&pressure,gauss); 258 258 … … 320 320 /*Compute strain rate viscosity and pressure: */ 321 321 this->StrainRateFS(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 322 material->GetViscosity3d(&viscosity,&epsilon[0]);322 this->ViscosityFS(&viscosity,3,&xyz_list[0][0],gauss,vx_input,vy_input,vz_input); 323 323 pressure_input->GetInputValue(&pressure,gauss); 324 324 … … 3138 3138 _assert_(gauss->Enum()==GaussPentaEnum); 3139 3139 this->StrainRateFS(&epsilon[0],xyz_list,(GaussPenta*)gauss,vx_input,vy_input,vz_input); 3140 material->GetViscosity3dFS(&viscosity,&epsilon[0]);3140 this->ViscosityFS(&viscosity,3,xyz_list,(GaussPenta*)gauss,vx_input,vy_input,vz_input); 3141 3141 GetPhi(&phi,&epsilon[0],viscosity); 3142 3142 -
issm/trunk-jpl/src/c/classes/Elements/Tria.cpp
r17236 r17248 204 204 void Tria::ComputeStressTensor(){ 205 205 206 IssmDouble 207 IssmDouble 208 IssmDouble 209 IssmDouble 210 IssmDouble 211 IssmDouble 212 IssmDouble 213 IssmDouble 214 IssmDouble 215 GaussTria* gauss=NULL;206 IssmDouble xyz_list[NUMVERTICES][3]; 207 IssmDouble pressure,viscosity; 208 IssmDouble epsilon[3]; /* epsilon=[exx,eyy,exy];*/ 209 IssmDouble sigma_xx[NUMVERTICES]; 210 IssmDouble sigma_yy[NUMVERTICES]; 211 IssmDouble sigma_zz[NUMVERTICES]={0,0,0}; 212 IssmDouble sigma_xy[NUMVERTICES]; 213 IssmDouble sigma_xz[NUMVERTICES]={0,0,0}; 214 IssmDouble sigma_yz[NUMVERTICES]={0,0,0}; 215 GaussTria* gauss=NULL; 216 216 217 217 /* Get node coordinates and dof list: */ … … 230 230 /*Compute strain rate viscosity and pressure: */ 231 231 this->StrainRateSSA(&epsilon[0],&xyz_list[0][0],gauss,vx_input,vy_input); 232 material->GetViscosity2d(&viscosity,&epsilon[0]);232 this->ViscositySSA(&viscosity,&xyz_list[0][0],gauss,vx_input,vy_input); 233 233 pressure_input->GetInputValue(&pressure,gauss); 234 234 -
issm/trunk-jpl/src/c/classes/Materials/Material.h
r17242 r17248 26 26 virtual void Configure(Elements* elements)=0; 27 27 virtual void GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum)=0; 28 virtual void GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon)=0; 29 virtual void GetViscosity2dvertical(IssmDouble* pviscosity, IssmDouble* pepsilon)=0; 30 virtual void GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* pepsilon)=0; 31 virtual void GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon)=0; 32 virtual void GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon)=0; 28 virtual void GetViscosity(IssmDouble* pviscosity,IssmDouble epseff)=0; 29 virtual void GetViscosityBar(IssmDouble* pviscosity,IssmDouble epseff)=0; 33 30 virtual void GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0; 34 31 virtual void GetViscosityDComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon)=0; -
issm/trunk-jpl/src/c/classes/Materials/Matice.cpp
r17244 r17248 240 240 } 241 241 /*}}}*/ 242 /*FUNCTION Matice::GetViscosity 2d{{{*/243 void Matice::GetViscosity 2d(IssmDouble* pviscosity, IssmDouble* epsilon){242 /*FUNCTION Matice::GetViscosity {{{*/ 243 void Matice::GetViscosity(IssmDouble* pviscosity,IssmDouble eps_eff){ 244 244 /*From a string tensor and a material object, return viscosity, using Glen's flow law. 245 246 viscosity= ------------------------- ------------------------------------------247 2 [ exx^2+eyy^2+exx*eyy+exy^2+exz^2+eyz^2 ]^[(n-1)/2n]248 249 where viscosity is the viscotiy, B the flow law parameter , (u,v) the velocity250 vector,and n the flow law exponent.251 252 If eps ilon is NULL, it means this is the first time SystemMatrices is being run, and we245 (1-D) B 246 viscosity= ------------------------- 247 2 eps_eff ^[(n-1)/n] 248 249 where viscosity is the viscotiy, B the flow law parameter , eps_eff is the effective strain rate 250 and n the flow law exponent. 251 252 If eps_eff = 0 , it means this is the first time SystemMatrices is being run, and we 253 253 return 10^14, initial viscosity. 254 254 */ … … 257 257 IssmDouble viscosity; 258 258 259 /*input strain rate: */260 IssmDouble exx,eyy,exy;261 262 259 /*Intermediary: */ 263 IssmDouble A,e;264 260 IssmDouble B,D,n; 265 261 266 262 /*Get B and n*/ 267 B=GetB bar();268 n=GetN(); 269 D=GetD bar();270 271 if (n==1 ){272 /* Viscous behaviour! viscosity=B: */273 viscosity=(1 -D)*B/2;263 B=GetB(); _assert_(B>0.); 264 n=GetN(); _assert_(n>0.); 265 D=GetD(); _assert_(D>=0. && D<1.); 266 267 if (n==1.){ 268 /*Linear Viscous behavior (Newtonian fluid) viscosity=B/2: */ 269 viscosity=(1.-D)*B/2.; 274 270 } 275 271 else{ 276 if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){ 277 viscosity=0.5*pow(10.,14); 278 } 272 273 /*if no strain rate, return maximum viscosity*/ 274 if(eps_eff==0.){ 275 viscosity = 1.e+14/2.; 276 //viscosity=2.5*pow(10.,17); 277 } 278 279 279 else{ 280 /*Retrive strain rate components: */ 281 exx=*(epsilon+0); 282 eyy=*(epsilon+1); 283 exy=*(epsilon+2); 284 285 /*Build viscosity: viscosity=B/(2*A^e) */ 286 A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+exx*eyy; 287 if(A==0){ 288 /*Maxiviscositym viscosity for 0 shear areas: */ 289 viscosity=2.5*pow(10.,17); 290 } 291 else{ 292 e=(n-1)/(2*n); 293 viscosity=(1-D)*B/(2*pow(A,e)); 294 } 280 viscosity=(1.-D)*B/(2.*pow(eps_eff,(n-1.)/n)); 295 281 } 296 282 } … … 298 284 /*Checks in debugging mode*/ 299 285 if(viscosity<=0) _error_("Negative viscosity"); 300 _assert_(B>0);301 _assert_(n>0);302 _assert_(D>=0 && D<1);303 286 304 287 /*Return: */ … … 306 289 } 307 290 /*}}}*/ 308 /*FUNCTION Matice::GetViscosity 2dvertical{{{*/309 void Matice::GetViscosity 2dvertical(IssmDouble* pviscosity, IssmDouble* epsilon){291 /*FUNCTION Matice::GetViscosityBar {{{*/ 292 void Matice::GetViscosityBar(IssmDouble* pviscosity,IssmDouble eps_eff){ 310 293 /*From a string tensor and a material object, return viscosity, using Glen's flow law. 311 312 viscosity= ------------------------- -------------313 2 [ exx^2+eyy^2+ 2exy^2]^[(n-1)/2n]314 315 where viscosity is the viscotiy, B the flow law parameter , (u,v) the velocity316 vector,and n the flow law exponent.317 318 If eps ilon is NULL, it means this is the first time SystemMatrices is being run, and we294 (1-D) B 295 viscosity= ------------------------- 296 2 eps_eff ^[(n-1)/n] 297 298 where viscosity is the viscotiy, B the flow law parameter , eps_eff is the effective strain rate 299 and n the flow law exponent. 300 301 If eps_eff = 0 , it means this is the first time SystemMatrices is being run, and we 319 302 return 10^14, initial viscosity. 320 303 */ … … 323 306 IssmDouble viscosity; 324 307 325 /*input strain rate: */326 IssmDouble exx,eyy,exy;327 328 308 /*Intermediary: */ 329 IssmDouble A,e;330 309 IssmDouble B,D,n; 331 310 332 311 /*Get B and n*/ 333 B=GetB ();334 n=GetN(); 335 D=GetD ();336 337 if (n==1 ){338 /* Viscous behaviour! viscosity=B: */339 viscosity=(1 -D)*B/2;312 B=GetBbar(); _assert_(B>0.); 313 n=GetN(); _assert_(n>0.); 314 D=GetDbar(); _assert_(D>=0. && D<1.); 315 316 if (n==1.){ 317 /*Linear Viscous behavior (Newtonian fluid) viscosity=B/2: */ 318 viscosity=(1.-D)*B/2.; 340 319 } 341 320 else{ 342 if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){ 343 viscosity=0.5*pow(10.,14); 344 } 321 322 /*if no strain rate, return maximum viscosity*/ 323 if(eps_eff==0.){ 324 viscosity = 1.e+14/2.; 325 //viscosity=2.5*pow(10.,17); 326 } 327 345 328 else{ 346 /*Retrive strain rate components: */ 347 exx=epsilon[0]; 348 eyy=epsilon[1]; 349 exy=epsilon[2]; 350 351 /*Build viscosity: viscosity=B/(2*A^e) */ 352 A=exx*exx+eyy*eyy+2.*exy*exy; 353 if(A==0.){ 354 /*Maxiviscositym viscosity for 0 shear areas: */ 355 viscosity=2.5*2.e+17; 356 } 357 else{ 358 e=(n-1.)/(2.*n); 359 viscosity=(1.-D)*B/(2.*pow(A,e)); 360 } 329 viscosity=(1.-D)*B/(2.*pow(eps_eff,(n-1.)/n)); 361 330 } 362 331 } … … 364 333 /*Checks in debugging mode*/ 365 334 if(viscosity<=0) _error_("Negative viscosity"); 366 _assert_(B>0);367 _assert_(n>0);368 _assert_(D>=0 && D<1);369 335 370 336 /*Return: */ 371 337 *pviscosity=viscosity; 372 }373 /*}}}*/374 /*FUNCTION Matice::GetViscosity2dverticalHO {{{*/375 void Matice::GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* epsilon){376 /*From a string tensor and a material object, return viscosity, using Glen's flow law.377 (1-D) B378 viscosity= --------------------------------------379 2[ 2exx^2 + 2exy^2]^[(n-1)/2n]380 381 where viscosity is the viscotiy, B the flow law parameter , (u,v) the velocity382 vector, and n the flow law exponent.383 384 If epsilon is NULL, it means this is the first time SystemMatrices is being run, and we385 return 10^14, initial viscosity.386 */387 388 /*output: */389 IssmDouble viscosity;390 391 /*input strain rate: */392 IssmDouble exx,exy;393 394 /*Intermediary: */395 IssmDouble A,e;396 IssmDouble B,D,n;397 398 /*Get B and n*/399 B=GetB();400 n=GetN();401 D=GetD();402 403 if (n==1){404 /*Viscous behaviour! viscosity=B: */405 viscosity=(1-D)*B/2;406 }407 else{408 if((epsilon[0]==0) && (epsilon[1]==0)){409 viscosity=0.5*pow(10.,14);410 }411 else{412 /*Retrive strain rate components: */413 exx=epsilon[0];414 exy=epsilon[1];415 416 /*Build viscosity: viscosity=B/(2*A^e) */417 A=2*exx*exx+2.*exy*exy;418 if(A==0.){419 /*Maxiviscositym viscosity for 0 shear areas: */420 viscosity=2.5*2.e+17;421 }422 else{423 e=(n-1.)/(2.*n);424 viscosity=(1.-D)*B/(2.*pow(A,e));425 }426 }427 }428 429 /*Checks in debugging mode*/430 if(viscosity<=0) _error_("Negative viscosity");431 _assert_(B>0);432 _assert_(n>0);433 _assert_(D>=0 && D<1);434 435 /*Return: */436 *pviscosity=viscosity;437 }438 /*}}}*/439 /*FUNCTION Matice::GetViscosity3d {{{*/440 void Matice::GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* epsilon){441 442 /*Return viscosity accounting for steady state power law creep [Thomas and SSA, 1982]:443 *444 * (1-D)*B445 * viscosity3d= -------------------------------------------------------------------446 * 2[ exx^2+eyy^2+exx*eyy+exy^2+exz^2+eyz^2 ]^[(n-1)/2n]447 *448 * where mu is the viscotiy, B the flow law parameter , (u,v) the velocity449 * vector, and n the flow law exponent.450 *451 * If epsilon is NULL, it means this is the first time Emg is being run, and we452 * return g, initial viscosity.453 */454 455 /*output: */456 IssmDouble viscosity3d;457 458 /*input strain rate: */459 IssmDouble exx,eyy,exy,exz,eyz;460 461 /*Intermediaries: */462 IssmDouble A,e;463 IssmDouble B,D,n;464 465 /*Get B and n*/466 B=GetB();467 D=GetD();468 n=GetN();469 470 if (n==1){471 /*Viscous behaviour! viscosity3d=B: */472 viscosity3d=(1-D)*B/2;473 }474 else{475 if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) &&476 (epsilon[3]==0) && (epsilon[4]==0)){477 viscosity3d=0.5*pow(10.,14);478 }479 else{480 481 /*Retrive strain rate components: */482 exx=*(epsilon+0);483 eyy=*(epsilon+1);484 exy=*(epsilon+2);485 exz=*(epsilon+3);486 eyz=*(epsilon+4);487 488 /*Build viscosity: viscosity3d=2*B/(2*A^e) */489 A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+pow(exz,2)+pow(eyz,2)+exx*eyy;490 if(A==0){491 /*Maxiviscosity3dm viscosity for 0 shear areas: */492 viscosity3d=2.25*pow(10.,17);493 }494 else{495 e=(n-1)/2/n;496 497 viscosity3d=(1-D)*B/(2*pow(A,e));498 }499 }500 }501 502 /*Checks in debugging mode*/503 if(viscosity3d<=0) _error_("Negative viscosity");504 _assert_(B>0);505 _assert_(n>0);506 _assert_(D>=0 && D<1);507 508 /*Assign output pointers:*/509 *pviscosity3d=viscosity3d;510 }511 /*}}}*/512 /*FUNCTION Matice::GetViscosity3dFS {{{*/513 void Matice::GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){514 /*Return viscosity accounting for steady state power law creep [Thomas and SSA, 1982]:515 *516 * (1-D)*B517 * viscosity3d= -------------------------------------------------------------------518 * 2[ exx^2+eyy^2+exx*eyy+exy^2+exz^2+eyz^2 ]^[(n-1)/2n]519 *520 * where mu is the viscotiy, B the flow law parameter , (u,v) the velocity521 * vector, and n the flow law exponent.522 *523 * If epsilon is NULL, it means this is the first time Emg is being run, and we524 * return g, initial viscosity.525 */526 527 /*output: */528 IssmDouble viscosity3d;529 530 /*input strain rate: */531 IssmDouble exx,eyy,exy,exz,eyz,ezz;532 533 /*Intermediaries: */534 IssmDouble A,e;535 IssmDouble B,D,n;536 IssmDouble eps0;537 538 /*Get B and n*/539 eps0=pow(10.,-27);540 B=GetB();541 D=GetD();542 n=GetN();543 544 if (n==1){545 /*Viscous behaviour! viscosity3d=B: */546 viscosity3d=(1-D)*B/2;547 }548 else{549 if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) &&550 (epsilon[3]==0) && (epsilon[4]==0) && (epsilon[5]==0)){551 viscosity3d=0.5*pow(10.,14);552 }553 else{554 555 /*Retrive strain rate components: */556 exx=*(epsilon+0);557 eyy=*(epsilon+1);558 ezz=*(epsilon+2); //not used559 exy=*(epsilon+3);560 exz=*(epsilon+4);561 eyz=*(epsilon+5);562 563 /*Build viscosity: viscosity3d=B/(2*A^e) */564 A=pow(exx,2)+pow(eyy,2)+pow(exy,2)+pow(exz,2)+pow(eyz,2)+exx*eyy+pow(eps0,2);565 if(A==0){566 /*Maxiviscosity3dm viscosity for 0 shear areas: */567 viscosity3d=2.25*pow(10.,17);568 }569 else{570 e=(n-1)/2/n;571 viscosity3d=(1-D)*B/(2*pow(A,e));572 }573 }574 }575 576 /*Checks in debugging mode*/577 if(viscosity3d<=0) _error_("Negative viscosity");578 _assert_(B>0);579 _assert_(n>0);580 _assert_(D>=0 && D<1);581 582 /*Assign output pointers:*/583 *pviscosity3d=viscosity3d;584 338 } 585 339 /*}}}*/ … … 706 460 IssmDouble exx,eyy,exy,exz,eyz; 707 461 708 /*Get visocisty and n*/709 GetViscosity3d(&mu,epsilon);710 n=GetN();711 462 712 463 if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && … … 715 466 } 716 467 else{ 468 717 469 /*Retrive strain rate components: */ 718 470 exx=epsilon[0]; … … 723 475 eff2 = exx*exx + eyy*eyy + exx*eyy + exy*exy + exz*exz + eyz*eyz; 724 476 725 mu_prime=(1-n)/(2*n) * mu/eff2; 477 GetViscosity(&mu,sqrt(eff2)); 478 n=GetN(); 479 mu_prime=(1.-n)/(2.*n) * mu/eff2; 726 480 } 727 481 … … 739 493 /*input strain rate: */ 740 494 IssmDouble exx,eyy,exy,exz,eyz,ezz; 741 742 /*Get visocisty and n*/743 GetViscosity3d(&mu,epsilon);744 n=GetN();745 495 746 496 if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0) && … … 758 508 eff2 = exx*exx + eyy*eyy + exx*eyy + exy*exy + exz*exz + eyz*eyz; 759 509 510 GetViscosity(&mu,sqrt(eff2)); 511 n=GetN(); 760 512 mu_prime=(1-n)/(2*n) * mu/eff2; 761 513 } … … 774 526 /*input strain rate: */ 775 527 IssmDouble exx,eyy,exy; 776 777 /*Get visocisty and n*/778 GetViscosity2d(&mu,epsilon);779 n=GetN();780 528 781 529 if((epsilon[0]==0) && (epsilon[1]==0) && (epsilon[2]==0)){ … … 789 537 eff2 = exx*exx + eyy*eyy + exx*eyy + exy*exy ; 790 538 791 mu_prime=(1-n)/(2*n) * mu/eff2; 539 GetViscosityBar(&mu,sqrt(eff2)); 540 n=GetN(); 541 mu_prime=(1.-n)/(2.*n)*mu/eff2; 792 542 } 793 543 -
issm/trunk-jpl/src/c/classes/Materials/Matice.h
r17242 r17248 52 52 void GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum); 53 53 void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters); 54 void GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon); 55 void GetViscosity2dvertical(IssmDouble* pviscosity, IssmDouble* pepsilon); 56 void GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* pepsilon); 57 void GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon); 58 void GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon); 54 void GetViscosity(IssmDouble* pviscosity, IssmDouble eps_eff); 55 void GetViscosityBar(IssmDouble* pviscosity, IssmDouble eps_eff); 59 56 void GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon); 60 57 void GetViscosityDComplement(IssmDouble*, IssmDouble*); -
issm/trunk-jpl/src/c/classes/Materials/Matpar.h
r17242 r17248 82 82 void Configure(Elements* elements); 83 83 void GetVectorFromInputs(Vector<IssmDouble>* vector,int input_enum){return;} 84 void GetViscosity2d(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");}; 85 void GetViscosity2dvertical(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");}; 86 void GetViscosity2dverticalHO(IssmDouble* pviscosity, IssmDouble* pepsilon){_error_("not supported");}; 87 void GetViscosity3d(IssmDouble* pviscosity3d, IssmDouble* pepsilon){_error_("not supported");}; 88 void GetViscosity3dFS(IssmDouble* pviscosity3d, IssmDouble* epsilon){_error_("not supported");}; 84 void GetViscosity(IssmDouble* pviscosity,IssmDouble eps_eff){_error_("not supported");}; 85 void GetViscosityBar(IssmDouble* pviscosity,IssmDouble eps_eff){_error_("not supported");}; 89 86 void GetViscosityComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");}; 90 87 void GetViscosityDComplement(IssmDouble* pviscosity_complement, IssmDouble* pepsilon){_error_("not supported");};
Note:
See TracChangeset
for help on using the changeset viewer.