OOFEM 3.0
Loading...
Searching...
No Matches
rheoChM.h
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 - 2025 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#ifndef rheochm_h
36#define rheochm_h
37
39#define keep_track_of_strains
40
42//#include "sm/Materials/linearelasticmaterial.h"
43#include "floatarray.h"
44#include "floatmatrix.h"
45
46#include "matconst.h"
49
51
52#define _IFT_RheoChainMaterial_n "n"
53#define _IFT_RheoChainMaterial_alphaOne "a1"
54#define _IFT_RheoChainMaterial_alphaTwo "a2"
55#define _IFT_RheoChainMaterial_lattice "lattice"
56#define _IFT_RheoChainMaterial_relmatage "relmatage"
57#define _IFT_RheoChainMaterial_begoftimeofinterest "begoftimeofinterest"
58#define _IFT_RheoChainMaterial_endoftimeofinterest "endoftimeofinterest"
59#define _IFT_RheoChainMaterial_timefactor "timefactor"
60#define _IFT_RheoChainMaterial_talpha "talpha"
62
63namespace oofem {
64#define MNC_NPOINTS 30
65#define TIME_DIFF 1.e-10
66
71{
72protected:
74 int nUnits = 0;
76 std :: vector< FloatArray >hiddenVars;
77 std :: vector< FloatArray >tempHiddenVars;
78
84
89 double currentTime = 0.;
90
91#ifdef keep_track_of_strains
92 double thermalStrain = 0.;
93 double tempThermalStrain = 0.;
94#endif
95
96public:
97 RheoChainMaterialStatus(GaussPoint *g, int nunits);
98
99 void printOutputAt(FILE *file, TimeStep *tStep) const override;
100
101 virtual const FloatArray &giveViscoelasticStressVector() const { return stressVector; }
102
103 FloatArray &giveHiddenVarsVector(int i) { return hiddenVars [ i - 1 ]; }
106 void letTempHiddenVarsVectorBe(int i, FloatArray &valueArray);
107
109 void setShrinkageStrainVector(FloatArray src) { shrinkageStrain = std :: move(src); }
110
112 double giveCurrentTime() { return currentTime; }
114 void setCurrentTime(double src) { currentTime = src; }
115
116 void initTempStatus() override;
117 void updateYourself(TimeStep *tStep) override;
118
119 void saveContext(DataStream &stream, ContextMode mode) override;
120 void restoreContext(DataStream &stream, ContextMode mode) override;
121
122
123#ifdef keep_track_of_strains
124 void setTempThermalStrain(double src) { tempThermalStrain = src; }
126 double giveThermalStrain(void) { return thermalStrain; }
127#endif
128
129 // definition
130 const char *giveClassName() const override { return "RheoChainMaterialStatus"; }
131};
132
133
140{
141protected:
143 double talpha = 0.;
145 int nUnits = 0;
147 double relMatAge = 0.;
148
149 bool lattice = false;
151 double nu = 0.;
153 double alphaOne = 0., alphaTwo = 0.;
155 mutable double EparValTime = -1.;
156
158 double begOfTimeOfInterest = 0.; // local one or taken from e-model
160 double endOfTimeOfInterest = 0.; // local one or taken from e-model
162 // LinearElasticMaterial *linearElasticMaterial = nullptr;
164
167 //FloatArray relaxationTimes;
172
178 double timeFactor = 0.;
179
180public:
181 RheoChainMaterial(int n, Domain *d);
182 virtual ~RheoChainMaterial();
183
185 const FloatArray &reducedStrain, TimeStep *tStep) const override;
186
188 {
189 FloatArray answer;
190 const_cast< RheoChainMaterial * >( this )->giveRealStressVector(answer, gp, strain, tStep);
191 return answer;
192 }
194 {
195 FloatArray answer;
196 const_cast< RheoChainMaterial * >( this )->giveRealStressVector(answer, gp, strain, tStep);
197 return answer;
198 }
200 {
201 FloatArray answer;
202 const_cast< RheoChainMaterial * >( this )->giveRealStressVector(answer, gp, strain, tStep);
203 return answer;
204 }
206 {
207 FloatArray answer;
208 const_cast< RheoChainMaterial * >( this )->giveRealStressVector(answer, gp, strain, tStep);
209 return answer;
210 }
212 {
213 FloatArray answer;
214 const_cast< RheoChainMaterial * >( this )->giveRealStressVector(answer, gp, strain, tStep);
215 return answer;
216 }
218 {
219 FloatArray answer;
220 const_cast< RheoChainMaterial * >( this )->giveRealStressVector(answer, gp, strain, tStep);
221 return answer;
222 }
223
225
226 /* virtual void giveThermalDilatationVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep)
227 * { answer.clear(); }*/
228
230 virtual double giveEModulus(GaussPoint *gp, TimeStep *tStep) const = 0;
231
232 /* virtual double giveIncrementalModulus(GaussPoint *gp, TimeStep *tStep) {
233 * if ( (tStep->giveIntrinsicTime() < this->castingTime) && ( this->zeroStiffness > 0. ) ) {
234 * return this->zeroStiffness;
235 * } else {
236 * return this->giveEModulus(gp, tStep);
237 * }
238 * }*/
239
241 virtual FloatArray computeCharCoefficients(double tPrime, GaussPoint *gp, TimeStep *tStep) const = 0;
242
243 // identification and auxiliary functions
244 bool hasMaterialModeCapability(MaterialMode mode) const override;
245
246 bool hasCastingTimeSupport() const override { return true; }
247
248 const char *giveClassName() const override { return "RheoChainMaterial"; }
249 void initializeFrom(InputRecord &ir) override;
250
251 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override;
252
253 // store & restore context functions
254 void saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp) override;
255 void restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp) override;
256
266 /* void giveStiffnessMatrix(FloatMatrix &answer,
267 * MatResponseMode mode,
268 * GaussPoint *gp,
269 * TimeStep *tStep) override;
270 */
271
272 FloatMatrixF< 6, 6 >give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override;
273 FloatMatrixF< 3, 3 >givePlaneStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override;
274 FloatMatrixF< 4, 4 >givePlaneStrainStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override;
275 FloatMatrixF< 1, 1 >give1dStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override;
276
277 // maybe not needed afterall?
278 // FloatMatrixF< 3, 3 >give2dLatticeStiffnessMatrix(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const;
279
280 // FloatMatrixF< 6, 6 >give3dLatticeStiffnessMatrix(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const;
281
282 FloatArray computeStressIndependentStrainVector(GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const override;
283
293 GaussPoint *gp,
294 TimeStep *tStep,
295 ValueModeType mode) const
296 { answer.clear(); }
297
298 // Note: must take LoadResponseMode into account
307 virtual void giveEigenStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const { }
308
309 std::unique_ptr<MaterialStatus> CreateStatus(GaussPoint *gp) const override;
310
311 double giveAlphaOne() const { return this->alphaOne; }
312 double giveAlphaTwo() const { return this->alphaTwo; }
313
315 double givePoissonsRatio() const { return nu; }
316
318 virtual double computeCreepFunction(double t, double t_prime, GaussPoint *gp, TimeStep *tStep) const = 0;
319
321 bool isActivated(TimeStep *tStep) const override {
322 if ( this->preCastingTimeMat > 0 ) {
323 return true;
324 } else {
325 return Material :: isActivated(tStep);
326 }
327 }
328
330 virtual double giveEquivalentTime(GaussPoint *gp, TimeStep *tStep) const
331 { return ( tStep->giveTargetTime() - tStep->giveTimeIncrement() / 2 ); }
332
333
334protected:
339 virtual bool hasIncrementalShrinkageFormulation() const { return false; }
340
351 static FloatArray generateLogTimeScale(double from, double to, int nsteps);
352 const FloatArray &giveDiscreteTimes() const;
353
369 void computeDiscreteRelaxationFunction(FloatArray &answer, const FloatArray &tSteps, double t0, double tr, GaussPoint *gp, TimeStep *tStep) const;
370
372 void giveUnitComplianceMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep) const;
374 void giveUnitStiffnessMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep) const;
375
377 virtual void updateEparModuli(double tPrime, GaussPoint *gp, TimeStep *tStep) const;
378
380 double giveEparModulus(int iChain) const;
381
383 virtual void computeCharTimes();
384
386 double giveCharTime(int) const;
387
389 virtual double giveCharTimeExponent(int i) const { return 1.0; }
390
392 // LinearElasticMaterial *giveLinearElasticMaterial();
394
397
408 TimeStep *tStep, ValueModeType mode) const;
409};
410} // end namespace oofem
411#endif // rheochm_h
int preCastingTimeMat
Material existing before casting time - optional parameter, zero by default.
Definition material.h:118
double giveCurrentTime()
Returns current time - see explanation near initTempStatus in giveRealStressVector.
Definition rheoChM.h:112
RheoChainMaterialStatus(GaussPoint *g, int nunits)
Definition rheoChM.C:674
int nUnits
Number of units in the chain.
Definition rheoChM.h:74
const char * giveClassName() const override
Definition rheoChM.h:130
void setCurrentTime(double src)
Stores current time.
Definition rheoChM.h:114
void setTempThermalStrain(double src)
Definition rheoChM.h:124
FloatArray & giveTempHiddenVarsVector(int i)
Definition rheoChM.h:104
void updateYourself(TimeStep *tStep) override
Definition rheoChM.C:725
void initTempStatus() override
Definition rheoChM.C:742
void setShrinkageStrainVector(FloatArray src)
Definition rheoChM.h:109
std ::vector< FloatArray > hiddenVars
Hidden (internal) variables, the meaning of which depends on the type of chain.
Definition rheoChM.h:76
FloatArray * giveShrinkageStrainVector()
Definition rheoChM.h:108
void restoreContext(DataStream &stream, ContextMode mode) override
Definition rheoChM.C:770
void saveContext(DataStream &stream, ContextMode mode) override
Definition rheoChM.C:752
FloatArray & giveHiddenVarsVector(int i)
Definition rheoChM.h:103
double giveTempThermalStrain(void)
Definition rheoChM.h:125
void letTempHiddenVarsVectorBe(int i, FloatArray &valueArray)
Definition rheoChM.C:683
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
Definition rheoChM.C:695
std ::vector< FloatArray > tempHiddenVars
Definition rheoChM.h:77
virtual const FloatArray & giveViscoelasticStressVector() const
Definition rheoChM.h:101
FloatArray * letHiddenVarsVectorBe(int i, FloatArray *)
FloatArrayF< 3 > giveRealStressVector_PlaneStress(const FloatArrayF< 3 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector_StressControl.
Definition rheoChM.h:199
double talpha
thermal dilatation coeff.
Definition rheoChM.h:143
bool hasMaterialModeCapability(MaterialMode mode) const override
Definition rheoChM.C:61
virtual double giveEModulus(GaussPoint *gp, TimeStep *tStep) const =0
Evaluation of the incremental modulus.
double giveEndOfTimeOfInterest()
Access to the time up to which the response should be accurate.
Definition rheoChM.C:629
FloatMatrixF< 3, 3 > givePlaneStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
Definition rheoChM.C:509
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
Definition rheoChM.C:558
StructuralMaterial * linearElasticMaterial
Associated linearElasticMaterial, with E = 1.
Definition rheoChM.h:163
FloatMatrixF< 6, 6 > give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
Definition rheoChM.C:486
bool isActivated(TimeStep *tStep) const override
Extended meaning: returns true if the material is cast (target time > casting time) or the precasing ...
Definition rheoChM.h:321
const FloatArray & giveDiscreteTimes() const
Definition rheoChM.C:260
FloatMatrixF< 4, 4 > givePlaneStrainStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
Definition rheoChM.C:526
int nUnits
Number of (Maxwell or Kelvin) units in the rheologic chain.
Definition rheoChM.h:145
double relMatAge
Physical age of the material at castingTime.
Definition rheoChM.h:147
void computeDiscreteRelaxationFunction(FloatArray &answer, const FloatArray &tSteps, double t0, double tr, GaussPoint *gp, TimeStep *tStep) const
Definition rheoChM.C:197
void initializeFrom(InputRecord &ir) override
Definition rheoChM.C:565
virtual double giveEquivalentTime(GaussPoint *gp, TimeStep *tStep) const
By default returns equivalent time in the middle of the time step.
Definition rheoChM.h:330
void saveIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp) override
Definition rheoChM.C:641
void giveUnitStiffnessMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep) const
Evaluation of elastic stiffness matrix for unit Young's modulus.
Definition rheoChM.C:267
const char * giveClassName() const override
Definition rheoChM.h:248
virtual void giveShrinkageStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
Definition rheoChM.h:292
FloatArrayF< 1 > giveRealStressVector_1d(const FloatArrayF< 1 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector_StressControl.
Definition rheoChM.h:205
double giveAlphaTwo() const
Definition rheoChM.h:312
double giveCharTime(int) const
Access to the characteristic time of a given unit.
Definition rheoChM.C:396
FloatMatrixF< 1, 1 > give1dStressStiffMtrx(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
Definition rheoChM.C:543
double endOfTimeOfInterest
Time (age???) up to which the model should give a good approximation.
Definition rheoChM.h:160
FloatArray EparVal
Partial moduli of individual units.
Definition rheoChM.h:166
void giveUnitComplianceMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep) const
Evaluation of elastic compliance matrix for unit Young's modulus.
Definition rheoChM.C:286
FloatArrayF< 6 > giveThermalDilatationVector(GaussPoint *gp, TimeStep *tStep) const override
Definition rheoChM.C:171
void giveRealStressVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep) const override
Definition rheoChM.C:72
double begOfTimeOfInterest
Time from which the model should give a good approximation. Optional field. Default value is 0....
Definition rheoChM.h:158
virtual void computeCharTimes()
Evaluation of characteristic times.
Definition rheoChM.C:402
RheoChainMaterial(int n, Domain *d)
Definition rheoChM.C:48
virtual ~RheoChainMaterial()
Definition rheoChM.C:52
FloatArrayF< 5 > giveRealStressVector_PlateLayer(const FloatArrayF< 5 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector_StressControl.
Definition rheoChM.h:217
virtual double computeCreepFunction(double t, double t_prime, GaussPoint *gp, TimeStep *tStep) const =0
Evaluation of the creep compliance function at time t when loading is acting from time t_prime.
void restoreIPContext(DataStream &stream, ContextMode mode, GaussPoint *gp) override
Definition rheoChM.C:648
double giveEparModulus(int iChain) const
Access to partial modulus of a given unit.
Definition rheoChM.C:303
virtual FloatArray computeCharCoefficients(double tPrime, GaussPoint *gp, TimeStep *tStep) const =0
Evaluation of the moduli of individual units.
double EparValTime
Time for which the partial moduli of individual units have been evaluated.
Definition rheoChM.h:155
double giveAlphaOne() const
Definition rheoChM.h:311
FloatArrayF< 6 > giveRealStressVector_3d(const FloatArrayF< 6 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
Definition rheoChM.h:187
virtual double giveCharTimeExponent(int i) const
Exponent to be used with the char time of a given unit, usually = 1.0.
Definition rheoChM.h:389
virtual bool hasIncrementalShrinkageFormulation() const
Definition rheoChM.h:339
virtual void giveEigenStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
Definition rheoChM.h:307
bool hasCastingTimeSupport() const override
Definition rheoChM.h:246
FloatArray discreteTimeScale
Times at which the errors are evaluated if the least-square method is used.
Definition rheoChM.h:171
virtual void updateEparModuli(double tPrime, GaussPoint *gp, TimeStep *tStep) const
Update of partial moduli of individual chain units.
Definition rheoChM.C:313
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
Definition rheoChM.C:657
FloatArrayF< 2 > giveRealStressVector_2dBeamLayer(const FloatArrayF< 2 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector_StressControl.
Definition rheoChM.h:211
StructuralMaterial * giveLinearElasticMaterial()
Access to the underlying linear elastic material with unit Young's modulus.
Definition rheoChM.C:611
double alphaOne
Parameters for the lattice model.
Definition rheoChM.h:153
void computeTrueStressIndependentStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
Definition rheoChM.C:340
FloatArray charTimes
Characteristic times of individual units (relaxation or retardation times).
Definition rheoChM.h:169
FloatArray computeStressIndependentStrainVector(GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const override
Definition rheoChM.C:370
double nu
Poisson's ratio (assumed to be constant, unaffected by creep).
Definition rheoChM.h:151
FloatArrayF< 4 > giveRealStressVector_PlaneStrain(const FloatArrayF< 4 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector_3d.
Definition rheoChM.h:193
double givePoissonsRatio() const
Returns Poisson's ratio.
Definition rheoChM.h:315
static FloatArray generateLogTimeScale(double from, double to, int nsteps)
Definition rheoChM.C:248
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
FloatArray stressVector
Equilibrated stress vector in reduced form.
StructuralMaterial(int n, Domain *d)
double giveTimeIncrement()
Returns solution step associated time increment.
Definition timestep.h:168
double giveTargetTime()
Returns target time.
Definition timestep.h:164
long ContextMode
Definition contextmode.h:43

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011