36 #include "../sm/Elements/structuralelement.h" 72 #ifdef keep_track_of_dissipated_energy 94 #ifdef keep_track_of_dissipated_energy 104 if ( mode == ElasticStiffness ) {
111 if ( mode == SecantStiffness ) {
114 answer.
times(1. - damage);
118 if ( mode == TangentStiffness ) {
122 if ( tempDamage <= damage ) {
128 gprime *= ( 1. -
mm );
148 double cumPlasticStrain;
162 double nonlocalContribution, nonlocalCumPlasticStrain = 0.0;
171 for (
auto &lir: *list ) {
174 if ( nonlocalContribution > 0 ) {
175 nonlocalContribution *= lir.weight;
178 nonlocalCumPlasticStrain += nonlocalContribution;
183 nonlocalCumPlasticStrain *= 1. / scale;
186 nonlocalCumPlasticStrain *= 1. / scale;
192 kappa =
mm * nonlocalCumPlasticStrain + ( 1. -
mm ) * localCumPlasticStrain;
216 if ( result !=
IRRT_OK )
return result;
240 if ( tempDam < dam ) {
273 for (
auto &lir: *list ) {
274 rmat =
dynamic_cast< RankineMatNl *
>( lir.nearGp->giveMaterial() );
286 std :: vector< localIntegrationRecord > *
303 double sum, nlKappa, damage, tempDamage;
310 if ( tempDamage <= damage ) {
324 for (
int i = 1; i <= nrows; i++ ) {
326 for (
int j = 1; j <= nsize; j++ ) {
327 sum += b.
at(j, i) * stress.
at(j);
330 lcontrib.
at(i) = sum * factor;
352 if ( tempKappa <= kappa ) {
361 for (
int i = 1; i <= ncols; i++ ) {
363 for (
int j = 1; j <= nsize; j++ ) {
364 sum += eta.
at(j) * b.
at(j, i);
367 rcontrib.
at(i) = sum;
375 if ( type == IST_CumPlasticStrain_2 ) {
383 }
else if ( type == IST_MaxEquivalentStrainLevel ) {
412 fprintf(file,
"status { ");
414 #ifdef keep_track_of_dissipated_energy 417 fprintf(file,
" }\n");
494 this->buildNonlocalPointTable(ip);
495 this->updateDomainBeforeNonlocAverage(tStep);
507 result = buff.
read(localCumPlasticStrainForAverage);
void computeWork_1d(GaussPoint *gp, double gf)
double computeDamage(GaussPoint *gp, TimeStep *tStep)
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...
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
Abstract base class for all nonlocal structural materials.
int giveNumberOfColumns() const
Returns number of columns of receiver.
This class implements an isotropic elastoplastic material with Rankine yield condition, associated flow rule and linear isotropic softening, and with isotropic damage that leads to softening.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
void updateDomainBeforeNonlocAverage(TimeStep *tStep)
Updates data in all integration points before nonlocal average takes place.
virtual int assemble(const IntArray &loc, const FloatMatrix &mat)=0
Assembles sparse matrix from contribution of local elements.
void setLocalCumPlasticStrainForAverage(double ls)
Base class for all matrices stored in sparse format.
double giveTempCumulativePlasticStrain()
virtual ~RankineMatNlStatus()
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
double damage
Damage (initial).
void evaluatePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep, double gprime)
Executive method used by local and gradient version.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
double sig0
Initial (uniaxial) yield stress.
double & at(int i)
Coefficient access function.
const FloatArray & giveTempEffectiveStress() const
virtual int estimatePackSize(DataStream &buff, GaussPoint *ip)
Estimates the necessary pack size to hold all packed data of receiver.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
RankineMatNlStatus(int n, Domain *d, GaussPoint *g)
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
void buildNonlocalPointTable(GaussPoint *gp)
Builds list of integration points which take part in nonlocal average in given integration point...
Element * giveElement()
Returns corresponding element to receiver.
ScalingType scaling
Parameter specifying the type of scaling of nonlocal weight function.
LinearElasticMaterial * giveLinearElasticMaterial()
Returns a reference to the basic elastic material.
std::vector< localIntegrationRecord > * giveIntegrationDomainList()
Returns integration list of receiver.
void setKappa_nl(double kap)
double stressWork
Density of total work done by stresses on strain increments.
void plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
Adds to the receiver the product .
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 kappa_nl
For printing only.
IRResultType initializeFrom(InputRecord *ir)
void computeWork_PlaneStress(GaussPoint *gp, double gf)
Computes the increment of total stress work and of dissipated work (gf is the dissipation density per...
virtual std::vector< localIntegrationRecord > * NonlocalMaterialStiffnessInterface_giveIntegrationDomainList(GaussPoint *gp)
Returns integration list of receiver.
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
void beScaled(double s, const FloatArray &b)
Sets receiver to be .
virtual void givePlaneStressStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing plane stress stiffness matrix of receiver.
Abstract base class for all "structural" finite elements.
virtual void giveStiffnessMatrix(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)
Computes the stiffness matrix for giveRealStressVector of receiver in given integration point...
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
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...
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.
std::vector< localIntegrationRecord > * giveIPIntegrationList(GaussPoint *gp)
Returns integration list corresponding to given integration point.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
virtual void computeCumPlasticStrain(double &kappa, GaussPoint *gp, TimeStep *tStep)
Computes the nonlocal cumulated plastic strain from its local form.
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
double at(int i, int j) const
Coefficient access function.
RankineMatNl(int n, Domain *d)
double giveCumulativePlasticStrain()
double giveLocalCumPlasticStrainForAverage()
Class representing vector of real numbers.
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Rankine nonlocal material.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void setTempDamage(double value)
Implementation of matrix containing floating point numbers.
void performPlasticityReturn(GaussPoint *gp, const FloatArray &totalStrain)
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int givePackSizeOfDouble(int count)=0
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
double mm
For "undernonlocal" or "overnonlocal" formulation.
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
Rankine nonlocal material status.
Base class for all nonlocal structural material statuses.
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Unpack and updates all necessary data of given integration point (according to element parallel_mode)...
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
virtual void NonlocalMaterialStiffnessInterface_addIPContribution(SparseMtrx &dest, const UnknownNumberingScheme &s, GaussPoint *gp, TimeStep *tStep)
Computes and adds IP contributions to destination matrix.
void zero()
Zeroes all coefficients of receiver.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
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.
double computeDamageParamPrime(double tempKappa)
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
double E
Young's modulus.
double kappa
Cumulative plastic strain (initial).
double localCumPlasticStrainForAverage
Equivalent strain for averaging.
InterfaceType
Enumerative type, used to identify interface type.
double giveIntegrationScale()
Returns associated integration scale.
double computeDamageParam(double tempKappa)
double dissWork
Density of dissipated work.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
REGISTER_Material(DummyMaterial)
int giveSize() const
Returns the size of receiver.
the oofem namespace is to define a context or scope in which all oofem names are defined.
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 computeEta(FloatArray &answer, RankineMatStatus *status)
Computes derivatives of final kappa with respect to final strain.
void computeLocalCumPlasticStrain(double &kappa, GaussPoint *gp, TimeStep *tStep)
virtual void giveRealStressVector_PlaneStress(FloatArray &answer, GaussPoint *gp, const FloatArray &strainVector, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
Class representing integration point in finite element program.
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
Class representing solution step.
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...
void setKappa_hat(double kap)
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &strainVector, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
void giveInputRecord(DynamicInputRecord &input)
Stores receiver in an input record.
void resize(int s)
Resizes receiver towards requested size.