00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053 #include <FDdecoupledElastic3D.h>
00054
00055
00056
00057
00058
00059 stresstensor FDdecoupledElastic3D::static_FDE_stress;
00060
00061
00062
00063
00064
00065
00066
00067 FDdecoupledElastic3D::FDdecoupledElastic3D(int tag,
00068
00069 int classTag,
00070
00071 WEnergy *wEnergy_in,
00072
00073 double rho_in= 0.0)
00074
00075 :FiniteDeformationElastic3D(tag, classTag, rho_in)
00076
00077 {
00078
00079 if ( wEnergy_in )
00080
00081 {
00082
00083 W = wEnergy_in->newObj();
00084
00085 }
00086
00087 else
00088
00089 {
00090
00091 opserr << "FDdecoupledElastic3D:: FDdecoupledElastic3D failed to construct the W Energy\n";
00092
00093 exit(-1);
00094
00095 }
00096
00097 }
00098
00099
00100
00101 FDdecoupledElastic3D::FDdecoupledElastic3D(int tag,
00102
00103 WEnergy *wEnergy_in,
00104
00105 double rho_in = 0.0)
00106
00107 :FiniteDeformationElastic3D(tag, ND_TAG_FDdecoupledElastic3D, rho_in)
00108
00109 {
00110
00111 if ( wEnergy_in)
00112
00113 {
00114
00115 W = wEnergy_in->newObj();
00116
00117 }
00118
00119 else
00120
00121 {
00122
00123 opserr << "FDdecoupledElastic3D:: FDdecoupledElastic3D failed to construct the W Energy\n";
00124
00125 exit(-1);
00126
00127 }
00128
00129 }
00130
00131
00132
00133 FDdecoupledElastic3D::FDdecoupledElastic3D(int tag,
00134
00135 WEnergy *wEnergy_in)
00136
00137 :FiniteDeformationElastic3D(tag, ND_TAG_FDdecoupledElastic3D, 0.0)
00138
00139 {
00140
00141 if ( wEnergy_in )
00142
00143 {
00144
00145 W = wEnergy_in->newObj();
00146
00147 }
00148
00149 else
00150
00151 {
00152
00153 opserr << "FDdecoupledElastic3D:: FDdecoupledElastic3D failed to construct the W Energy\n";
00154
00155 exit(-1);
00156
00157 }
00158
00159 }
00160
00161
00162
00163
00164
00165 FDdecoupledElastic3D::FDdecoupledElastic3D( )
00166
00167 :FiniteDeformationElastic3D(0, 0, 0.0)
00168
00169 {
00170
00171 W = 0;
00172
00173 }
00174
00175
00176
00177
00178
00179 FDdecoupledElastic3D::FDdecoupledElastic3D(FDdecoupledElastic3D &fde3d )
00180
00181 {
00182
00183 F = fde3d.F;
00184
00185 C = fde3d.C;
00186
00187 Cinv = fde3d.Cinv;
00188
00189 J = fde3d.J;
00190
00191 lambda1 = fde3d.lambda1;
00192
00193 lambda2 = fde3d.lambda2;
00194
00195 lambda3 = fde3d.lambda3;
00196
00197 lambda_wave1 = fde3d.lambda_wave1;
00198
00199 lambda_wave2 = fde3d.lambda_wave2;
00200
00201 lambda_wave3 = fde3d.lambda_wave3;
00202
00203
00204
00205 Stiffness = fde3d.Stiffness;
00206
00207 thisGreenStrain = fde3d.thisGreenStrain;
00208
00209 thisPK2Stress = fde3d.thisPK2Stress;
00210
00211 }
00212
00213
00214
00215
00216
00217 FDdecoupledElastic3D::~FDdecoupledElastic3D()
00218
00219 {
00220
00221 if (W)
00222
00223 delete W;
00224
00225 }
00226
00227
00228
00229
00230
00231 double FDdecoupledElastic3D::getRho(void)
00232
00233 {
00234
00235 return rho;
00236
00237 }
00238
00239
00240
00241 WEnergy *FDdecoupledElastic3D::getWEnergy(void)
00242
00243 {
00244
00245 return W;
00246
00247 }
00248
00249
00250
00251 int FDdecoupledElastic3D::setTrialF(const straintensor &f)
00252
00253 {
00254
00255 FromForC = 0;
00256
00257 F = f;
00258
00259 C = F("ki")*F("kj"); C.null_indices();
00260
00261 return this->ComputeTrials();
00262
00263 }
00264
00265
00266
00267 int FDdecoupledElastic3D::setTrialFIncr(const straintensor &df)
00268
00269 {
00270
00271 return this->setTrialF(this->getF() + df);
00272
00273 }
00274
00275
00276
00277 int FDdecoupledElastic3D::setTrialC(const straintensor &c)
00278
00279 {
00280
00281 FromForC = 1;
00282
00283 C = c;
00284
00285 return this->ComputeTrials();
00286
00287 }
00288
00289
00290
00291 int FDdecoupledElastic3D::setTrialCIncr(const straintensor &dc)
00292
00293 {
00294
00295 return this->setTrialC(this->getC() + dc);
00296
00297 }
00298
00299
00300
00301 const straintensor& FDdecoupledElastic3D::getF(void)
00302
00303 {
00304
00305 return F;
00306
00307 }
00308
00309
00310
00311 const straintensor& FDdecoupledElastic3D::getC(void)
00312
00313 {
00314
00315 return C;
00316
00317 }
00318
00319
00320
00321 const double FDdecoupledElastic3D::getJ(void)
00322
00323 {
00324
00325 return J;
00326
00327 }
00328
00329
00330
00331 const Vector FDdecoupledElastic3D::getlambda(void)
00332
00333 {
00334
00335 Vector lambda(3);
00336
00337
00338
00339 lambda(0) = lambda1;
00340
00341 lambda(1) = lambda2;
00342
00343 lambda(2) = lambda3;
00344
00345
00346
00347 return lambda;
00348
00349 }
00350
00351
00352
00353 const Vector FDdecoupledElastic3D::getlambda_wave(void)
00354
00355 {
00356
00357 Vector lambda_wave(3);
00358
00359 lambda_wave(0) = lambda_wave1;
00360
00361 lambda_wave(1) = lambda_wave2;
00362
00363 lambda_wave(2) = lambda_wave3;
00364
00365
00366
00367 return lambda_wave;
00368
00369 }
00370
00371
00372
00373 const Vector FDdecoupledElastic3D::wa(void)
00374
00375 {
00376
00377 Vector Wa(3);
00378
00379 Vector lambda_wave(3);
00380
00381 lambda_wave = this->getlambda_wave();
00382
00383 Vector disowOverlambda = W->disowOdlambda(lambda_wave);
00384
00385 double temp = disowOverlambda(0) * lambda_wave(0) +
00386
00387 disowOverlambda(1) * lambda_wave(1) +
00388
00389 disowOverlambda(2) * lambda_wave(2) ;
00390
00391 temp = temp * (-0.3333333333333333333333333333);
00392
00393 Wa(0) = temp + disowOverlambda(0) * lambda_wave(0);
00394
00395 Wa(1) = temp + disowOverlambda(1) * lambda_wave(1);
00396
00397 Wa(2) = temp + disowOverlambda(2) * lambda_wave(2);
00398
00399 return Wa;
00400
00401 }
00402
00403
00404
00405 const Tensor FDdecoupledElastic3D::Yab(void)
00406
00407 {
00408
00409 Tensor Y(2, def_dim_2, 0.0);
00410
00411 Tensor I_ij("I", 2, def_dim_2);
00412
00413 Vector lambda_wave(3);
00414
00415 lambda_wave = this->getlambda_wave();
00416
00417 Tensor d2 = W->d2isowOdlambda1dlambda2(lambda_wave);
00418
00419 Vector d1 = W->disowOdlambda(lambda_wave);
00420
00421 Vector d11 = W->d2isowOdlambda2(lambda_wave);
00422
00423 d2.val(1,1) = d11(0);
00424
00425 d2.val(2,2) = d11(1);
00426
00427 d2.val(3,3) = d11(2);
00428
00429 Vector tempi(3);
00430
00431 double tempd = d1(0)*lambda_wave(0) + d1(1)*lambda_wave(1) + d1(2)*lambda_wave(2) ;
00432
00433 double tempcd = 0.0;
00434
00435 for (int i=0; i<3; i++)
00436
00437 {
00438
00439 tempi(i) = 0.0;
00440
00441 for (int j=0; j<3; j++)
00442
00443 {
00444
00445 tempi(i) += d2.cval(i+1,j+1) * lambda_wave(i) * lambda_wave(j);
00446
00447 tempcd += d2.cval(i+1,j+1) * lambda_wave(i) * lambda_wave(j);
00448
00449 }
00450
00451 }
00452
00453 for(int a=1; a<=3; a++)
00454
00455 {
00456
00457 for(int b=1; b<=3; b++)
00458
00459 {
00460
00461 Y.val(a,b) = d1(a-1)*I_ij.cval(a,b)*lambda_wave(b-1) + d2.cval(a,b)*lambda_wave(a-1)*lambda_wave(b-1) -
00462
00463 ( tempi(a-1) + tempi(b-1) + d1(a-1)*lambda_wave(a-1) + d1(b-1)*lambda_wave(b-1) ) / 3.0 +
00464
00465 ( tempcd + tempd ) / 9.0;
00466
00467 }
00468
00469 }
00470
00471 return Y;
00472
00473 }
00474
00475
00476
00477 const Tensor FDdecoupledElastic3D::FDisoStiffness(void)
00478
00479 {
00480
00481 Tensor I_ij("I", 2, def_dim_2);
00482
00483 Tensor I_ijkl( 4, def_dim_4, 0.0 );
00484
00485 I_ijkl = I_ij("ij") * I_ij("kl");
00486
00487 I_ij.null_indices();
00488
00489 Tensor I_ikjl( 4, def_dim_4, 0.0 );
00490
00491 I_ikjl = I_ijkl.transpose0110();
00492
00493 Tensor I_iljk( 4, def_dim_4, 0.0 );
00494
00495 I_iljk = I_ijkl.transpose0111();
00496
00497 Tensor I4s = (I_ikjl+I_iljk)*0.5;
00498
00499 Tensor tempI = I4s - I_ijkl;
00500
00501
00502
00503 Tensor CinvCinv = Cinv("ij") * Cinv("kl");
00504
00505 CinvCinv.null_indices(); Cinv.null_indices();
00506
00507
00508
00509 Tensor ICinv = ( CinvCinv.transpose0110() + CinvCinv.transpose0111() ) * (0.5);
00510
00511
00512
00513 Tensor CinvCinv_ICinv = CinvCinv - ICinv;
00514
00515
00516
00517 double I1 = lambda1*lambda1 + lambda2*lambda2 + lambda3*lambda3;
00518
00519
00520
00521 Vector Wa = this->wa();
00522
00523 Tensor yab = this->Yab();
00524
00525
00526
00527 Tensor L_iso(2,def_dim_2,0.0);
00528
00529
00530
00531 if(caseIndex == 0)
00532
00533 {
00534
00535 double d1 = (lambda1+lambda2)*(lambda1+lambda3)*(lambda1-lambda2)*(lambda1-lambda3);
00536
00537 double d2 = (lambda2+lambda3)*(lambda2+lambda1)*(lambda2-lambda3)*(lambda2-lambda1);
00538
00539 double d3 = (lambda3+lambda1)*(lambda3+lambda2)*(lambda3-lambda1)*(lambda3-lambda2);
00540
00541
00542
00543 Tensor M1 = ( C - I_ij*(I1-lambda1*lambda1) + Cinv*(J*J/(lambda1*lambda1)) ) * (1.0/d1);
00544
00545 Tensor M2 = ( C - I_ij*(I1-lambda2*lambda2) + Cinv*(J*J/(lambda2*lambda2)) ) * (1.0/d2);
00546
00547 Tensor M3 = ( C - I_ij*(I1-lambda3*lambda3) + Cinv*(J*J/(lambda3*lambda3)) ) * (1.0/d3);
00548
00549
00550
00551 double d1p = 4.0 *lambda1*lambda1*lambda1*lambda1 - I1*lambda1*lambda1 - J*J /(lambda1*lambda1);
00552
00553 double d2p = 4.0 *lambda2*lambda2*lambda2*lambda2 - I1*lambda2*lambda2 - J*J /(lambda2*lambda2);
00554
00555 double d3p = 4.0 *lambda3*lambda3*lambda3*lambda3 - I1*lambda3*lambda3 - J*J /(lambda3*lambda3);
00556
00557
00558
00559 Tensor Cm1M1M1Cm1 = Cinv("ij")*M1("kl") + M1("ij")*Cinv("kl");
00560
00561 Cinv.null_indices(); M1.null_indices(); Cm1M1M1Cm1.null_indices();
00562
00563
00564
00565 Tensor Cm1M2M2Cm1 = Cinv("ij")*M2("kl") + M2("ij")*Cinv("kl");
00566
00567 Cinv.null_indices(); M2.null_indices(); Cm1M2M2Cm1.null_indices();
00568
00569
00570
00571 Tensor Cm1M3M3Cm1 = Cinv("ij")*M3("kl") + M3("ij")*Cinv("kl");
00572
00573 Cinv.null_indices(); M3.null_indices(); Cm1M3M3Cm1.null_indices();
00574
00575
00576
00577
00578
00579 Tensor dM1M1d = I_ij("ij")*M1("kl") + M1("ij")*I_ij("kl");
00580
00581 I_ij.null_indices(); M1.null_indices(); dM1M1d.null_indices();
00582
00583
00584
00585 Tensor dM2M2d = I_ij("ij")*M2("kl") + M2("ij")*I_ij("kl");
00586
00587 I_ij.null_indices(); M2.null_indices(); dM2M2d.null_indices();
00588
00589
00590
00591 Tensor dM3M3d = I_ij("ij")*M3("kl") + M3("ij")*I_ij("kl");
00592
00593 I_ij.null_indices(); M3.null_indices(); dM3M3d.null_indices();
00594
00595
00596
00597 Tensor M1M1 = M1("ij") * M1("kl");
00598
00599 M1.null_indices(); M1M1.null_indices();
00600
00601 Tensor M2M2 = M2("ij") * M2("kl");
00602
00603 M2.null_indices(); M2M2.null_indices();
00604
00605 Tensor M3M3 = M3("ij") * M3("kl");
00606
00607 M3.null_indices(); M3M3.null_indices();
00608
00609
00610
00611 Tensor calM1 = ( tempI + (CinvCinv_ICinv -Cm1M1M1Cm1)*(J*J/(lambda1*lambda1)) + dM1M1d*(lambda1*lambda1) - M1M1*d1p ) *(1.0/d1);
00612
00613 Tensor calM2 = ( tempI + (CinvCinv_ICinv -Cm1M2M2Cm1)*(J*J/(lambda2*lambda2)) + dM2M2d*(lambda2*lambda2) - M2M2*d2p ) *(1.0/d2);
00614
00615 Tensor calM3 = ( tempI + (CinvCinv_ICinv -Cm1M3M3Cm1)*(J*J/(lambda3*lambda3)) + dM3M3d*(lambda3*lambda3) - M3M3*d3p ) *(1.0/d3);
00616
00617
00618
00619 Tensor L_iso_1 = ( calM1*Wa(0) + calM2*Wa(1) + calM3*Wa(2) ) * 2.0;
00620
00621 Tensor L_iso_2 = M1("ij") * M1("kl") * yab.cval(1,1) + M1("ij") * M2("kl") * yab.cval(1,2) + M1("ij") * M3("kl") * yab.cval(1,3) +
00622
00623 M2("ij") * M1("kl") * yab.cval(2,1) + M2("ij") * M2("kl") * yab.cval(2,2) + M2("ij") * M3("kl") * yab.cval(2,3) +
00624
00625 M3("ij") * M1("kl") * yab.cval(3,1) + M3("ij") * M2("kl") * yab.cval(3,2) + M3("ij") * M3("kl") * yab.cval(3,3);
00626
00627 L_iso = L_iso_1 + L_iso_2 ;
00628
00629 }
00630
00631
00632
00633 if(caseIndex == 11)
00634
00635 {
00636
00637 double d1 = (lambda1+lambda2)*(lambda1+lambda3)*(lambda1-lambda2)*(lambda1-lambda3);
00638
00639 Tensor M1 = (I_ij - Cinv * (lambda2*lambda2)) * (1.0/(lambda1+lambda2)/(lambda1-lambda2));
00640
00641 Tensor Mr = Cinv - M1;
00642
00643 double d1p = 4.0 *lambda1*lambda1*lambda1*lambda1 - I1*lambda1*lambda1 - J*J /(lambda1*lambda1);
00644
00645 Tensor Cm1M1M1Cm1 = Cinv("ij")*M1("kl") + M1("ij")*Cinv("kl");
00646
00647 Cinv.null_indices(); M1.null_indices(); Cm1M1M1Cm1.null_indices();
00648
00649 Tensor dM1M1d = I_ij("ij")*M1("kl") + M1("ij")*I_ij("kl");
00650
00651 I_ij.null_indices(); M1.null_indices(); dM1M1d.null_indices();
00652
00653 Tensor M1M1 = M1("ij") * M1("kl");
00654
00655 M1.null_indices(); M1M1.null_indices();
00656
00657 Tensor calM1 = ( tempI + (CinvCinv_ICinv -Cm1M1M1Cm1)*(J*J/(lambda1*lambda1)) + dM1M1d*(lambda1*lambda1) - M1M1*d1p ) *(1.0/d1);
00658
00659 Tensor calMr = (ICinv + calM1) * (-1.0);
00660
00661 Tensor L_iso_1 = ( calM1*Wa(0) + calMr*Wa(2) ) * 2.0;
00662
00663 Tensor L_iso_2 = M1("ij") * M1("kl") * yab.cval(1,1) + M1("ij") * Mr("kl") * yab.cval(1,3) +
00664
00665 Mr("ij") * M1("kl") * yab.cval(3,1) + Mr("ij") * Mr("kl") * yab.cval(3,3);
00666
00667 L_iso = L_iso_1 + L_iso_2 ;
00668
00669 }
00670
00671
00672
00673 if(caseIndex == 13)
00674
00675 {
00676
00677 double d3 = (lambda3+lambda1)*(lambda3+lambda2)*(lambda3-lambda1)*(lambda3-lambda2);
00678
00679 Tensor M3 = (I_ij - Cinv * (lambda2*lambda2)) * (1.0/(lambda3+lambda2)/(lambda3-lambda2));
00680
00681 Tensor Mr = Cinv - M3;
00682
00683 double d3p = 4.0 *lambda3*lambda3*lambda3*lambda3 - I1*lambda3*lambda3 - J*J /(lambda3*lambda3);
00684
00685 Tensor Cm1M3M3Cm1 = Cinv("ij")*M3("kl") + M3("ij")*Cinv("kl");
00686
00687 Cinv.null_indices(); M3.null_indices(); Cm1M3M3Cm1.null_indices();
00688
00689 Tensor dM3M3d = I_ij("ij")*M3("kl") + M3("ij")*I_ij("kl");
00690
00691 I_ij.null_indices(); M3.null_indices(); dM3M3d.null_indices();
00692
00693 Tensor M3M3 = M3("ij") * M3("kl");
00694
00695 M3.null_indices(); M3M3.null_indices();
00696
00697 Tensor calM3 = ( tempI + (CinvCinv_ICinv -Cm1M3M3Cm1)*(J*J/(lambda3*lambda3)) + dM3M3d*(lambda3*lambda3) - M3M3*d3p ) *(1.0/d3);
00698
00699 Tensor calMr = (ICinv + calM3) * (-1.0);
00700
00701 Tensor L_iso_1 = ( calM3*Wa(2) + calMr*Wa(0) ) * 2.0;
00702
00703 Tensor L_iso_2 = M3("ij") * M3("kl") * yab.cval(3,3) + M3("ij") * Mr("kl") * yab.cval(3,1) +
00704
00705 Mr("ij") * M3("kl") * yab.cval(1,3) + Mr("ij") * Mr("kl") * yab.cval(1,1);
00706
00707 L_iso = L_iso_1 + L_iso_2 ;
00708
00709 }
00710
00711
00712
00713 if(caseIndex == 2)
00714
00715 {
00716
00717 Vector lambda_wave(3);
00718
00719 lambda_wave = this->getlambda_wave();
00720
00721 Vector d11 = W->d2isowOdlambda2(lambda_wave);
00722
00723 Vector d1 = W->disowOdlambda(lambda_wave);
00724
00725 double G2linear = d11(1)*lambda_wave2*lambda_wave2 + d1(1)*lambda_wave2;
00726
00727
00728
00729 L_iso = ( ICinv - CinvCinv * (1.0/3.0) ) * G2linear;
00730
00731 }
00732
00733
00734
00735 return L_iso;
00736
00737 }
00738
00739
00740
00741 const Tensor FDdecoupledElastic3D::FDvolStiffness(void)
00742
00743 {
00744
00745 Tensor CinvCinv = Cinv("ij")*Cinv("kl") ;
00746
00747 Cinv.null_indices(); CinvCinv.null_indices();
00748
00749 Tensor ICinv = ( CinvCinv.transpose0110() + CinvCinv.transpose0111() ) * (0.5);
00750
00751 double dWdJ = W->dvolwOdJ(J);
00752
00753 double d2WdJ2 = W->d2volwOdJ2(J);
00754
00755 double wj = d2WdJ2*J*J + J*dWdJ;
00756
00757
00758
00759 Tensor L_vol = CinvCinv*wj - ICinv *2.0*J*dWdJ ;
00760
00761
00762
00763 return L_vol;
00764
00765 }
00766
00767
00768
00769 const Tensor& FDdecoupledElastic3D::getTangentTensor(void)
00770
00771 {
00772
00773 return Stiffness;
00774
00775 }
00776
00777
00778
00779 const Tensor
00780
00781 &FDdecoupledElastic3D::getInitialTangentTensor(void)
00782
00783 {
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803 return this->getTangentTensor();
00804
00805 }
00806
00807
00808
00809 const straintensor& FDdecoupledElastic3D::getStrainTensor(void)
00810
00811 {
00812
00813 return thisGreenStrain;
00814
00815 }
00816
00817
00818
00819 const stresstensor& FDdecoupledElastic3D::getStressTensor(void)
00820
00821 {
00822
00823 return thisPK2Stress;
00824
00825 }
00826
00827
00828
00829 const stresstensor& FDdecoupledElastic3D::getPK1StressTensor(void)
00830
00831 {
00832
00833 stresstensor thisSPKStress;
00834
00835
00836
00837 if ( FromForC == 0 ) {
00838
00839 thisSPKStress = this->getStressTensor();
00840
00841 FDdecoupledElastic3D::static_FDE_stress = thisSPKStress("ij") * (F.transpose11())("jk") ;
00842
00843 }
00844
00845
00846
00847 if ( FromForC == 1 ) {
00848
00849 opserr << "FDdecoupledElastic3D: unknown deformation gradient - cannot compute PK1 stress" << "\n";
00850
00851 exit (-1);
00852
00853 }
00854
00855
00856
00857 return FDdecoupledElastic3D::static_FDE_stress;
00858
00859 }
00860
00861
00862
00863 const stresstensor& FDdecoupledElastic3D::getCauchyStressTensor(void)
00864
00865 {
00866
00867 stresstensor thisSPKStress;
00868
00869
00870
00871 if ( FromForC == 0 ) {
00872
00873 thisSPKStress = this->getStressTensor();
00874
00875 FDdecoupledElastic3D::static_FDE_stress = F("ij") * thisSPKStress("jk") * (F.transpose11())("kl") * (1.0/J);
00876
00877 }
00878
00879
00880
00881 if ( FromForC == 1 ) {
00882
00883 opserr << "FDdecoupledElastic3D: unknown deformation gradient - cannot compute Cauchy stress" << "\n";
00884
00885 exit (-1);
00886
00887 }
00888
00889
00890
00891 return FDdecoupledElastic3D::static_FDE_stress;
00892
00893 }
00894
00895
00896
00897 int FDdecoupledElastic3D::commitState (void)
00898
00899 {
00900
00901 return 0;
00902
00903 }
00904
00905
00906
00907 int FDdecoupledElastic3D::revertToLastCommit (void)
00908
00909 {
00910
00911 return 0;
00912
00913 }
00914
00915
00916
00917 int FDdecoupledElastic3D::revertToStart (void)
00918
00919 {
00920
00921 Tensor F0("I", 2, def_dim_2);
00922
00923 F = F0;
00924
00925 C = F0;
00926
00927 Cinv = F0;
00928
00929
00930
00931 Tensor ss_zero(2,def_dim_2,0.0);
00932
00933 thisPK2Stress = ss_zero;
00934
00935 thisGreenStrain = ss_zero;
00936
00937 Stiffness = getInitialTangentTensor();
00938
00939
00940
00941 J = 1.0;
00942
00943 lambda1 = 1.0;
00944
00945 lambda2 = 1.0;
00946
00947 lambda3 = 1.0;
00948
00949 lambda_wave1 = 1.0;
00950
00951 lambda_wave2 = 1.0;
00952
00953 lambda_wave3 = 1.0;
00954
00955
00956
00957 caseIndex = 0;
00958
00959
00960
00961 return 0;
00962
00963 }
00964
00965
00966
00967 NDMaterial * FDdecoupledElastic3D::getCopy (void)
00968
00969 {
00970
00971 FDdecoupledElastic3D *theCopy =
00972
00973 new FDdecoupledElastic3D (this->getTag(), this->getWEnergy(), this->getRho());
00974
00975
00976
00977 theCopy->F = F;
00978
00979 theCopy->C = C;
00980
00981 theCopy->Cinv = Cinv;
00982
00983 theCopy->J = J;
00984
00985 theCopy->lambda1 = lambda1;
00986
00987 theCopy->lambda2 = lambda2;
00988
00989 theCopy->lambda3 = lambda3;
00990
00991 theCopy->lambda_wave1 = lambda_wave1;
00992
00993 theCopy->lambda_wave2 = lambda_wave2;
00994
00995 theCopy->lambda_wave3 = lambda_wave3;
00996
00997
00998
00999 theCopy->Stiffness = Stiffness;
01000
01001 theCopy->thisGreenStrain = thisGreenStrain;
01002
01003 theCopy->thisPK2Stress = thisPK2Stress;
01004
01005
01006
01007 return theCopy;
01008
01009 }
01010
01011
01012
01013 NDMaterial * FDdecoupledElastic3D::getCopy (const char *type)
01014
01015 {
01016
01017
01018
01019 opserr << "FDdecoupledElastic3D::getCopy(const char *) - not yet implemented\n";
01020
01021
01022
01023 return 0;
01024
01025 }
01026
01027
01028
01029 const char* FDdecoupledElastic3D::getType (void) const
01030
01031 {
01032
01033 return "ThreeDimentionalFD";
01034
01035 }
01036
01038
01039
01040
01041
01042
01043
01044
01045
01046
01047
01048
01049 int FDdecoupledElastic3D::sendSelf (int commitTag, Channel &theChannel)
01050
01051 {
01052
01053 int res = 0;
01054
01055
01056
01057 static Vector data(2);
01058
01059
01060
01061 data(0) = this->getTag();
01062
01063 data(1) = rho;
01064
01065
01066
01067 res += theChannel.sendVector(this->getDbTag(), commitTag, data);
01068
01069 if (res < 0)
01070
01071 {
01072
01073 opserr << "FDdecoupledElastic3D::sendSelf -- could not send Vector\n";
01074
01075 return res;
01076
01077 }
01078
01079
01080
01081 return res;
01082
01083 }
01084
01085
01086
01087 int FDdecoupledElastic3D::recvSelf (int commitTag,
01088
01089 Channel &theChannel,
01090
01091 FEM_ObjectBroker &theBroker)
01092
01093 {
01094
01095 int res = 0;
01096
01097
01098
01099 static Vector data(2);
01100
01101
01102
01103 res += theChannel.recvVector(this->getDbTag(), commitTag, data);
01104
01105 if (res < 0)
01106
01107 {
01108
01109 opserr << "FDdecoupledElastic3D::recvSelf -- could not recv Vector\n";
01110
01111 return res;
01112
01113 }
01114
01115
01116
01117 this->setTag((int)data(0));
01118
01119 rho = data(1);
01120
01121
01122
01123 return res;
01124
01125 }
01126
01127
01128
01129 void FDdecoupledElastic3D::Print (OPS_Stream &s, int flag)
01130
01131 {
01132
01133 s << "Finite Deformation Elastic 3D model" << endln;
01134
01135 s << "\trho: " << rho << endln;
01136
01137 return;
01138
01139 }
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160
01161
01162
01163 int FDdecoupledElastic3D::ComputeTrials()
01164
01165 {
01166
01167
01168
01169 Cinv = C.inverse();
01170
01171 Cinv.symmetrize11();
01172
01173
01174
01175
01176
01177 J = sqrt(C.determinant());
01178
01179
01180
01181
01182
01183 tensor eigtensor = C.eigenvalues();
01184
01185 lambda1 = sqrt(eigtensor.cval(1));
01186
01187 lambda2 = sqrt(eigtensor.cval(2));
01188
01189 lambda3 = sqrt(eigtensor.cval(3));
01190
01191
01192
01193
01194
01195 double JJJ = pow(J, -0.33333333333333333333333333333);
01196
01197 lambda_wave1 = lambda1 *JJJ;
01198
01199 lambda_wave2 = lambda2 *JJJ;
01200
01201 lambda_wave3 = lambda3 *JJJ;
01202
01203
01204
01205
01206
01207 double diff12 = fabs(lambda1-lambda2);
01208
01209 double diff23 = fabs(lambda2-lambda3);
01210
01211 double perturbation = pow( d_macheps(), (0.4) );
01212
01213 if ( diff12 >= perturbation && diff23 >= perturbation )
01214
01215 caseIndex = 0;
01216
01217 else if (diff12 >= perturbation && diff23 < perturbation )
01218
01219 caseIndex = 11;
01220
01221 else if (diff12 < perturbation && diff23 >= perturbation )
01222
01223 caseIndex = 13;
01224
01225 else if (diff12 < perturbation && diff23 < perturbation )
01226
01227 caseIndex = 2;
01228
01229 else {opserr << "FDdecoupledElastic3D::getCaseIndex -- unknown case! \n";
01230
01231 exit (-1);}
01232
01233
01234
01235 Tensor I_ij("I", 2, def_dim_2);
01236
01237
01238
01239 Tensor isoPK2Stress(2, def_dim_2, 0.0);
01240
01241
01242
01243 Vector Wa = this->wa();
01244
01245
01246
01247 double I1 = lambda1*lambda1+lambda2*lambda2+lambda3*lambda3;
01248
01249
01250
01251 if (caseIndex == 0)
01252
01253 {
01254
01255 double d1 = (lambda1+lambda2)*(lambda1+lambda3)*(lambda1-lambda2)*(lambda1-lambda3);
01256
01257 double d2 = (lambda2+lambda3)*(lambda2+lambda1)*(lambda2-lambda3)*(lambda2-lambda1);
01258
01259 double d3 = (lambda3+lambda1)*(lambda3+lambda2)*(lambda3-lambda1)*(lambda3-lambda2);
01260
01261
01262
01263 Tensor M1 = ( C - I_ij*(I1-lambda1*lambda1) + Cinv *(J*J/(lambda1*lambda1)) ) * (1.0/d1);
01264
01265 Tensor M2 = ( C - I_ij*(I1-lambda2*lambda2) + Cinv *(J*J/(lambda2*lambda2)) ) * (1.0/d2);
01266
01267 Tensor M3 = ( C - I_ij*(I1-lambda3*lambda3) + Cinv *(J*J/(lambda3*lambda3)) ) * (1.0/d3);
01268
01269
01270
01271 isoPK2Stress = M1*Wa(0) + M2*Wa(1) + M3*Wa(2);
01272
01273 }
01274
01275
01276
01277 if (caseIndex == 11)
01278
01279 {
01280
01281 Tensor M1 = (I_ij - Cinv * (lambda2*lambda2)) * (1.0/(lambda1+lambda2)/(lambda1-lambda2));
01282
01283 Tensor Mr = Cinv - M1;
01284
01285 isoPK2Stress = Mr*Wa(2) + M1*Wa(0);
01286
01287 }
01288
01289
01290
01291 if (caseIndex == 13)
01292
01293 {
01294
01295 Tensor M3 = (I_ij - Cinv * (lambda2*lambda2)) * (1.0/(lambda3+lambda2)/(lambda3-lambda2));
01296
01297 Tensor Mr = Cinv - M3;
01298
01299 isoPK2Stress = Mr*Wa(0) + M3*Wa(2);
01300
01301 }
01302
01303
01304
01305 if (caseIndex == 2)
01306
01307 {
01308
01309
01310
01311 }
01312
01313
01314
01315 double dWdJ = W->dvolwOdJ(J);
01316
01317 Tensor volPK2Stress = Cinv * J * dWdJ;
01318
01319
01320
01321 thisPK2Stress = volPK2Stress + isoPK2Stress;
01322
01323
01324
01325 thisGreenStrain = (C - I_ij) * 0.5;
01326
01327
01328
01329 Tensor L_iso = this->FDisoStiffness();
01330
01331 Tensor L_vol = this->FDvolStiffness();
01332
01333 Stiffness = L_iso + L_vol;
01334
01335
01336
01337 return 0;
01338
01339 }
01340
01341
01342
01343 int FDdecoupledElastic3D::getCaseIndex()
01344
01345 {
01346
01347 return caseIndex;
01348
01349 }
01350
01351
01352
01353
01354