MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMaterialSolidifyingKelvinChain.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2019 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
26#ifndef _GEMA_PLUGIN_MECHANICALMATERIAL_SOLIDIFYINGKELVINCHAIN_H_
27#define _GEMA_PLUGIN_MECHANICALMATERIAL_SOLIDIFYINGKELVINCHAIN_H_
28
29#include "gmpMechanicalConfig.h"
30#include <gmpFemPhysics.h>
31#include <gmMathUtils.h>
32
34#include "gmpMechanicPoint.h"
35
36class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMaterialSolidifyingKelvinChain : public GmpMechanicalMaterial
37{
38protected:
41 {
47
48 // --- NO ADDING BELOW THIS LINE
50 };
51
54 {
57
58 // --- NO ADDING BELOW THIS LINE
60 };
61
62public:
63
65 GmpMaterialSolidifyingKelvinChain(int typeIndex, QString typeName, const GmLogCategory& logger)
66 : GmpMechanicalMaterial(typeIndex, typeName, logger) {}
67
70
72 static GmpFemPhysicsCommonMaterial* instance(GmSimulationData* simulation, int typeIndex, QString typeName, const GmLogCategory& logger)
73 {
74 Q_UNUSED(simulation);
75 return new GmpMaterialSolidifyingKelvinChain(typeIndex, typeName, logger);
76 }
77
78 // Returns a map with material associated properties.
79 virtual const QVariantMap* materialMetaDataMap();
80
81 // Returns the stresses according to the material behavior adopted
82 virtual bool mechanicalConstitutiveModel(const GmElement* e, GmMatrix& Dep, const GmpMechanicPoint* mp, const GmVector* coord, const GmVector& Time, unsigned sc, bool ips) const;
83
85 virtual bool isIsotropic() const { return true; }
86
88 virtual double elasticModulus(const GmElement* e, const GmVector* coord, int ip) const
89 {
90 return propertyAc(E0_ID)->scalarValueAt(e, coord, ip);
91 }
93 virtual double poissonRatio(const GmElement* e, const GmVector* coord, int ip) const
94 {
95 return propertyAc(NU_ID)->scalarValueAt(e, coord, ip);
96 }
97
99 virtual GmVector elasticModulusChain(const GmElement* e, const GmVector* coord, int ip) const
100 {
101 S_TRACE();
102 GmVector data;
103 GmCellAccessor* Acc = propertyAc(E_CHAIN_ID);
104 if (Acc != NULL) {
105 vectorPropertyValue(e, Acc, data, coord, ip);
106 }
107 return data;
108 }
109
111 virtual GmVector retardationTimeChain(const GmElement* e, const GmVector* coord, int ip) const
112 {
113 S_TRACE();
114 GmVector data;
115 GmCellAccessor* Acc = propertyAc(RT_CHAIN_ID);
116 if (Acc != NULL) {
117 vectorPropertyValue(e, Acc, data, coord, ip);
118 }
119 return data;
120 }
121
123 virtual double alphaAging(const GmElement* e, const GmVector* coord, int ip) const
124 {
125 return propertyAc(ALPHA_AGING_ID)->scalarValueAt(e, coord, ip);
126 }
127
129 void strainInteg(double E0, double nu, const GmVector& Ei, const GmVector& tau, double dTime, const GmVector& dStrain, const GmVector& stress, bool ips, double& Cve, GmVector& stress_new, GmMatrix& strainCreep) const;
130
131 // Checks material loaded data.
132 virtual bool checkLoadedData(const GmElement* e) const;
133};
134
135#endif
Definition gmpMaterialSolidifyingKelvinChain.h:37
virtual double poissonRatio(const GmElement *e, const GmVector *coord, int ip) const
Returns the material poisson ratio.
Definition gmpMaterialSolidifyingKelvinChain.h:93
virtual bool isIsotropic() const
Returns true if the material is isotropic, false otherwise.
Definition gmpMaterialSolidifyingKelvinChain.h:85
virtual GmVector elasticModulusChain(const GmElement *e, const GmVector *coord, int ip) const
Returns the material elastic modulus chain.
Definition gmpMaterialSolidifyingKelvinChain.h:99
virtual double alphaAging(const GmElement *e, const GmVector *coord, int ip) const
Returns the aging alpha factor.
Definition gmpMaterialSolidifyingKelvinChain.h:123
ElementPropertyIds
IDs for material element properties.
Definition gmpMaterialSolidifyingKelvinChain.h:41
@ E0_ID
Id for retrieving the Young's Modulus of outer spring accessor.
Definition gmpMaterialSolidifyingKelvinChain.h:42
@ E_CHAIN_ID
Id for retrieving the vector with Young's Modulus of Kelvin chain accessor.
Definition gmpMaterialSolidifyingKelvinChain.h:44
@ RT_CHAIN_ID
Id for retrieving the vector with Retardation times of Kelving chain accessor.
Definition gmpMaterialSolidifyingKelvinChain.h:45
@ NUM_PROPERTY_IDS
The number of property ids above.
Definition gmpMaterialSolidifyingKelvinChain.h:49
@ ALPHA_AGING_ID
Id for retrieving the alpha factor of aging function.
Definition gmpMaterialSolidifyingKelvinChain.h:46
@ NU_ID
Id for retrieving the Poisson's ratio accessor.
Definition gmpMaterialSolidifyingKelvinChain.h:43
virtual ~GmpMaterialSolidifyingKelvinChain()
Virtual destructor.
Definition gmpMaterialSolidifyingKelvinChain.h:69
virtual double elasticModulus(const GmElement *e, const GmVector *coord, int ip) const
Returns the material elastic modulus.
Definition gmpMaterialSolidifyingKelvinChain.h:88
virtual GmVector retardationTimeChain(const GmElement *e, const GmVector *coord, int ip) const
Returns the material elastic modulus chain.
Definition gmpMaterialSolidifyingKelvinChain.h:111
GaussAttributeIds
IDs for material Gauss attributes.
Definition gmpMaterialSolidifyingKelvinChain.h:54
@ ECC_OLD_GA_ID
Id for retrieving the creep strain accessor at the previous state (old creep strain)
Definition gmpMaterialSolidifyingKelvinChain.h:56
@ ECC_GA_ID
Base Id for Gauss attribute(s) used to store the calculated creep strain at the current state.
Definition gmpMaterialSolidifyingKelvinChain.h:55
@ NUM_GA_IDS
The number of Gauss attribute ids above.
Definition gmpMaterialSolidifyingKelvinChain.h:59
GmpMaterialSolidifyingKelvinChain(int typeIndex, QString typeName, const GmLogCategory &logger)
Constructor. Gets as parameters the material index and its name.
Definition gmpMaterialSolidifyingKelvinChain.h:65
static GmpFemPhysicsCommonMaterial * instance(GmSimulationData *simulation, int typeIndex, QString typeName, const GmLogCategory &logger)
A "factory" function used to register the material with the physics material factory.
Definition gmpMaterialSolidifyingKelvinChain.h:72
Definition gmpMechanicPoint.h:33
Basic class providing the interface for a mechanical material.
Definition gmpMechanicalMaterial.h:43
virtual bool mechanicalConstitutiveModel(const GmElement *e, GmMatrix &Dep, const GmpMechanicPoint *mp, const GmVector *coord, const GmVector &Time, unsigned nc, bool ips=false) const =0
Evaluates stress and tangent matrix according to the material behavior adopted.
arma::mat GmMatrix
#define S_TRACE()
arma::vec GmVector
Declaration of the GmpMechanicPoint class.
Declaration of useful configuration definitions for the plugin library.
Declaration of the GmpMechanicalMaterial class.