36 #include "../sm/Elements/structuralelement.h" 92 double E = lmat->
give(
'E', gp);
98 answer.
at(1, 1) = ( 1 - tempDamage ) * E;
99 if ( mode != TangentStiffness ) {
103 if ( tempKappa <= kappa ) {
109 double stress = stressVector.
at(1);
110 answer.
at(1, 1) = ( 1. - tempDamage ) * E *
H / ( E +
H );
111 if ( tempDamage > damage ) {
129 double cumPlasticStrain;
150 std :: vector< localIntegrationRecord > :: iterator pos, postarget;
153 for ( pos = list->begin(); pos != list->end(); ++pos ) {
154 if ( pos->nearGp == gp ) {
162 double xtarget = coords.
at(1);
164 double w, wsum = 0., x, xprev, damage, damageprev = 0.0;
168 double distance = 0.;
170 for ( pos = postarget; pos != list->end(); ++pos ) {
171 nearElem = ( pos->nearGp )->giveElement();
176 if ( pos != postarget ) {
189 for ( pos = postarget; pos != list->begin(); --pos ) {
190 nearElem = ( pos->nearGp )->giveElement();
195 if ( pos != postarget ) {
208 if ( pos != postarget ) {
209 nearElem = ( pos->nearGp )->giveElement();
227 case 2:
return 1. / (
Rf /
cl + ( 1. -
Rf /
cl ) * pow(1. - damage,
exponent) );
229 case 3:
if ( damage == 0. ) {
232 return 1. / ( 1. - ( 1. -
Rf /
cl ) * pow(damage,
exponent) );
235 case 4:
return 1. / pow(
Rf /
cl, damage);
237 case 5:
return ( 2. *
cl ) / (
cl +
Rf + (
cl -
Rf ) * cos(
M_PI * damage) );
246 double nonlocalContribution, nonlocalCumPlasticStrain = 0.0;
255 for (
auto &lir: *list ) {
258 if ( nonlocalContribution > 0 ) {
259 nonlocalContribution *= lir.weight;
262 nonlocalCumPlasticStrain += nonlocalContribution;
267 nonlocalCumPlasticStrain *= 1. / scale;
270 nonlocalCumPlasticStrain *= 1. / scale;
276 kappa =
mm * nonlocalCumPlasticStrain + ( 1. -
mm ) * localCumPlasticStrain;
298 if ( result !=
IRRT_OK )
return result;
300 if ( result !=
IRRT_OK )
return result;
351 if ( tempDam < dam ) {
376 for (
auto &lir: *list ) {
377 rmat =
dynamic_cast< MisesMatNl *
>( lir.nearGp->giveMaterial() );
390 std :: vector< localIntegrationRecord > *
403 double nlKappa, damage, tempDamage, dDamF;
411 if ( ( tempDamage - damage ) > 0 ) {
428 double kappa, tempKappa;
439 if ( ( tempKappa - kappa ) > 0 ) {
441 double E = lmat->
give(
'E', gp);
444 double coeff =
sgn( stress.
at(1) ) * E / ( E +
H );
471 fprintf(file,
"status { ");
472 fprintf(file,
"kappa %f, damage %f ", this->
kappa, this->
damage);
473 fprintf(file,
"}\n");
553 this->buildNonlocalPointTable(ip);
554 this->updateDomainBeforeNonlocAverage(tStep);
567 result = buff.
read(localCumPlasticStrainForAverage);
virtual void NonlocalMaterialStiffnessInterface_addIPContribution(SparseMtrx &dest, const UnknownNumberingScheme &s, GaussPoint *gp, TimeStep *tStep)
Computes and adds IP contributions to destination matrix.
void computeLocalCumPlasticStrain(double &kappa, GaussPoint *gp, TimeStep *tStep)
Abstract base class for all nonlocal structural materials.
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
int giveNumberOfColumns() const
Returns number of columns of receiver.
void letTempStrainVectorBe(const FloatArray &v)
Assigns tempStrainVector to given vector v.
This class implements an isotropic elastoplastic material with Mises yield condition, associated flow rule and linear isotropic hardening.
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.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
#define _IFT_MisesMatNl_exp
Base class for all matrices stored in sparse format.
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
double H
Hardening modulus.
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
double & at(int i)
Coefficient access function.
double sgn(double i)
Returns the signum of given value (if value is < 0 returns -1, otherwise returns 1) ...
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 clear()
Clears receiver (zero size).
double giveCumulativePlasticStrain()
virtual std::vector< localIntegrationRecord > * NonlocalMaterialStiffnessInterface_giveIntegrationDomainList(GaussPoint *gp)
Returns integration list of receiver.
double giveTempCumulativePlasticStrain()
void buildNonlocalPointTable(GaussPoint *gp)
Builds list of integration points which take part in nonlocal average in given integration point...
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Abstract base class for all finite elements.
Element * giveElement()
Returns corresponding element to receiver.
ScalingType scaling
Parameter specifying the type of scaling of nonlocal weight function.
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
std::vector< localIntegrationRecord > * giveIntegrationDomainList()
Returns integration list of receiver.
double computeDistanceModifier(double damage)
void modifyNonlocalWeightFunctionAround(GaussPoint *gp)
void plusDyadUnsym(const FloatArray &a, const FloatArray &b, double dV)
Adds to the receiver the product .
#define _IFT_MisesMatNl_rf
virtual void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
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...
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 computeDamageParam(double tempKappa)
This class is a abstract base class for all linear elastic material models in a finite element proble...
Mises Nonlocal material status.
virtual void giveRealStressVector_3d(FloatArray &answer, GaussPoint *gp, const FloatArray &strainVector, TimeStep *tStep)
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
virtual Interface * giveInterface(InterfaceType)
Interface requesting service.
IRResultType initializeFrom(InputRecord *ir)
virtual void updateYourself(TimeStep *tStep)
Update equilibrium history variables according to temp-variables.
void performPlasticityReturn(GaussPoint *gp, const FloatArray &totalStrain, TimeStep *tStep)
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 double give(int aProperty, GaussPoint *gp)
Returns the value of material property 'aProperty'.
Abstract base class for all "structural" finite elements.
double localCumPlasticStrainForAverage
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
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...
virtual void computeCumPlasticStrain(double &kappa, GaussPoint *gp, TimeStep *tStep)
Computes the nonlocal cumulated plastic strain from its local form.
MisesMatNlStatus(int n, Domain *d, GaussPoint *g)
Class Nonlocal Material Stiffness Interface.
virtual void give1dStressStiffMtrx(FloatMatrix &answer, MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep)
Method for computing 1d stiffness matrix of receiver.
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...
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 contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
#define _IFT_MisesMatNl_averagingtype
virtual void giveRealStressVector_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &strainVector, TimeStep *tStep)
Default implementation relies on giveRealStressVector_StressControl.
double at(int i, int j) const
Coefficient access function.
double computeDamageParamPrime(double tempKappa)
void setTempDamage(double value)
Class representing vector of real numbers.
double kappa
Cumulative plastic strain (initial).
double computeDamage(GaussPoint *gp, TimeStep *tStep)
Implementation of matrix containing floating point numbers.
IRResultType
Type defining the return values of InputRecord reading operations.
virtual int givePackSizeOfDouble(int count)=0
void setIntegrationScale(double val)
Sets associated integration scale.
void letTempStressVectorBe(const FloatArray &v)
Assigns tempStressVector to given vector v.
double mm
For "undernonlocal" or "overnonlocal" formulation.
double giveLocalCumPlasticStrainForAverage()
virtual int estimatePackSize(DataStream &buff, GaussPoint *ip)
Estimates the necessary pack size to hold all packed data of receiver.
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
const FloatArray & giveTempEffectiveStress()
Base class for all nonlocal structural material statuses.
void zero()
Zeroes all coefficients of receiver.
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 void printOutputAt(FILE *file, TimeStep *tStep)
Print receiver's output to given stream.
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.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
virtual ~MisesMatNlStatus()
InterfaceType
Enumerative type, used to identify interface type.
double giveIntegrationScale()
Returns associated integration scale.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
MisesMatNl(int n, Domain *d)
REGISTER_Material(DummyMaterial)
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
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...
virtual void initTempStatus()
Initializes the temporary internal variables, describing the current state according to previously re...
double cl
Characteristic length of the nonlocal model (its interpretation depends on the type of weight functio...
Class representing integration point in finite element program.
Class representing solution step.
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
virtual double computeWeightFunction(double distance)
Evaluates the basic nonlocal weight function for a given distance between interacting points...
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
virtual void giveInputRecord(DynamicInputRecord &input)
Setups the input record string of receiver.
void setLocalCumPlasticStrainForAverage(double ls)
void giveInputRecord(DynamicInputRecord &input)
Stores receiver in an input record.
void resize(int s)
Resizes receiver towards requested size.
LinearElasticMaterial * giveLinearElasticMaterial()
Returns a reference to the basic elastic material.
void plusProduct(const FloatMatrix &b, const FloatArray &s, double dV)
Adds the product .