OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
anisolinearelasticmaterial.C
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #include "linearelasticmaterial.h"
37 #include "structuralms.h"
38 #include "floatmatrix.h"
39 #include "classfactory.h"
40 #include "dynamicinputrecord.h"
41 
42 namespace oofem {
43 REGISTER_Material(AnisotropicLinearElasticMaterial);
44 
47 {
48  IRResultType result; // Required by IR_GIVE_FIELD macro
49 
50  // read the stiffness coefficients arranged by rows from the diagonal to the right (21 values)
51  FloatArray stiffness;
53  if ( stiffness.giveSize() != 21 ) {
54  OOFEM_ERROR( "Incorrect size of stiff - should be 21, is %d\n", stiffness.giveSize() );
55  }
56 
57  // put the stiffness coefficients into a 6x6 matrix
58  int k = 1;
59  for ( int i = 1; i <= 6; i++ ) {
60  stiffmat.at(i, i) = stiffness.at(k++);
61  for ( int j = i + 1; j <= 6; j++ ) {
62  stiffmat.at(i, j) = stiffmat.at(j, i) = stiffness.at(k++);
63  }
64  }
65 
66  // read the thermal expansion coefficients (3 values)
68  if ( alpha.giveSize() == 0 ) {
69  alpha.resize(6);
70  alpha.zero();
71  } else if ( alpha.giveSize() != 6 ) {
72  OOFEM_ERROR( "Incorrect size of talpha - should be 0 or 6, is %d\n", alpha.giveSize() );
73  }
74 
76 }
77 
78 
79 void
81 {
83  FloatArray stiffness(21);
84  int k = 1;
85  for ( int i = 1; i <= 6; i++ ) {
86  for ( int j = i; j <= 6; j++ ) {
87  stiffness.at(k++) = stiffmat.at(i, j);
88  }
89  }
91 
93 }
94 
95 
96 void
98  MatResponseMode mode,
99  GaussPoint *gp,
100  TimeStep *tStep)
101 {
102  answer = stiffmat;
103 
104  if ( ( tStep->giveIntrinsicTime() < this->castingTime ) ) {
105  answer.times(1. - this->preCastStiffnessReduction);
106  }
107 }
108 
109 
110 void
112  GaussPoint *gp, TimeStep *tStep)
113 {
114  answer = alpha;
115 }
116 
117 
120 /*
121  * creates new material status corresponding to this class
122  */
123 {
124  return new StructuralMaterialStatus(1, this->giveDomain(), gp);
125 }
126 } // end namespace oofem
void setField(int item, InputFieldType id)
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
This class implements a structural material status information.
Definition: structuralms.h:65
double preCastStiffnessReduction
artificial isotropic damage to reflect reduction in stiffness for time < castingTime.
virtual void giveThermalDilatationVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
Returns a vector of coefficients of thermal dilatation in direction of each material principal (local...
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
Definition: material.C:110
MatResponseMode
Describes the character of characteristic material matrix.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual MaterialStatus * CreateStatus(GaussPoint *gp) const
Creates new copy of associated status and inserts it into given integration point.
void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
#define OOFEM_ERROR(...)
Definition: error.h:61
void times(double f)
Multiplies receiver by factor f.
Definition: floatmatrix.C:1594
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
double giveIntrinsicTime()
Returns intrinsic time, e.g. time in which constitutive model is evaluated.
Definition: timestep.h:148
Abstract base class representing a material status information.
Definition: matstatus.h:84
virtual void give3dMaterialStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes full 3d material stiffness matrix at given integration point, time, respecting load history ...
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
#define _IFT_AnisotropicLinearElasticMaterial_talpha
Class representing the general Input Record.
Definition: inputrecord.h:101
void zero()
Zeroes all coefficients of receiver.
Definition: floatarray.C:658
Class representing the a dynamic Input Record.
Domain * giveDomain() const
Definition: femcmpnn.h:100
REGISTER_Material(DummyMaterial)
double castingTime
Casting time.
Definition: material.h:113
int giveSize() const
Returns the size of receiver.
Definition: floatarray.h:218
the oofem namespace is to define a context or scope in which all oofem names are defined.
#define _IFT_AnisotropicLinearElasticMaterial_stiff
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:27 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011