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