DrainClough2Material.cpp

Go to the documentation of this file.
00001 /* ****************************************************************** **
00002 **    OpenSees - Open System for Earthquake Engineering Simulation    **
00003 **          Pacific Earthquake Engineering Research Center            **
00004 **                                                                    **
00005 **                                                                    **
00006 ** (C) Copyright 1999, The Regents of the University of California    **
00007 ** All Rights Reserved.                                               **
00008 **                                                                    **
00009 ** Commercial use of this program without express permission of the   **
00010 ** University of California, Berkeley, is strictly prohibited.  See   **
00011 ** file 'COPYRIGHT'  in main directory for information on usage and   **
00012 ** redistribution,  and for a DISCLAIMER OF ALL WARRANTIES.           **
00013 **                                                                    **
00014 ** Developed by:                                                      **
00015 **   Frank McKenna (fmckenna@ce.berkeley.edu)                         **
00016 **   Gregory L. Fenves (fenves@ce.berkeley.edu)                       **
00017 **   Filip C. Filippou (filippou@ce.berkeley.edu)                     **
00018 **                                                                    **
00019 ** ****************************************************************** */
00020 
00021 // $Revision: 1.2 $
00022 // $Date: 2001/10/01 17:08:54 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/drain/DrainClough2Material.cpp,v $
00024 
00025 // Written: MHS
00026 // Created: June 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // DrainClough2Material.
00030 
00031 #include <DrainClough2Material.h>
00032 #include <Vector.h>
00033 
00034 DrainClough2Material::DrainClough2Material(int tag,
00035         double E, double fyp, double fyn, double alpha,
00036         double ecaps, double ecapk, double ecapa, double ecapd,
00037         double cs, double ck, double ca, double cd,
00038         double capSlope, double capDispP, double capDispN, double res,
00039         double b):
00040 // 19 history variables and 16 material parameters
00041 DrainMaterial(tag, MAT_TAG_DrainClough2, 19, 16, b)
00042 {
00043         data[0]  = E;
00044         data[1]  = fyp;
00045         data[2]  = fyn;
00046         data[3]  = alpha;
00047         data[4]  = ecaps;
00048         data[5]  = ecapk;
00049         data[6]  = ecapa;
00050         data[7]  = ecapd;
00051         data[8]  = cs;
00052         data[9]  = ck;
00053         data[10] = ca;
00054         data[11] = cd;
00055         data[12] = capSlope;
00056         data[13] = capDispP;
00057         data[14] = capDispN;
00058         data[15] = res;
00059 
00060         // Initialize history variables
00061         this->revertToStart();
00062 }
00063 
00064 DrainClough2Material::DrainClough2Material(int tag, const Vector &input, double b):
00065 // 19 history variables and 16 material parameters
00066 DrainMaterial(tag, MAT_TAG_DrainClough2, 19, 16, b)
00067 {
00068         for (int i = 0; i < 16; i++)
00069                 data[i] = input(i);
00070 
00071         // Initialize history variables
00072         this->revertToStart();
00073 }
00074 
00075 DrainClough2Material::DrainClough2Material(void):
00076 DrainMaterial(0, MAT_TAG_DrainClough2, 19, 16)
00077 {
00078         // Does nothing
00079 }
00080 
00081 DrainClough2Material::~DrainClough2Material(void)
00082 {
00083         // Does nothing
00084 }
00085 
00086 int
00087 DrainClough2Material::revertToStart(void)
00088 {
00089         double dyp = data[1]/data[0];   // fyp/E
00090         double dyn = data[2]/data[0];   // fyn/E
00091 
00092         hstv[0]  = data[0];             // E
00093         hstv[1]  = data[0];             // E
00094         hstv[2]  = dyp;
00095         hstv[3]  = dyn; 
00096         hstv[4]  = 0.0;
00097         hstv[5]  = dyp;
00098         hstv[6]  = dyn;
00099         hstv[7]  = data[1];             // fyp
00100         hstv[8]  = data[2];             // fyn
00101         hstv[9]  = data[13];    // capDispP
00102         hstv[10] = data[14];    // capDispN
00103         hstv[11] = 0.0;
00104         hstv[12] = 0.0;
00105         hstv[13] = 0.0;
00106         hstv[14] = data[0];             // E
00107         hstv[15] = 0.0;
00108         hstv[16] = 0.0;
00109         hstv[17] = 0.0;
00110         hstv[18] = 0.0;
00111 
00112         // Set trial history variables to committed values
00113         for (int i = 0; i < 19; i++)
00114                 hstv[i+19] = hstv[i];
00115 
00116         return 0;
00117 }
00118 
00119 UniaxialMaterial*
00120 DrainClough2Material::getCopy(void)
00121 {
00122         Vector input(data, 16);
00123 
00124         DrainClough2Material *theCopy =
00125                 new DrainClough2Material(this->getTag(), input, beto);
00126 
00127         return theCopy;
00128 }

Generated on Mon Oct 23 15:05:19 2006 for OpenSees by doxygen 1.5.0