00001
00002
00003
00004 #include "galias.h"
00005 #include "global.h"
00006 #include "math.h"
00007 #include "globmat.h"
00008 #include "genfile.h"
00009 #include "adaptivity.h"
00010 #include "intpoints.h"
00011 #include "stdlib.h"
00012 #include "elastisomat.h"
00013 #include "creep.h"
00014 #include "creep_b3.h"
00015
00016 b3mat::b3mat (void)
00017 {
00018 type_h=0;
00019 type_temp=0;
00020
00021 type_e=0;
00022
00023 hum_env = temp_env = 0.0;
00024
00025 flag_drshr = flag_shr = flag_temp = 0;
00026
00027 ft_flag = 0;
00028
00029
00030 kappa = 0.0;
00031 beta_t = beta_h = beta_s = 1.0;
00032
00033
00034 q1=q2=q3=q4=q5=0.0;
00035
00036 alpha = 12.0e-6;
00037 e28=30.0e9;
00038 fc=35.8e6;
00039 ft=1.5e6;
00040 ft_ratio = 1.0e-5;
00041 wc=0.43;
00042 sc=3.4;
00043 gc=1.98;
00044 cs=305.0;
00045 a1=1.05;
00046 a2=1.2;
00047 kd=0.15;
00048 type_b3 = 1;
00049 type_e=0;
00050 type_h=0;
00051 type_temp=0;
00052
00053 tb_time = 0.0;
00054 th_time = 0.0;
00055 napproxtime = 0;
00056 nRetTime = 0;
00057 type_rt = 0;
00058 e0 = 0.0;
00059 previoustime = 0.0;
00060 actualtime = 0.0;
00061 dtb = 0.0;
00062 tb_age_dt = tb_age = tbl_age = tbh_age = maxtimeb = 0.0;
00063 napptimeb = 0;
00064
00065 retTime=NULL;
00066 timeMax=(Mp->timecon.endtime ())/86400.0;
00067
00068 eps_ainf = 0.0;
00069 }
00070
00071 b3mat::~b3mat (void)
00072 {
00073 delete [] retTime;
00074 }
00075
00076
00077
00078
00079
00080
00081
00082
00083 void b3mat::read (XFILE *in)
00084 {
00085 long i;
00086
00087 xfscanf(in,"%ld",&type_b3);
00088
00089 if (type_b3 == 2){
00090 xfscanf (in,"%lf %lf %lf %lf %lf", &q1_ini, &q2_ini, &q3_ini, &q4_ini, &q5_ini);
00091 }
00092
00093 else{
00094 xfscanf(in,"%ld",&type_e);
00095
00096 if (type_e == 1){xfscanf (in,"%lf ", &e28);}
00097
00098 e0 = 1.5*e28/6.89476*1.0e-3;
00099 e28 = e28/6.89476*1.0e-3;
00100
00101 xfscanf (in,"%lf %ld", &fc, &ft_flag);
00102
00103 switch(ft_flag){
00104 case 0:
00105 xfscanf (in,"%lf ", &ft);
00106 break;
00107 case 1:
00108 xfscanf (in,"%lf ", &ft_ratio);
00109 break;
00110 default:{
00111 print_err("\n unknown type ft_flag is required \n",__FILE__, __LINE__, __func__);
00112 }
00113 }
00114
00115 xfscanf (in,"%lf %lf %lf %lf %lf %lf %lf %lf %lf", &alpha, &wc, &sc, &gc, &cs, &a1, &a2, &ks, &kd);
00116
00117
00118 fc = fc/6.89476*1.0e-3;
00119
00120 cs = cs/16.03;
00121
00122 kd=kd/0.0254;
00123 }
00124
00125
00126
00127 xfscanf (in,"%ld %ld", &type_h, &type_temp);
00128
00129
00130 if (type_h == 0){xfscanf (in,"%lf ", &hum_env); }
00131 if (type_temp == 0){xfscanf (in,"%lf ", &temp_env); }
00132
00133 xfscanf (in,"%lf %lf %ld %ld %ld %d %d %d", &tb_time, &th_time, &napproxtime, &nRetTime, &type_rt, &flag_drshr, &flag_shr, &flag_temp);
00134
00135 tb_time = tb_time/86400.0;
00136 th_time = th_time/86400.0;
00137
00138 retTime = new double [nRetTime];
00139 for (i=0;i<nRetTime;i++){
00140 retTime[i]=0.0;
00141 }
00142
00143 if (type_rt==1){
00144 for (i=0;i<nRetTime;i++)
00145 xfscanf (in,"%lf",&retTime[i]);
00146 }
00147
00148 xfscanf (in,"%lf",&eps_ainf);
00149 xfscanf (in,"%lf",&kappa);
00150 }
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160 void b3mat::print (FILE *out)
00161 {
00162 long i;
00163
00164 fprintf (out," %ld",type_b3);
00165
00166 if (type_b3 == 2){
00167 fprintf (out," %lf %lf %lf %lf %lf", q1_ini, q2_ini, q3_ini, q4_ini, q5_ini);
00168 }
00169
00170 else{
00171 fprintf(out," %ld",type_e);
00172
00173 if (type_e == 1){
00174 e28 = e28*6.89476/1.0e-3;
00175
00176 fprintf (out," %lf",e28);
00177 }
00178
00179 fc = fc*6.89476/1.0e-3;
00180
00181 fprintf (out," %lf %d", fc, ft_flag);
00182
00183 if (ft_flag == 0)
00184 fprintf (out," %lf", ft);
00185 else
00186 fprintf (out," %lf", ft_ratio);
00187
00188 cs = cs*16.03;
00189 kd=kd*0.0254;
00190
00191 fprintf (out," %lf %lf %lf %lf %lf %lf %lf %lf %lf", alpha, wc, sc, gc, cs, a1, a2, ks, kd);
00192 }
00193
00194 fprintf (out," %ld %ld", type_h, type_temp);
00195
00196 if (type_h == 0){fprintf (out," %lf ", hum_env); }
00197 if (type_temp == 0){fprintf (out," %lf ", temp_env); }
00198
00199 tb_time = tb_time*86400.0;
00200 th_time = th_time*86400.0;
00201
00202 fprintf (out," %lf %lf %ld %ld %ld %d %d %d", tb_time, th_time, napproxtime, nRetTime, type_rt, flag_drshr, flag_shr, flag_temp);
00203
00204 if (type_rt==1){
00205 for (i=0;i<nRetTime;i++)
00206 fprintf (out," %lf", retTime[i]);
00207 }
00208
00209 fprintf (out," %lf",eps_ainf);
00210 fprintf (out," %lf",kappa);
00211 }
00212
00213
00214
00215
00216
00217
00218
00219
00220
00221 void b3mat::compute_ages (long ipp, long ido)
00222 {
00223
00224 if(Mp->time == previoustime)
00225 dtb = Mp->timecon.initialtimeincr ()/86400.0;
00226 else
00227 dtb = (Mp->time - previoustime)/86400.0;
00228 actualtime = Mp->time/86400.0;
00229 tbh_age = actualtime - th_time;
00230 tbl_age = actualtime - tb_time + dtb/2.0;
00231 tb_age = actualtime - tb_time;
00232 napptimeb = give_napproxtime(ipp);
00233 maxtimeb = Mp->timecon.endtime ()/86400.0;
00234 tb_age_dt = tb_age + dtb;
00235
00236 if (tb_age <= 0.0){
00237 fprintf (stderr,"\n Age of concrete must be greater than zero!!!");
00238 fprintf (stderr,"\n Age of concrete = %e, Actual time = %e, Time of end of concrete casting = %e; (Age of concrete = Actual time - Time of end of concrete casting)",tb_age,actualtime,tb_time);
00239 print_err("\n In function compute_ages ", __FILE__, __LINE__, __func__);
00240 exit(0);
00241 }
00242 if (tbh_age <= 0.0){
00243 fprintf (stderr,"\n Age of concrete when drying begins must be greater than zero!!!");
00244 fprintf (stderr,"\n Age of concrete when drying begins = %e, Actual time = %e, Time when drying begins = %e; (Age of concrete when drying begins = Actual time - Time when drying begins).",tbh_age,actualtime,th_time);
00245 print_err("\n In function compute_ages ", __FILE__, __LINE__, __func__);
00246 exit(1);
00247 }
00248
00249 if (th_time <= tb_time){
00250 fprintf (stderr,"\n Time when drying begins must be greater than Time of end of concrete casting!!!");
00251 fprintf (stderr,"\n Time when drying begins = %e Time of end of concrete casting = %e.",th_time,tb_time);
00252 print_err("\n In function compute_ages ", __FILE__, __LINE__, __func__);
00253 exit(2);
00254 }
00255
00256
00257 beta_t = give_beta_t_eqother(ipp,ido);
00258
00259 if (kappa > 0.0){
00260 dtb = kappa*beta_t*beta_h*beta_s*dtb;
00261 }
00262 }
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273
00274
00275
00276
00277
00278
00279 void b3mat::give_ages (double &t_age_dt,double &t_age,double &tl_age,double &th_age,double &dt,double &maxtime,long &napptime,long ipp)
00280 {
00281 t_age_dt = tb_age_dt;
00282 t_age = tb_age;
00283 tl_age = tbl_age;
00284 th_age = tbh_age;
00285 dt = dtb;
00286 maxtime = maxtimeb;
00287 napptime = napptimeb;
00288 }
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298 long b3mat::give_nceqother (long ipp)
00299 {
00300 long nc,nceqother;
00301
00302 nc=Mm->ip[ipp].ncompstr;
00303
00304 nceqother = nc + nc;
00305 nceqother = nceqother + nc + nc;
00306 nceqother = nceqother + 2;
00307 nceqother = nceqother + nRetTime;
00308 nceqother = nceqother + nc*nRetTime;
00309 nceqother = nceqother + nc;
00310 nceqother = nceqother + nc;
00311 nceqother = nceqother + nc;
00312 nceqother = nceqother + nc;
00313 nceqother = nceqother + 1;
00314 nceqother = nceqother + 1;
00315 nceqother = nceqother + nc;
00316 nceqother = nceqother + 1;
00317
00318 return(nceqother);
00319 }
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329 long b3mat::give_ncother (long ipp)
00330 {
00331 long nc,ncother;
00332
00333 nc=Mm->ip[ipp].ncompstr;
00334
00335 ncother = nc;
00336
00337 return(ncother);
00338 }
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350 void b3mat::initvalues (long ipp, long ido)
00351 {
00352 long nc;
00353
00354 nc=Mm->ip[ipp].ncompstr;
00355
00356 if(Mm->givestatusnmq(rel_hum) == 1)
00357 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)]=Mm->givenonmechq(rel_hum, ipp);
00358 if(Mm->givestatusnmq(temperature) == 1)
00359 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+1)]=Mm->givenonmechq(temperature, ipp);
00360
00361 store_beta_t_eqother(1.0,ipp,ido);
00362 }
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374 void b3mat::updatevalues (long ipp, long ido)
00375 {
00376 long nc;
00377 double beta;
00378
00379 nc=Mm->ip[ipp].ncompstr;
00380
00381
00382
00383 beta = compute_beta_t(ipp);
00384
00385 store_beta_t_eqother(beta,ipp,ido);
00386 }
00387
00388
00389
00390
00391
00392
00393
00394 long b3mat::give_nret_time (void)
00395 {
00396 return(nRetTime);
00397 }
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408
00409 void b3mat::give_rettimes (vector &rettimes,long n_ret_times,long ipp)
00410 {
00411 long i;
00412 double m,mm;
00413
00414 if (n_ret_times != nRetTime){
00415 print_err("\n Wrong number of ret. times", __FILE__, __LINE__, __func__);
00416 abort();
00417 }
00418
00419 if (type_rt==1){
00420 }
00421 else
00422 {
00423 m = log10(2.0*timeMax);
00424
00425 retTime[0]=1.0e-9;
00426 retTime[1]=1.0;
00427 mm=1./(nRetTime-2);
00428
00429 for (i=2;i<nRetTime-1;i++){
00430 retTime[i]=pow(10.,(i-1)*mm*m);
00431 }
00432 retTime[nRetTime -1]=2.0*timeMax;
00433 }
00434
00435 for (i=0;i<nRetTime;i++){
00436 rettimes.a[i]=retTime[i];
00437 }
00438 }
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450
00451 void b3mat::store_emu_eqother(vector &e_mu,long n_ret_times,long ipp,long ido)
00452 {
00453 long i;
00454 long nc;
00455
00456 nc=Mm->ip[ipp].ncompstr;
00457
00458 if (n_ret_times != nRetTime){
00459 print_err("\n Wrong number of ret. times", __FILE__, __LINE__, __func__);
00460 abort();
00461 }
00462
00463 for (i=0;i<nRetTime;i++){
00464 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2)+ i] = e_mu.a[i];
00465 }
00466 }
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479 void b3mat::give_emu_eqother(vector &e_mu,long n_ret_times,long ipp,long ido)
00480 {
00481 long i;
00482 long nc;
00483
00484 nc=Mm->ip[ipp].ncompstr;
00485
00486 if (n_ret_times != nRetTime){
00487 print_err("\n Wrong number of ret. times", __FILE__, __LINE__, __func__);
00488 abort();
00489 }
00490
00491 for (i=0;i<nRetTime;i++){
00492 e_mu.a[i] = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2)+ i];
00493 }
00494 }
00495
00496
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506 void b3mat::store_ym_eqother(double ym,long ipp,long ido)
00507 {
00508 long n_ret_times;
00509 long nc;
00510
00511 nc=Mm->ip[ipp].ncompstr;
00512 n_ret_times = give_nret_time ();
00513
00514 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc)] = ym;
00515 }
00516
00517
00518
00519
00520
00521
00522
00523
00524
00525
00526
00527 double b3mat::give_ym_eqother(long ipp,long ido)
00528 {
00529 long n_ret_times;
00530 long nc;
00531 double ym;
00532
00533 nc=Mm->ip[ipp].ncompstr;
00534 n_ret_times = give_nret_time ();
00535
00536 ym = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc)];
00537
00538 return(ym);
00539 }
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550
00551
00552 void b3mat::store_ym_old_eqother(double ym,long ipp,long ido)
00553 {
00554 long n_ret_times;
00555 long nc;
00556
00557 nc=Mm->ip[ipp].ncompstr;
00558 n_ret_times = give_nret_time ();
00559
00560 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc+1+1+nc)] = ym;
00561 }
00562
00563
00564
00565
00566
00567
00568
00569
00570
00571
00572
00573 double b3mat::give_ym_old_eqother(long ipp,long ido)
00574 {
00575 long n_ret_times;
00576 long nc;
00577 double ym;
00578
00579 nc=Mm->ip[ipp].ncompstr;
00580 n_ret_times = give_nret_time ();
00581
00582 ym = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc+1+1+nc)];
00583
00584 return(ym);
00585 }
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596 double b3mat::compute_beta_t(long ipp)
00597 {
00598 long nc,n_ret_times;
00599 double beta,tempr,uh_R,temprinit;
00600
00601 nc=Mm->ip[ipp].ncompstr;
00602 n_ret_times = give_nret_time ();
00603
00604 if(Mm->givestatusnmq(temperature) == 1)
00605 tempr = Mm->givenonmechq(temperature, ipp);
00606 if(Mm->givestatusnmq(initial_temperature) == 1)
00607 temprinit = Mm->givenonmechq(initial_temperature, ipp);
00608
00609
00610 if (tempr < 273.15)
00611 tempr += 273.15;
00612 if (temprinit < 273.15)
00613 temprinit += 273.15;
00614
00615 uh_R = 4600.0*pow((30.0/(tempr - 263.0)),0.39);
00616
00617 if(tempr > temprinit)
00618
00619
00620 beta = 4.0;
00621 else
00622 beta = 1.0;
00623
00624 return beta;
00625 }
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635
00636
00637 void b3mat::store_beta_t_eqother(double beta,long ipp,long ido)
00638 {
00639 long n_ret_times;
00640 long nc;
00641 double beta_last;
00642
00643 nc=Mm->ip[ipp].ncompstr;
00644 n_ret_times = give_nret_time ();
00645 beta_last = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc+1)];
00646
00647 if(beta_last < beta)
00648 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc+1)] = beta;
00649 }
00650
00651
00652
00653
00654
00655
00656
00657
00658
00659
00660
00661 double b3mat::give_beta_t_eqother(long ipp,long ido)
00662 {
00663 long n_ret_times;
00664 long nc;
00665 double beta;
00666
00667 nc=Mm->ip[ipp].ncompstr;
00668 n_ret_times = give_nret_time ();
00669
00670 beta = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc+1)];
00671
00672 return beta;
00673 }
00674
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685 void b3mat::give_hidden_strains_eqother(matrix &gamma_mu,long ipp,long ido)
00686 {
00687 long i,j,ii;
00688 long n_ret_times;
00689 long nc;
00690
00691 nc=Mm->ip[ipp].ncompstr;
00692 n_ret_times = give_nret_time ();
00693
00694 ii = 0;
00695 for (i=0;i<n_ret_times;i++){
00696 for (j=0;j<nc;j++){
00697 gamma_mu[j][i]=Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times)+ ii];
00698 ii++;
00699 }
00700 }
00701 }
00702
00703
00704
00705
00706
00707
00708
00709
00710
00711
00712
00713 void b3mat::store_hidden_strains_eqother(matrix &gamma_mu,long ipp,long ido)
00714 {
00715 long i,j,ii;
00716 long n_ret_times;
00717 long nc;
00718
00719 nc=Mm->ip[ipp].ncompstr;
00720 n_ret_times = give_nret_time ();
00721
00722 ii = 0;
00723 for (i=0;i<n_ret_times;i++){
00724 for (j=0;j<nc;j++){
00725 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times)+ ii] = gamma_mu[j][i];
00726 ii++;
00727 }
00728 }
00729 }
00730
00731
00732
00733
00734
00735
00736
00737
00738
00739
00740
00741 void b3mat::give_stresses_eqother(vector &sigma,long ipp,long ido)
00742 {
00743 long i;
00744 long nc;
00745
00746 nc=Mm->ip[ipp].ncompstr;
00747
00748 for (i=0;i<nc;i++){
00749 sigma[i] = Mm->ip[ipp].eqother[ido+(nc)+i];
00750 }
00751 }
00752
00753
00754
00755
00756
00757
00758
00759
00760
00761
00762
00763 void b3mat::store_stresses_eqother(vector &sigma,long ipp,long ido)
00764 {
00765 long i;
00766 long nc;
00767
00768 nc=Mm->ip[ipp].ncompstr;
00769
00770 for (i=0;i<nc;i++){
00771 Mm->ip[ipp].eqother[ido+(nc)+i] = sigma[i];
00772 }
00773 }
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785 void b3mat::give_stresses_other(vector &sigma,long ipp,long ido)
00786 {
00787 long i;
00788 long nc;
00789
00790 nc=Mm->ip[ipp].ncompstr;
00791
00792 for (i=0;i<nc;i++){
00793 sigma[i] = Mm->ip[ipp].other[ido+(nc)+i];
00794 }
00795 }
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807 void b3mat::store_stresses_other(vector &sigma,long ipp,long ido)
00808 {
00809 long i;
00810 long nc;
00811
00812 nc=Mm->ip[ipp].ncompstr;
00813
00814 for (i=0;i<nc;i++){
00815 Mm->ip[ipp].other[ido+(nc)+i] = sigma[i];
00816 }
00817 }
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829 void b3mat::give_dstresses_eqother(vector &dsigma,long ipp,long ido)
00830 {
00831 long i;
00832 long nc;
00833
00834 nc=Mm->ip[ipp].ncompstr;
00835
00836 for (i=0;i<nc;i++){
00837 dsigma[i] = Mm->ip[ipp].eqother[ido+(nc+nc+nc)+i];
00838 }
00839 }
00840
00841
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851 void b3mat::store_dstresses_eqother(vector &dsigma,long ipp,long ido)
00852 {
00853 long i;
00854 long nc;
00855
00856 nc=Mm->ip[ipp].ncompstr;
00857
00858 for (i=0;i<nc;i++){
00859 Mm->ip[ipp].eqother[ido+(nc+nc+nc)+i] = dsigma[i];
00860 }
00861 }
00862
00863
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873 void b3mat::give_strains_eqother(vector &eps,long ipp,long ido)
00874 {
00875 long i;
00876 long nc;
00877
00878 nc=Mm->ip[ipp].ncompstr;
00879
00880 for (i=0;i<nc;i++){
00881 eps[i] = Mm->ip[ipp].eqother[ido+(0)+i];
00882 }
00883 }
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893
00894
00895 void b3mat::store_strains_eqother(vector &eps,long ipp,long ido)
00896 {
00897 long i;
00898 long nc;
00899
00900 nc=Mm->ip[ipp].ncompstr;
00901
00902 for (i=0;i<nc;i++){
00903 Mm->ip[ipp].eqother[ido+(0)+i] = eps[i];
00904 }
00905 }
00906
00907
00908
00909
00910
00911
00912
00913
00914
00915
00916
00917 void b3mat::give_creepdstrains_eqother(vector &deps_cr,long ipp,long ido)
00918 {
00919 long i;
00920 long n_ret_times;
00921 long nc;
00922
00923 nc=Mm->ip[ipp].ncompstr;
00924 n_ret_times = give_nret_time ();
00925
00926 for (i=0;i<nc;i++){
00927 deps_cr[i] = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times)+i];
00928 }
00929 }
00930
00931
00932
00933
00934
00935
00936
00937
00938
00939
00940
00941 void b3mat::store_creepdstrains_eqother(vector &deps_cr,long ipp,long ido)
00942 {
00943 long i;
00944 long n_ret_times;
00945 long nc;
00946
00947 nc=Mm->ip[ipp].ncompstr;
00948 n_ret_times = give_nret_time ();
00949
00950 for (i=0;i<nc;i++){
00951 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times)+i] = deps_cr[i];
00952 }
00953 }
00954
00955
00956
00957
00958
00959
00960
00961
00962
00963
00964
00965 void b3mat::give_irrdstrains_eqother(vector &deps_sh,long ipp,long ido)
00966 {
00967 long i;
00968 long n_ret_times;
00969 long nc;
00970
00971 nc=Mm->ip[ipp].ncompstr;
00972 n_ret_times = give_nret_time ();
00973
00974 for (i=0;i<nc;i++){
00975 deps_sh[i] = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc)+i];
00976 }
00977 }
00978
00979
00980
00981
00982
00983
00984
00985
00986
00987
00988
00989 void b3mat::store_irrdstrains_eqother(vector &deps_sh,long ipp,long ido)
00990 {
00991 long i;
00992 long n_ret_times;
00993 long nc;
00994
00995 nc=Mm->ip[ipp].ncompstr;
00996 n_ret_times = give_nret_time ();
00997
00998 for (i=0;i<nc;i++){
00999 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc)+i] = deps_sh[i];
01000 }
01001 }
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013 void b3mat::give_stressirrdstrains_eqother(vector &deps_ss,long ipp,long ido)
01014 {
01015 long i;
01016 long n_ret_times;
01017 long nc;
01018
01019 nc=Mm->ip[ipp].ncompstr;
01020 n_ret_times = give_nret_time ();
01021
01022 for (i=0;i<nc;i++){
01023 deps_ss[i] = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc)+i];
01024 }
01025 }
01026
01027
01028
01029
01030
01031
01032
01033
01034
01035
01036
01037 void b3mat::store_stressirrdstrains_eqother(vector &deps_ss,long ipp,long ido)
01038 {
01039 long i;
01040 long n_ret_times;
01041 long nc;
01042
01043 nc=Mm->ip[ipp].ncompstr;
01044 n_ret_times = give_nret_time ();
01045
01046 for (i=0;i<nc;i++){
01047 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc)+i] = deps_ss[i];
01048 }
01049 }
01050
01051
01052
01053
01054
01055
01056
01057
01058
01059
01060 double b3mat::give_shrinkage_eqother(long ipp,long ido)
01061 {
01062 long i;
01063 long n_ret_times;
01064 long nc;
01065 double eps_sh;
01066
01067 nc=Mm->ip[ipp].ncompstr;
01068 n_ret_times = give_nret_time ();
01069
01070 for (i=0;i<nc;i++){
01071 eps_sh = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc)];
01072 }
01073
01074 return eps_sh;
01075 }
01076
01077
01078
01079
01080
01081
01082
01083
01084
01085
01086
01087 void b3mat::store_shrinkage_eqother(double eps_sh,long ipp,long ido)
01088 {
01089 long i;
01090 long n_ret_times;
01091 long nc;
01092
01093 nc=Mm->ip[ipp].ncompstr;
01094 n_ret_times = give_nret_time ();
01095
01096 for (i=0;i<nc;i++){
01097 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc)] = eps_sh;
01098 }
01099 }
01100
01101
01102
01103
01104
01105
01106
01107
01108
01109
01110 void b3mat::store_hum_eqother(long ipp,long ido)
01111 {
01112 long nc;
01113
01114 nc=Mm->ip[ipp].ncompstr;
01115
01116 if(Mm->givestatusnmq(rel_hum) == 1)
01117 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)] = Mm->givenonmechq(rel_hum, ipp);
01118 else
01119 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)] = 0.0;
01120 }
01121
01122
01123
01124
01125
01126
01127
01128
01129
01130
01131 void b3mat::store_temp_eqother(long ipp,long ido)
01132 {
01133 long nc;
01134
01135 nc=Mm->ip[ipp].ncompstr;
01136
01137 if(Mm->givestatusnmq(temperature) == 1)
01138 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+1)] = Mm->givenonmechq(temperature, ipp);
01139 else
01140 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+1)] = 0.0;
01141 }
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151 long b3mat::give_napproxtime(long ipp)
01152 {
01153 return(napproxtime);
01154 }
01155
01156
01157
01158
01159
01160
01161
01162
01163
01164
01165
01166
01167
01168
01169 double b3mat::b3_law (double t0, double tl, double t, long ipp,long ido)
01170 {
01171 double n,c0,cd,ac,ag,m,z,r,qf,q,eps_shinf,tau,ht,htl,st,stl;
01172 double hum,temp,hum_prev,temp_prev;
01173 double jt,kt;
01174 long nc;
01175
01176 nc=Mm->ip[ipp].ncompstr;
01177
01178 if ( type_h == 0){
01179 hum = 0.0;
01180 hum_prev = 0.0;
01181 }
01182 else{
01183
01184 hum=Mm->givenonmechq(rel_hum, ipp);
01185
01186 hum_prev = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)];
01187 }
01188 if ( type_temp == 0){
01189 temp = 0.0;
01190 temp_prev = 0.0;
01191 }
01192 else{
01193
01194 temp=Mm->givenonmechq(temperature, ipp);
01195
01196 temp_prev = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)+1];
01197 }
01198
01199 if (t < t0){
01200 fprintf (stderr,"\n Age of concrete is lower than age when dyring begins!!!");
01201 fprintf (stderr,"\n Age of concrete = %e, Age when dyring begins = %e",t,t0);
01202 print_err("\n In ", __FILE__, __LINE__, __func__);
01203 exit(1);
01204 }
01205 if (t < tl){
01206 fprintf (stderr,"\n Age of concrete is lower than age at loading!!!");
01207 fprintf (stderr,"\n Age of concrete = %e, Age at loading = %e",t,tl);
01208 print_err("\n In ", __FILE__, __LINE__, __func__);
01209 exit(0);
01210 }
01211
01212
01213 ac=sc+gc; ag=ac/gc; m=0.5;
01214 n = 0.1;
01215
01216 if (type_e == 1)
01217 q1=600000.0/e28;
01218 else
01219 q1=600000.0/57000.0/sqrt(fc);
01220
01221 r=1.7*pow(tl,0.12)+8.0;
01222 qf=1.0/(0.086*pow(tl,(2.0/9.0))+1.21*pow(tl,(4.0/9.0)));
01223 z = 1.0/pow(tl,m)*log(1.0 + pow((t - tl),n));
01224 q = qf/pow((1.0 + pow((qf/z),r)),(1.0/r));
01225 q2=451.1*sqrt(cs)/pow(fc,0.9);
01226 q3=0.29*pow(wc,4.0)*q2;
01227 q4=0.14/pow(ac,0.7);
01228
01229 if(type_b3==2){
01230 q1 = q1_ini;
01231 q2 = q2_ini;
01232 q3 = q3_ini;
01233 q4 = q4_ini;
01234 }
01235
01236 c0=q2*q+q3*log(1.0+pow((t-tl),n))+q4*log(t/tl);
01237
01238
01239 cd = 0.0;
01240
01241 if (type_h == 0){
01242
01243
01244 kt = 190.8/pow(t,0.08)/pow(fc,0.25);
01245 tau = kt*ks*ks*kd*kd;
01246 st = tanh(sqrt((t - t0)/tau));
01247 stl = tanh(sqrt((tl - t0)/tau));
01248 ht = 1.0 - (1.0 - hum_env)*st;
01249 htl = 1.0 - (1.0 - hum_env)*stl;
01250 eps_shinf = a1*a2*(26.0*pow((wc*cs),2.1)/pow(fc,0.28)+270.);
01251 q5 = 7.57e5/fc/pow(eps_shinf,0.6);
01252
01253 if(type_b3==2){
01254 q5 = q5_ini;
01255 }
01256
01257 cd = q5*sqrt(exp(-8.0*ht) - exp(-8.0*htl));
01258
01259 if (tl < t0)
01260 cd = 0.0;
01261 }
01262
01263
01264
01265
01266
01267
01268
01269
01270
01271
01272
01273
01274
01275
01276
01277
01278
01279
01280
01281
01282 if (flag_drshr == 0)
01283 cd = 0.0;
01284
01285 q1 = q1/6.89476*1.0e-3*1.0e-6;
01286 jt=(c0+cd)/6.89476*1.0e-3*1.0e-6;
01287
01288 return(jt);
01289 }
01290
01291
01292
01293
01294
01295
01296
01297 double b3mat::give_q1()
01298 {
01299 return(q1);
01300 }
01301
01302
01303
01304
01305
01306
01307
01308
01309
01310
01311
01312
01313
01314
01315
01316
01317 void b3mat::give_deps_free (vector &deps_sh, double t0, double t_dt, double t, double dt, long ipp,long im,long ido)
01318 {
01319 double eps_shinf,kh,kt,tau,st,dhum,dtemp;
01320 double hum,temp,hum_prev,temp_prev;
01321 double deps,deps_h,deps_a,deps_h_old,deps_t,e_607,e_t0_tau,e_t0,e_actual;
01322 long nc;
01323
01324 strastrestate ss;
01325
01326 nc=Mm->ip[ipp].ncompstr;
01327
01328 if ( type_h == 0){
01329 hum = 0.0;
01330 hum_prev = 0.0;
01331 }
01332 else{
01333
01334 hum=Mm->givenonmechq(rel_hum, ipp);
01335
01336 hum_prev = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)];
01337 }
01338 if ( type_temp == 0){
01339 temp = 0.0;
01340 temp_prev = 0.0;
01341 }
01342 else{
01343
01344 temp=Mm->givenonmechq(temperature, ipp);
01345
01346 temp_prev = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)+1];
01347 }
01348
01349 if (t < t0){
01350 fprintf (stderr,"\n Age of concrete is lower than age when dyring begins!!!");
01351 fprintf (stderr,"\n Age of concrete = %10.15e, Age when dyring begins = %10.15e",t,t0);
01352 print_err("\n In ", __FILE__, __LINE__, __func__);
01353 exit(1);
01354 }
01355
01356
01357 if (type_h == 0){
01358
01359
01360 kt = 190.8/pow(t,0.08)/pow(fc,0.25);
01361 tau = kt*ks*ks*kd*kd;
01362 st = tanh(sqrt((t - t0)/tau));
01363
01364
01365 eps_shinf = a1*a2*(26.0*pow((wc*cs),2.1)/pow(fc,0.28)+270.);
01366
01367 e_607 = e28*sqrt(607.0/(4+0.85*607.0));
01368 e_t0_tau = e28*sqrt((t0+tau)/(4+0.85*(t0+tau)));
01369 eps_shinf = eps_shinf*e_607/e_t0_tau;
01370
01371
01372 if(hum_env<=0.98)
01373 kh=(1.0-pow(hum_env,3.0));
01374 else
01375 kh= (-0.2 - (1.0-pow(0.98,3.0)))/0.02*(hum_env - 0.98);
01376 if(hum_env>=1.0)
01377 kh = -0.2;
01378
01379 deps_h = -eps_shinf*kh*st;
01380
01381 deps_h_old = give_shrinkage_eqother(ipp,ido);
01382 store_shrinkage_eqother(deps_h,ipp,ido);
01383 deps_h = deps_h - deps_h_old;
01384
01385 deps_h = deps_h*1.e-6;
01386 }
01387 else{
01388
01389 dhum = hum - hum_prev;
01390 eps_shinf = a1*a2*(26.0*pow((wc*cs),2.1)/pow(fc,0.28)+270.);
01391 eps_shinf = eps_shinf*1.e-6;
01392
01393
01394
01395 e_t0 = e28*sqrt((t0)/(4+0.85*(t0)));
01396 e_actual = creep_give_actual_ym (ipp,im,ido)/6.89476*1.0e-3;
01397
01398
01399 deps_h = eps_shinf*3.0*hum*hum*dhum;
01400
01401
01402
01403 deps_a = -eps_ainf*((1.0-exp(-.125*t_dt*24.0))-(1.0-exp(-.125*t*24.0)));
01404
01405 deps_h = deps_h + deps_a;
01406 }
01407
01408
01409
01410 dtemp = temp - temp_prev;
01411 deps_t = 0.0;
01412
01413 if (flag_shr == 0)
01414 deps_h = 0.0;
01415
01416 if (flag_temp == 0)
01417 deps_t = 0.0;
01418
01419 deps = deps_h + deps_t;
01420
01421 fillv(0.0,deps_sh);
01422 ss=Mm->ip[ipp].ssst;
01423
01424
01425 if(ss==bar){
01426 deps_sh[0]=deps;
01427 }
01428 else{
01429 deps_sh[0]=deps;
01430 deps_sh[1]=deps;
01431 }
01432 if(ss==planestrain) deps_sh[3]=deps;
01433 if(ss==planestress) deps_sh[3]=deps;
01434 if(ss==axisymm) deps_sh[2]=deps;
01435 if(ss==spacestress) deps_sh[2]=deps;
01436
01437 }
01438
01439
01440
01441
01442
01443
01444
01445
01446
01447
01448
01449
01450
01451
01452
01453
01454 void b3mat::give_deps_stressinduced (vector &deps_ss, double t0, double t_dt, double t, vector &sigma, long ipp,long im,long ido)
01455 {
01456 double eps_shinf,deps,deps_cs,deps_ts,r,gh,dhum,rho,gt,dtemp,k;
01457 double hum,temp,hum_prev,temp_prev,e_t0,e_actual;
01458 long i,nc;
01459
01460 strastrestate ss;
01461
01462 nc=Mm->ip[ipp].ncompstr;
01463
01464 if ( type_h == 0){
01465 hum = 0.0;
01466 hum_prev = 0.0;
01467 }
01468 else{
01469
01470 hum=Mm->givenonmechq(rel_hum, ipp);
01471
01472 hum_prev = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)];
01473 }
01474 if ( type_temp == 0){
01475 temp = 0.0;
01476 temp_prev = 0.0;
01477 }
01478 else{
01479
01480 temp=Mm->givenonmechq(temperature, ipp);
01481
01482 temp_prev = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc)+1];
01483 }
01484
01485 if (t < t0){
01486 fprintf (stderr,"\n Age of concrete is lower than age when dyring begins!!!");
01487 print_err("\n In ", __FILE__, __LINE__, __func__);
01488 exit(1);
01489 }
01490
01491 eps_shinf = a1*a2*(26.0*pow((wc*cs),2.1)/pow(fc,0.28)+270.);
01492 eps_shinf = eps_shinf*1.e-6;
01493
01494
01495
01496 e_t0 = e28*sqrt((t0)/(4+0.85*(t0)));
01497 e_actual = creep_give_actual_ym (ipp,im,ido)/6.89476*1.0e-3;
01498
01499
01500 k = -eps_shinf;
01501 r = 0.3*ft*1.e-6;
01502 rho = 1.5*ft*1.e-6;
01503
01504 dhum = hum-hum_prev;
01505 dtemp = temp - temp_prev;
01506
01507 if(dhum >= 0.0)
01508 gh = 1.0;
01509 else
01510 gh = -1.0;
01511
01512 if(dtemp >= 0.0)
01513 gt = 1.0;
01514 else
01515 gt = -1.0;
01516
01517
01518 fillv(0.0,deps_ss);
01519 ss=Mm->ip[ipp].ssst;
01520
01521 for(i=0;i<nc;i++){
01522 if (type_h == 0)
01523 deps_cs = 0.0;
01524 else
01525 deps_cs = -k*r*gh*sigma[i]*dhum;
01526
01527 if (type_temp == 0)
01528 deps_ts = 0.0;
01529 else
01530 deps_ts = -alpha*rho*gt*sigma[i]*dtemp;
01531
01532 deps = (deps_cs + deps_ts)*1.e-12;
01533
01534 if (flag_drshr == 0)
01535 deps = 0.0;
01536
01537 deps_ss[i]=deps;
01538 }
01539
01540
01541 if(ss==planestress){
01542 deps_ss[2]=0.0;
01543 }
01544 if(ss==planestrain){
01545 deps_ss[2]=0.0;
01546 }
01547 if(ss==axisymm){
01548 deps_ss[3]=0.0;
01549 }
01550 if(ss==spacestress){
01551 deps_ss[3]=0.0;
01552 deps_ss[4]=0.0;
01553 deps_ss[5]=0.0;
01554 }
01555
01556 }
01557
01558
01559
01560
01561
01562
01563
01564
01565
01566
01567
01568 double b3mat::creep_give_actual_ft (long ipp,long im,long ido)
01569 {
01570 long imat;
01571 double q,e_0,e_t,fft;
01572
01573 imat=Mm->ip[ipp].idm[Mm->ip[ipp].gemid()];
01574
01575 q = creep_matstiffchange (ipp,im,ido);
01576
01577 e_0=Mm->eliso[imat].e;
01578 e_t = q*e_0;
01579
01580 if(ft_flag == 0)
01581 fft = ft;
01582 else
01583 fft = ft_ratio*e_t;
01584
01585 return (fft);
01586 }
01587
01588
01589
01590
01591
01592
01593
01594
01595
01596
01597
01598 void b3mat::addirrstrains_eqother (vector &deps,long ipp, long ido)
01599 {
01600 long i;
01601 long n_ret_times;
01602 long nc;
01603
01604 nc=Mm->ip[ipp].ncompstr;
01605
01606 n_ret_times = give_nret_time ();
01607
01608 for (i=0;i<deps.n;i++){
01609 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc)+i] += deps[i];
01610 }
01611 }
01612
01613
01614
01615
01616
01617
01618
01619
01620
01621
01622
01623 void b3mat::giveirrstrains_eqother (long ipp, long ido, vector &epscr)
01624 {
01625 long i;
01626 long n_ret_times;
01627 long nc;
01628
01629 nc=Mm->ip[ipp].ncompstr;
01630
01631 n_ret_times = give_nret_time ();
01632
01633 for (i=0;i<epscr.n;i++){
01634 epscr[i] = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc)+i];
01635 }
01636 }
01637
01638
01639
01640
01641
01642
01643
01644
01645
01646
01647
01648 void b3mat::store_agstrains_eqother(long ipp,long ido,vector &eps_ag)
01649 {
01650 long i;
01651 long n_ret_times,nc;
01652
01653
01654 nc=Mm->ip[ipp].ncompstr;
01655
01656 n_ret_times = give_nret_time ();
01657
01658 for (i=0;i<nc;i++){
01659 Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc+1+1)+i] = eps_ag[i];
01660 }
01661 }
01662
01663
01664
01665
01666
01667
01668
01669
01670
01671
01672
01673 void b3mat::give_agstrains_eqother(long ipp,long ido,vector &eps_ag)
01674 {
01675 long i;
01676 long n_ret_times,nc;
01677
01678 nc=Mm->ip[ipp].ncompstr;
01679 n_ret_times = give_nret_time ();
01680
01681 for (i=0;i<nc;i++){
01682 eps_ag[i] = Mm->ip[ipp].eqother[ido+(nc+nc+nc+nc+2+n_ret_times+nc*n_ret_times+nc+nc+nc+nc+1+1)+i];
01683 }
01684 }
01685
01686
01687
01688
01689
01690
01691
01692
01693
01694
01695
01696
01697 double b3mat::get_othervalue(long compother,long ipp)
01698 {
01699 double other;
01700
01701
01702 switch (compother){
01703 case 0:{
01704 other = 0.0;
01705 break;
01706 }
01707 default:{
01708 print_err("\n Unknown type of component is required in ", __FILE__, __LINE__, __func__);
01709 }
01710 }
01711 return (other);
01712
01713 }
01714
01715
01716
01717
01718
01719
01720
01721
01722
01723
01724 void b3mat::print_othervalue_name(FILE *out,long compother)
01725 {
01726
01727 switch (compother){
01728 case 0:{
01729 fprintf (out,"eps_x ()");
01730 break;
01731 }
01732 default:{
01733 print_err("\n Unknown type of component is required in ", __FILE__, __LINE__, __func__);
01734 }
01735 }
01736 }
01737
01738
01739
01740
01741
01742
01743
01744
01745
01746
01747
01748
01749 void b3mat::give_reqnmq(long *anmq)
01750 {
01751 if (type_temp)
01752 {
01753 anmq[temperature-1] = 1;
01754 anmq[initial_temperature-1] = 1;
01755 }
01756 if (type_h)
01757 anmq[rel_hum-1] = 1;
01758 }