Skip to content

Commit

Permalink
Fixed bug in reactive viscoelastic materials (unconstrained and uncou…
Browse files Browse the repository at this point in the history
…pled) to correctly accommodate viscoelastic fibrous materials that don't sustain stress in compression. This affects reactive viscoelastic fibrous materials subjected to tension and compression.
  • Loading branch information
gateshian committed Nov 1, 2024
1 parent 93d1fc5 commit e6af0d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FEBioMech/FEReactiveViscoelastic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ SOFTWARE.*/
#include "stdafx.h"
#include "FEReactiveViscoelastic.h"
#include "FEElasticMixture.h"
#include "FEElasticFiberMaterial.h"
#include "FEFiberMaterialPoint.h"
#include "FEScaledElasticMaterial.h"
#include <FECore/FECoreKernel.h>
Expand Down Expand Up @@ -655,6 +656,10 @@ void FEReactiveViscoelasticMaterial::UpdateSpecializedMaterialPoints(FEMaterialP
m_pBase->UpdateSpecializedMaterialPoints(sb, tp);
m_pBond->UpdateSpecializedMaterialPoints(wb, tp);

// if the this material is a fiber and if the fiber is in compression, skip this update
if ((dynamic_cast<FEElasticFiberMaterial*>(m_pBase)) && (dynamic_cast<FEElasticFiberMaterial*>(m_pBond)))
if ((m_pBase->Stress(mp)).norm() == 0) return;

// get the reactive viscoelastic point data
FEReactiveVEMaterialPoint& pt = *wb.ExtractData<FEReactiveVEMaterialPoint>();

Expand Down
5 changes: 5 additions & 0 deletions FEBioMech/FEUncoupledReactiveViscoelastic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ SOFTWARE.*/
#include "FEUncoupledReactiveViscoelastic.h"
#include "FEUncoupledElasticMixture.h"
#include "FEFiberMaterialPoint.h"
#include "FEElasticFiberMaterialUC.h"
#include "FEScaledUncoupledMaterial.h"
#include <FECore/FECoreKernel.h>
#include <FECore/log.h>
Expand Down Expand Up @@ -642,6 +643,10 @@ void FEUncoupledReactiveViscoelasticMaterial::UpdateSpecializedMaterialPoints(FE
m_pBase->UpdateSpecializedMaterialPoints(sb, tp);
m_pBond->UpdateSpecializedMaterialPoints(wb, tp);

// if the this material is a fiber and if the fiber is in compression, skip this update
if ((dynamic_cast<FEElasticFiberMaterialUC*>(m_pBase)) && (dynamic_cast<FEElasticFiberMaterialUC*>(m_pBond)))
if ((m_pBase->DevStress(mp)).norm() == 0) return;

// get the reactive viscoelastic point data
FEReactiveVEMaterialPoint& pt = *wb.ExtractData<FEReactiveVEMaterialPoint>();

Expand Down

0 comments on commit e6af0d0

Please sign in to comment.