00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <stdlib.h>
00023 #include <math.h>
00024 #include "QzSimple1.h"
00025 #include <Vector.h>
00026 #include <Channel.h>
00027
00028
00029 const int QZmaxIterations = 20;
00030 const double QZtolerance = 1.0e-12;
00031
00033
00034
00035 QzSimple1::QzSimple1(int tag, int qzChoice, double Q_ult, double z_50,
00036 double suctionRatio, double dash_pot)
00037 :UniaxialMaterial(tag,MAT_TAG_QzSimple1),
00038 QzType(qzChoice), Qult(Q_ult), z50(z_50), suction(suctionRatio), dashpot(dash_pot)
00039 {
00040
00041
00042 this->revertToStart();
00043 initialTangent = Ttangent;
00044 }
00045
00047
00048
00049 QzSimple1::QzSimple1()
00050 :UniaxialMaterial(0,MAT_TAG_QzSimple1),
00051 QzType(0), Qult(0.0), z50(0.0), suction(0.0), dashpot(0.0)
00052 {
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 }
00063
00065
00066 QzSimple1::~QzSimple1()
00067 {
00068
00069 }
00070
00072 void QzSimple1::getGap(double zlast, double dz, double dz_old)
00073 {
00074
00075
00076
00077 if(zlast > 0.0 && (zlast + dz) < -QZtolerance) dz = -QZtolerance - zlast;
00078 if(zlast < 0.0 && (zlast + dz) > QZtolerance) dz = QZtolerance - zlast;
00079 TGap_z = zlast + dz;
00080
00081
00082
00083 getClosure(zlast,dz);
00084 getSuction(zlast,dz);
00085 TGap_Q = TSuction_Q + TClose_Q;
00086 TGap_tang = TSuction_tang + TClose_tang;
00087
00088 return;
00089 }
00090
00092 void QzSimple1::getFarField(double z)
00093 {
00094 TFar_z = z;
00095 TFar_tang= TFar_tang;
00096 TFar_Q = TFar_tang * TFar_z;
00097
00098 return;
00099 }
00100
00102 void QzSimple1::getClosure(double zlast, double dz)
00103 {
00104 TClose_z = zlast + dz;
00105
00106
00107
00108 if(TClose_z <= 0.0)
00109 {
00110 TClose_tang = 1000.0*Qult/z50;
00111 TClose_Q = TClose_z * TClose_tang;
00112 }
00113
00114
00115
00116 if(TClose_z > 0.0)
00117 {
00118 TClose_tang = 0.001*Qult/z50;
00119 TClose_Q = TClose_z * TClose_tang;
00120 }
00121
00122 return;
00123 }
00124
00126 void QzSimple1::getSuction(double zlast, double dz)
00127 {
00128 TSuction_z = zlast + dz;
00129 double Qmax=suction*Qult;
00130 double dzTotal=TSuction_z - CSuction_z;
00131
00132
00133
00134 if(fabs(dzTotal*TSuction_tang/Qult) < 3.0*QZtolerance)
00135 {
00136 TSuction_Q = TSuction_Q + dz*TSuction_tang;
00137 if(fabs(TSuction_Q) >= Qmax)
00138 TSuction_Q =(TSuction_Q/fabs(TSuction_Q))*(1.0-1.0e-8)*Qmax;
00139 return;
00140 }
00141
00142
00143
00144
00145 if(TSuction_Qin != CSuction_Qin)
00146 {
00147 TSuction_Qin = CSuction_Qin;
00148 TSuction_zin = CSuction_zin;
00149 }
00150
00151
00152
00153 if(CSuction_z > CSuction_zin && dzTotal < 0.0)
00154 {
00155 TSuction_Qin = CSuction_Q;
00156 TSuction_zin = CSuction_z;
00157 }
00158
00159
00160 if(CSuction_z < CSuction_zin && dzTotal > 0.0)
00161 {
00162 TSuction_Qin = CSuction_Q;
00163 TSuction_zin = CSuction_z;
00164 }
00165
00166
00167
00168 if(dzTotal >= 0.0)
00169 {
00170 TSuction_Q=Qmax-(Qmax-TSuction_Qin)*pow(0.5*z50,nd)
00171 *pow(0.5*z50 + TSuction_z - TSuction_zin,-nd);
00172 TSuction_tang=nd*(Qmax-TSuction_Qin)*pow(0.5*z50,nd)
00173 *pow(0.5*z50 + TSuction_z - TSuction_zin,-nd-1.0);
00174 }
00175
00176
00177
00178 if(dzTotal < 0.0)
00179 {
00180 TSuction_Q=-Qmax+(Qmax+TSuction_Qin)*pow(0.5*z50,nd)
00181 *pow(0.5*z50 - TSuction_z + TSuction_zin,-nd);
00182 TSuction_tang=nd*(Qmax+TSuction_Qin)*pow(0.5*z50,nd)
00183 *pow(0.5*z50 - TSuction_z + TSuction_zin,-nd-1.0);
00184 }
00185
00186
00187
00188 if(fabs(TSuction_Q) >= (1.0-QZtolerance)*Qmax) {
00189 TSuction_Q =(TSuction_Q/fabs(TSuction_Q))*(1.0-QZtolerance)*Qmax;}
00190 if(TSuction_tang <=1.0e-4*Qult/z50) TSuction_tang = 1.0e-4*Qult/z50;
00191
00192 return;
00193 }
00194
00196 void QzSimple1::getNearField(double zlast, double dz, double dz_old)
00197 {
00198
00199
00200 if(dz*dz_old < 0.0 && fabs(dz/dz_old) > 0.5) dz = -dz_old/2.0;
00201
00202
00203
00204 if(dz*dz_old < -z50*z50) {
00205 dz = (TNF_zinr + TNF_zinl)/2.0 - zlast;
00206 }
00207
00208
00209
00210 TNF_z = zlast + dz;
00211 double NFdz = TNF_z - CNF_z;
00212
00213
00214
00215 if(fabs(NFdz*TNF_tang/Qult) < 3.0*QZtolerance)
00216 {
00217 TNF_Q = TNF_Q + dz*TNF_tang;
00218 if(fabs(TNF_Q) >=Qult) TNF_Q=(TNF_Q/fabs(TNF_Q))*(1.0-QZtolerance)*Qult;
00219 return;
00220 }
00221
00222
00223
00224
00225 if(TNF_Qinr != CNF_Qinr || TNF_Qinl != CNF_Qinl)
00226 {
00227 TNF_Qinr = CNF_Qinr;
00228 TNF_Qinl = CNF_Qinl;
00229 TNF_zinr = CNF_zinr;
00230 TNF_zinl = CNF_zinl;
00231 }
00232
00233
00234
00235 bool changeDirection = false;
00236
00237
00238
00239 if(CNF_Q > CNF_Qinr && NFdz <0.0){
00240 changeDirection = true;
00241 if((CNF_Q - CNF_Qinl) > 2.0*Qult*Elast) Elast=(CNF_Q - CNF_Qinl)/(2.0*Qult);
00242 if(2.0*Elast > maxElast) Elast=maxElast/2.0;
00243 TNF_Qinr = CNF_Q;
00244 TNF_Qinl = TNF_Qinr - 2.0*Qult*Elast;
00245 TNF_zinr = CNF_z;
00246 TNF_zinl = TNF_zinr - (TNF_Qinr-TNF_Qinl)/NFkrig;
00247 }
00248 if(CNF_Q < CNF_Qinl && NFdz > 0.0){
00249 changeDirection = true;
00250 if((CNF_Qinr - CNF_Q) > 2.0*Qult*Elast) Elast=(CNF_Qinr - CNF_Q)/(2.0*Qult);
00251 if(2.0*Elast > maxElast) Elast=maxElast/2.0;
00252 TNF_Qinl = CNF_Q;
00253 TNF_Qinr = TNF_Qinl + 2.0*Qult*Elast;
00254 TNF_zinl = CNF_z;
00255 TNF_zinr = TNF_zinl + (TNF_Qinr-TNF_Qinl)/NFkrig;
00256 }
00257
00258
00259
00260 if(changeDirection == true) {
00261 double maxdz = Elast*Qult/NFkrig;
00262 if(fabs(dz) > maxdz) dz = (dz/fabs(dz))*maxdz;
00263 }
00264
00265
00266
00267 TNF_z = zlast + dz;
00268
00269
00270
00271 if(NFdz >= 0.0){
00272
00273 if(TNF_z <= TNF_zinr){
00274 TNF_tang = NFkrig;
00275 TNF_Q = TNF_Qinl + (TNF_z - TNF_zinl)*NFkrig;
00276 }
00277 else {
00278 TNF_tang = np * (Qult-TNF_Qinr) * pow(zref,np)
00279 * pow(zref - TNF_zinr + TNF_z, -np-1.0);
00280 TNF_Q = Qult - (Qult-TNF_Qinr)* pow(zref/(zref-TNF_zinr+TNF_z),np);
00281 }
00282 }
00283
00284
00285
00286 if(NFdz < 0.0){
00287
00288 if(TNF_z >= TNF_zinl){
00289 TNF_tang = NFkrig;
00290 TNF_Q = TNF_Qinr + (TNF_z - TNF_zinr)*NFkrig;
00291 }
00292 else {
00293 TNF_tang = np * (Qult+TNF_Qinl) * pow(zref,np)
00294 * pow(zref + TNF_zinl - TNF_z, -np-1.0);
00295 TNF_Q = -Qult + (Qult+TNF_Qinl)* pow(zref/(zref+TNF_zinl-TNF_z),np);
00296 }
00297 }
00298
00299
00300
00301 if(fabs(TNF_Q) >= (1.0-QZtolerance)*Qult) {
00302 TNF_Q=(TNF_Q/fabs(TNF_Q))*(1.0-QZtolerance)*Qult;
00303 TNF_tang = 1.0e-4*Qult/z50;
00304 }
00305 if(TNF_tang <= 1.0e-4*Qult/z50) TNF_tang = 1.0e-4*Qult/z50;
00306
00307 return;
00308 }
00309
00311 int
00312 QzSimple1::setTrialStrain (double newz, double zRate)
00313 {
00314
00315
00316
00317 double dz = newz - Tz;
00318 double dQ = Ttangent * dz;
00319 TzRate = zRate;
00320
00321
00322
00323
00324
00325 int numSteps = 1;
00326 double stepSize = 1.0;
00327 if(fabs(dQ/Qult) > 0.5) numSteps = 1 + int(fabs(dQ/(0.5*Qult)));
00328 if(fabs(dz/z50) > 1.0 ) numSteps = 1 + int(fabs(dz/(1.0*z50)));
00329 stepSize = 1.0/float(numSteps);
00330 if(numSteps > 100) numSteps = 100;
00331
00332 dz = stepSize * dz;
00333
00334
00335
00336 for(int istep=1; istep <= numSteps; istep++)
00337 {
00338 Tz = Tz + dz;
00339 dQ = Ttangent * dz;
00340
00341
00342
00343
00344 double dz_gap_old = ((TQ + dQ) - TGap_Q)/TGap_tang;
00345 double dz_nf_old = ((TQ + dQ) - TNF_Q) /TNF_tang;
00346
00347
00348
00349
00350 for (int j=1; j < QZmaxIterations; j++)
00351 {
00352 TQ = TQ + dQ;
00353 if(fabs(TQ) >(1.0-QZtolerance)*Qult) TQ=(1.0-QZtolerance)*Qult*(TQ/fabs(TQ));
00354
00355
00356 double dz_nf = (TQ - TNF_Q)/TNF_tang;
00357 getNearField(TNF_z,dz_nf,dz_nf_old);
00358
00359
00360 double Q_unbalance = TQ - TNF_Q;
00361 double zres_nf = (TQ - TNF_Q)/TNF_tang;
00362 dz_nf_old = dz_nf;
00363
00364
00365 double dz_gap = (TQ - TGap_Q)/TGap_tang;
00366 getGap(TGap_z,dz_gap,dz_gap_old);
00367
00368
00369 double Q_unbalance2 = TQ - TGap_Q;
00370 double zres_gap = (TQ - TGap_Q)/TGap_tang;
00371 dz_gap_old = dz_gap;
00372
00373
00374 double dz_far = (TQ - TFar_Q)/TFar_tang;
00375 TFar_z = TFar_z + dz_far;
00376 getFarField(TFar_z);
00377
00378
00379 double Q_unbalance3 = TQ - TFar_Q;
00380 double zres_far = (TQ - TFar_Q)/TFar_tang;
00381
00382
00383 Ttangent = pow(1.0/TGap_tang + 1.0/TNF_tang + 1.0/TFar_tang, -1.0);
00384
00385
00386 double dv = Tz - (TGap_z + zres_gap)
00387 - (TNF_z + zres_nf) - (TFar_z + zres_far);
00388
00389
00390 dQ = Ttangent * dv;
00391
00392
00393 double Qsum = (fabs(Q_unbalance) + fabs(Q_unbalance2) + fabs(Q_unbalance3))/3.0;
00394 if(Qsum/Qult < QZtolerance) break;
00395 }
00396 }
00397
00398 return 0;
00399 }
00401 double
00402 QzSimple1::getStress(void)
00403 {
00404
00405
00406
00407
00408 double ratio_disp =(1.0/TFar_tang)/(1.0/TFar_tang + 1.0/TNF_tang + 1.0/TGap_tang);
00409 if(Tz != Cz) {
00410 ratio_disp = (TFar_z - CFar_z)/(Tz - Cz);
00411 if(ratio_disp > 1.0) ratio_disp = 1.0;
00412 if(ratio_disp < 0.0) ratio_disp = 0.0;
00413 }
00414 double dashForce = dashpot * TzRate * ratio_disp;
00415
00416
00417
00418 if(fabs(TQ + dashForce) >= (1.0-QZtolerance)*Qult)
00419 return (1.0-QZtolerance)*Qult*(TQ+dashForce)/fabs(TQ+dashForce);
00420 else return TQ + dashForce;
00421 }
00423 double
00424 QzSimple1::getTangent(void)
00425 {
00426 return this->Ttangent;
00427 }
00429 double
00430 QzSimple1::getInitialTangent(void)
00431 {
00432 return this->initialTangent;
00433 }
00435 double
00436 QzSimple1::getDampTangent(void)
00437 {
00438
00439
00440
00441
00442 double ratio_disp =(1.0/TFar_tang)/(1.0/TFar_tang + 1.0/TNF_tang + 1.0/TGap_tang);
00443 if(Tz != Cz) {
00444 ratio_disp = (TFar_z - CFar_z)/(Tz - Cz);
00445 if(ratio_disp > 1.0) ratio_disp = 1.0;
00446 if(ratio_disp < 0.0) ratio_disp = 0.0;
00447 }
00448
00449 double DampTangent = dashpot * ratio_disp;
00450
00451
00452
00453 if(DampTangent < TFar_tang * 1.0e-12) DampTangent = TFar_tang * 1.0e-12;
00454
00455 return DampTangent;
00456 }
00458 double
00459 QzSimple1::getStrain(void)
00460 {
00461 return this->Tz;
00462 }
00464 double
00465 QzSimple1::getStrainRate(void)
00466 {
00467 return this->TzRate;
00468 }
00470 int
00471 QzSimple1::commitState(void)
00472 {
00473
00474 Cz = Tz;
00475 CQ = TQ;
00476 Ctangent = Ttangent;
00477
00478
00479 CNF_Qinr = TNF_Qinr;
00480 CNF_Qinl = TNF_Qinl;
00481 CNF_zinr = TNF_zinr;
00482 CNF_zinl = TNF_zinl;
00483 CNF_Q = TNF_Q;
00484 CNF_z = TNF_z;
00485 CNF_tang = TNF_tang;
00486
00487
00488 CSuction_Qin = TSuction_Qin;
00489 CSuction_zin = TSuction_zin;
00490 CSuction_Q = TSuction_Q;
00491 CSuction_z = TSuction_z;
00492 CSuction_tang = TSuction_tang;
00493
00494
00495 CClose_Q = TClose_Q;
00496 CClose_z = TClose_z;
00497 CClose_tang = TClose_tang;
00498
00499
00500 CGap_z = TGap_z;
00501 CGap_Q = TGap_Q;
00502 CGap_tang = TGap_tang;
00503
00504
00505 CFar_z = TFar_z;
00506 CFar_Q = TFar_Q;
00507 CFar_tang = TFar_tang;
00508
00509 return 0;
00510 }
00511
00513 int
00514 QzSimple1::revertToLastCommit(void)
00515 {
00516
00517
00518
00519
00520
00521 Tz = Cz;
00522 TQ = CQ;
00523 Ttangent = Ctangent;
00524
00525 TNF_Qinr = CNF_Qinr;
00526 TNF_Qinl = CNF_Qinl;
00527 TNF_zinr = CNF_zinr;
00528 TNF_zinl = CNF_zinl;
00529 TNF_Q = CNF_Q;
00530 TNF_z = CNF_z;
00531 TNF_tang = CNF_tang;
00532
00533 TSuction_Qin = CSuction_Qin;
00534 TSuction_zin = CSuction_zin;
00535 TSuction_Q = CSuction_Q;
00536 TSuction_z = CSuction_z;
00537 TSuction_tang = CSuction_tang;
00538
00539 TClose_Q = CClose_Q;
00540 TClose_z = CClose_z;
00541 TClose_tang = CClose_tang;
00542
00543 TGap_z = CGap_z;
00544 TGap_Q = CGap_Q;
00545 TGap_tang = CGap_tang;
00546
00547 TFar_z = CFar_z;
00548 TFar_Q = CFar_Q;
00549 TFar_tang = CFar_tang;
00550
00551 return 0;
00552 }
00553
00555 int
00556 QzSimple1::revertToStart(void)
00557 {
00558
00559
00560
00561 if(suction <= QZtolerance) suction = QZtolerance;
00562 if(suction > 0.1){
00563 suction = 0.1;
00564 opserr << "QzSimple1::QzSimple1 -- setting suction to max value of 0.1\n";
00565 }
00566
00567
00568
00569 if(dashpot < 0.0) dashpot = 0.0;
00570
00571
00572
00573 if(Qult <= 0.0 || z50 <= 0.0) {
00574 opserr << "QzSimple1::QzSimple1 -- only accepts positive nonzero Qult and z50\n";
00575 exit(-1);
00576 }
00577
00578
00579
00580 if(QzType ==1) {
00581 zref = 0.35*z50;
00582 np = 1.2;
00583 Elast = 0.2;
00584 maxElast= 0.7;
00585 nd = 1.0;
00586 TFar_tang= 0.525*Qult/z50;
00587 }
00588 else if (QzType == 2){
00589 zref = 12.3*z50;
00590 np = 5.5;
00591 Elast = 0.3;
00592 maxElast= 0.7;
00593 nd = 1.0;
00594 TFar_tang= 1.39*Qult/z50;
00595 }
00596 else{
00597 opserr << "QzSimple1::QzSimple1 -- only accepts QzType of 1 or 2\n";
00598 exit(-1);
00599 }
00600
00601
00602
00603 TFar_Q = 0.0;
00604 TFar_z = 0.0;
00605
00606
00607
00608 NFkrig = 10000.0 * Qult / z50;
00609 TNF_Qinr = Elast*Qult;
00610 TNF_Qinl = -TNF_Qinr;
00611 TNF_zinr = TNF_Qinr / NFkrig;
00612 TNF_zinl = -TNF_zinr;
00613 TNF_Q = 0.0;
00614 TNF_z = 0.0;
00615 TNF_tang = NFkrig;
00616
00617
00618
00619 TSuction_Qin = 0.0;
00620 TSuction_zin = 0.0;
00621 TSuction_Q = 0.0;
00622 TSuction_z = 0.0;
00623 TSuction_tang = nd*(Qult*suction-TSuction_Q)*pow(z50/2.0,nd)
00624 *pow(z50/2.0 - TSuction_z + TSuction_zin,-nd-1.0);
00625
00626
00627
00628 TClose_Q = 0.0;
00629 TClose_z = 0.0;
00630 TClose_tang = 100.0*Qult/z50;
00631
00632
00633
00634 TGap_z = 0.0;
00635 TGap_Q = 0.0;
00636 TGap_tang= TClose_tang + TSuction_tang;
00637
00638
00639
00640 Tz = 0.0;
00641 TQ = 0.0;
00642 Ttangent = pow(1.0/TGap_tang + 1.0/TNF_tang + 1.0/TFar_tang, -1.0);
00643 TzRate = 0.0;
00644
00645
00646
00647 this->commitState();
00648
00649 return 0;
00650 }
00651
00653 UniaxialMaterial *
00654 QzSimple1::getCopy(void)
00655 {
00656 QzSimple1 *theCopy =
00657 new QzSimple1(this->getTag(),QzType,Qult,z50,suction,dashpot);
00658
00659
00660 theCopy->zref = zref;
00661 theCopy->np = np;
00662 theCopy->Elast = Elast;
00663 theCopy->maxElast= maxElast;
00664 theCopy->nd = nd;
00665
00666
00667 theCopy->NFkrig = NFkrig;
00668
00669
00670 theCopy->CNF_Qinr = CNF_Qinr;
00671 theCopy->CNF_Qinl = CNF_Qinl;
00672 theCopy->CNF_zinr = CNF_zinr;
00673 theCopy->CNF_zinl = CNF_zinl;
00674 theCopy->CNF_Q = CNF_Q;
00675 theCopy->CNF_z = CNF_z;
00676 theCopy->CNF_tang = CNF_tang;
00677
00678
00679 theCopy->TNF_Qinr = TNF_Qinr;
00680 theCopy->TNF_Qinl = TNF_Qinl;
00681 theCopy->TNF_zinr = TNF_zinr;
00682 theCopy->TNF_zinl = TNF_zinl;
00683 theCopy->TNF_Q = TNF_Q;
00684 theCopy->TNF_z = TNF_z;
00685 theCopy->TNF_tang = TNF_tang;
00686
00687
00688 theCopy->CSuction_Qin = CSuction_Qin;
00689 theCopy->CSuction_zin = CSuction_zin;
00690 theCopy->CSuction_Q = CSuction_Q;
00691 theCopy->CSuction_z = CSuction_z;
00692 theCopy->CSuction_tang = CSuction_tang;
00693
00694
00695 theCopy->TSuction_Qin = TSuction_Qin;
00696 theCopy->TSuction_zin = TSuction_zin;
00697 theCopy->TSuction_Q = TSuction_Q;
00698 theCopy->TSuction_z = TSuction_z;
00699 theCopy->TSuction_tang = TSuction_tang;
00700
00701
00702 theCopy->CClose_Q = CClose_Q;
00703 theCopy->CClose_z = CClose_z;
00704 theCopy->CClose_tang = CClose_tang;
00705
00706
00707 theCopy->TClose_Q = TClose_Q;
00708 theCopy->TClose_z = TClose_z;
00709 theCopy->TClose_tang = TClose_tang;
00710
00711
00712 theCopy->CGap_z = CGap_z;
00713 theCopy->CGap_Q = CGap_Q;
00714 theCopy->CGap_tang = CGap_tang;
00715
00716
00717 theCopy->TGap_z = TGap_z;
00718 theCopy->TGap_Q = TGap_Q;
00719 theCopy->TGap_tang = TGap_tang;
00720
00721
00722 theCopy->CFar_z = CFar_z;
00723 theCopy->CFar_Q = CFar_Q;
00724 theCopy->CFar_tang = CFar_tang;
00725
00726
00727 theCopy->TFar_z = TFar_z;
00728 theCopy->TFar_Q = TFar_Q;
00729 theCopy->TFar_tang = TFar_tang;
00730
00731
00732 theCopy->Cz = Cz;
00733 theCopy->CQ = CQ;
00734 theCopy->Ctangent = Ctangent;
00735
00736
00737 theCopy->Tz = Tz;
00738 theCopy->TQ = TQ;
00739 theCopy->Ttangent = Ttangent;
00740 theCopy->TzRate = TzRate;
00741
00742 return theCopy;
00743 }
00744
00746 int
00747 QzSimple1::sendSelf(int cTag, Channel &theChannel)
00748 {
00749 int res = 0;
00750
00751 static Vector data(37);
00752
00753 data(0) = this->getTag();
00754 data(1) = QzType;
00755 data(2) = Qult;
00756 data(3) = z50;
00757 data(4) = suction;
00758 data(5) = dashpot;
00759 data(6) = zref;
00760 data(7) = np;
00761 data(8) = Elast;
00762 data(9) = maxElast;
00763 data(10)= nd;
00764 data(11)= NFkrig;
00765
00766 data(12) = CNF_Qinr;
00767 data(13) = CNF_Qinl;
00768 data(14) = CNF_zinr;
00769 data(15) = CNF_zinl;
00770 data(16) = CNF_Q;
00771 data(17) = CNF_z;
00772 data(18) = CNF_tang;
00773
00774 data(19) = CSuction_Qin;
00775 data(20) = CSuction_zin;
00776 data(21) = CSuction_Q;
00777 data(22) = CSuction_z;
00778 data(23) = CSuction_tang;
00779
00780 data(24) = CClose_Q;
00781 data(25) = CClose_z;
00782 data(26) = CClose_tang;
00783
00784 data(27) = CGap_z;
00785 data(28) = CGap_Q;
00786 data(29) = CGap_tang;
00787
00788 data(30) = CFar_z;
00789 data(31) = CFar_Q;
00790 data(32) = CFar_tang;
00791
00792 data(33) = Cz;
00793 data(34) = CQ;
00794 data(35) = Ctangent;
00795 data(36) = TzRate;
00796
00797 data(37) = initialTangent;
00798
00799 res = theChannel.sendVector(this->getDbTag(), cTag, data);
00800 if (res < 0)
00801 opserr << "QzSimple1::sendSelf() - failed to send data\n";
00802
00803 return res;
00804 }
00805
00807 int
00808 QzSimple1::recvSelf(int cTag, Channel &theChannel,
00809 FEM_ObjectBroker &theBroker)
00810 {
00811 int res = 0;
00812
00813 static Vector data(38);
00814 res = theChannel.recvVector(this->getDbTag(), cTag, data);
00815
00816 if (res < 0) {
00817 opserr << "QzSimple1::recvSelf() - failed to receive data\n";
00818 CNF_tang = 0;
00819 this->setTag(0);
00820 }
00821 else {
00822 this->setTag((int)data(0));
00823 QzType = (int)data(1);
00824 Qult = data(2);
00825 z50 = data(3);
00826 suction = data(4);
00827 dashpot = data(5);
00828 zref = data(6);
00829 np = data(7);
00830 Elast = data(8);
00831 maxElast = data(9);
00832 nd = data(10);
00833 NFkrig = data(11);
00834
00835 CNF_Qinr = data(12);
00836 CNF_Qinl = data(13);
00837 CNF_zinr = data(14);
00838 CNF_zinl = data(15);
00839 CNF_Q = data(16);
00840 CNF_z = data(17);
00841 CNF_tang = data(18);
00842
00843 CSuction_Qin = data(19);
00844 CSuction_zin = data(20);
00845 CSuction_Q = data(21);
00846 CSuction_z = data(22);
00847 CSuction_tang = data(23);
00848
00849 CClose_Q = data(24);
00850 CClose_z = data(25);
00851 CClose_tang = data(26);
00852
00853 CGap_z = data(27);
00854 CGap_Q = data(28);
00855 CGap_tang = data(29);
00856
00857 CFar_z = data(30);
00858 CFar_Q = data(31);
00859 CFar_tang = data(32);
00860
00861 Cz = data(33);
00862 CQ = data(34);
00863 Ctangent = data(35);
00864 TzRate = data(36);
00865
00866 initialTangent = data(37);
00867
00868
00869 this->revertToLastCommit();
00870 }
00871
00872 return res;
00873 }
00874
00876 void
00877 QzSimple1::Print(OPS_Stream &s, int flag)
00878 {
00879 s << "QzSimple1, tag: " << this->getTag() << endln;
00880 s << " QzType: " << QzType << endln;
00881 s << " Qult: " << Qult << endln;
00882 s << " z50: " << z50 << endln;
00883 s << " suction: " << suction << endln;
00884 s << " dashpot: " << dashpot << endln;
00885 }
00886
00888