xc
EyBasic.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 #ifndef EyBasic_h
30 #define EyBasic_h
31 
32 // File: ~/material/EyBasic.h
33 //
34 // Written: fmk
35 // Created: 07/98
36 // Revision: A
37 //
38 // Description: This file contains the class definition for
39 // EyBasic. EyBasic provides the abstraction
40 // of an elastic perfectly plastic uniaxial material,
41 //
42 // What: "@(#) EyBasic.h, revA"
43 
44 #include <material/uniaxial/ElasticPPMaterialBase.h>
45 
46 namespace XC {
47 //
54  {
55  private:
56  double split_stress;
58  inline double yield_function(const double &sigtrial) const
59  {
60  if(sigtrial>=split_stress)
61  return (sigtrial - fyp);
62  else
63  return (-sigtrial + fyn);
64  }
65  public:
66  EyBasic(int tag= 0);
67  EyBasic(int tag, double E, double eyp, double eyn, double ezero);
68  UniaxialMaterial *getCopy(void) const;
69 
70  int setTrialStrain(double strain, double strainRate = 0.0);
71 
72  int commitState(void);
73 
74  void set_fyp(const double &);
75  void set_fyn(const double &);
76 
77  inline double getLowerYieldStress(void)
78  { return get_fyn(); }
79  void setLowerYieldStress(const double &d)
80  { set_fyn(d); }
81  double getUpperYieldStress(void)
82  { return get_fyp(); }
83  void setUpperYieldStress(const double &d)
84  { set_fyp(d); }
85 
86  void setParameters(const double &, const double &, const double &);
87  };
88 } // end of XC namespace
89 
90 
91 #endif
92 
93 
94 
int commitState(void)
Commit material state.
Definition: EyBasic.cc:122
Lateral reaction of soil.
Definition: EyBasic.h:53
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:93
double E
Elastic modulus.
Definition: ElasticBaseMaterial.h:45
void set_fyn(const double &)
Set the yield stress a compression value.
Definition: EyBasic.cc:50
void set_fyp(const double &)
Sets the less negative yield stress value (tension).
Definition: EyBasic.cc:36
int setTrialStrain(double strain, double strainRate=0.0)
Sets trial strain.
Definition: EyBasic.cc:92
UniaxialMaterial * getCopy(void) const
Virtual constructor.
Definition: EyBasic.cc:79
double fyn
positive and negative yield stress
Definition: ElasticPPMaterialBase.h:82
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
void setParameters(const double &, const double &, const double &)
Set the values of the parameters that define the material response.
Definition: EyBasic.cc:83
EyBasic(int tag=0)
Constructor.
Definition: EyBasic.cc:74
Elastic perfectly plastic material.
Definition: ElasticPPMaterialBase.h:79