20 STATE ni1 , STATE ni2 , STATE G12 , STATE G13 ,
24 fIdfMax(6),fE1(E1), fE2(E2), fG12(G12), fG13(G13), fG23(G23),
25 fh(h),ff(f),fmi(1./(-1.+ni1*ni2)),fni1(ni1),fni2(ni2),
27 fRmat(6,6,0.),fRmatT(6,6,0.),
28 fKxxR(6,6,0.),fKyyR(6,6,0.),
29 fKxyR(6,6,0.),fKyxR(6,6,0.),
30 fBx0R(6,6,0.),fB0xR(6,6,0.),
31 fBy0R(6,6,0.),fB0yR(6,6,0.),
33 fKxx(6,6,0.),fKyy(6,6,0.),
34 fKxy(6,6,0.),fKyx(6,6,0.),
35 fBx0(6,6,0.),fB0x(6,6,0.),
36 fBy0(6,6,0.),fB0y(6,6,0.),
40 Small = E1*STATE(1.E-5);
42 mi = 1.0/(-1.0 + ni1 * ni2);
57 fKxx(0,4) = -E1*f*h*mi;
58 fKxx(1,1) = G12*h/2. + h*Small/4.;
59 fKxx(1,3) = -f*G12*h/2.;
60 fKxx(2,2) = G13*h*k/2.;
61 fKxx(3,1) = -f*G12*h/2.;
62 fKxx(3,3) = f*f*G12*h/2. + G12*h*h*h/24.;
63 fKxx(4,0) = -E1*f*h*mi;
64 fKxx(4,4) = -E1*f*f*h*mi - E1*h*h*h*mi/12.;
66 fKxy(0,1) = -E1*h*mi*ni2;
67 fKxy(0,3) = E1*f*h*mi*ni2;
68 fKxy(1,0) = G12*h/2. - h*Small/4.;
69 fKxy(1,4) = f*G12*h/2.;
70 fKxy(3,0) = -f*G12*h/2.;
71 fKxy(3,4) = -f*f*G12*h/2. - G12*h*h*h/24.;
72 fKxy(4,1) = -E1*f*h*mi*ni2;
73 fKxy(4,3) = E1*f*f*h*mi*ni2 + E1*h*h*h*mi*ni2/12.;
77 fKyy(0,0) = G12*h/2. + h*Small/4.;
78 fKyy(0,4) = f*G12*h/2.;
80 fKyy(1,3) = E2*f*h*mi;
81 fKyy(2,2) = G23*h*k/2.;
82 fKyy(3,1) = E2*f*h*mi;
83 fKyy(3,3) = -E2*f*f*h*mi - E2*h*h*h*mi/12.;
84 fKyy(4,0) = f*G12*h/2.;
85 fKyy(4,4) = f*f*G12*h/2. + G12*h*h*h/24.;
87 fB0x(4,2) = G13*h*k/2.;
88 fB0x(5,1) = -h*Small/2.;
92 fB0y(3,2) = -G23*h*k/2.;
93 fB0y(5,0) = h*Small/2.;
97 fB00(3,3) = G23*h*k/2.;
98 fB00(4,4) = G13*h*k/2.;
118 for(i=0;i<numl;i++) {
160 for (
int r=0; r<axes.Rows(); r++) {
161 for (
int c=0; c<axes.Cols(); c++) {
162 axes(r,c) = data.
axes(r,c);
167 PZError <<
"TPZMatPlaca2.contr, inconsistent input data : phi.Cols() = " 168 << phi.
Cols() <<
" dphi.Cols + " << dphi.
Cols() <<
169 " phi.Rows = " << phi.
Rows() <<
" dphi.Rows = " <<
177 STATE Dax1n1, Dax1n2, Dax2n1, Dax2n2;
197 Kn1n1 =
fKxxR * Dax1n1 * Dax1n1 +
fKyyR * Dax1n2 * Dax1n2 +
198 fKxyR * Dax1n1 * Dax1n2 +
fKyxR * Dax1n1 * Dax1n2 ;
200 Kn2n2 =
fKxxR * Dax2n1 * Dax2n1 +
fKyyR * Dax2n2 * Dax2n2 +
201 fKxyR * Dax2n2 * Dax2n1 +
fKyxR * Dax2n2 * Dax2n1;
203 Kn1n2 =
fKxxR * Dax1n1 * Dax2n1 +
fKyyR * Dax1n2 * Dax2n2 +
204 fKxyR * Dax1n1 * Dax2n2 +
fKyxR * Dax1n2 * Dax2n1;
206 Kn2n1 =
fKxxR * Dax2n1 * Dax1n1 +
fKyyR * Dax2n2 * Dax1n2 +
207 fKxyR * Dax2n1 * Dax1n2 +
fKyxR * Dax2n2 * Dax1n1;
232 int nshape = phi.
Rows();
245 for(i=0; i<nshape; i++) {
246 for(idf=0; idf<3; idf++) {
247 ef(
fIdfMax*i+idf) += weight*contrib[
idf]*phi(i,0);
249 for(idf=3; idf<
fIdfMax; idf++) ef(fIdfMax*i+idf) += weight*
fXF[
idf]*phi(i,0);
250 for(j=0; j<nshape; j++) {
251 STATE dphi_0i(dphi(0,i)),dphi_1i(dphi(1,i)),dphi_0j(dphi(0,j)),dphi_1j(dphi(1,j));
252 STATE phi_i(phi(i,0)),phi_j(phi(j,0));
253 KIJ = ((STATE)weight)*(dphi_0i*dphi_0j*Kn1n1+
254 dphi_0i*dphi_1j*Kn1n2+
255 dphi_1i*dphi_0j*Kn2n1+
256 dphi_1i*dphi_1j*Kn2n2+
257 dphi_0i*phi_j *Bn10 +
258 dphi_1i*phi_j *Bn20 +
259 phi_i *dphi_0j*B0n1 +
260 phi_i *dphi_1j*B0n2 +
261 phi_i *phi_j *B000 );
263 ek(i*fIdfMax+idf,j*fIdfMax+jdf) += KIJ(idf,jdf);
280 PZError <<
"TPZMatPlaca2.aplybc, unknown boundary condition type :" <<
281 bc.
Type() <<
" boundary condition ignored\n";
285 int numnod = ek.
Rows()/numdof;
292 for(in=0 ; in<numnod ; ++in){
293 for(idf = 0;idf<r;idf++) {
296 for(jn=0 ; jn<numnod ; ++jn) {
297 for(idf = 0;idf<r;idf++) {
298 ek(in*r+idf,jn*r+idf) +=
gBigNumber*phi(in,0)*phi(jn,0)*weight;
305 for(in=0 ; in<numnod ; ++in){
306 for(idf = 0;idf<r;idf++) {
307 (ef)(in*r+idf,0) += phi(in,0)*bc.
Val2()(
idf,0)*weight;
313 for(in=0 ; in<numnod ; ++in){
314 for(idf = 0;idf<r;idf++) {
315 (ef)(in*r+idf,0) += phi(in,0)*bc.
Val2()(
idf,0)*weight;
317 for(jn=0 ; jn<numnod ; ++jn) {
318 for(idf = 0;idf<r;idf++) {
319 for(jdf = 0;jdf<r;jdf++) {
320 ek(in*r+idf,jn*r+jdf) += bc.
Val1()(
idf,jdf)*phi(in,0)*phi(jn,0)*weight;
331 PZError <<
"TPZMatPlaca2::Flux is called\n";
336 PZError <<
"TPZMatPlaca2::Errors is called\n";
348 if(!strcmp(name.c_str(),
"State"))
return 0;
349 if(!strcmp(name.c_str(),
"Deslocx"))
return 2;
350 if(!strcmp(name.c_str(),
"Deslocy"))
return 3;
351 if(!strcmp(name.c_str(),
"Deslocz"))
return 4;
352 if(!strcmp(name.c_str(),
"MnVec"))
return 5;
353 if(!strcmp(name.c_str(),
"MaVec"))
return 50;
354 if(!strcmp(name.c_str(),
"Vn1"))
return 8;
355 if(!strcmp(name.c_str(),
"Vn2"))
return 9;
356 if(!strcmp(name.c_str(),
"Sign1"))
return 10;
357 if(!strcmp(name.c_str(),
"Sign2"))
return 11;
358 if(!strcmp(name.c_str(),
"Taun1n2"))
return 12;
359 if(!strcmp(name.c_str(),
"NaVec"))
return 54;
360 if(!strcmp(name.c_str(),
"Taun1n3"))
return 13;
361 if(!strcmp(name.c_str(),
"Taun2n3"))
return 14;
362 if(!strcmp(name.c_str(),
"Displacement"))
return 15;
372 if(var == 2)
return 1;
373 if(var == 3)
return 1;
374 if(var == 4)
return 1;
375 if(var == 5)
return 3;
376 if(var== 50)
return 3;
377 if(var == 8)
return 1;
378 if(var == 9)
return 1;
379 if(var == 10)
return 1;
380 if(var == 11)
return 1;
381 if(var == 12)
return 1;
382 if(var == 54)
return 3;
383 if(var == 13)
return 1;
384 if(var == 14)
return 1;
385 if(var == 15)
return 3;
427 for(idf=0; idf<6; idf++) {
431 for(jdf=0; jdf<6; jdf++) {
432 Soln[
idf] +=
fRmat(idf,jdf)*Sol[jdf];
433 DSolnax(0,idf) +=
fRmat(idf,jdf)*DSol(0,jdf);
434 DSolnax(1,idf) +=
fRmat(idf,jdf)*DSol(1,jdf);
439 Rmatan(0,0)= axes(0,0)*
fnaxes(0,0) + axes(0,1)*
fnaxes(0,1) + axes(0,2)*
fnaxes(0,2);
440 Rmatan(1,0)= axes(0,0)*
fnaxes(1,0) + axes(0,1)*
fnaxes(1,1) + axes(0,2)*
fnaxes(1,2);
441 Rmatan(0,1)= axes(1,0)*
fnaxes(0,0) + axes(1,1)*
fnaxes(0,1) + axes(1,2)*
fnaxes(0,2);
442 Rmatan(1,1)= axes(1,0)*
fnaxes(1,0) + axes(1,1)*
fnaxes(1,1) + axes(1,2)*
fnaxes(1,2);
444 for(idf=0;idf<6;idf++) {
445 DSolnn(0,idf) = Rmatan(0,0)*DSolnax(0,idf)+Rmatan(0,1)*DSolnax(1,idf);
446 DSolnn(1,idf) = Rmatan(1,0)*DSolnax(0,idf)+Rmatan(1,1)*DSolnax(1,idf);
453 -
ff*DSolnn(0,4)-DSolnn(0,0));
462 Mn1n2 =
fG12*
fh*
fh*
fh*(DSolnn(1,4) - DSolnn(0,3))/24.;
463 Mn1n2 += (
ff*
fG12*
fh*(
ff*DSolnn(1,4) + DSolnn(1,0) -
464 ff*DSolnn(0,3) + DSolnn(0,1)))/2.;
478 -
ff*DSolnn(0,4)-DSolnn(0,0));
487 Mn1n2 =
fG12*
fh*
fh*
fh*(DSolnn(1,4) - DSolnn(0,3))/24.;
488 Mn1n2 += (
ff*
fG12*
fh*(
ff*DSolnn(1,4) + DSolnn(1,0) -
489 ff*DSolnn(0,3) + DSolnn(0,1)))/2.;
491 Ma1 = Mn1 * Rmatan(0,0) * Rmatan(0,0) + Mn2*Rmatan(1,0) * Rmatan(1,0) + 2.* Rmatan(0,0) * Rmatan(1,0) * Mn1n2;
493 Ma2 = Mn1 * Rmatan(0,1) * Rmatan(0,1) + Mn2*Rmatan(1,1) * Rmatan(1,1) + 2.* Rmatan(1,1) * Rmatan(0,1) * Mn1n2;
496 Ma1a2 = Mn1n2 * (Rmatan(0,0)*Rmatan(0,0) + Rmatan(1,0) *Rmatan(0,1))+ (Mn1-Mn2)*Rmatan(0,0)*Rmatan(0,1);
507 Vn1 = (
fG12*
fh*k*(Soln[4]+DSolnn(0,2)));
513 Vn2 = (
fG12*
fh*k*(-Soln[3]+ DSolnn(1,2)))/2.;
520 if (var == 10 || var == 54) {
523 Sign1 = -
fE1*
fmi*(
fni2*(-(
ff + z)*DSolnn(1,3) + DSolnn(1,1))+
524 (
ff + z)*DSolnn(0,4) + DSolnn(0,0));
531 if (var == 11 || var == 54) {
534 Sign2=-
fE2*
fmi*(-(
ff + z)*DSolnn(1,3) + DSolnn(1,1) +
535 fni1*((
ff + z)*DSolnn(0,4) + DSolnn(0,0)));
542 if (var == 12 || var == 54) {
545 Taun1n2=(
fG12*((
ff + z)*DSolnn(1,4) + DSolnn(1,0) -
546 (
ff + z)*DSolnn(0,3) + DSolnn(0,1)))/2.;
555 Siga1 = Sign1 * Rmatan(0,0) * Rmatan(0,0) + Sign2*Rmatan(1,0) * Rmatan(1,0) + 2.* Rmatan(0,0) * Rmatan(1,0) * Taun1n2;
557 Siga2 = Sign1 * Rmatan(0,1) * Rmatan(0,1) + Sign2*Rmatan(1,1) * Rmatan(1,1) + 2.* Rmatan(1,1) * Rmatan(0,1) * Taun1n2;
560 Siga1a2 = Taun1n2 * (Rmatan(0,0)*Rmatan(0,0) + Rmatan(1,0) *Rmatan(0,1))+ (Sign1-Sign2)*Rmatan(0,0)*Rmatan(0,1);
565 Solout[2]=Siga1a2*
fh;
570 Taun1n3=
fG13*(Soln[4] + DSolnn(0,2))/2.;
576 Taun2n3=
fG23*(-Soln[3] + DSolnn(1,2))/2.;
virtual void Solution(TPZMaterialData &data, int var, TPZVec< STATE > &Solout)
Returns the solution associated with the var index based on the finite element approximation.
virtual void Execute(const TPZVec< REAL > &x, TPZVec< TVar > &f, TPZFMatrix< TVar > &df)
Performs function computation.
virtual void Solution(TPZVec< STATE > &Sol, TPZFMatrix< STATE > &DSol, TPZFMatrix< REAL > &axes, int var, TPZVec< STATE > &Solout) override
Returns the solution associated with the var index based on the finite element approximation.
TPZFMatrix< STATE > fB00R
TPZFMatrix< STATE > fRmat
TPZManVector< REAL, 3 > x
value of the coordinate at the integration point
clarg::argBool bc("-bc", "binary checkpoints", false)
Templated vector implementation.
TPZFMatrix< STATE > fKyyR
TPZFMatrix< STATE > fRmatT
TPZFMatrix< STATE > fnaxes
virtual int VariableIndex(const std::string &name)
Returns the variable index associated with the name.
virtual int NStateVariables() const override
Returns the number of state variables associated with the material.
clarg::argBool h("-h", "help message", false)
Contains the TPZMatPlaca2 class.
AutoPointerMutexArrayInit tmp
virtual int VariableIndex(const std::string &name) override
Returns the variable index associated with the name.
TPZFMatrix< STATE > fBy0R
TPZFMatrix< STATE > fKxxR
TPZFMatrix< STATE > & Val2(int loadcase=0)
TPZFNMatrix< 220, REAL > phi
vector of shapefunctions (format is dependent on the value of shapetype)
TPZFNMatrix< 660, REAL > dphix
values of the derivative of the shape functions
This abstract class defines the behaviour which each derived class needs to implement.
void SetNAxes(TPZFMatrix< STATE > &n)
Modify the direction of the fibres for the plate.
Contains the TPZBndCond class which implements a boundary condition for TPZMaterial objects...
virtual void Resize(const int64_t newsize, const T &object)
Resizes the vector object reallocating the necessary storage, copying the existing objects to the new...
void Print(std::ostream &out) override
Prints out the data associated with the material.
virtual int ClassId() const override
Define the class id associated with the class.
This class defines the boundary condition for TPZMaterial objects.
ofstream placatest("placatest.dat")
Output file to write data of the test over shell (placa)
virtual void ContributeBC(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef, TPZBndCond &bc) override
It computes a contribution to the stiffness matrix and load vector at one BC integration point...
int64_t Rows() const
Returns number of rows.
virtual int NFluxes() override
Returns the number of components which form the flux function.
TPZFNMatrix< 9, REAL > axes
axes indicating the directions of the derivatives of the shapefunctions
TPZFMatrix< STATE > fB0yR
TPZFMatrix< STATE > & Val1()
TPZFMatrix< STATE > fKxyR
virtual void Flux(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &fl) override
Computes the value of the flux function to be used by ZZ error estimator.
static REAL gBigNumber
Big number to penalization method, used for Dirichlet conditions.
int32_t Hash(std::string str)
int ClassId() const override
Unique identifier for serialization purposes.
TPZFMatrix< STATE > fB0xR
virtual int NSolutionVariables(int var)
Returns the number of variables associated with the variable indexed by var.
virtual void Multiply(const TPZFMatrix< TVar > &A, TPZFMatrix< TVar > &res, int opt=0) const
It mutiplies itself by TPZMatrix<TVar>A putting the result in res.
TPZAutoPointer< TPZFunction< STATE > > fForcingFunction
Pointer to forcing function, it is the right member at differential equation.
TPZMatPlaca2(int num, STATE h, STATE f, STATE E1, STATE E2, STATE ni1, STATE ni2, STATE G12, STATE G13, STATE G23, TPZFMatrix< STATE > &naxes, TPZVec< STATE > &xf)
virtual void Contribute(TPZMaterialData &data, REAL weight, TPZFMatrix< STATE > &ek, TPZFMatrix< STATE > &ef) override
It computes a contribution to the stiffness matrix and load vector at one integration point...
int64_t Cols() const
Returns number of cols.
TPZFMatrix< STATE > fBx0R
TPZFMatrix< STATE > fKyxR
virtual int NSolutionVariables(int var) override
Returns the number of variables associated with the variable indexed by var.
void Transpose(TPZMatrix< TVar > *const T) const override
It makes *T the transpose of current matrix.
#define PZError
Defines the output device to error messages and the DebugStop() function.
virtual void Errors(TPZVec< REAL > &x, TPZVec< STATE > &u, TPZFMatrix< STATE > &dudx, TPZFMatrix< REAL > &axes, TPZVec< STATE > &flux, TPZVec< STATE > &u_exact, TPZFMatrix< STATE > &du_exact, TPZVec< REAL > &values) override
Computes the error due to the difference between the interpolated flux and the flux computed based o...