xc
ElasticPPMaterial.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.5 $
48 // $Date: 2003/02/25 23:33:38 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/ElasticPPMaterial.h,v $
50 
51 #ifndef ElasticPPMaterial_h
52 #define ElasticPPMaterial_h
53 
54 // File: ~/material/ElasticPPMaterial.h
55 //
56 // Written: fmk
57 // Created: 07/98
58 // Revision: A
59 //
60 // Description: This file contains the class definition for
61 // ElasticPPMaterial. ElasticPPMaterial provides the abstraction
62 // of an elastic perfectly plastic uniaxial material,
63 //
64 // What: "@(#) ElasticPPMaterial.h, revA"
65 
66 #include <material/uniaxial/EPPBaseMaterial.h>
67 
68 namespace XC {
70 //
79  {
80  private:
81  double fyp, fyn;
82 
84  inline double yield_function(const double &sigtrial) const
85  {
86  if(sigtrial>=0.0)
87  return (sigtrial - fyp);
88  else
89  return (-sigtrial + fyn);
90  }
91  protected:
92  inline double def_total(void)
93  { return EPPBaseMaterial::def_total()-commitStrain; }
94  int sendData(CommParameters &);
95  int recvData(const CommParameters &);
96 
97  public:
98  ElasticPPMaterial(int tag, double E, double eyp);
99  ElasticPPMaterial(int tag, double E, double eyp, double eyn, double ezero);
100  ElasticPPMaterial(int tag);
101  ElasticPPMaterial(void);
102 
103  void set_fyp(const double &);
104  void set_eyp(const double &);
105  void set_fyn(const double &);
106  void set_eyn(const double &);
107  double get_fyp(void) const;
108  double get_eyp(void) const;
109  double get_fyn(void) const;
110  double get_eyn(void) const;
111 
112  int setTrialStrain(double strain, double strainRate = 0.0);
113 
114  int commitState(void);
115  int revertToLastCommit(void);
116  int revertToStart(void);
117 
118  UniaxialMaterial *getCopy(void) const;
119 
120  int sendSelf(CommParameters &);
121  int recvSelf(const CommParameters &);
122 
123  void Print(std::ostream &s, int flag =0);
124 
125  };
126 } // end of XC namespace
127 
128 
129 #endif
130 
131 
132 
void Print(std::ostream &s, int flag=0)
Print stuff.
Definition: ElasticPPMaterial.cpp:239
void set_fyp(const double &)
Sets the positive yield stress value (tension).
Definition: ElasticPPMaterial.cpp:72
int revertToStart(void)
Returns the material to its initial state.
Definition: ElasticPPMaterial.cpp:185
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:92
double E
Material trial strain.
Definition: ElasticBaseMaterial.h:42
ElasticPPMaterial(void)
Constructor.
Definition: ElasticPPMaterial.cpp:118
int revertToLastCommit(void)
Returns the material state to its last commit.
Definition: ElasticPPMaterial.cpp:180
UniaxialMaterial * getCopy(void) const
Virtual constructor.
Definition: ElasticPPMaterial.cpp:192
int setTrialStrain(double strain, double strainRate=0.0)
Sets trial strain.
Definition: ElasticPPMaterial.cpp:126
double commitStrain
plastic strain at last commit
Definition: EPPBaseMaterial.h:43
Base class for elastic perfectly plastic materials.
Definition: EPPBaseMaterial.h:38
int recvData(const CommParameters &)
Receives object members through the channel being passed as parameter.
Definition: ElasticPPMaterial.cpp:204
int recvSelf(const CommParameters &)
Receives object through the channel being passed as parameter.
Definition: ElasticPPMaterial.cpp:225
Elastic perfectly plastic material.
Definition: ElasticPPMaterial.h:78
int sendData(CommParameters &)
Send object members through the channel being passed as parameter.
Definition: ElasticPPMaterial.cpp:196
void set_fyn(const double &)
Set the yield stress a compression value.
Definition: ElasticPPMaterial.cpp:87
double ezero
Initial deformation.
Definition: ElasticBaseMaterial.h:43
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
void set_eyp(const double &)
Sets the positive el yield strain value (tension).
Definition: ElasticPPMaterial.cpp:83
Communication parameters between processes.
Definition: CommParameters.h:65
int commitState(void)
Commit material state.
Definition: ElasticPPMaterial.cpp:159
void set_eyn(const double &)
Asigna el yield stress a compression value.
Definition: ElasticPPMaterial.cpp:98
int sendSelf(CommParameters &)
Sends object through the channel being passed as parameter.
Definition: ElasticPPMaterial.cpp:211