XC Open source finite element analysis program
DrainMaterial.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.3 $
48 // $Date: 2003/02/14 23:01:38 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/DrainMaterial.h,v $
50 
51 // Written: MHS
52 // Created: June 2001
53 //
54 // Description: This file contains the class definition for
55 // DrainMaterial. DrainMaterial wraps a Drain spring element subroutine
56 // and converts it to the UniaxialMaterial interface for use in
57 // zero length elements, beam sections, or anywhere else
58 // UniaxialMaterials may be used.
59 //
60 // For more information see the Drain-2DX user guide:
61 // Allahabadi, R.; Powell, G. H.
62 // UCB/EERC-88/06, Berkeley: Earthquake Engineering Research Center,
63 // University of California, Mar. 1988, 1 vol.
64 
65 #ifndef DrainMaterial_h
66 #define DrainMaterial_h
67 
68 #include <material/uniaxial/UniaxialMaterial.h>
69 
70 namespace XC {
72 //
75  {
76  private:
77  double epsilon;
78  double epsilonDot;
79  double sigma;
80  double tangent;
81  protected:
82 
83  std::vector<double> matParams;
84  std::vector<double> hstv;
85 
86  int numData;
87  int numHstv;
88 
89  double epsilonP;
90  double sigmaP;
91  double tangentP;
92 
93  double beto;
94  double initialTangent;
95 
96  // Invokes the Drain subroutine
97  virtual int invokeSubroutine(void);
98  int sendData(CommParameters &);
99  int recvData(const CommParameters &);
100  public:
101  DrainMaterial(int tag, int classTag, int numHV, int numData, double beto = 0.0);
102 
103  virtual int setTrialStrain(double strain, double strainRate = 0.0);
104  virtual int setTrial(double strain, double &stress, double &tangent, double strainRate = 0.0);
105  virtual double getStrain(void) const;
106  virtual double getStrainRate(void) const;
107  virtual double getStress(void) const;
108  virtual double getTangent(void) const;
109  virtual double getDampTangent(void) const;
110  virtual double getInitialTangent(void) const;
111 
112  virtual int commitState(void);
113  virtual int revertToLastCommit(void);
114  virtual int revertToStart(void);
115 
116  // WARNING -- if you wish to override any method in this base class, you must
117  // also override the getCopy method to return a pointer to the derived class!!!
118  virtual UniaxialMaterial *getCopy(void) const;
119 
120  virtual int sendSelf(CommParameters &);
121  virtual int recvSelf(const CommParameters &);
122 
123  virtual void Print(std::ostream &s, int flag = 0);
124  };
125 } // end of XC namespace
126 
127 
128 #endif
129 
std::vector< double > matParams
Material parameters array.
Definition: DrainMaterial.h:83
double initialTangent
initial tangent
Definition: DrainMaterial.h:94
double epsilonP
Committed strain.
Definition: DrainMaterial.h:89
??.
Definition: DrainMaterial.h:74
double beto
Stiffness proportional damping factor.
Definition: DrainMaterial.h:93
virtual double getStrainRate(void) const
default operation for strain rate is zero
Definition: DrainMaterial.cpp:116
virtual int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: DrainMaterial.cpp:205
double tangentP
Committed tangent.
Definition: DrainMaterial.h:91
virtual void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: DrainMaterial.cpp:237
double sigmaP
Committed stress.
Definition: DrainMaterial.h:90
int sendData(CommParameters &)
Send its members through the channel being passed as parameter.
Definition: DrainMaterial.cpp:181
virtual double getDampTangent(void) const
default operation for damping tangent is zero
Definition: DrainMaterial.cpp:128
int recvData(const CommParameters &)
Receives its members through the channel being passed as parameter.
Definition: DrainMaterial.cpp:193
int numHstv
Number of history variables.
Definition: DrainMaterial.h:87
std::vector< double > hstv
History array: first half is committed, second half is trial.
Definition: DrainMaterial.h:84
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
virtual UniaxialMaterial * getCopy(void) const
Virtual constructor.
Definition: DrainMaterial.cpp:176
virtual int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: DrainMaterial.cpp:219
int numData
Number of material parameters.
Definition: DrainMaterial.h:86
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:88