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

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