xc
ConcreteHistoryVars.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 #ifndef ConcreteHistoryVars_h
29 #define ConcreteHistoryVars_h
30 
31 #include <iostream>
32 #include <cmath>
33 
34 namespace XC {
35 
37 //
40  {
41  double ecmin;
42  double dept;
43  double eps;
44  double sig;
45  double e;
46 
47  inline ConcreteHistoryVars(void)
48  : ecmin(0.0), dept(0.0), eps(0.0), sig(0.0), e(0.0) {}
49  inline void setup_parameters(const double &initialTangent)
50  {
51  e= initialTangent;
52  eps= 0.0;
53  sig= 0.0;
54  }
55  inline double getStrain(void) const
56  { return eps; }
57  inline double getStress(void) const
58  { return sig; }
59  inline double getTangent(void) const
60  { return e; }
61 
65  double getSecantStiffness(const double &Ec, const double &eps_m) const
66  {
67  double retval= Ec;
68  if(std::abs(eps_m/this->sig)<=Ec)
69  { retval = std::abs(this->sig/eps_m); } //ADDED 7/22
70 
71  if(std::isnan(retval))
72  { retval = Ec; }
73  return retval;
74  }
75  void cutStress(const double &sigmin,const double &sigmax,const double &er)
76  {
77  if(sig <= sigmin)
78  {
79  sig= sigmin;
80  e= er;
81  }
82  else if(sig >= sigmax)
83  {
84  sig= sigmax;
85  e= 0.5 * er;
86  }
87  }
88  void Print(std::ostream &os) const
89  {
90  os << "Concrete02:(strain, stress, tangent) " << eps
91  << ", " << sig << ", " << e << std::endl;
92  }
93  };
94 
96 inline std::ostream &operator<<(std::ostream &os,const ConcreteHistoryVars &hv)
97  {
98  hv.Print(os);
99  return os;
100  }
101 
103  {
104  double ecmax;
105 
106  inline CreepConcreteHistoryVars(void)
107  : ConcreteHistoryVars(), ecmax(0.0) {}
108  inline void revertToStart(const double &initialTangent)
109  {
110  this->ecmin= 0.0;
111  this->ecmax= 0.0;
112  this->dept= 0.0;
113  this->setup_parameters(initialTangent);
114  }
115  };
116 
117 } // end of XC namespace
118 
119 #endif
double getSecantStiffness(const double &Ec, const double &eps_m) const
Return the wecant stiffness for determination of creep strain.
Definition: ConcreteHistoryVars.h:65
double ecmax
added by AMK
Definition: ConcreteHistoryVars.h:104
double sig
stress
Definition: ConcreteHistoryVars.h:44
Concrete history variables.
Definition: ConcreteHistoryVars.h:39
double dept
hstP(2)
Definition: ConcreteHistoryVars.h:42
Definition: ConcreteHistoryVars.h:102
double eps
strain
Definition: ConcreteHistoryVars.h:43
double e
stiffness modulus
Definition: ConcreteHistoryVars.h:45
double ecmin
hstP(1)
Definition: ConcreteHistoryVars.h:41
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35