void
ComputeFiniteStrainElasticStress::initialSetup()
{
  if (!hasGuaranteedMaterialProperty(_elasticity_tensor_name, Guarantee::ISOTROPIC))
    mooseError("ComputeFiniteStrainElasticStress can only be used with elasticity tensor materials "
               "that guarantee isotropic tensors.");
}
Exemplo n.º 2
0
void
ComputeSmearedCrackingStress::initialSetup()
{
  ComputeMultipleInelasticStress::initialSetup();

  if (!hasGuaranteedMaterialProperty(_elasticity_tensor_name, Guarantee::ISOTROPIC))
    mooseError("ComputeSmearedCrackingStress requires that the elasticity tensor be "
               "guaranteed isotropic");

  std::vector<MaterialName> soft_matls = getParam<std::vector<MaterialName>>("softening_models");
  if (soft_matls.size() != 0)
  {
    for (auto soft_matl : soft_matls)
    {
      SmearedCrackSofteningBase * scsb =
          dynamic_cast<SmearedCrackSofteningBase *>(&getMaterialByName(soft_matl));
      if (scsb)
        _softening_models.push_back(scsb);
      else
        mooseError("Model " + soft_matl +
                   " is not a softening model that can be used with ComputeSmearedCrackingStress");
    }
    if (_softening_models.size() == 1)
    {
      // Reuse the same model in all 3 directions
      _softening_models.push_back(_softening_models[0]);
      _softening_models.push_back(_softening_models[0]);
    }
    else if (_softening_models.size() != 3)
      mooseError("If 'softening_models' is specified in ComputeSmearedCrackingStress, either 1 or "
                 "3 models must be provided");
  }
}
void
ComputeFiniteStrainElasticStressBirchMurnaghan::initialSetup()
{
  if (!hasGuaranteedMaterialProperty(_elasticity_tensor_name, Guarantee::ISOTROPIC))
    mooseError("ComputeFiniteStrainElasticStressBirchMurnaghan can only be used with elasticity "
               "tensor materials "
               "that guarantee isotropic tensors.");

  _is_elasticity_tensor_guaranteed_constant_in_time =
      hasGuaranteedMaterialProperty(_elasticity_tensor_name, Guarantee::CONSTANT_IN_TIME);
  if ((isParamValid("initial_stress")) && !_is_elasticity_tensor_guaranteed_constant_in_time)
    mooseError("A finite stress material cannot both have an initial stress and an elasticity "
               "tensor with varying values; please use a defined constant elasticity tensor, "
               "such as ComputeIsotropicElasticityTensor, if your model defines an initial "
               "stress, or apply an initial strain instead.");
}
void
ComputeMultipleInelasticStress::initialSetup()
{
  _is_elasticity_tensor_guaranteed_isotropic =
      hasGuaranteedMaterialProperty(_elasticity_tensor_name, Guarantee::ISOTROPIC);

  std::vector<MaterialName> models = getParam<std::vector<MaterialName>>("inelastic_models");
  for (unsigned int i = 0; i < _num_models; ++i)
  {
    StressUpdateBase * rrr = dynamic_cast<StressUpdateBase *>(&getMaterialByName(models[i]));
    if (rrr)
    {
      _models.push_back(rrr);
      if (rrr->requiresIsotropicTensor() && !_is_elasticity_tensor_guaranteed_isotropic)
        mooseError("Model " + models[i] +
                   " requires an isotropic elasticity tensor, but the one supplied is not "
                   "guaranteed isotropic");
    }
    else
      mooseError("Model " + models[i] + " is not compatible with ComputeMultipleInelasticStress");
  }
}