nutofem / nuto

NuTo - yet another finite element library
https://nuto.readthedocs.io
Boost Software License 1.0
17 stars 5 forks source link

Damage material parameters #232

Closed TTitscher closed 6 years ago

TTitscher commented 6 years ago

Problem

Currently, a lot of code is required to instantiate the appropriate laws/integrands. Like

template <int TDim>
auto TestLaw()
{
    // Define the law using policy based design principles, hopefully applied correctly
    using Damage = Constitutive::DamageLawExponential;
    using StrainNorm = Constitutive::ModifiedMisesStrainNorm<TDim>;
    using Evolution = Laws::EvolutionImplicit<TDim>;
    using Law = Laws::LocalIsotropicDamage<TDim, Damage, Evolution>;

    Damage dmg(kappa0, beta, alpha);
    Evolution evolutionEq(StrainNorm(nu, fc / ft), /*numCells=*/1, /*numIps=*/1);
    Laws::LinearElasticDamage<TDim> elasticDamage(E, nu);

    return Law(elasticDamage, dmg, evolutionEq);
}

Some material parameters are required multiple times (kappa0 = ft/E) which is error prone and long. Also parameters like alpha or beta are not intuitive. But they do relate to real material parameters.

Solution

1) Define a material class. Dealing with mechanical softening problems often involves the same set of parameters. Like

struct SofteningMaterial
{
  double youngsModulus;
  double poissonRatio;
  double tensileStrength;
  double compressiveStrength;
  double residualStrength;
  double fractureEnergy;
  double nonlocalRadius;
}

2) Add constructors that takes a SofteningMaterial to the softening laws/integrands, as well as the deeper classes like (strain norms, damage laws, linear elastic damage). This allows a proper policy based design with defaulted template arguments. The code above would then look like

template <int TDim>
auto TestLaw(SofteningMaterial material)
{
    return Laws::LocalIsotropicDamage<TDim>(material); // with reasonable the default template arguments
}

3) Still allow construction with the individual parameters. Still allow customization by changing the template parameters.

Discussion: