52RheoChainMaterial :: ~RheoChainMaterial()
61RheoChainMaterial :: hasMaterialModeCapability(MaterialMode mode)
const
63 return mode == _3dMat || mode == _PlaneStress ||
64 mode == _PlaneStrain || mode == _1dMat ||
65 mode == _PlateLayer || mode == _2dBeamLayer ||
66 mode == _1dLattice || mode == _2dLattice ||
72RheoChainMaterial :: giveRealStressVector(
FloatArray &answer,
83 FloatArray stressIncrement, stressVector, strainIncrement, reducedStrain;
104 zeros.resize(StructuralMaterial :: giveSizeOfVoigtSymVector(gp->giveMaterialMode() ) );
119 tStep, VM_Incremental);
144 Binv.
times(Emodulus);
147 stressIncrement.
beProductOf(Binv, strainIncrement);
151 stressVector.
add(stressIncrement);
157 if ( Material :: isActivated(tStep) ) {
166 answer = stressVector;
179 MaterialMode mMode = gp->giveMaterialMode();
180 if ( mMode == _1dLattice || mMode == _2dLattice || mMode == _3dLattice ) {
182 this->
talpha, 0., 0., 0., 0., 0.
197RheoChainMaterial :: computeDiscreteRelaxationFunction(
FloatArray &answer,
199 double t0,
double tr,
209 double sig0 = 1. / Jtrt0;
213 double totalDeltaSigma = 0.;
214 for (
int k = si; k <= nsteps; k++ ) {
216 for (
int i = si; i <= k - 1; i++ ) {
221 taui = 0.5 * ( t0 + tSteps.
at(i) + tr );
223 taui = t0 + 0.5 * ( tSteps.
at(i) + tSteps.
at(i - 1) );
233 tauk = 0.5 * ( t0 + tSteps.
at(k) + tr );
235 tauk = t0 + 0.5 * ( tSteps.
at(k) + tSteps.
at(k - 1) );
241 totalDeltaSigma += deltaSigma.
at(k);
242 answer.
at(k) = sig0 - totalDeltaSigma;
248RheoChainMaterial :: generateLogTimeScale(
double from,
double to,
int nsteps)
251 double help = log(to / from) / nsteps;
252 for (
int i = 1; i <= nsteps; i++ ) {
253 answer.
at(i) = exp(i * help) * from;
260RheoChainMaterial :: giveDiscreteTimes()
const
297 answer.beInverseOf(tangent);
303RheoChainMaterial :: giveEparModulus(
int iChain)
const
340RheoChainMaterial :: computeTrueStressIndependentStrainVector(
FloatArray &answer,
348 if ( !Material :: isActivated(tStep) ) {
357 auto e0 = StructuralMaterial :: computeStressIndependentStrainVector(gp, tStep, mode);
360 if ( e0.giveSize() ) {
361#ifdef keep_track_of_strains
370RheoChainMaterial :: computeStressIndependentStrainVector(
GaussPoint *gp,
TimeStep *tStep, ValueModeType mode)
const
384 if ( Material :: isActivated(tStep) ) {
396RheoChainMaterial :: giveCharTime(
int i)
const
402RheoChainMaterial :: computeCharTimes()
421 double endTime, Taun1, Tau1, help;
423 double stepMultiplier = 10.;
426 Taun1 = 0.75 * endTime;
435 OOFEM_ERROR(
"begOfTimeOfInterest must be a positive number");
438 nsteps = ( int ) ( ( log(Taun1) - log(Tau1) ) / log(stepMultiplier) + 1. );
443 this->
nUnits = size = nsteps + 2;
450 help = ( log(Taun1) - log(Tau1) ) / (
double ) nsteps;
451 for (
int i = 1; i <= nsteps; i++ ) {
452 charTimes.at(i + 1) = exp(log(Tau1) + help * i);
486RheoChainMaterial :: give3dMaterialStiffnessMatrix(MatResponseMode mode,
GaussPoint *gp,
TimeStep *tStep)
const
499 return sMat->give3dMaterialStiffnessMatrix(mode, gp, tStep);
509RheoChainMaterial :: givePlaneStressStiffMtrx(MatResponseMode mode,
516 return sMat->givePlaneStressStiffMtrx(mode, gp, tStep);
526RheoChainMaterial :: givePlaneStrainStiffMtrx(MatResponseMode mode,
533 return sMat->givePlaneStrainStiffMtrx(mode, gp, tStep);
543RheoChainMaterial :: give1dStressStiffMtrx(MatResponseMode mode,
550 return sMat->give1dStressStiffMtrx(mode, gp, tStep);
557std::unique_ptr<MaterialStatus>
560 return std::make_unique<RheoChainMaterialStatus>(gp,
nUnits);
567 StructuralMaterial :: initializeFrom(ir);
611RheoChainMaterial :: giveLinearElasticMaterial()
629RheoChainMaterial :: giveEndOfTimeOfInterest()
643 Material :: saveIPContext(stream, mode, gp);
650 Material :: restoreIPContext(stream, mode, gp);
659 if ( type == IST_ThermalStrainTensor ) {
666 return StructuralMaterial :: giveIPValue(answer, gp, type, tStep);
674RheoChainMaterialStatus :: RheoChainMaterialStatus(
GaussPoint *g,
int nunits) :
683RheoChainMaterialStatus :: letTempHiddenVarsVectorBe(
int i,
FloatArray &valueArray)
688 OOFEM_ERROR(
"unit number exceeds the specified limit");
695RheoChainMaterialStatus :: printOutputAt(FILE *file,
TimeStep *tStep)
const
699 StructuralMaterialStatus :: printOutputAt(file, tStep);
701 fprintf(file,
"{hidden variables: ");
702 for (
int i = 0; i <
nUnits; i++ ) {
705 fprintf(file,
"%f ", val);
712 fprintf(file,
"shrinkageStrain: {");
714 fprintf(file,
"%f ", val);
720 fprintf(file,
"}\n");
725RheoChainMaterialStatus :: updateYourself(
TimeStep *tStep)
727 StructuralMaterialStatus :: updateYourself(tStep);
729 for (
int i = 0; i <
nUnits; i++ ) {
735#ifdef keep_track_of_strains
742RheoChainMaterialStatus :: initTempStatus()
744 StructuralMaterialStatus :: initTempStatus();
746#ifdef keep_track_of_strains
754 StructuralMaterialStatus :: saveContext(stream, mode);
757 for (
int i = 0; i <
nUnits; i++ ) {
772 StructuralMaterialStatus :: restoreContext(stream, mode);
775 for (
int i = 0; i <
nUnits; i++ ) {
Domain * giveDomain() const
Domain * domain
Link to domain object, useful for communicating with other FEM components.
Index giveSize() const
Returns the size of receiver.
void beDifferenceOf(const FloatArray &a, const FloatArray &b)
void zero()
Zeroes all coefficients of receiver.
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
void add(const FloatArray &src)
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
int preCastingTimeMat
Material existing before casting time - optional parameter, zero by default.
virtual void initTempStatus(GaussPoint *gp) const
double giveCurrentTime()
Returns current time - see explanation near initTempStatus in giveRealStressVector.
double giveThermalStrain(void)
FloatArray shrinkageStrain
int nUnits
Number of units in the chain.
void setCurrentTime(double src)
Stores current time.
void setTempThermalStrain(double src)
void setShrinkageStrainVector(FloatArray src)
std ::vector< FloatArray > hiddenVars
Hidden (internal) variables, the meaning of which depends on the type of chain.
std ::vector< FloatArray > tempHiddenVars
virtual const FloatArray & giveViscoelasticStressVector() const
double talpha
thermal dilatation coeff.
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.
StructuralMaterial * linearElasticMaterial
Associated linearElasticMaterial, with E = 1.
bool isActivated(TimeStep *tStep) const override
Extended meaning: returns true if the material is cast (target time > casting time) or the precasing ...
int nUnits
Number of (Maxwell or Kelvin) units in the rheologic chain.
double relMatAge
Physical age of the material at castingTime.
void giveUnitStiffnessMatrix(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep) const
Evaluation of elastic stiffness matrix for unit Young's modulus.
virtual void giveShrinkageStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
double endOfTimeOfInterest
Time (age???) up to which the model should give a good approximation.
FloatArray EparVal
Partial moduli of individual units.
double begOfTimeOfInterest
Time from which the model should give a good approximation. Optional field. Default value is 0....
virtual void computeCharTimes()
Evaluation of characteristic times.
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.
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.
virtual bool hasIncrementalShrinkageFormulation() const
virtual void giveEigenStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
FloatArray discreteTimeScale
Times at which the errors are evaluated if the least-square method is used.
StructuralMaterial * giveLinearElasticMaterial()
Access to the underlying linear elastic material with unit Young's modulus.
double alphaOne
Parameters for the lattice model.
void computeTrueStressIndependentStrainVector(FloatArray &answer, GaussPoint *gp, TimeStep *tStep, ValueModeType mode) const
FloatArray charTimes
Characteristic times of individual units (relaxation or retardation times).
double nu
Poisson's ratio (assumed to be constant, unaffected by creep).
static FloatArray generateLogTimeScale(double from, double to, int nsteps)
const FloatArray & giveStrainVector() const
Returns the const pointer to receiver's strain vector.
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
StructuralMaterial(int n, Domain *d)
virtual void giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const
void giveStressDependentPartOfStrainVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrainVector, TimeStep *tStep, ValueModeType mode) const
#define _IFT_Material_castingtime
double sum(const FloatArray &x)
FloatArrayF< N > zeros()
For more readable code.
#define _IFT_RheoChainMaterial_endoftimeofinterest
#define _IFT_RheoChainMaterial_talpha
#define _IFT_RheoChainMaterial_relmatage
#define _IFT_RheoChainMaterial_lattice
#define _IFT_RheoChainMaterial_alphaOne
#define _IFT_RheoChainMaterial_n
#define _IFT_RheoChainMaterial_begoftimeofinterest
#define _IFT_RheoChainMaterial_timefactor
#define _IFT_RheoChainMaterial_alphaTwo