16 static LoggerPtr logdata(Logger::getLogger(
"pz.material.elasticity.data"));
40 if(shapetype==data[0].EVecShape){
50 int phc,phr,dphc,dphr,efr,efc,ekr,ekc;
53 int phr_rigid = phirigidbodymode.
Rows();
60 if(phc != 1 || dphr != 2 || phr != dphc || 2*phr+2*phr_rigid != ekr){
61 PZError <<
"\nTPZElasticityMaterial.contr, inconsistent input data : \n" <<
62 "phi.Cols() = " << phi.
Cols() <<
" dphi.Cols() = " << dphi.
Cols() <<
63 " phi.Rows = " << phi.
Rows() <<
" dphi.Rows = " <<
64 dphi.
Rows() <<
"\nek.Rows() = " << ek.
Rows() <<
" ek.Cols() = " 66 "\nef.Rows() = " << ef.
Rows() <<
" ef.Cols() = " 89 REAL Eover1MinNu2 =
E/(1-nu*nu);
90 REAL Eover21PlusNu =
E/(2.*(1+nu));
98 REAL nu2 = (1.-2.*nu)/2.;
99 REAL F =
E/((1.+nu)*(1.-2.*nu));
100 STATE epsx, epsy,epsxy,epsz = 0.;
103 DSolxy(0,0) = data[0].dsol[0](0,0)*axes(0,0)+data[0].dsol[0](1,0)*axes(1,0);
104 DSolxy(1,0) = data[0].dsol[0](0,0)*axes(0,1)+data[0].dsol[0](1,0)*axes(1,1);
106 DSolxy(0,1) = data[0].dsol[0](0,1)*axes(0,0)+data[0].dsol[0](1,1)*axes(1,0);
107 DSolxy(1,1) = data[0].dsol[0](0,1)*axes(0,1)+data[0].dsol[0](1,1)*axes(1,1);
110 epsxy = 0.5*(DSolxy(1,0)+DSolxy(0,1));
114 epsz = -lambda*(epsx+epsy)/(lambda+2.*mu);
121 STATE SigX = lambda*(epsx+epsy+epsz)+2.*mu*epsx +
fPreStressXX;
122 STATE SigY = lambda*(epsx+epsy+epsz)+2.*mu*epsy +
fPreStressYY;
124 STATE SigZ = lambda*(epsx+epsy+epsz)+2.*mu*epsz;
128 for(
int in = 0; in < phr; in++ ) {
129 du(0,0) = dphi(0,in)*axes(0,0)+dphi(1,in)*axes(1,0);
130 du(1,0) = dphi(0,in)*axes(0,1)+dphi(1,in)*axes(1,1);
133 for (
int col = 0; col < efc; col++)
135 ef(2*in, col) += weight * (locforce[0]*phi(in,0) - du(0,0)*(SigX) - du(1,0)*(TauXY));
136 ef(2*in+1, col) += weight * (locforce[1]*phi(in,0) - du(0,0)*(TauXY) - du(1,0)*(SigY));
138 for(
int jn = 0; jn < phr; jn++ ) {
139 du(0,1) = dphi(0,jn)*axes(0,0)+dphi(1,jn)*axes(1,0);
140 du(1,1) = dphi(0,jn)*axes(0,1)+dphi(1,jn)*axes(1,1);
145 ek(2*in,2*jn) += weight * (
146 nu1 * du(0,0)*du(0,1)+ nu2 * du(1,0)*du(1,1)
149 ek(2*in,2*jn+1) += weight * (
150 nu*du(0,0)*du(1,1)+ nu2*du(1,0)*du(0,1)
153 ek(2*in+1,2*jn) += weight * (
154 nu*du(1,0)*du(0,1)+ nu2*du(0,0)*du(1,1)
157 ek(2*in+1,2*jn+1) += weight * (
158 nu1*du(1,0)*du(1,1)+ nu2*du(0,0)*du(0,1)
164 ek(2*in,2*jn) += weight * (
165 Eover1MinNu2 * du(0,0)*du(0,1)+ Eover21PlusNu * du(1,0)*du(1,1)
168 ek(2*in,2*jn+1) += weight * (
169 Eover1MinNu2*nu*du(0,0)*du(1,1)+ Eover21PlusNu*du(1,0)*du(0,1)
172 ek(2*in+1,2*jn) += weight * (
173 Eover1MinNu2*nu*du(1,0)*du(0,1)+ Eover21PlusNu*du(0,0)*du(1,1)
176 ek(2*in+1,2*jn+1) += weight * (
177 Eover1MinNu2*du(1,0)*du(1,1)+ Eover21PlusNu*du(0,0)*du(0,1)
183 for (
int in=0; in<phr; in++) {
184 ek(2*phr,2*in) -= (STATE)phi(in,0)*weight;
185 ek(2*phr+1,2*in+1) -= (STATE)phi(in,0)*weight;
186 ek(2*in,2*phr) -= phi(in,0)*weight;
187 ek(2*in+1,2*phr+1) -= phi(in,0)*weight;
189 ek(2*phr+2,2*in) -= (phi(in,0)*phirigidbodymode(1))*weight;
190 ek(2*phr+2,2*in+1) -= (-phi(in,0)*phirigidbodymode(0))*weight;
191 ek(2*in,2*phr+2) -= (phi(in,0)*phirigidbodymode(1))*weight;
192 ek(2*in+1,2*phr+2) -= (-phi(in,0)*phirigidbodymode(0))*weight;
196 ek(2*phr+3,2*phr) += weight;
197 ek(2*phr,2*phr+3) += weight;
198 ek(2*phr+4,2*phr+1) += weight;
199 ek(2*phr+1,2*phr+4) += weight;
200 ek(2*phr+5,2*phr+2) += weight;
201 ek(2*phr+2,2*phr+5) += weight;
223 val2[0] = bc.
Val2()(0,0);
224 val2[1] = bc.
Val2()(1,0);
238 int phr = phi.
Rows();
258 for(in = 0 ; in < phr; in++) {
264 ef(2*in,il) += BIGNUMBER * v2[0] * phi(in,0) * weight;
265 ef(2*in+1,il) += BIGNUMBER * v2[1] * phi(in,0) * weight;
267 for (jn = 0 ; jn < phi.
Rows(); jn++)
269 ek(2*in,2*jn) += BIGNUMBER * phi(in,0) *phi(jn,0) * weight;
270 ek(2*in+1,2*jn+1) += BIGNUMBER * phi(in,0) *phi(jn,0) * weight;
278 for (in = 0; in < phr; in++)
282 ef(2*in,il) += -val2[0] * phi(in,0) * weight;
283 ef(2*in+1,il) += -val2[1] * phi(in,0) * weight;
292 for(in = 0 ; in < phi.
Rows(); in++)
297 ef(2*in,il) += v2(0,0) * phi(in,0) * weight;
298 ef(2*in+1,il) += v2(1,0) * phi(in,0) * weight;
303 for (jn = 0 ; jn < phi.
Rows(); jn++) {
304 ek(2*in,2*jn) += 1./bc.
Val1()(0,0) * phi(in,0) * phi(jn,0) * weight;
305 ek(2*in+1,2*jn) += bc.
Val1()(1,0) * phi(in,0) * phi(jn,0) * weight;
306 ek(2*in+1,2*jn+1) += 1./bc.
Val1()(1,1) * phi(in,0) * phi(jn,0) * weight;
307 ek(2*in,2*jn+1) += bc.
Val1()(0,1) * phi(in,0) * phi(jn,0) * weight;
void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
int fPlaneStress
Uses plain stress.
STATE GetMU(REAL E, REAL nu) const
int fNumLoadCases
Defines the number of load cases generated by this material.
TPZElasticity2DHybrid()
Default constructor.
Contains definitions to LOGPZ_DEBUG, LOGPZ_INFO, LOGPZ_WARN, LOGPZ_ERROR and LOGPZ_FATAL, and the implementation of the inline InitializePZLOG(string) function using log4cxx library or not. It must to be called out of "#ifdef LOG4CXX" scope.
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
REAL fPreStressYY
Pre Stress Tensor - Sigma YY.
clarg::argBool bc("-bc", "binary checkpoints", false)
REAL fPreStressXY
Pre Stress Tensor - Sigma XY.
MShapeFunctionType fShapeType
This class implements a simple vector storage scheme for a templated class T. Utility.
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
void ContributeVecShapeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc)
TPZAutoPointer< TPZFunction< STATE > > & ForcingFunction()
Returns a procedure as source function for the material.
int ClassId() const override
Returns the solution associated with the var index based on the finite element approximation.
virtual int ClassId() const override
Unique identifier for serialization purposes.
virtual void Read(TPZStream &buf, void *context) override
Reads the element data from a stream.
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
Applies the element boundary conditions.
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
Contains the TPZElasticityMaterial class which implements a two dimensional elastic material in plane...
This class defines the boundary condition for TPZMaterial objects.
virtual ~TPZElasticity2DHybrid()
Default destructor.
int64_t Rows() const
Returns number of rows.
TPZAutoPointer< TPZFunction< STATE > > fElasticity
TPZFMatrix< STATE > & Val1()
REAL E()
Returns the elasticity modulus E.
TPZManVector< STATE, 3 > ff
Forcing vector.
virtual int HasForcingFunction()
Directive that gives true if the material has a forcing function.
virtual void Contribute(TPZVec< TPZMaterialData > &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
Calculates the element stiffness matrix - simulate compaction as aditional variable.
virtual void Write(TPZStream &buf, int withclassid) const override
Saves the element data to a stream.
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
int32_t Hash(std::string str)
Contains TPZMatrix<TVar>class, root matrix class.
STATE GetLambda(REAL E, REAL nu) const
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
This class implements a two dimensional elastic material in plane stress or strain.
int NumLoadCases()
returns the number of load cases for this material object
int Dimension() const override
Returns the model dimension.
int64_t Cols() const
Returns number of cols.
This class implements a two dimensional elastic material in plane stress or strain.
Defines the interface for saving and reading data. Persistency.
REAL fPreStressXX
Pre Stress Tensor - Sigma XX.
REAL fnu_def
Poison coeficient.
REAL fE_def
Elasticity modulus.
Implements an interface to register a class id and a restore function. Persistence.
Non abstract class which implements full matrices with preallocated storage with (N+1) entries...
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
#define PZError
Defines the output device to error messages and the DebugStop() function.