/** * @file material_brittle_inline_impl.cc * * @author Aranda Ruiz Josue * @author Daniel Pino Muñoz * * * @brief Implementation of the inline functions of the material brittle * * @section LICENSE * * Copyright (©) 2010-2012, 2014 EPFL (Ecole Polytechnique Fédérale de Lausanne) * Laboratory (LSMS - Laboratoire de Simulation en Mécanique des Solides) * */ /* -------------------------------------------------------------------------- */ template inline void MaterialBrittle::computeStressOnQuad(Matrix & grad_u, Matrix & grad_v, Matrix & sigma, Real & dam, Real & sigma_equivalent, Real & fracture_stress) { MaterialElastic::computeStressOnQuad(grad_u, sigma); Real equiv_strain_rate=0.; Real volume_change_rate=grad_v.trace(); if(spatial_dimension==2){ // if(this->plane_stress){ // Real e_dot_33 = this->lambda*(volume_change_rate)/(2. * this->mu - this->lambda); // volume_change_rate+=e_dot_33; // equiv_strain_rate+=2./3.*pow( e_dot_33 - volume_change_rate/3. , 2. ); // } // else equiv_strain_rate+=2./3.*pow( volume_change_rate/3. , 2. ); } for(UInt i=0; iE_0) //fracture_stress=A*pow(equiv_strain_rate,3)+B*pow(equiv_strain_rate,2)+C*equiv_strain_rate+D; fracture_stress=A; Vector principal_stress(spatial_dimension); sigma.eig(principal_stress); sigma_equivalent = principal_stress(0); for(UInt i=1; iis_non_local) { computeDamageAndStressOnQuad(sigma, dam, sigma_equivalent, fracture_stress); } } /* -------------------------------------------------------------------------- */ template inline void MaterialBrittle::computeDamageAndStressOnQuad(Matrix & sigma, Real & dam, Real & sigma_c, Real & fracture_stress) { if ( sigma_c > fracture_stress ) dam = 1.; dam = std::min(dam,1.); sigma *= 1-dam; } /* -------------------------------------------------------------------------- */ template inline UInt MaterialBrittle::getNbDataForElements(const Array & elements, SynchronizationTag tag) const { AKANTU_DEBUG_IN(); /*UInt size = 0; if(tag == _gst_smm_init_mat) { size += sizeof(Real) * this->getModel().getNbQuadraturePoints(elements); } */ UInt size = MaterialDamage::getNbDataForElements(elements, tag); AKANTU_DEBUG_OUT(); return size; } /* -------------------------------------------------------------------------- */ template inline void MaterialBrittle::packElementData(CommunicationBuffer & buffer, const Array & elements, SynchronizationTag tag) const { AKANTU_DEBUG_IN(); /*if(tag == _gst_smm_init_mat) { this->packElementDataHelper(Yd, buffer, elements); }*/ MaterialDamage::packElementData(buffer, elements, tag); AKANTU_DEBUG_OUT(); } /* -------------------------------------------------------------------------- */ template inline void MaterialBrittle::unpackElementData(CommunicationBuffer & buffer, const Array & elements, SynchronizationTag tag) { AKANTU_DEBUG_IN(); /*if(tag == _gst_smm_init_mat) { this->unpackElementDataHelper(Yd, buffer, elements); }*/ MaterialDamage::unpackElementData(buffer, elements, tag); AKANTU_DEBUG_OUT(); }