FedeasConcr2Material.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/FedeasConcr2Material.cpp,v $
00024                                                                       
00025 // Written: MHS
00026 // Created: Jan 2001
00027 //
00028 // Description: This file contains the class definition for 
00029 // FedeasConcr2Material. FedeasConcr2Material wraps the FEDEAS
00030 // 1d material subroutine Concr_2.
00031 #include <stdlib.h>
00032 #include <FedeasConcr2Material.h>
00033 
00034 FedeasConcr2Material::FedeasConcr2Material(int tag,
00035                                          double fc, double ec, double fu, double eu,
00036                                          double ratio, double ft, double Ets):
00037 // 2 history variables and 7 material parameters
00038 FedeasMaterial(tag, MAT_TAG_FedeasConcrete2, 2, 7)
00039 {
00040   data[0]  = fc;
00041   data[1]  = ec;
00042   data[2]  = fu;
00043   data[3]  = eu;
00044   data[4]  = ratio;
00045   data[5]  = ft;
00046   data[6]  = Ets;
00047 
00048   tangent =  2.0*data[0]/data[1];
00049   tangentP =  tangent;
00050 }
00051 
00052 FedeasConcr2Material::FedeasConcr2Material(int tag, const Vector &d):
00053 // 2 history variables and 7 material parameters
00054 FedeasMaterial(tag, MAT_TAG_FedeasConcrete2, 2, 7)
00055 {
00056   if (d.Size() != numData) {
00057     opserr << "FedeasConcr2Material::FedeasConcr2Material -- not enough input arguments\n";
00058     exit(-1);
00059   }
00060 
00061   for (int i = 0; i < numData; i++)
00062     data[i] = d(i);
00063 
00064   tangent =  2.0*data[0]/data[1];
00065   tangentP =  tangent;
00066 }
00067 
00068 FedeasConcr2Material::FedeasConcr2Material(void):
00069 FedeasMaterial(0, MAT_TAG_FedeasConcrete2, 2, 7)
00070 {
00071         // Does nothing
00072 }
00073 
00074 FedeasConcr2Material::~FedeasConcr2Material(void)
00075 {
00076         // Does nothing
00077 }
00078 
00079 UniaxialMaterial*
00080 FedeasConcr2Material::getCopy(void)
00081 {
00082   Vector d(data, numData);
00083 
00084   FedeasConcr2Material *theCopy = new FedeasConcr2Material(this->getTag(), d);
00085   
00086   // Copy history variables
00087   for (int i = 0; i < 2*numHstv; i++)
00088     theCopy->hstv[i] = hstv[i];
00089   
00090   theCopy->epsilonP = epsilonP;
00091   theCopy->sigmaP   = sigmaP;
00092   theCopy->tangentP = tangentP;
00093 
00094   theCopy->epsilon = epsilonP;
00095   theCopy->sigma = sigmaP;
00096   theCopy->tangent = tangentP;  
00097 
00098   return theCopy;
00099 }
00100 
00101 double
00102 FedeasConcr2Material::getInitialTangent(void)
00103 {
00104   //return 2.0*fc/ec;
00105   return 2.0*data[0]/data[1];
00106 }

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