xc
Mehanny.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 #ifndef Mehanny_h
49 #define Mehanny_h
50 
51 // $Revision: 1.1 $
52 // $Date: 2004/09/01 03:54:28 $
53 // $Source: /usr/local/cvs/OpenSees/SRC/damage/Mehanny.h,v $
54 
55 
56 // Written: Arash Altoontash, Gregory Deierlein
57 // Created: 10/02
58 // Revision: AA
59 //
60 // Description: This file contains the class definition for
61 // Combined damage model. It is a subclass of DamageModel
62 //
63 
64 #include <material/damage/DamageModel.h>
65 
66 namespace XC {
67 class DamageResponse;
68 
69 
71 //
83 class Mehanny: public DamageModel
84  {
85  private:
86  int processData (double PDefo);
87  // Model parameters
88 
89  double Alpha , Beta , Gamma , UltimatePosValue , UltimateNegValue;
90  double PosModifier, NegModifier;
91  double AbsTol, RelTol;
92 
93  // Trial step
94  double TrialPlasticDefo;
95  double TrialDefoIncr;
96  double TrialTempPDefo;
97  double TrialPosCycle;
98  double TrialNegCycle;
99  double TrialSumPosFHC;
100  double TrialPosPHC;
101  double TrialSumNegFHC;
102  double TrialNegPHC;
103  double TrialDamage;
104 
105  // Committed state
106  double CommPlasticDefo;
107  double CommDefoIncr;
108  double CommTempPDefo;
109  double CommPosCycle;
110  double CommNegCycle;
111  double CommSumPosFHC;
112  double CommPosPHC;
113  double CommSumNegFHC;
114  double CommNegPHC;
115  double CommDamage;
116 
117  // Last commit
118  double LCommPlasticDefo;
119  double LCommDefoIncr;
120  double LCommTempPDefo;
121  double LCommPosCycle;
122  double LCommNegCycle;
123  double LCommSumPosFHC;
124  double LCommPosPHC;
125  double LCommSumNegFHC;
126  double LCommNegPHC;
127  double LCommDamage;
128 
129  // FILE *OutputFile; // For debugging
130  public:
131  Mehanny(int tag, double alpha, double beta, double gamma ,
132  double ultimatePosValue , double ultimateNegValue, double abstol, double reltol, double posmodifier, double negmodifier);
133  Mehanny();
134  ~Mehanny();
135 
136  int setTrial(const Vector &trialVector );
137  int setTrial(void) { return -1; }
138 
139  int setInputResponse( Element *elem , const std::vector<std::string> & , int ndof );
140 
141  double getDamage(void);
142  double getPosDamage (void);
143  double getNegDamage (void);
144 
145  int commitState(void);
146  int revertToLastCommit (void);
147  int revertToStart (void);
148 
149  DamageModel *getCopy(void) const;
150 
151  int setVariable(const std::string &argv);
152  int getVariable(int variableID, double &info);
153 
154  int setParameter(const std::vector<std::string> &argv, Information &eleInformation);
155  int updateParameter(int responseID, Information &eleInformation);
156 
157  Response *setResponse(const std::vector<std::string> &argv, Information &);
158  int getResponse(int responseID, Information &info);
159 
160  int sendSelf(Communicator &);
161  int recvSelf(const Communicator &);
162  void Print(std::ostream &s, int flag =0) const;
163 
164  // method for this damage model to update itself according to its new parameters
165  void update(void){}
166  };
167 } // end of XC namespace
168 
169 
170 #endif
171 
int getVariable(int variableID, double &info)
Returns the value of the variable cuyo identifier being passed as parameter.
Definition: Mehanny.cpp:288
Float vector abstraction.
Definition: Vector.h:94
Information about an element.
Definition: Information.h:81
Communication parameters between processes.
Definition: Communicator.h:66
int recvSelf(const Communicator &)
Receive the object.
Definition: Mehanny.cpp:342
Base class response objects.
Definition: Response.h:81
int setVariable(const std::string &argv)
Returns the identifier of the variable cuyo name being passed as parameter.
Definition: Mehanny.cpp:283
int updateParameter(int responseID, Information &eleInformation)
Updates the parameter identified by parameterID with info.
Definition: Mehanny.cpp:294
int sendSelf(Communicator &)
Send the object.
Definition: Mehanny.cpp:338
Base class for the finite elements.
Definition: Element.h:112
DamageModel * getCopy(void) const
Virtual constructor.
Definition: Mehanny.cpp:240
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: Mehanny.cpp:346
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Base class for damage models.
Definition: DamageModel.h:107
Mehanny - Deierlein damage model.
Definition: Mehanny.h:83