FedeasHyster2Material.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.5 $
00022 // $Date: 2004/07/15 21:36:46 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/fedeas/FedeasHyster2Material.cpp,v $
00024                                                                       
00025 // Written: MHS
00026 // Created: Jan 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // FedeasHyster2Material. FedeasHyster2Material wraps the FEDEAS
00030 // 1d material subroutine Hyster_2.
00031 
00032 #include <stdlib.h>
00033 #include <FedeasHyster2Material.h>
00034 
00035 FedeasHyster2Material::FedeasHyster2Material(int tag,
00036                 double mom1p, double rot1p, double mom2p, double rot2p,
00037                 double mom3p, double rot3p, double mom1n, double rot1n,
00038                 double mom2n, double rot2n, double mom3n, double rot3n,
00039                 double pinchX, double pinchY, double damfc1, double damfc2):
00040 // 6 history variables and 16 material parameters
00041 FedeasMaterial(tag, MAT_TAG_FedeasHysteretic2, 6, 16)
00042 {
00043         data[0]  = mom1p;
00044         data[1]  = rot1p;
00045         data[2]  = mom2p;
00046         data[3]  = rot2p;
00047         data[4]  = mom3p;
00048         data[5]  = rot3p;
00049 
00050         data[6]  = mom1n;
00051         data[7]  = rot1n;
00052         data[8]  = mom2n;
00053         data[9]  = rot2n;
00054         data[10] = mom3n;
00055         data[11] = rot3n;
00056 
00057         data[12] = pinchX;
00058         data[13] = pinchY;
00059         data[14] = damfc1;
00060         data[15] = damfc2;
00061 
00062         tangentP =  data[0]/data[1];
00063         tangent = tangentP;
00064 }
00065 
00066 FedeasHyster2Material::FedeasHyster2Material(int tag,
00067         double mom1p, double rot1p, double mom2p, double rot2p,
00068         double mom1n, double rot1n, double mom2n, double rot2n,
00069         double pinchX, double pinchY, double damfc1, double damfc2):
00070 // 6 history variables and 16 material parameters
00071 FedeasMaterial(tag, MAT_TAG_FedeasHysteretic2, 6, 16)
00072 {
00073         data[0]  = mom1p;
00074         data[1]  = rot1p;
00075         data[2]  = 0.5*(mom1p+mom2p);
00076         data[3]  = 0.5*(rot1p+rot2p);
00077         data[4]  = mom2p;
00078         data[5]  = rot2p;
00079 
00080         data[6]  = mom1n;
00081         data[7]  = rot1n;
00082         data[8]  = 0.5*(mom1n+mom2n);
00083         data[9]  = 0.5*(rot1n+rot2n);
00084         data[10] = mom2n;
00085         data[11] = rot2n;
00086 
00087         data[12] = pinchX;
00088         data[13] = pinchY;
00089         data[14] = damfc1;
00090         data[15] = damfc2;
00091 
00092         tangentP =  data[0]/data[1];
00093         tangent = tangentP;
00094 }
00095 
00096 FedeasHyster2Material::FedeasHyster2Material(int tag, const Vector &d):
00097 // 6 history variables and 16 material parameters
00098 FedeasMaterial(tag, MAT_TAG_FedeasHysteretic2, 6, 16)
00099 {
00100   if (d.Size() != numData) {
00101     opserr << "FedeasHyster2Material::FedeasHyster2Material -- not enough input arguments\n";
00102     exit(-1);
00103   }
00104 
00105   for (int i = 0; i < numData; i++)
00106     data[i] = d(i);
00107 }
00108 
00109 FedeasHyster2Material::FedeasHyster2Material(void):
00110 FedeasMaterial(0, MAT_TAG_FedeasHysteretic2, 6, 16)
00111 {
00112         // Does nothing
00113 }
00114 
00115 FedeasHyster2Material::~FedeasHyster2Material(void)
00116 {
00117         // Does nothing
00118 }
00119 
00120 UniaxialMaterial*
00121 FedeasHyster2Material::getCopy(void)
00122 {
00123   Vector d(data, numData);
00124 
00125   FedeasHyster2Material *theCopy = new FedeasHyster2Material(this->getTag(), d);
00126   
00127   // Copy history variables
00128   for (int i = 0; i < 2*numHstv; i++)
00129     theCopy->hstv[i] = hstv[i];
00130   
00131   theCopy->epsilonP = epsilonP;
00132   theCopy->sigmaP   = sigmaP;
00133   theCopy->tangentP = tangentP;
00134 
00135   theCopy->epsilon = epsilonP;
00136   theCopy->sigma = sigmaP;
00137   theCopy->tangent = tangentP;  
00138   
00139   return theCopy;
00140 }
00141 
00142 double
00143 FedeasHyster2Material::getInitialTangent(void)
00144 {
00145         //return mom1p/rot1p;
00146         return data[0]/data[1];
00147 }

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