XC Open source finite element analysis program
Bilinear.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.1 $
48 // $Date: 2004/09/01 03:53:13 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/material/uniaxial/snap/Bilinear.h,v $
50 //
51 //
52 // Bilinear.h: implementation of the Bilinear class from Fortran version.
53 // Originally from SNAP PROGRAM by Luis Ibarra and Prof H.K. Krawinkler
54 //
55 // Written: A. Altoontash & Prof. G. Deierlein 12/01
56 // Revised: 03/02
57 //
58 // Purpose: This file contains the implementation for the Bilinear class.
59 //
61 
62 // Bilinear.h: interface for the Bilinear class.
63 //
65 
66 #ifndef BILINEAR_H
67 #define BILINEAR_H
68 
69 #include <material/uniaxial/UniaxialMaterial.h>
70 #include <utility/matrix/Vector.h>
71 #include <stdio.h>
72 #include <material/damage/DamageModel.h>
73 #include <utility/recorder/response/MaterialResponse.h>
74 
75 namespace XC {
77 //
79 class Bilinear : public UniaxialMaterial
80  {
81  private:
82  // Input parameters
83  double elstk, fyieldPos ,fyieldNeg, alfa; // Main properties
84  double alfaCap, capDispPos, capDispNeg, Resfac; // Cap properties
85  int flagCapenv;
86  DamageModel *StrDamage;
87  DamageModel *StfDamage;
88  DamageModel *CapDamage;
89 
90  // Hystory data
91  double hsTrial[17], hsCommit[17], hsLastCommit[17];
92 
93  FILE *OutputFile; // For debugging
94 
95  // Sensitivity related variables
96  int parameterID;
97  Matrix *SHVs;
98  public:
99  Bilinear(void);
100  Bilinear(int tag);
101  Bilinear(int tag, Vector inputParam ,DamageModel *strength,DamageModel *stiffness,DamageModel *capping);
102  virtual ~Bilinear();
103 
104  int setTrialStrain(double d, double strainRate = 0.0);
105  double getStrain(void) const;
106  double getStress(void) const;
107  double getTangent(void) const;
108  double getInitialTangent(void) const;
109 
110  int commitState(void);
111  int revertToLastCommit(void);
112  int revertToStart(void);
113 
114  //virtual
115  UniaxialMaterial *getCopy(void) const;
116 
117  int sendSelf(CommParameters &);
118  int recvSelf(const CommParameters &);
119 
120  Response* setResponse(const std::vector<std::string> &argv, Information &matInfo);
121  int getResponse(int responseID, Information &matInfo);
122 
123  void Print(std::ostream &s, int flag =0);
124  int setParameter(const std::vector<std::string> &argv, Parameter &param);
125  int updateParameter(int parameterID, Information &info);
126  int activateParameter(int parameterID);
127 
128 /*
129  // Reliability and sensitivity stuff
130  double getInitialTangent (void);
131 
132  double getStressSensitivity (int gradNumber, bool conditional);
133  double getStrainSensitivity (int gradNumber);
134  double getTangentSensitivity (int gradNumber);
135  double getDampTangentSensitivity(int gradNumber);
136  double getRhoSensitivity (int gradNumber);
137  int commitSensitivity (double strainGradient, int gradNumber, int numGrads);
138  */
139 
140  protected:
141  void envelPosCap( double ekelstk, double fy, double ekhard, double dcap,
142  double ekcap, double fRes, double *fuPos, double d, double *f, double *ek );
143  void envelNegCap( double ekelstk, double fy, double ekhard, double dcap,
144  double ekcap, double fRes, double *fuNeg, double d, double *f, double *ek );
145  void recordInfo(int cond =0);
146 
147  };
148 } // end of XC namespace
149 
150 #endif
Definition: Vector.h:82
Definition: DamageModel.h:87
UniaxialMaterial * getCopy(void) const
Virtual constructor.
Definition: Bilinear.cpp:403
int getResponse(int responseID, Information &matInfo)
Returns material response.
Definition: Bilinear.cpp:612
Information about an element.
Definition: Information.h:80
void Print(std::ostream &s, int flag=0)
Imprime el objeto.
Definition: Bilinear.cpp:290
Definition: Matrix.h:82
??.
Definition: Bilinear.h:79
Definition: Parameter.h:65
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
Definition: Response.h:71
Base class for uniaxial materials.
Definition: UniaxialMaterial.h:88