35 #include "../sm/Elements/structuralelement.h" 70 double cumPlastStrain;
91 double tempDam,
beta, nlKappa;
92 FloatArray tempEffectiveStress, tempTensor2, prodTensor, plasFlowDirec;
93 FloatMatrix elasticity, compliance, SSaTensor, secondTerm, thirdTerm, tangentMatrix;
95 if ( mode == ElasticStiffness ) {
100 }
else if ( mode == SecantStiffness ) {
106 answer.
times(1.0 - tempDam);
107 }
else if ( mode == TangentStiffness ) {
110 double dKappa = tempKappa - kappa;
111 if ( dKappa < 10.e-9 ) {
115 if ( dKappa > 0.0 ) {
120 double dam = nlStatus->
giveDam();
127 if ( tempDam - dam > 0 ) {
137 secondTerm.
times(-( 1.0 - tempDam ) / beta);
139 tangentMatrix = SSaTensor;
140 tangentMatrix.
times(1.0 - tempDam);
141 tangentMatrix.
add(secondTerm);
142 tangentMatrix.
add(thirdTerm);
144 answer = tangentMatrix;
152 answer.
times(1.0 - tempDam);
177 for (
auto &lir: *list ) {
178 rmat =
dynamic_cast< TrabBoneNL3D *
>( lir.nearGp->giveMaterial() );
190 std :: vector< localIntegrationRecord > *
206 double sum, nlKappa, dDamFunc, dam, tempDam;
214 if ( ( tempDam - dam ) > 0.0 ) {
225 for (
int i = 1; i <= nrows; i++ ) {
227 for (
int j = 1; j <= nsize; j++ ) {
228 sum += b.
at(j, i) * localNu.
at(j);
231 lcontrib.
at(i) =
mParam * dDamFunc * sum;
255 double dKappa = tempKappa - kappa;
256 if ( dKappa < 10.e-9 ) {
260 if ( dKappa > 0.0 ) {
267 remoteNu = 1 / beta * prodTensor;
285 FloatArray effStress, totalStress, densStress;
291 totalStress = ( 1 - tempDam ) * effStress;
293 for (
int i = 1; i <= 6; i++ ) {
294 if ( sqrt( totalStress.
at(i) * totalStress.
at(i) ) < 1e-8 ) {
295 totalStress.
at(i) = 0.;
303 answer.
add(densStress);
306 answer = totalStress;
316 double nonlocalContribution, nonlocalCumPlastStrain = 0.0;
324 for (
auto &lir: *list ) {
327 nonlocalContribution *= lir.weight;
328 nonlocalCumPlastStrain += nonlocalContribution;
334 kappa =
mParam * nonlocalCumPlastStrain + ( 1 -
mParam ) * localCumPlastStrain;
393 if ( ( dist >= 0. ) && ( dist <= this->
R ) ) {
394 double help = ( 1. - dist * dist / ( R *
R ) );
421 fprintf(file,
"status {");
422 fprintf(file,
" plastrains ");
424 fprintf( file,
" %.4e", val );
428 fprintf(file,
" kappa %.4e ,",
kappa);
429 fprintf(file,
" dam %.4e ,",
tempDam);
431 fprintf(file,
" psed %.4e ,", this->
tempPSED);
432 fprintf(file,
" tsed %.4e", this->
tempTSED);
433 fprintf(file,
"}\n");
470 this->buildNonlocalPointTable(ip);
471 this->updateDomainBeforeNonlocAverage(tStep);
486 double localEquivalentStrainForAverage;
488 result = buff.
read(localEquivalentStrainForAverage);
virtual std::vector< localIntegrationRecord > * NonlocalMaterialStiffnessInterface_giveIntegrationDomainList(GaussPoint *gp)
Returns integration list of receiver.
Abstract base class for all nonlocal structural materials.
int giveNumberOfColumns() const
Returns number of columns of receiver.
The representation of EngngModel default unknown numbering.
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Unpack and updates all necessary data of given integration point (according to element parallel_mode)...
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
double beta
Parameter which multiplied with the interaction radius cl0 gives its minimum allowed value...
void updateDomainBeforeNonlocAverage(TimeStep *tStep)
Updates data in all integration points before nonlocal average takes place.
This class implements associated Material Status to IDNLMaterial (Nonlocal isotropic damage)...
void computeDensificationStress(FloatArray &answer, GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep)
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
Assembles sparse matrix from contribution of local elements.
void setLocalEquivalentStrainForAverage(double ls)
Sets the localEquivalentStrainForAverage to given value.
double giveLocalCumPlastStrainForAverage()
const FloatArray & giveTempEffectiveStress() const
Base class for all matrices stored in sparse format.
virtual double computeWeightFunction(const FloatArray &src, const FloatArray &coord)
Evaluates the basic nonlocal weight function for two points with given coordinates.
void performPlasticityReturn(GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep)
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
double & at(int i)
Coefficient access function.
Trabecular bone nonlocal material model.
virtual void computeCumPlastStrain(double &kappa, GaussPoint *gp, TimeStep *tStep)
Trabecular bone nonlocal material status.
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 ...
TrabBoneNL3DStatus(int n, Domain *d, GaussPoint *g)
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
void buildNonlocalPointTable(GaussPoint *gp)
Builds list of integration points which take part in nonlocal average in given integration point...
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
Element * giveElement()
Returns corresponding element to receiver.
std::vector< localIntegrationRecord > * giveIntegrationDomainList()
Returns integration list of receiver.
double computeDamage(GaussPoint *gp, TimeStep *tStep)
void constructAnisoComplTensor(FloatMatrix &answer)
Construct anisotropic compliance tensor.
void plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
Adds to the receiver the product .
virtual void updateBeforeNonlocAverage(const FloatArray &strainVector, GaussPoint *gp, TimeStep *tStep)
Declares the service updating local variables in given integration points, which take part in nonloca...
void giveStressDependentPartOfStrainVector(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrainVector, TimeStep *tStep, ValueModeType mode)
Method for subtracting from reduced space strain vector its stress-independent parts (caused by tempe...
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
Class implementing an array of integers.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
MatResponseMode
Describes the character of characteristic material matrix.
double giveLocalEquivalentStrainForAverage()
Returns the local equivalent strain to be averaged.
IRResultType initializeFrom(InputRecord *ir)
double distance(const FloatArray &x) const
Computes the distance between position represented by receiver and position given as parameter...
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
Abstract base class for all "structural" finite elements.
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
void computeLocalCumPlastStrain(double &kappa, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the local cumulated plastic strain from given strain vector (full form). ...
void setSmtrx(FloatMatrix &smt)
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
TrabBoneNL3D(int n, Domain *d)
void clear()
Clears the array (zero size).
Class Nonlocal Material Stiffness Interface.
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
Returns the location array (array of code numbers) of receiver for given numbering scheme...
void times(double f)
Multiplies receiver by factor f.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
void setLocalCumPlastStrainForAverage(double ls)
void beProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix and anArray.
virtual int estimatePackSize(DataStream &buff, GaussPoint *ip)
Estimates the necessary pack size to hold all packed data of receiver.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
void beTProductOf(const FloatMatrix &aMatrix, const FloatArray &anArray)
Receiver becomes the result of the product of aMatrix^T and anArray.
double at(int i, int j) const
Coefficient access function.
void computePlasStrainEnerDensity(GaussPoint *gp, const FloatArray &totalStrain, const FloatArray &totalStress)
#define _IFT_TrabBoneNL3D_m
virtual ~TrabBoneNL3DStatus()
#define _IFT_TrabBoneNL3D_r
virtual void updateYourself(TimeStep *)
Update equilibrium history variables according to temp-variables.
void setTempDam(double da)
Class representing vector of real numbers.
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int givePackSizeOfDouble(int count)=0
const FloatArray & givePlasFlowDirec() const
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
double localCumPlastStrainForAverage
Equivalent strain for averaging.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
void giveRemoteNonlocalStiffnessContribution(GaussPoint *gp, IntArray &rloc, const UnknownNumberingScheme &s, FloatArray &rcontrib, TimeStep *tStep)
Computes the "remote" part of nonlocal stiffness contribution assembled for given integration point...
const FloatMatrix & giveSSaTensor() const
void add(const FloatMatrix &a)
Adds matrix to the receiver.
Base class for all nonlocal structural material statuses.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
void zero()
Zeroes all coefficients of receiver.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
void beDyadicProductOf(const FloatArray &vec1, const FloatArray &vec2)
Assigns to the receiver the dyadic product .
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int lowerIndx=1, int upperIndx=ALL_STRAINS)=0
Computes the geometrical matrix of receiver in given integration point.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void NonlocalMaterialStiffnessInterface_addIPContribution(SparseMtrx &dest, const UnknownNumberingScheme &s, GaussPoint *gp, TimeStep *tStep)
Computes and adds IP contributions to destination matrix.
This class implements associated Material Status to TrabBone3D (trabecular bone material).
InterfaceType
Enumerative type, used to identify interface type.
double giveIntegrationScale()
Returns associated integration scale.
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &strainVector, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
REGISTER_Material(DummyMaterial)
int giveSize() const
Returns the size of receiver.
int giveLocalNonlocalStiffnessContribution(GaussPoint *gp, IntArray &loc, const UnknownNumberingScheme &s, FloatArray &lcontrib, TimeStep *tStep)
Computes the "local" part of nonlocal stiffness contribution assembled for given integration point...
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void clear()
Sets size of receiver to be an empty matrix. It will have zero rows and zero columns size...
virtual void initTempStatus(GaussPoint *gp)
Initializes temporary variables stored in integration point status at the beginning of new time step...
void beInverseOf(const FloatMatrix &src)
Modifies receiver to become inverse of given parameter.
Class representing integration point in finite element program.
Class representing solution step.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
void add(const FloatArray &src)
Adds array src to receiver.
void resize(int s)
Resizes receiver towards requested size.