00001
00002
00003
00004
00005
00006 #include "aliast.h"
00007 #include "damisotrmat.h"
00008 #include "stochdrivert.h"
00009 #include "globalt.h"
00010
00011 dampermeability damisotrmat::damper;
00012
00013 damisotrmat::damisotrmat (void)
00014 {
00015
00016 k=0.0;
00017
00018 c=0.0;
00019
00020 daminfl = off;
00021 }
00022
00023
00024
00025 damisotrmat::~damisotrmat (void)
00026 {
00027 }
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 void damisotrmat::matcond (matrix &d,long ri,long ci,long ipp)
00042 {
00043 long n;
00044 n = d.n;
00045
00046 switch (n){
00047 case 1:{
00048 matcond1d (d,ri,ci,ipp);
00049 break;
00050 }
00051 case 2:{
00052 matcond2d (d,ri,ci,ipp);
00053 break;
00054 }
00055 case 3:{
00056 matcond3d (d,ri,ci,ipp);
00057 break;
00058 }
00059 default:{
00060 print_err("unknown number of components of conductivity tensor is required",__FILE__,__LINE__,__func__);
00061 }
00062 }
00063 if (daminfl == on){
00064
00065 damper.matcond (d,ipp);
00066 }
00067 Tm->ip[ipp].eqother[0] = d[0][0];
00068 }
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079 void damisotrmat::matcond1d (matrix &d,long ri,long ci,long ipp)
00080 {
00081 double kk;
00082
00083 kk = get_k();
00084
00085 d[0][0] = kk;
00086 }
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096 void damisotrmat::matcond2d (matrix &d,long ri,long ci,long ipp)
00097 {
00098 double kk;
00099
00100 kk = get_k();
00101
00102 fillm(0.0,d);
00103
00104 d[0][0] = kk; d[0][1] = 0.0;
00105 d[1][0] = 0.0; d[1][1] = kk;
00106 }
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117 void damisotrmat::matcond3d (matrix &d,long ri,long ci,long ipp)
00118 {
00119 double kk;
00120
00121 kk = get_k();
00122
00123 fillm(0.0,d);
00124
00125 d[0][0]=kk; d[0][1]=0.0; d[0][2]=0.0;
00126 d[1][0]=0.0; d[1][1]=kk; d[1][2]=0.0;
00127 d[2][0]=0.0; d[2][1]=0.0; d[2][2]=kk;
00128 }
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139 void damisotrmat::matcap (double &cc,long ri,long ci,long ipp)
00140 {
00141 cc = 0.0;
00142
00143 cc = get_c();
00144 }
00145
00146
00147
00148
00149
00150
00151
00152 void damisotrmat::read (XFILE *in)
00153 {
00154 xfscanf (in,"%lf %lf",&c,&k);
00155 xfscanf (in,"%m", &answertype_kwdset, &daminfl);
00156 }
00157
00158
00159
00160
00161
00162
00163
00164 void damisotrmat::print (FILE *out)
00165 {
00166 fprintf (out," %e %e",c,k);
00167 }
00168
00169
00170
00171
00172
00173
00174
00175 double damisotrmat::get_k()
00176 {
00177 return(k);
00178 }
00179
00180
00181
00182
00183
00184
00185 double damisotrmat::get_c()
00186 {
00187 return(c);
00188 }
00189
00190
00191
00192 void damisotrmat::print_othervalue_name(FILE *out,long compother)
00193 {
00194 switch (compother){
00195 case 0:{
00196 fprintf (out,"Actual permeability");
00197 break;
00198 }
00199 default:{
00200 fprintf (stderr,"\n\n unknown type of component is required in function (%s, line %d).\n",__FILE__,__LINE__);
00201 }
00202 }
00203 }
00204
00205
00206
00207
00208
00209
00210
00211
00212
00213
00214
00215
00216
00217 void damisotrmat::give_dof_names(namevart *dofname, long ntm)
00218 {
00219 if (ntm < 1)
00220 {
00221 print_err("the model defines %ld unknowns but number of transported media is %ld",
00222 __FILE__, __LINE__, __func__, 1, ntm);
00223 abort();
00224 }
00225 dofname[0] = trf_moisture;
00226 }
00227
00228
00229
00230
00231
00232
00233
00234 void damisotrmat::changeparam (atsel &atm,vector &val)
00235 {
00236 long i;
00237
00238 for (i=0;i<atm.num;i++){
00239 switch (atm.atrib[i]){
00240 case 0:{
00241 c=val[0];
00242 break;
00243 }
00244 case 1:{
00245 k=val[1];
00246 break;
00247 }
00248 default:{
00249 print_err("wrong number of atribute is required",__FILE__,__LINE__,__func__);
00250 }
00251 }
00252 }
00253 }
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265
00266
00267
00268 void damisotrmat::give_reqntq(long *antq)
00269 {
00270 if (daminfl == on){
00271
00272 antq[scal_iso_damage-1] = 1;
00273
00274 antq[proc_zone_length-1] = 1;
00275
00276 antq[crack_width-1] = 1;
00277 }
00278 }