xc
FluidSolidPorousMaterial.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 // $Revision: 1.11 $
29 // $Date: 2003/10/07 21:20:48 $
30 // $Source: /usr/local/cvs/OpenSees/SRC/material/nD/soil/FluidSolidPorousMaterial.h,v $
31 
32 // Written: ZHY
33 // Created: August 2000
34 // Revision: A
35 //
36 // Description: This file contains the class prototype for FluidSolidPorousMaterial.
37 //
38 // What: "@(#) FluidSolidPorousMaterial.h, revA"
39 
40 #ifndef FluidSolidPorousMaterial_h
41 #define FluidSolidPorousMaterial_h
42 
43 #include "material/nD/soil/SoilMaterialBase.h"
44 
45 namespace XC {
46 class Response;
47 
51 //
53 //
60  {
61  private:
62  static std::vector<double> combinedBulkModulusx;
63  static double pAtm;
64  NDMaterial *theSoilMaterial;
65  mutable double trialExcessPressure;
66  double currentExcessPressure;
67  double trialVolumeStrain;
68  double currentVolumeStrain;
69  mutable double initMaxPress;
70 
71  static Vector workV3;
72  static Vector workV6;
73  static Matrix workM3;
74  static Matrix workM6;
75 
76  void free_mem(void);
77  void alloc(const NDMaterial *);
78  protected:
79  int sendData(Communicator &);
80  int recvData(const Communicator &);
81  public:
82  // Initialization constructor
83  FluidSolidPorousMaterial(int tag= 0);
84  FluidSolidPorousMaterial(int tag, int nd,const NDMaterial &soilMat, double combinedBulkModul, double atm=101.);
87 
88  // Destructor: clean up memory storage space.
89  virtual ~FluidSolidPorousMaterial();
90 
91  // Sets the values of the trial strain tensor.
92  int setTrialStrain(const Vector &strain);
93 
94  // Sets the values of the trial strain and strain rate tensors.
95  int setTrialStrain(const Vector &v, const Vector &r);
96 
97  int setTrialStrainIncr(const Vector &v);
98  int setTrialStrainIncr(const Vector &v, const Vector &r);
99 
100  // Calculates current tangent stiffness.
101  const Matrix &getTangent(void) const;
102  const Matrix &getInitialTangent(void) const;
103 
104  double getRho(void) const;
105 
106  // Calculates the corresponding stress increment(rate), for a given strain increment.
107  const Vector &getStress(void) const;
108  const Vector &getStrain(void) const;
109  const Vector &getCommittedStress(void);
110  const Vector &getCommittedStrain(void);
111  const Vector &getCommittedPressure(void);
112 
113  // Accepts the current trial strain values as being on the solution path, and updates
114  // all model parameters related to stress/strain states. Return 0 on success.
115  int commitState(void);
116 
117  // Revert the stress/strain states to the last committed states. Return 0 on success.
118  int revertToLastCommit(void);
119 
120  int revertToStart(void);
121 
122  // Return an exact copy of itself.
123  NDMaterial *getCopy(void) const;
124 
125  // Return a copy of itself if "code"="PlaneStrain" or "ThreeDimensional", otherwise return null.
126  NDMaterial *getCopy(const std::string &) const;
127 
128  int sendSelf(Communicator &);
129  int recvSelf(const Communicator &);
130  Response *setResponse(const std::vector<std::string> &argv, Information &matInfo);
131  int getResponse(int responseID, Information &matInformation);
132  void Print(std::ostream &s, int flag =0) const;
133 
134  int updateParameter(int responseID, Information &eleInformation);
135 
136  // RWB; PyLiq1 & TzLiq1 need to see the excess pore pressure and initial stresses.
137  friend class PyLiq1;
138  friend class TzLiq1;
139  };
140 } // end of XC namespace
141 
142 #endif
const Matrix & getTangent(void) const
Return the material tangent stiffness.
Definition: FluidSolidPorousMaterial.cpp:216
Float vector abstraction.
Definition: Vector.h:94
FluidSolidPorousMaterial & operator=(const FluidSolidPorousMaterial &tro)
Assignment operator.
Definition: FluidSolidPorousMaterial.cpp:125
int getResponse(int responseID, Information &matInformation)
Returns material response.
Definition: FluidSolidPorousMaterial.cpp:433
Material that couples the responses of two phases: fluid and solid.
Definition: SoilMaterialBase.h:59
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: FluidSolidPorousMaterial.cpp:373
Information about an element.
Definition: Information.h:81
const Matrix & getInitialTangent(void) const
Return the material initial stiffness.
Definition: FluidSolidPorousMaterial.cpp:236
Communication parameters between processes.
Definition: Communicator.h:66
Base class response objects.
Definition: Response.h:81
const Vector & getCommittedStrain(void)
Returns committed strains.
Definition: FluidSolidPorousMaterial.cpp:299
void Print(std::ostream &s, int flag=0) const
Print stuff.
Definition: FluidSolidPorousMaterial.cpp:457
Uniaxial p-y material that incorporates liquefaction effects.
Definition: PyLiq1.h:61
const Vector & getStress(void) const
Returns the material stress vector at the current trial strain.
Definition: FluidSolidPorousMaterial.cpp:249
int updateParameter(int responseID, Information &eleInformation)
Updates the parameter identified by parameterID with info.
Definition: FluidSolidPorousMaterial.cpp:281
NDMaterial * getCopy(void) const
Virtual constructor.
Definition: FluidSolidPorousMaterial.cpp:348
double getRho(void) const
Get material density.
Definition: FluidSolidPorousMaterial.cpp:246
const Vector & getStrain(void) const
Returns strain.
Definition: FluidSolidPorousMaterial.cpp:315
int recvSelf(const Communicator &)
Receives object through the communicator argument.
Definition: FluidSolidPorousMaterial.cpp:397
const Vector & getCommittedStress(void)
Returns committed stresses.
Definition: FluidSolidPorousMaterial.cpp:293
Uniaxial t-z material that incorporates liquefaction effects.
Definition: TzLiq1.h:61
Material that couples the responses of two phases: fluid and solid.
Definition: FluidSolidPorousMaterial.h:59
int sendSelf(Communicator &)
Sends object through the communicator argument.
Definition: FluidSolidPorousMaterial.cpp:383
int commitState(void)
Commit the state of the material.
Definition: FluidSolidPorousMaterial.cpp:320
Base class for 2D and 3D materials.
Definition: NDMaterial.h:101
int setTrialStrain(const Vector &strain)
Sets the value of the trial strain vector, that value used by {getStress()} and getTangent(), to be strain.
Definition: FluidSolidPorousMaterial.cpp:142
int revertToStart(void)
Revert the material to its initial state.
Definition: FluidSolidPorousMaterial.cpp:340
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Matrix of floats.
Definition: Matrix.h:111
int setTrialStrainIncr(const Vector &v)
Set trial strain increment.
Definition: FluidSolidPorousMaterial.cpp:179
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: FluidSolidPorousMaterial.cpp:363
virtual ~FluidSolidPorousMaterial()
Destructor.
Definition: FluidSolidPorousMaterial.cpp:138