FedeasBond2Material.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.6 $
00022 // $Date: 2004/07/15 21:36:46 $
00023 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/fedeas/FedeasBond2Material.cpp,v $
00024                                                                       
00025 // Written: MHS
00026 // Created: Jan 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // FedeasBond2Material. FedeasBond2Material wraps the FEDEAS
00030 // 1d material subroutine Bond_2.
00031 
00032 #include <stdlib.h>
00033 #include <FedeasBond2Material.h>
00034 
00035 FedeasBond2Material::FedeasBond2Material(int tag,
00036         double u1p, double q1p, double u2p, double u3p, double q3p,
00037         double u1n, double q1n, double u2n, double u3n, double q3n,
00038         double s0, double bb, double alp, double aln):
00039 // 27 history variables and 15 material parameters
00040 FedeasMaterial(tag, MAT_TAG_FedeasBond2, 27, 15)
00041 {
00042         data[0]  = u1p;
00043         data[1]  = q1p;
00044         data[2]  = u2p;
00045         data[3]  = u3p;
00046         data[4]  = q3p;
00047         data[5]  = u1n;
00048         data[6]  = q1n;
00049         data[7]  = u2n;
00050         data[8]  = u3n;
00051         data[9]  = q3n;
00052         data[10] = s0;
00053         data[11] = bb;
00054         data[12] = alp;
00055         data[13] = aln;
00056 
00057         double E0p = q1p*u1p/(1.0+bb) + q1p*(u2p-u1p) + 0.5*(q1p+q3p)*(u3p-u2p);
00058         double E0n = q1n*u1n/(1.0+bb) + q1n*(u2n-u1n) + 0.5*(q1n+q3n)*(u3n-u2n);
00059 
00060         data[14] = (E0p > E0n) ? E0p : E0n;
00061 
00062         tangent =  data[1]/data[0];
00063         tangentP = tangent;
00064 }
00065 
00066 FedeasBond2Material::FedeasBond2Material(int tag, const Vector &d):
00067 // 27 history variables and 15 material parameters
00068 FedeasMaterial(tag, MAT_TAG_FedeasBond2, 27, 15)
00069 {
00070   if (d.Size() != numData) {
00071     opserr << "FedeasBond2Material::FedeasBond2Material -- not enough input arguments\n";
00072     exit(-1);
00073   }
00074                 
00075   for (int i = 0; i < numData; i++)
00076     data[i] = d(i);
00077   
00078   tangent =  data[1]/data[0];
00079   tangentP = tangent;
00080 }
00081 
00082 FedeasBond2Material::FedeasBond2Material(void):
00083 FedeasMaterial(0, MAT_TAG_FedeasBond2, 27, 15)
00084 {
00085         // Does nothing
00086 }
00087 
00088 FedeasBond2Material::~FedeasBond2Material(void)
00089 {
00090         // Does nothing
00091 }
00092 
00093 UniaxialMaterial*
00094 FedeasBond2Material::getCopy(void)
00095 {
00096   Vector d(data, numData);
00097 
00098   FedeasBond2Material *theCopy = new FedeasBond2Material(this->getTag(), d);
00099   
00100   // Copy history variables
00101   for (int i = 0; i < 2*numHstv; i++)
00102     theCopy->hstv[i] = hstv[i];
00103   
00104   theCopy->epsilonP = epsilonP;
00105   theCopy->sigmaP   = sigmaP;
00106   theCopy->tangentP = tangentP;
00107   
00108   theCopy->epsilon = epsilonP;
00109   theCopy->sigma = sigmaP;
00110   theCopy->tangent = tangentP;  
00111 
00112   return theCopy;
00113 }
00114 
00115 double
00116 FedeasBond2Material::getInitialTangent(void)
00117 {
00118         //return q1p/u1p;
00119         return data[1]/data[0];
00120 }

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