11 #ifdef LOG4CXX // LOG4CXX may be defined alone or with LOG4CXX_PLASTICITY. The latter shall not be used alone. 12 #include <log4cxx/logger.h> 13 #include <log4cxx/basicconfigurator.h> 14 #include <log4cxx/propertyconfigurator.h> 16 static LoggerPtr plasticIntegrLogger(Logger::getLogger(
"plasticity.plasticIntegr"));
20 #ifdef LOG4CXX_PLASTICITY 21 static LoggerPtr testLogger(Logger::getLogger(
"plasticity.test"));
26 #ifdef LOG4CXX_PLASTICITY 27 static LoggerPtr MaterialPoint(Logger::getLogger(
"MaterialPointTest"));
57 static void InitializeLOG();
63 static void StressTest(T & plasticModel,
const char *
filename, REAL stressMultiplier=1);
66 static void StrainTest(T & plasticModel,
const char * filename, REAL strainMultiplier=1);
68 static void LoadTest(
const char * filename);
71 static int CreatePlasticModel(T * ( & plasticModel),
const char * line);
74 static void GlobalCheckConv(T & plasticModel,
TPZTensor<REAL> & strain, REAL maxDeltaStrain = 0.01);
82 static void DruckerPragerTest();
84 static void MohrCoulombTest();
86 static void ModifiedMohrCoulombTest();
88 static void WillamWarnkeTest();
90 static void VonMisesTest();
92 static void UndocumentedTest2();
94 static void UndocumentedTest3();
96 static void UndocumentedTest4();
110 static void DruckerTest();
137 for(i=0; i<6; i++) gRefTension.
fData[i] = state(i,0);
148 gPlasticModel.ApplyStrainComputeDep(gRefTension,DiagonalStress,Dep);
150 REAL norm =
Norm(Dep);
165 gPlasticModel.ApplyStrainComputeDep(gRefTension,DiagonalStress,Dep);
167 REAL norm = DiagonalStress.
Norm();
183 static void RotateMatrix(
TPZFMatrix<REAL> &Mat, REAL thetaRad,
int rotateaboutaxes);
188 static void PlasticIntegratorCheck(T mat);
199 ofstream outfiletxt(
"LadeKimTriaxialLooseSand.txt");
207 deltastress.
XX() = -0.005;
208 deltastress.
XY() = 0.;
209 deltastress.
XZ() = 0.;
210 deltastress.
YY() = -0.0003;
211 deltastress.
YZ() = 0.;
212 deltastress.
ZZ() = -0.0003;
219 for(
int i=0;i<steps;i++)
223 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()-stress.
ZZ()) <<
"\n";
284 ofstream outfiletxt5(
"SDMcCormicRanchSand.txt");
291 cout <<
"\n Put the value of strain you want to add in each step of your loat test: (sugg.0.0001) ";
294 deltastrain.
XX() = -straininput;
295 deltastrain.
XY() = 0.;
296 deltastrain.
XZ() = 0.;
297 deltastrain.
YY() = -straininput;
298 deltastrain.
YZ() = 0.;
299 deltastrain.
ZZ() = -straininput;
301 cout <<
"Choose the material pareameters you want to set to SandlerDimaggio Test :";
302 cout <<
"\n0 - McCormicRanchSandMod";
303 cout <<
"\n1 - McCormicRanchSandMod2 ";
304 cout <<
"\n2 - UncDeepSandRes ";
305 cout <<
"\n3 - UncDeepSandResPSI";
306 cout <<
"\n4 - UncDeepSandResMPa";
307 cout <<
"\n5 - Put the material parameters you want ";
311 cout <<
"\n Put the numbers of steps you want: (sugg. 20)";
319 std::ofstream outfiletxt(
"TPZSandlerDimaggioMcCormicRanchSandMod(SD).txt");
321 for(
int step=0;step<length;step++)
323 cout <<
"\nstep "<< step;
325 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
326 strain += deltastrain;
333 std::ofstream outfiletxt(
"TPZSandlerDimaggioMcCormicRanchSandMod2.txt");
334 for(
int step=0;step<length;step++)
336 cout <<
"\nstep "<< step;
338 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
339 strain += deltastrain;
347 std::ofstream outfiletxt(
"TPZLadeKimUncDeepSandRes.txt");
348 for(
int step=0;step<length;step++)
350 cout <<
"\nstep "<< step;
352 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
353 strain += deltastrain;
361 std::ofstream outfiletxt(
"TPZLadeKimUncDeepSandResPSI.txt");
362 for(
int step=0;step<length;step++)
364 cout <<
"\nstep "<< step;
366 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
367 strain += deltastrain;
375 std::ofstream outfiletxt(
"TPZLadeKimUncDeepSandResMPa.txt");
376 for(
int step=0;step<length;step++)
378 cout <<
"\nstep "<< step;
380 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
381 strain += deltastrain;
403 cout<<
"\n Young Modulus 9000.";
407 cout<<
"\n poisson 0.25 ";
412 SD.fER.
SetUp(E, poisson);
414 cout<<
"\n A (sugg.18)";
418 cout <<
"\n B (sugg. 0.0245) ";
422 cout <<
"\n C (sugg. 17.7) ";
426 cout <<
"\n D (sugg.0.00735) ";
430 cout <<
"\n R (sugg. 1.5) ";
434 cout <<
"\n W (sugg. 0.0908) ";
438 SD.fYC.
SetUp(A, B, C, D, R, W);
440 std::ofstream outfiletxt(
"SandlerDimaggioYOURMODEL.txt");
441 for(
int step=0;step<length;step++)
443 cout <<
"\nstep "<< step;
445 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
446 strain += deltastrain;
453 cout <<
"Unknown Test Type. Exiting...";
464 ofstream outfiletxt1(
"FineSilica.txt");
469 deltastress.
XX() = -4.;
470 deltastress.
XY() = 0.;
471 deltastress.
XZ() = 0.;
472 deltastress.
YY() = -4.;
473 deltastress.
YZ() = 0.;
474 deltastress.
ZZ() = -4.;
475 stress = deltastress;
479 for(
int step=0;step<length;step++)
481 cout <<
"\nstep "<< step;
482 if(step == 69)deltastress *=-1.;
484 outfiletxt1 <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
485 stress += deltastress;
486 cout <<
"strain = "<<strain <<
"\n";
487 cout <<
"sigma = "<< stress <<
"\t "<<
"I1 = "<< stress.
I1() <<
"\n";
504 deltastress.
XX() = -147.;
505 deltastress.
XY() = 0.;
506 deltastress.
XZ() = 0.;
507 deltastress.
YY() = -147.;
508 deltastress.
YZ() = 0.;
509 deltastress.
ZZ() = -147.;
517 std::ofstream outfiletxt(
"TPZLadeKim_IsotropicCompression_PlaneConcrete.txt");
520 for(
int i=0;i<length;i++)
523 cout <<
"\nstep = "<< i << endl;
525 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX())/14.7 <<
"\n";
719 ofstream outfiletxt1(
"LKKoCompressionLoadTest.txt");
723 deltastress.
XX()=-1.;
724 deltastress.
YY()=-0.5;
725 deltastress.
ZZ()=-0.5;
733 for(
int step=0;step<length2;step++)
735 cout <<
"\nstep "<< step;
738 outfiletxt1 <<
fabs(strain.
I1()) <<
" " <<
fabs(stress.
XX()/stress.
ZZ()) <<
"\n";
739 stress += deltastress;
740 cout <<
"strain = "<<strain <<
"\n";
741 cout <<
"sigma = "<< stress <<
"\t "<<
"I1 = "<< stress.
I1() <<
"\n";
753 ofstream outfiletxt1(
"FineSilica.txt");
754 ofstream outfiletxt2(
"PlainConcretee1.txt");
755 ofstream outfiletxt3(
"PlainConcretee2.txt");
756 ofstream outfiletxt4(
"PlainConcretee3.txt");
757 ofstream outfiletxt5(
"SDMcCormicRanchSand.txt");
764 deltastress.
XX() = -0.001;
765 deltastress.
XY() = 0.;
766 deltastress.
XZ() = 0.;
767 deltastress.
YY() = -0.001;
768 deltastress.
YZ() = 0.;
769 deltastress.
ZZ() = -0.001;
770 stress = deltastress;
777 deltastress.
XX() = -4.;
778 deltastress.
XY() = 0.;
779 deltastress.
XZ() = 0.;
780 deltastress.
YY() = -4.;
781 deltastress.
YZ() = 0.;
782 deltastress.
ZZ() = -4.;
783 stress = deltastress;
795 for(
int step=0;step<length;step++)
797 cout <<
"\nstep "<< step;
798 if(step == 69)deltastress *=-1.;
812 outfiletxt1 <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
817 stress += deltastress;
819 cout <<
"strain = "<<strain <<
"\n";
820 cout <<
"sigma = "<< stress <<
"\t "<<
"I1 = "<< stress.
I1() <<
"\n";
825 deltastrain.
XX() = -0.0001;
826 deltastrain.
XY() = 0.;
827 deltastrain.
XZ() = 0.;
828 deltastrain.
YY() = -0.;
829 deltastrain.
YZ() = 0.;
830 deltastrain.
ZZ() = -0.;
836 for(
int step=0;step<length2;step++)
838 cout <<
"\nstep "<< step;
841 outfiletxt2 <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
842 outfiletxt3 <<
fabs(strain.
YY()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
843 outfiletxt4 <<
fabs(strain.
ZZ()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
844 strain += deltastrain;
845 cout <<
"strain = "<<strain <<
"\n";
846 cout <<
"sigma = "<< stress <<
"\t "<<
"I1 = "<< stress.
I1() <<
"\n";
853 deltastrain.
XX() = -0.005;
854 deltastrain.
XY() = 0.;
855 deltastrain.
XZ() = 0.;
856 deltastrain.
YY() = -0.;
857 deltastrain.
YZ() = 0.;
858 deltastrain.
ZZ() = -0.;
862 for(
int step=0;step<length3;step++)
864 cout <<
"\nstep "<< step;
865 if(step == 14 )deltastrain *=-1.;
867 outfiletxt5 <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
868 strain += deltastrain;
869 cout <<
"strain = "<<strain <<
"\n";
870 cout <<
"sigma = "<< stress <<
"\t "<<
"I1 = "<< stress.
I1() <<
"\n";
893 ofstream outfiletxt(
"DruckerPragerIsotropicCompression.txt");
894 cout <<
"\n Put the value of strain you want to add in each step of your loat test: (sugg. 0.0001)";
899 deltastrain.
XX() = -straininput;
900 deltastrain.
XY() = 0.;
901 deltastrain.
XZ() = 0.;
902 deltastrain.
YY() = -straininput;
903 deltastrain.
YZ() = 0.;
904 deltastrain.
ZZ() = -straininput;
907 cout <<
"\n4 - Put the material parameters you want";
909 cout <<
"\n Young modulus (sugg. 20000.)";
913 cout <<
"\n Poisson (sugg. 0.2)";
918 cout <<
"\n choose 0 for Iner Morh-Coulomb fit or 1 for outer Morh-Coulomb Fit (sugg. 0) ";
928 cout <<
"\n Type the internal frictional angle in degrees(sugg. 20.)";
932 cout <<
"\n Type the material coesion (sugg. 9.)";
936 cout <<
"\n Type the material hardening modulus (sugg. 1000.)";
939 DP.fYC.
SetUp(phi/180. *M_PI ,mcfit);
941 DP.fER.
SetUp(E,poisson);
944 for(
int step=0;step<length;step++)
946 cout <<
"\nstep "<< step;
947 DP.ApplyStrainComputeDep(strain, stress, Dep);
948 strain += deltastrain;
949 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
957 ofstream outfiletxt(
"DruckerBiaxialTest.txt");
958 cout <<
"\n Put the value of strain you want to add in each step of your loat test: (sugg. 0.0001)";
963 deltastrain.
XX() = -straininput;
964 deltastrain.
XY() = 0.;
965 deltastrain.
XZ() = 0.;
966 deltastrain.
YY() = -straininput/0.52;
967 deltastrain.
YZ() = 0.;
968 deltastrain.
ZZ() = 0.;
971 cout <<
"\n4 - Put the material parameters you want";
973 cout <<
"\n Young modulus (sugg. 20000.)";
977 cout <<
"\n Poisson (sugg. 0.2)";
982 cout <<
"\n choose 0 for Iner Morh-Coulomb fit or 1 for outer Morh-Coulomb Fit (sugg. 0) ";
992 cout <<
"\n Type the internal frictional angle in degrees(sugg. 20.)";
996 cout <<
"\n Type the material coesion (sugg. 9.)";
1000 cout <<
"\n Type the material hardening modulus (sugg. 1000.)";
1003 DP.fYC.
SetUp(phi/180. *M_PI ,mcfit);
1005 DP.fER.
SetUp(E,poisson);
1008 for(
int step=0;step<length;step++)
1010 cout <<
"\nstep "<< step;
1011 DP.ApplyStrainComputeDep(strain, stress, Dep);
1012 strain += deltastrain;
1013 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1024 cout <<
"\n Put the value of stress you want to put sx ";
1026 cin >> stressinputx;
1028 cout <<
"\n Put the value of stress you want to put sy ";
1030 cin >> stressinputy;
1032 cout <<
"\n Put the value of stress you want to put sz ";
1034 cin >> stressinputz;
1036 deltastress.
XX() = -stressinputx;
1037 deltastress.
XY() = 0.;
1038 deltastress.
XZ() = 0.;
1039 deltastress.
YY() = -stressinputy;
1040 deltastress.
YZ() = 0.;
1041 deltastress.
ZZ() = -stressinputz;
1044 cout <<
"Choose the material pareameters you want to set to Lade Kim Test :";
1045 cout <<
"\n0 - Plain Concrete ";
1046 cout <<
"\n1 - Loose Sacramento River Sand ";
1047 cout <<
"\n2 - Dense Sacramento River Sand ";
1048 cout <<
"\n3 - Fine Silica Sand";
1049 cout <<
"\n4 - Put the material parameters you want";
1053 cout <<
"\n Put the numbers of steps you want: (sugg. 20)";
1062 std::ofstream outfiletxt1(
"BiaxialXTPZLadeKimPlainConcrete.txt");
1063 std::ofstream outfiletxt2(
"BiaxialYTPZLadeKimPlainConcrete.txt");
1064 std::ofstream outfiletxt3(
"BiaxialZTPZLadeKimPlainConcrete.txt");
1066 for(
int step=0;step<length;step++)
1068 cout <<
"\nstep "<< step;
1070 outfiletxt1 << -strain.
XX() <<
" " <<
fabs(stress.
XX()/14.7) <<
"\n";
1071 outfiletxt2 << -strain.
YY() <<
" " <<
fabs(stress.
XX()/14.7) <<
"\n";
1072 outfiletxt3 << -strain.
ZZ() <<
" " <<
fabs(stress.
XX()/14.7) <<
"\n";
1073 stress += deltastress;
1080 std::ofstream outfiletxt1(
"BiaxialXTPZLadeKimLooseSacrRiverSand.txt");
1081 std::ofstream outfiletxt2(
"BiaxialYTPZLadeKimLooseSacrRiverSand.txt");
1082 std::ofstream outfiletxt3(
"BiaxialZTPZLadeKimLooseSacrRiverSand.txt");
1084 for(
int step=0;step<length;step++)
1086 cout <<
"\nstep "<< step;
1088 outfiletxt1 << strain.
XX() <<
" " <<
fabs(stress.
XX()) <<
"\n";
1089 outfiletxt2 << strain.
YY() <<
" " <<
fabs(stress.
XX()) <<
"\n";
1090 outfiletxt3 << strain.
ZZ() <<
" " <<
fabs(stress.
XX()) <<
"\n";
1091 stress += deltastress;
1098 std::ofstream outfiletxt(
"TPZLadeKim::DenseSacrRiverSand.txt");
1100 for(
int step=0;step<length;step++)
1102 cout <<
"\nstep "<< step;
1104 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1105 outfiletxt <<
fabs(strain.
YY()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1106 outfiletxt <<
fabs(strain.
ZZ()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1107 strain += deltastrain;
1115 std::ofstream outfiletxt(
"TPZLadeKim::FineSilicaSand.txt");
1117 for(
int step=0;step<length;step++)
1119 cout <<
"\nstep "<< step;
1121 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1122 outfiletxt <<
fabs(strain.
YY()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1123 outfiletxt <<
fabs(strain.
ZZ()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1124 strain += deltastrain;
1131 cout <<
"\n poisson (sugg. 0.18)";
1135 cout <<
"\n M (sugg. 361800.)";
1139 cout <<
"\nlambda (sugg. 0.)";
1143 cout <<
"\n a (sugg. 28.5)";
1147 cout <<
"\n m (sugg. 1.113)";
1151 cout <<
"\n neta1 (sugg. 159800.)";
1155 cout <<
"\n ksi2 (sugg. -2.92)";
1159 cout <<
"\n mu (sugg. 5.06)";
1163 cout <<
"\n C (sugg. 0.712E-12)";
1167 cout <<
"\n p (sugg. 3.8)";
1171 cout <<
"\n h (sugg. 1.990) ";
1175 cout <<
"\n alpha (sugg. 0.75) ";
1179 cout <<
"\n pa (sugg. 14.7) ";
1184 cout <<
"\n Tolerance (sugg. 0.0001) ";
1187 LK2.SetResidualTolerance(restol);
1189 LK2.
SetUp(poisson, M, lambda,
1195 std::ofstream outfiletxt(
"TPZLadeKim::YOURMODEL.txt");
1196 for(
int step=0;step<length;step++)
1198 cout <<
"\nstep "<< step;
1200 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1201 outfiletxt <<
fabs(strain.
YY()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1202 outfiletxt <<
fabs(strain.
ZZ()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
1203 strain += deltastrain;
1210 cout <<
"Unknown Test Type. Exiting...";
1277 std::string configfile;
1278 #ifdef HAVE_CONFIG_H 1279 path = PLASTICITYSOURCEDIR;
1281 cout << path.c_str() << endl;
1288 configfile +=
"log4cxx.cfg";
1289 log4cxx::PropertyConfigurator::configure(configfile.c_str());
1291 std::stringstream sout;
1292 sout << __PRETTY_FUNCTION__ <<
"\nLOG4CXX configured.\n" 1293 <<
"LOG4CXX config file:" << configfile;
1295 LOGPZ_INFO(plasticIntegrLogger,sout.str().c_str());
1297 #ifdef LOG4CXX_PLASTICITY 1311 T plasticModelCopy = plasticModel;
1318 plasticModel.Phi(strain1,phi);
1320 #ifdef LOG4CXX_PLASTICITY 1322 std::stringstream sout;
1323 sout << __PRETTY_FUNCTION__
1324 <<
"\nImposing strain = \n" << strain1
1325 <<
"\nPhi before plastic loop = \n" << phi ;
1333 plasticModel.ApplyStrainComputeDep(strain1, stress1, tangent);
1335 plasticModel.Phi(strain1,phi);
1337 #ifdef LOG4CXX_PLASTICITY 1339 std::stringstream sout;
1340 sout << __PRETTY_FUNCTION__
1341 <<
"\nphi after plastic loop =\n" << phi
1342 <<
"\ncausing stress = " << stress1
1343 <<
"\nNow applying the opposite operation...";
1351 plasticModelCopy.ApplyLoad(stress2, strain2);
1353 plasticModelCopy.Phi(strain2,phi2);
1355 #ifdef LOG4CXX_PLASTICITY 1357 std::stringstream sout;
1358 sout << __PRETTY_FUNCTION__
1359 <<
"\nphi after plastic loop =\n" << phi2
1360 <<
"\ncausing strain = " << strain2
1378 #ifdef LOG4CXX_PLASTICITY 1380 std::stringstream sout;
1381 sout << __PRETTY_FUNCTION__
1382 <<
"\nApply Load Test\nPlease enter file name containing load path (sigmaxx xy xz yy yz zz) for all iterations:\n" 1383 <<
"\nReading file named \"" << filename <<
"\"\n";
1388 const int linelen = 1024;
1389 char outfilename[linelen], line[linelen];
1394 file.open(filename);
1398 cout <<
"\nFile not open.\nExiting...\n";
1402 file.getline(line, linelen);
1403 strncpy(outfilename, filename, 120);
1404 strcpy(outfilename+strlen(outfilename),
".out");
1406 #ifdef LOG4CXX_PLASTICITY 1408 std::stringstream sout;
1409 sout << __PRETTY_FUNCTION__
1410 <<
"\nReading file named \"" << filename <<
"\"\n" 1411 <<
"\nTest data description: \"" << line <<
"\"\n" 1412 <<
"\nOutput file named \"" << outfilename <<
"\"\n";
1417 outFile.open(outfilename);
1418 outFile << line << endl;
1425 file.getline(line, linelen);
1426 stringstream strLine(line);
1428 for(i = 0; i < 6; i++)
1430 strLine >> loadPath[j].fData[i];
1436 totalStrainPath.
Resize(nsteps);
1438 for(i = 0; i < nsteps; i++)
1441 for(j=0;j<6;j++)tempLoad.
fData[j]*=stressMultiplier;
1442 if(i > 1)totalStrainPath[i] = totalStrainPath[i-1];
1444 plasticModel.ApplyLoad(tempLoad, totalStrainPath[i]);
1446 std::stringstream outputLine;
1447 outputLine <<
"step " << i <<
", sigma: " << loadPath[i] ;
1448 outputLine <<
"\nfN:/n" << plasticModel.GetState() << endl;
1450 outFile << outputLine.str();
1451 #ifdef LOG4CXX_PLASTICITY 1452 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1472 #ifdef LOG4CXX_PLASTICITY 1474 std::stringstream sout;
1475 sout << __PRETTY_FUNCTION__
1476 <<
"\nApply Strain Test\nPlease enter file name containing strain path (sigmaxx xy xz yy yz zz) for all iterations:\n" 1477 <<
"\nReading file named \"" << filename <<
"\"\n";
1482 const int linelen = 1024;
1483 char outfilename[linelen], line[linelen];
1488 file.open(filename);
1492 cout <<
"\nFile not open.\nExiting...\n";
1496 file.getline(line, linelen);
1497 strncpy(outfilename, filename, 120);
1498 strcpy(outfilename+strlen(outfilename),
".out");
1500 #ifdef LOG4CXX_PLASTICITY 1502 std::stringstream sout;
1503 sout << __PRETTY_FUNCTION__
1504 <<
"\nReading file named \"" << filename <<
"\"\n" 1505 <<
"\nTest data description: \"" << line <<
"\"\n" 1506 <<
"\nOutput file named \"" << outfilename <<
"\"\n";
1511 outFile.open(outfilename);
1512 outFile << line << endl;
1520 file.getline(line, linelen);
1521 stringstream strLine(line);
1523 for(i = 0; i < 6; i++)
1525 strLine >> strainPath[j].fData[i];
1530 int nsteps = strainPath.
NElements() - 1;
1531 stressPath.
Resize(nsteps);
1533 for(i = 0; i < nsteps; i++)
1536 for(j=0;j<6;j++)tempStrain.
fData[j]*=strainMultiplier;
1537 if(i > 1)stressPath[i] = stressPath[i-1];
1539 plasticModel.ApplyStrain(tempStrain);
1540 plasticModel.ApplyStrainComputeDep(tempStrain, stressPath[i], tangent);
1558 std::stringstream outputLine;
1559 outputLine <<
"step " << i <<
", imposedEps: " << strainPath[i]
1560 <<
", sigma: " << stressPath[i]
1561 <<
", epsP= " << epsp
1562 <<
", alpha= " << alpha << endl;
1564 outFile << outputLine.str();
1565 #ifdef LOG4CXX_PLASTICITY 1566 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1587 #ifdef LOG4CXX_PLASTICITY 1589 std::stringstream sout;
1590 sout << __PRETTY_FUNCTION__
1591 <<
"\nApply Load Test\nPlease enter file name containing load path (strain/stress sigmaxx xy xz yy yz zz) for all iterations:\n" 1592 <<
"\nReading file named \"" << filename <<
"\"\n";
1597 const int linelen = 1024;
1598 char outfilename[linelen], line[linelen];
1603 file.open(filename);
1607 cout <<
"\nFile not open.\nExiting...\n";
1612 file.getline(line, linelen);
1613 strncpy(outfilename, filename, 120);
1615 strcpy(outfilename+strlen(outfilename),
".txt");
1617 #ifdef LOG4CXX_PLASTICITY 1619 std::stringstream sout;
1620 sout << __PRETTY_FUNCTION__
1621 <<
"\nReading file named \"" << filename <<
"\"\n" 1622 <<
"\nTest data description: \"" << line <<
"\"\n" 1623 <<
"\nOutput file named \"" << outfilename <<
"\"\n";
1628 outFile.open(outfilename);
1629 outFile << line << endl;
1632 file.getline(line, linelen);
1633 outFile << line << endl;
1636 file.getline(line, linelen);
1639 if(!CreatePlasticModel(pPlasticModel, line))
1641 std::stringstream sout;
1642 sout <<
"Could not create plastic model named " << line;
1643 #ifdef LOG4CXX_PLASTICITY 1649 outFile << endl << sout.str();
1657 TPZTensor<REAL> stress, tempStress, strain, tempStrain, epsp, strainP;
1659 REAL stressMultiplier = 1., strainMultiplier = 1., integrTol;
1664 file.getline(line, linelen);
1665 if(!strncmp(line,
"strainLoad",10))
1667 stringstream strLine(line + 10);
1668 for(i = 0; i < 6; i++)
1670 strLine >> strain.
fData[i];
1672 strain.
CopyTo(tempStrain);
1673 for(i = 0; i < 6; i++)tempStrain.
fData[i]*=strainMultiplier;
1677 tempStress.
CopyTo(stress);
1678 for(i = 0; i < 6; i++)stress.
fData[i]/=stressMultiplier;
1681 for(i = 0; i < 6; i++)strainP.
fData[i]/=strainMultiplier;
1683 std::stringstream outputLine;
1692 <<
" " << strain.
XX()
1693 <<
" " << stress.
XX() << endl;
1697 <<
" " << strain.
XX()
1698 <<
" " << stress.
XX() << endl;
1700 outFile << outputLine.str();
1702 #ifdef LOG4CXX_PLASTICITY 1703 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1707 if(!strncmp(line,
"stressLoad",10))
1709 stringstream strLine(line + 10);
1710 for(i = 0; i < 6; i++)
1712 strLine >> stress.
fData[i];
1714 stress.
CopyTo(tempStress);
1715 for(i = 0; i < 6; i++)tempStress.
fData[i]*=stressMultiplier;
1717 pPlasticModel->
ApplyLoad(tempStress, tempStrain);
1725 tempStrain.
CopyTo(strain);
1726 for(i = 0; i < 6; i++)strain.
fData[i]/=strainMultiplier;
1729 for(i = 0; i < 6; i++)strainP.
fData[i]/=strainMultiplier;
1731 tempStress.
CopyTo(stress);
1732 for(i = 0; i < 6; i++)stress.
fData[i]/=stressMultiplier;
1735 std::stringstream outputLine;
1746 <<
" " << strain.
XX()
1747 <<
" " << stress.
XX() << endl;
1751 <<
" " << strain.
XX()
1752 <<
" " << stress.
XX() << endl;
1754 outFile << outputLine.str();
1756 #ifdef LOG4CXX_PLASTICITY 1757 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1761 if(!strncmp(line,
"stressMult",10))
1763 stringstream strLine(line + 10);
1764 strLine >> stressMultiplier;
1766 std::stringstream outputLine;
1767 outputLine <<
"stressMult = " << stressMultiplier << endl;
1769 outFile << outputLine.str();
1771 #ifdef LOG4CXX_PLASTICITY 1772 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1775 if(!strncmp(line,
"strainMult",10))
1777 stringstream strLine(line + 10);
1778 strLine >> strainMultiplier;
1780 std::stringstream outputLine;
1781 outputLine <<
"strainMult = " << strainMultiplier << endl;
1783 outFile << outputLine.str();
1785 #ifdef LOG4CXX_PLASTICITY 1786 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1789 if(!strncmp(line,
"resetMater",10))
1793 pPlasticModel->
SetState(nullState);
1795 std::stringstream outputLine;
1796 outputLine <<
"ResetMaterial" << endl;
1798 outFile << outputLine.str();
1800 #ifdef LOG4CXX_PLASTICITY 1801 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1804 if(!strncmp(line,
"integrTol ",10))
1806 stringstream strLine(line + 10);
1807 strLine >> integrTol;
1808 pPlasticModel->SetIntegrTol(integrTol);
1810 std::stringstream outputLine;
1811 outputLine <<
"integrTol " << integrTol << endl;
1813 outFile << outputLine.str();
1815 #ifdef LOG4CXX_PLASTICITY 1816 LOGPZ_INFO(testLogger,outputLine.str().c_str());
1824 delete pPlasticModel;
1831 if(!strncmp(line,
"LadeKim.PlainConcrete",21))
1835 pPlasticModel = pLK;
1838 if(!strncmp(line,
"LadeKim.LooseSacrRiverSand",26))
1842 pPlasticModel = pLK;
1845 if(!strncmp(line,
"LadeKim.DenseSacrRiverSand",26))
1849 pPlasticModel = pLK;
1852 if(!strncmp(line,
"LadeKim.FineSilicaSand",22))
1856 pPlasticModel = pLK;
1859 if(!strncmp(line,
"SandlerDimaggio.McCormicRanchSandMod",36))
1863 pPlasticModel = pSD;
1866 if(!strncmp(line,
"SandlerDimaggio.McCormicRanchSand",33))
1870 pPlasticModel = pSD;
1873 if(!strncmp(line,
"DruckerPrager.DummyConcrete",27))
1876 TPZDruckerPrager * pDP =
new TPZDruckerPrager();
1878 pDP->fTFA.
SetUp( 9.2376, 1000.);
1879 pDP->fER.
SetUp( 20000, 0.2);
1880 pPlasticModel = pDP;
1883 if(!strncmp(line,
"MohrCoulomb.DummyConcrete",25))
1886 TPZDruckerPrager * pDP =
new TPZDruckerPrager();
1888 pDP->fTFA.
SetUp( 9.2376, 1000.);
1889 pDP->fER.
SetUp( 20000, 0.2);
1890 pPlasticModel = pDP;
1910 const int nRetries = 30;
1911 const int nVars = 6;
1920 plasticModel.ApplyStrainComputeDep(strain, stress, Dep);
1927 std::stringstream sout;
1928 sout << __PRETTY_FUNCTION__
1929 <<
"\nGlobalCheckConv Test with " << nRetries <<
" samplings\n";
1930 sout <<
"\n Stress = " << stress
1931 <<
"\n Dep=\n" << Dep;
1932 LOGPZ_INFO(plasticIntegrLogger,sout.str().c_str());
1940 for(k = 0; k < nRetries; k++)
1942 FcnHistory[k].
Resize(nVars,nVars);
1943 for(i = 0; i < nVars; i++)
1945 T plasticModelCopy(plasticModel);
1946 REAL random = (rand()&1000)/1000.;
1947 REAL deltaStrain = random * maxDeltaStrain;
1949 tempStrain.
fData[i] = deltaStrain;
1950 StrainHistory[k].fData[i] = deltaStrain;
1951 tempStrain.
Add(strain,1.);
1952 plasticModelCopy.ApplyStrainComputeDep(tempStrain, tempStress, tempMatrix);
1953 for(j = 0; j < nVars; j++)
1954 FcnHistory[k](j,i) = tempStress.
fData[j]
1956 - tempMatrix(j,i) * deltaStrain;
1974 std::stringstream sout;
1975 sout <<
"\nCase " << k
1976 <<
"\nStrain= " << tempStrain
1977 <<
"\nStress= " << tempStress
1978 <<
"\ntempMatrix= " << tempMatrix;
1979 LOGPZ_INFO(plasticIntegrLogger,sout.str().c_str());
1988 std::stringstream output;
1989 for(k = 1; k < nRetries; k++)
1991 output <<
"\n\n Result of checkconv with steps " << k-1 <<
" and " << k <<
"\n";
1992 output <<
"\nStrainHistory[" << k-1 <<
"]=" << StrainHistory[k-1];
1993 output <<
"\nFcnHistory[" << k-1 <<
"]=" << FcnHistory[k-1];
1994 output <<
"\nStrainHistory[" << k <<
"]=" << StrainHistory[k];
1995 output <<
"\nFcnHistory[" << k <<
"]=" << FcnHistory[k];
1996 output <<
"\nCheckConv:\n" ;
1997 for(j = 0; j < nVars; j++)
1999 for(i = 0; i < nVars; i++)
2001 REAL ykm1 = FcnHistory[k-1](j,i);
2002 REAL yk = FcnHistory[k ](j,i);
2003 REAL xkm1 = StrainHistory[k-1].fData[i];
2004 REAL xk = StrainHistory[k ].fData[i];
2007 if(ykm1 * yk < 1.e-24)
2009 if(ykm1 * yk < -1.e-24)
2019 if(xkm1 * xk < 1.e-24)
2024 output <<
log(ykm1/yk) /
log(xkm1 / xk);
2036 LOGPZ_INFO(plasticIntegrLogger,output.str().c_str());
2046 ofstream outfile(
"comparamathematica1.nb");
2050 cout <<
"\nChoose Load Case:";
2051 cout <<
"\n0 - Strain Step";
2052 cout <<
"\n1 - Stress Step";
2065 deltastress.
XX() = -10.;
2066 deltastress.
ZZ() = 1.;
2067 stress = deltastress;
2079 TPZDruckerPrager Pstep;
2083 Pstep.fYC.
SetUp( 20./180. * pi ,1);
2084 REAL coesao = 9.2376;
2085 Pstep.fTFA.
SetUp( coesao, 1000.);
2086 Pstep.fER.
SetUp( 20000., 0.2);
2089 for(
int step=0;step<length;step++)
2091 cout <<
"\nstep "<< step;
2094 if( step==100 || step==200)
2100 stress += deltastress;
2101 Pstep.ApplyLoad(stress,strain);
2107 if(step==0)outfile <<
"points={";
2109 if(step!=length && step!=length-1)
2111 outfile <<
"{"<<-strain.
XX()<<
","<<-stress.
XX()<<
" }, ";
2116 if(step==length-2)outfile <<
"{"<<-strain.
XX()<<
","<<-stress.
XX()<<
"}";
2124 outfile<<
"SolAprox = ListPlot[points, PlotRange-> All,AxesLabel->{epsilon,sigma}, PlotLabel->DRUCKER PRAGER,AxesOrigin->{0,0},Filling -> Axis , FillingStyle -> Directive[Opacity[0.5], Orange]]";
2135 ofstream outfiletxt(
"mohrcoulomb.txt");
2139 deltastress.
XX() = -13.5;
2140 deltastress.
XY() = -0.01;
2141 deltastress.
XZ() = 0.;
2142 deltastress.
YY() = 0.;
2143 deltastress.
YZ() = 0.;
2144 deltastress.
ZZ() = -0.01;
2145 stress = deltastress;
2157 TPZMohrCoulomb Pstep;
2158 Pstep.fYC.
SetUp( 20./180. * M_PI);
2159 REAL coesao = 9.2376;
2160 Pstep.fTFA.
SetUp( coesao, 1000.);
2161 Pstep.fER.
SetUp( 20000., 0.);
2164 for(
int step=0;step<length;step++)
2166 cout <<
"\nstep "<< step;
2175 stress += deltastress;
2177 Pstep.ApplyLoad(stress,strain);
2181 cout<<
"\nstress " << stress << endl;
2182 cout<<
"\nstrain " << strain << endl;
2185 Pstep.Phi(strain, phis);
2186 cout <<
"\nphis " << phis << endl;
2189 outfiletxt <<
fabs(strain.
XX()) <<
" " <<
fabs(stress.
XX()) <<
"\n";
2202 ofstream outfile(
"mohr");
2206 cout <<
"\nChoose Load Case:";
2207 cout <<
"\n0 - Strain Step";
2208 cout <<
"\n1 - Stress Step";
2214 deltastrain.
XX() = -0.000005;
2215 deltastrain.
YY() = -0.000005;
2216 deltastress.
XX()= -10.;
2217 deltastress.
YY()= -20.;
2220 TPZModifiedMohrCoulomb Pstep;
2222 Pstep.
fYC.SetUp( 20./180. * pi );
2223 REAL coesao = 9.2376;
2224 Pstep.fTFA.SetUp( coesao, 1000.);
2225 Pstep.fER.SetUp( 20000., 0.);
2229 for(
int step=0;step<length;step++)
2234 strain += deltastrain;
2235 Pstep.ApplyStrainComputeSigma(strain,stress);
2240 stress += deltastress;
2241 Pstep.ApplyLoad(stress, strain);
2246 std::stringstream sout;
2247 sout <<
"\nMOHRCOULOMB\n";
2249 sout <<
"STRAIN" <<std::endl;
2250 sout<<strain<<std::endl;
2251 sout <<
"STRESS"<<std::endl;
2252 sout<<stress<<std::endl;
2254 sout<<
"STRESS-I1"<<std::endl;
2255 sout<<stress.
I1()<<std::endl;
2256 sout<<
"STRESS-I2"<<std::endl;
2257 sout<<stress.
I2()<<std::endl;
2258 sout<<
"STRESS-I3"<<std::endl;
2259 sout<<stress.
I3()<<std::endl;
2261 sout<<
"STRESS-J2"<<std::endl;
2262 sout<<stress.
J2()<<std::endl;
2263 sout<<
"STRESS-J3"<<std::endl;
2264 sout<<stress.
J3()<<std::endl;
2278 ofstream outfiletxt(
"TPZYCWillamWarnke.txt");
2283 deltastress.
XX() = -1.;
2284 deltastress.
YY()= 0.;
2285 deltastress.
ZZ()= 0.;
2286 deltastress.
XY() = 0.;
2287 deltastress.
XZ() = 0.;
2288 deltastress.
YZ()= 0.;
2289 stress = deltastress;
2301 WW.fYC.SetUp(1.,1.,20.);
2302 REAL coesao = 9.2376;
2303 WW.fTFA.SetUp( coesao, 1000.);
2304 WW.fER.SetUp( 20000., 0.2);
2308 for(
int step=0;step<length;step++)
2310 cout <<
"\nstep "<< step;
2319 stress += deltastress;
2321 WW.ApplyLoad(stress,strain);
2324 std::stringstream sout;
2325 sout <<
"\n *********************************** STEP LOAD IN WILLANWERNAKE = "<< step <<
"*********************************** \n";
2331 stress.
Eigenvalue(eigenval,dSigma1,dSigma2,dSigma3);
2332 cout<<
"\nstress " << stress << endl;
2333 cout<<
"\nEigen " << eigenval << endl;
2335 outfiletxt << strain.
XX() <<
" " << stress.
XX() <<
"\n";
2384 R.
Put(0,0,(1./3.)*(1+2*
cos(thetaRad)));R.
Put( 0,1, (1./3.) * (1-
cos(thetaRad) -
sqrt(3)*
sin(thetaRad)) );R.
Put( 0,2, (1./3.) * (1-
cos(thetaRad) +
sqrt(3)*
sin(thetaRad)) );
2385 R.
Put( 1,0, (1./3.) * (1-
cos(thetaRad) +
sqrt(3)*
sin(thetaRad)) );R.
Put(1,1,(1./3.)*(1+2*
cos(thetaRad)));R.
Put( 1,2, (1./3.) * (1-
cos(thetaRad) -
sqrt(3)*
sin(thetaRad) ));
2386 R.
Put( 2,0, (1./3.) * ( 1-
cos(thetaRad) -
sqrt(3)*
sin(thetaRad) ) );R.
Put( 2,1, (1./3.) * ( 1-
cos(thetaRad) +
sqrt(3)*
sin(thetaRad) ) );R.
Put(2,2,(1./3.)*(1+2*
cos(thetaRad)));
2392 std::cout <<
" NON SPECIFIED AXIS "<<std::endl;
2403 std::ifstream
input(
"../SnubDodecahedron.txt");
2410 int nyield = plasticModel.NYield;
2414 REAL coordxx,coordyy,coordzz;
2415 for(
int i=0;i<sizedirs;i++)
2418 input >> coordxx >> coordyy >> coordzz;
2419 DiagonalStress.
XX()=coordxx;
2420 DiagonalStress.
YY()=coordyy;
2421 DiagonalStress.
ZZ()=coordzz;
2422 DiagonalStress*=dirMult;
2424 cout <<
"\n DiagonalStress" << DiagonalStress << endl;
2425 plasticModel.ApplyLoad(DiagonalStress,epst);
2441 bool Plastifica =
false;
2446 std::stringstream sout;
2448 sout <<
" \n DIRECTION Number = " << i <<
"\n " <<endl;
2449 sout <<
" \n DiagonalStress = " << DiagonalStress <<
"\n " <<endl;
2458 DiagonalStress*=1.1;
2459 cout <<
" \ncount "<< count << endl;
2460 cout <<
"\n DiagonalStress " << DiagonalStress << endl;
2461 cout <<
"\n epsT " << epst << endl;
2462 cout <<
"\n funcs " << funcs << endl;
2463 plasticModel.Phi(epst, funcs);
2465 plasticModel.ApplyLoad(DiagonalStress,epst);
2471 std::stringstream sout;
2474 sout <<
" \n\n While loop number = " << count << endl;
2475 sout <<
" \n\n funcs = " << funcs <<
"\n"<< endl;
2476 sout <<
" \n\n DiagonalStressInsideWhile = " << DiagonalStress <<endl;
2477 sout<<
"\nvector"<<count<<
" = {" << DiagonalStress.
XX()<<
","<<DiagonalStress.
YY()<<
","<<DiagonalStress.
ZZ()<<
"};" << endl;
2479 sout <<
" \n Alpha() = " << plasticModel.GetState().VolHardening() << endl;
2480 sout <<
" \n epst = " << plasticModel.GetState().EpsT() <<endl;
2481 sout <<
" \n epsP = " << plasticModel.GetState().EpsP() <<endl;
2487 if(funcs[0] < -1000.)
break;
2489 for(
int j = 0;j<nyield;j++)
2500 }
while(Plastifica==
false);
2505 std::stringstream sout;
2506 sout <<
" ######## saindo do while =####### "<< endl;
2526 std::ifstream
input(
"../SnubDodecahedron.txt");
2532 int nyield = mat.NYield;
2535 bool Plastifica =
false;
2536 bool MustStop =
false;
2537 for(
int i=0;i<sizedirs;i++)
2540 REAL coordxx,coordyy,coordzz;
2541 input >> coordxx >> coordyy >> coordzz;
2543 DiagonalStress.
XX()=pa*coordxx;
2544 DiagonalStress.
YY()=pa*coordyy;
2545 DiagonalStress.
ZZ()=pa*coordzz;
2546 T plasticModelCopy(mat);
2547 plasticModelCopy.ApplyLoad(DiagonalStress,epst);
2551 while(( Plastifica ==
false && MustStop ==
false) || count < 30 ){
2554 plasticModelCopy.ApplyStrainComputeDep(epst,stress,Dep);
2557 cout <<
"\n count " <<count <<endl;
2558 cout <<
"\n EPST = "<< epst << endl;
2559 cout <<
"\n EPSP = "<< plasticModelCopy.GetState().EpsP() << endl;
2560 cout <<
"\n STRESS = "<< stress << endl;
2566 for(
int j = 0;j<nyield;j++)
2573 if(funcs[j] < -1000.)
2587 std::stringstream sout;
2588 sout <<
" \n count = "<< count << endl;
2589 sout <<
" \n PlasticIntegratorCheck = "<< endl;
2590 sout <<
" \n funcs = " << funcs << endl;
2591 sout <<
" \n DiagonalStress = " << stress <<endl;
2592 sout <<
" \n Alpha() = " << plasticModelCopy.GetState().VolHardening() << endl;
2593 sout <<
" \n epst = " << plasticModelCopy.GetState().EpsT() <<endl;
2594 sout <<
" \n epsP = " << plasticModelCopy.GetState().EpsP() <<endl;
2595 sout <<
"\n Dep = " << Dep << endl;
2600 GlobalCheckConv(plasticModelCopy, epst, 0.0000001);
2611 ofstream outfiletxt1(
"e1dp052NewThermoAModulusCorrected.txt");
2612 ofstream outfiletxt2(
"e2dp052NewThermoAModulusCorrected.txt");
2613 ofstream outfiletxt3(
"e3dp052NewThermoAModulusCorrected.txt");
2614 ofstream outfiletxt4(
"Voldp052NewThermoAModulusCorrected.txt");
2624 deltastress.
XX() = -60.;
2625 deltastress.
XY() = -0.;
2626 deltastress.
XZ() = -0.;
2627 deltastress.
YY() = -0.;
2628 deltastress.
YZ() = -0.;
2629 deltastress.
ZZ() = -3.18;
2650 TPZDruckerPrager DP;
2654 DP.fYC.
SetUp( 20./180. * pi ,0);
2656 DP.fTFA.
SetUp( coesao, 1.);
2657 DP.fER.
SetUp(5318389., 0.18);
2660 DP.ApplyLoad(stress, strain);
2674 stress = deltastress;
2677 for(
int step=0;step<length;step++)
2684 cout <<
"\nstep "<< step;
2685 DP.ApplyLoad(stress,strain);
2687 outfiletxt1 << strain.
XX() <<
" " <<
fabs(stress.
XX()) <<
"\n";
2688 outfiletxt2 << strain.
YY() <<
" " <<
fabs(stress.
XX()) <<
"\n";
2689 outfiletxt3 << strain.
ZZ() <<
" " <<
fabs(stress.
XX()) <<
"\n";
2690 outfiletxt4 << strain.
I1() <<
" " <<
fabs(stress.
I1()) <<
"\n";
2691 stress += deltastress;
2692 cout <<
"strain = "<<strain <<
"\n";
2693 cout <<
"sigma = "<< stress <<
"\t "<<
"I1 = "<< stress.
I1() <<
"\n";
2704 ofstream outfiletxt1(
"Mises25.txt");
2705 ofstream outfiletxt2(
"Mises50.txt");
2706 TPZTensor<REAL> stress, strain, deltastress, deltastrain,stress2,strain2;
2708 deltastress.
XX() = 250.;
2709 deltastress.
XY() = 0.0001;
2710 deltastress.
XY() = 0.0001;
2711 deltastress.
YY() = 0.0001;
2712 deltastress.
YZ() = 0.0001;
2713 deltastress.
ZZ() = 0.0001;
2714 stress = deltastress;
2715 stress2= deltastress;
2719 VM1.fTFA.
SetUp(250.,2500.);
2720 VM1.fER.
SetUp( 210000., 0.3);
2723 VM2.fTFA.
SetUp(500.,7812.5);
2724 VM2.fER.
SetUp( 210000., 0.3);
2727 for(
int step=0;step<length;step++)
2729 cout <<
"\nstep "<< step;
2731 if(step==350|| step ==700)
2737 stress += deltastress;
2738 VM1.ApplyLoad(stress,strain);
2740 outfiletxt1 << strain.
XX() <<
" " << stress.
XX() <<
"\n";
2807 LK.SetIntegrTol(0.0001);
2832 sigma.
XY() = -0.001;
2833 sigma.
XZ() = -0.003;
2835 sigma.
YZ() = -0.0015;
2842 for(i = 0; i < 6; i++)sigma_FAD.
fData[i].diff(i,6);
2850 YCSD.
N(sigma, A, NDir,0);
2851 YCSD.
Compute(sigma_FAD, A_FAD, res_FAD,0);
2853 cout <<
"\nNDir = " << NDir;
2854 cout <<
"\nres_FAD = " << res_FAD;
2868 strain.
XY() = -0.001;
2869 strain.
XZ() = -0.003;
2870 strain.
YY() = -0.15;
2871 strain.
YZ() = -0.0015;
2872 strain.
ZZ() = -0.17;
2891 SD.SetIntegrTol(1.e-0);
2895 cout <<
"\n sigma: " << sigma;
2897 cout <<
"\n Dep: " << Dep;
2899 cout <<
"\n PlasticState: " << SD.
GetState();
2905 cout <<
"\n sigma: " << sigma;
2907 cout <<
"\n Dep: " << Dep;
2909 cout <<
"\n PlasticState: " << SD.
GetState();
2911 strain.
XX() -= 0.00001;
2915 cout <<
"\n sigma: " << sigma;
2917 cout <<
"\n Dep: " << Dep;
2919 cout <<
"\n PlasticState: " << SD.
GetState();
void RotationMatrix(TPZFMatrix< REAL > &R, REAL thetaRad, int axis)
virtual void ApplyLoad(const TPZTensor< REAL > &sigma, TPZTensor< REAL > &epsTotal) override
Classe que efetua avanco de um passo de plastificacao utilizando o metodo de Newton.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ fabs
void LoadState(TPZFMatrix< REAL > &state)
void CopyTo(TPZTensor< T1 > &target) const
static void UncDeepSandRes(TPZSandlerDimaggio &material)
static void DruckerPragerTest()
void Add(const TPZTensor< T1 > &tensor, const T2 &constant)
YC_t fYC
Object which represents the yield criterium.
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
static void UndocumentedTest4()
Implements a vector class which allows to use external storage provided by the user. Utility.
static void UncDeepSandResPSI(TPZSandlerDimaggio &material)
static void DenseSacrRiverSand(TPZLadeKim &material)
TPZTensor< T > m_eps_t
Tensors representing the total and plastic strain states.
TPZManVector< T, 6 > fData
virtual TPZPlasticState< REAL > GetState() const =0
void DruckerBiaxialTest()
static void McCormicRanchSandMod2(TPZSandlerDimaggio &material)
virtual void SetState(const TPZPlasticState< REAL > &state)=0
Templated vector implementation.
T m_hardening
Plastic volumetric hardeing variable.
static void UndocumentedTest3()
void LKFineSilicaLoadTest()
static void McCormicRanchSand(TPZSandlerDimaggio &material)
clarg::argBool h("-h", "help message", false)
clarg::argString input("-if", "input file", "cube1.txt")
static void MohrCoulombTest()
static void StrainTest(T &plasticModel, const char *filename, REAL strainMultiplier=1)
TPZTensor< REAL > gRefTension
static void McCormicRanchSandMod(TPZSandlerDimaggio &material)
void DruckerIsotropicCompression()
static void McCormicRanchSand(TPZYCSandlerDimaggio &material)
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object.
virtual void Print(std::ostream &out) const override
void SetUp(REAL poisson, REAL M, REAL lambda, REAL a, REAL m, REAL neta1, REAL ksi2, REAL mu, REAL C, REAL p, REAL h, REAL alpha, REAL pa)
static void VonMisesTest()
virtual void ApplyLoad(const TPZTensor< REAL > &sigma, TPZTensor< REAL > &epsTotal)=0
static void ModifiedMohrCoulombTest()
#define LOGPZ_INFO(A, B)
Define log for informations.
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
Contains TPZMatrixclass which implements full matrix (using column major representation).
void LKKoCompressionLoadTest()
TPZVonMises gPlasticModel
void Residual(TPZFMatrix< REAL > &res, int icase)
static void LooseSantaMonicaBeachSand(TPZLadeKim &material)
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ sqrt
static void UndocumentedTest2()
virtual int Put(const int64_t row, const int64_t col, const TVar &value)
Put values with bounds checking if DEBUG variable is defined.
void SetUp(REAL poisson, REAL E, REAL A, REAL B, REAL C, REAL R, REAL D, REAL W)
static void UncDeepSandResMPa(TPZSandlerDimaggio &material)
void SetUp(REAL &cohesion, REAL &phi, REAL &hardening, REAL &young, REAL &poisson)
void SetUp(REAL young, REAL poisson, REAL fangle, REAL coesion, REAL hardeningModulus, int InnerOuter=0)
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension a matrix and ZERO your elements.
void LKIsotropicCompression()
static void FineSilicaSand(TPZLadeKim &material)
static void WillamWarnkeTest()
static void StressTest(T &plasticModel, const char *filename, REAL stressMultiplier=1)
virtual int IntegrationSteps() const
static int CreatePlasticModel(T *(&plasticModel), const char *line)
void SandlerDimaggioIsotropicCompression()
static void ReciprocityTest(T &plasticModel, TPZTensor< REAL > strain1)
void Eigenvalue(TPZTensor< T > &eigenval, TPZTensor< T > &dSigma1, TPZTensor< T > &dSigma2, TPZTensor< T > &dSigma3) const
void Compute(const TPZTensor< T > &sigma, const T &A, TPZVec< T > &res, int checkForcedYield) const
Calculo do criterio de plastificacao.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ log
static void DruckerTest()
void MultiDirectionsMaterialPointTest(T &plasticModel, REAL dirMult)
static void PlasticIntegratorCheck(T mat)
const T & VolHardening() const
virtual void ApplyStrainComputeSigma(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > *tangent=NULL)=0
void ComputeTangent(TPZFMatrix< REAL > &tangent, TPZVec< REAL > &coefs, int icase)
void N(const TPZTensor< T > &sigma, const T &A, TPZVec< TPZTensor< T > > &Ndir, int checkForcedYield) const
virtual void ApplyStrainComputeDep(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > &Dep) override
virtual void SetUp(const TPZTensor< REAL > &epsTotal) override
const TPZTensor< T > & EpsP() const
expr_ expr_ expr_ expr_ expr_ expr_ asin
int Resize(const int64_t newRows, const int64_t wCols) override
Redimension a matrix, but maintain your elements.
static void GlobalCheckConv(T &plasticModel, TPZTensor< REAL > &strain, REAL maxDeltaStrain=0.01)
int64_t NElements() const
Returns the number of elements of the vector.
static void LooseSacrRiverSand(TPZLadeKim &material)
clarg::argString m("-m", "input matrix file name (text format)", "matrix.txt")
virtual void ApplyStrainComputeDep(const TPZTensor< REAL > &epsTotal, TPZTensor< REAL > &sigma, TPZFMatrix< REAL > &Dep) override
static void InitializeLOG()
static void LoadTest(const char *filename)
TPZFlopCounter cos(const TPZFlopCounter &orig)
Returns the cosine in radians and increments the counter of the Cosine.
virtual void SetState(const TPZPlasticState< REAL > &state) override
virtual TPZPlasticState< REAL > GetState() const override
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
static void PlainConcrete(TPZLadeKim &material)
void LadeKimTriaxialLooseSand()