DrainBilinearMaterial.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/DrainBilinearMaterial.cpp,v $
00024 
00025 // Written: MHS
00026 // Created: June 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // DrainBilinearMaterial.
00030 
00031 #include <DrainBilinearMaterial.h>
00032 #include <Vector.h>
00033 
00034 DrainBilinearMaterial::DrainBilinearMaterial(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 // 17 history variables and 16 material parameters
00041 DrainMaterial(tag, MAT_TAG_DrainBilinear, 17, 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 DrainBilinearMaterial::DrainBilinearMaterial(int tag, const Vector &input, double b):
00065 // 17 history variables and 16 material parameters
00066 DrainMaterial(tag, MAT_TAG_DrainBilinear, 17, 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 DrainBilinearMaterial::DrainBilinearMaterial(void):
00076 DrainMaterial(0, MAT_TAG_DrainBilinear, 17, 16)
00077 {
00078         // Does nothing
00079 }
00080 
00081 DrainBilinearMaterial::~DrainBilinearMaterial(void)
00082 {
00083         // Does nothing
00084 }
00085 
00086 int
00087 DrainBilinearMaterial::revertToStart(void)
00088 {
00089         hstv[0]  = 0.0;
00090         hstv[1]  = 0.0;
00091         hstv[2]  = data[1];             // fyp
00092         hstv[3]  = data[1];             // fyp
00093         hstv[4]  = data[2];             // fyn
00094         hstv[5]  = data[2];             // fyn
00095         hstv[6]  = data[0];             // E
00096         hstv[7]  = data[0];             // E
00097         hstv[8]  = data[13];    // capDispP
00098         hstv[9]  = data[13];    // capDispP
00099         hstv[10] = data[14];    // capDispN
00100         hstv[11] = data[14];    // capDispN
00101         hstv[12] = 0.0;
00102         hstv[13] = 0.0;
00103         hstv[14] = 0.0;
00104         hstv[15] = data[0];             // E
00105         hstv[16] = data[15];    // res
00106 
00107         // Set trial history variables to committed values
00108         for (int i = 0; i < 17; i++)
00109                 hstv[i+17] = hstv[i];
00110 
00111         return 0;
00112 }
00113 
00114 UniaxialMaterial*
00115 DrainBilinearMaterial::getCopy(void)
00116 {
00117         Vector input(data, 16);
00118 
00119         DrainBilinearMaterial *theCopy =
00120                 new DrainBilinearMaterial(this->getTag(), input, beto);
00121 
00122         return theCopy;
00123 }

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