tcscam.cpp

00001 /*************************************************************************************
00002  * MechSys - A C++ library to simulate (Continuum) Mechanical Systems                *
00003  * Copyright (C) 2005 Dorival de Moraes Pedroso <dorival.pedroso at gmail.com>       *
00004  * Copyright (C) 2005 Raul Dario Durand Farfan  <raul.durand at gmail.com>           *
00005  *                                                                                   *
00006  * This file is part of MechSys.                                                     *
00007  *                                                                                   *
00008  * MechSys is free software; you can redistribute it and/or modify it under the      *
00009  * terms of the GNU General Public License as published by the Free Software         *
00010  * Foundation; either version 2 of the License, or (at your option) any later        *
00011  * version.                                                                          *
00012  *                                                                                   *
00013  * MechSys is distributed in the hope that it will be useful, but WITHOUT ANY        *
00014  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A   *
00015  * PARTICULAR PURPOSE. See the GNU General Public License for more details.          *
00016  *                                                                                   *
00017  * You should have received a copy of the GNU General Public License along with      *
00018  * MechSys; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, *
00019  * Fifth Floor, Boston, MA 02110-1301, USA                                           *
00020  *************************************************************************************/
00021 
00022 #include <iostream>
00023 
00024 #include "util/array.h"
00025 #include "util/exception.h"
00026 #include "models/coupled/csubcam.h"
00027 
00028 using std::cout;
00029 using std::endl;
00030 
00031 int main(int argc, char **argv) try
00032 {
00034     Array<REAL> prms;
00035     prms.push_back(0.0891); // lam
00036     prms.push_back(0.0196); // kap
00037     prms.push_back(0.20);   // nu
00038     prms.push_back(3.2);    // Rcs
00039     prms.push_back(5000);   // c
00040     prms.push_back(1.0e-4); // k
00041 
00043     Array<REAL> idat;
00044     idat.push_back(2);     // Sx
00045     idat.push_back(2);     // Sy
00046     idat.push_back(2);     // Sz
00047     idat.push_back(1.691); // v_ini (specific volume)
00048     idat.push_back(1);     // OCR
00049     idat.push_back(0);     // Pp (pore-pressure)
00050 
00052     CSubCam csc(prms, idat);
00053     cout << "Sig_ini  = " << csc.Sig() << endl;
00054 
00056     
00057     // Actualize
00058     Tensor2 DSig; DSig=10,10,5, 0,0,0;
00059     REAL    DPp;  DPp=-2;
00060     Tensor2 DEps;
00061     REAL    DnSr;
00062     csc.Actualize(DSig,DPp, DEps,DnSr);
00063 
00064     // Output
00065     cout << "Sig_fin  = " << csc.Sig()  << endl;
00066     cout << "DEps (%) = " << DEps*100.0 << endl;
00067     cout << "DnSr     = " << DnSr       << endl;
00068 
00069     return 0;
00070 }
00071 catch (Exception * e) // {{{{
00072 {
00073     e->Cout();
00074     if (e->IsFatal()) exit(1);
00075     delete e;
00076 }
00077 catch (char const * s)
00078 {
00079     cout << " Fatal:" << s << "\n";
00080     exit(1);
00081 } // }}}
00082 
00083 // vim:fdm=marker

Generated on Wed Jan 24 15:56:27 2007 for MechSys by  doxygen 1.4.7