Ejemplo n.º 1
0
void
PLC_LSH::computeStress()
{
  // Given the stretching, compute the stress increment and add it to the old stress. Also update the creep strain
  // stress = stressOld + stressIncrement
  // creep_strain = creep_strainOld + creep_strainIncrement

  if (_t_step == 0 && !_app.isRestarting())
    return;

  if (_output_iteration_info == true)
  {
    _console
      << std::endl
      << "iteration output for combined creep-plasticity solve:"
      << " time=" <<_t
      << " temperature=" << _temperature[_qp]
      << " int_pt=" << _qp
      << std::endl;
  }

  // compute trial stress
  SymmTensor stress_new( *elasticityTensor() * _strain_increment );
  stress_new += _stress_old;

  SymmTensor creep_strain_increment;
  SymmTensor plastic_strain_increment;
  SymmTensor elastic_strain_increment;
  SymmTensor stress_new_last( stress_new );
  Real delS(_absolute_stress_tolerance+1);
  Real first_delS(delS);
  unsigned int counter(0);

  while (counter < _max_its &&
        delS > _absolute_stress_tolerance &&
        (delS/first_delS) > _relative_tolerance)
  {
    elastic_strain_increment = _strain_increment;
    elastic_strain_increment -= plastic_strain_increment;
    stress_new = *elasticityTensor() * elastic_strain_increment;
    stress_new += _stress_old;

    elastic_strain_increment = _strain_increment;
    computeCreep( elastic_strain_increment, creep_strain_increment, stress_new );

    // now use stress_new to calculate a new effective_trial_stress and determine if
    // yield has occured and if so, calculate the corresponding plastic strain

    elastic_strain_increment -= creep_strain_increment;

    computeLSH( elastic_strain_increment, plastic_strain_increment, stress_new );

    elastic_strain_increment -= plastic_strain_increment;

    // now check convergence
    SymmTensor deltaS(stress_new_last - stress_new);
    delS = std::sqrt(deltaS.doubleContraction(deltaS));
    if (counter == 0)
    {
      first_delS = delS;
    }
    stress_new_last = stress_new;

    if (_output_iteration_info == true)
    {
      _console
        << "stress_it=" << counter
        << " rel_delS=" << delS/first_delS
        << " rel_tol="  << _relative_tolerance
        << " abs_delS=" << delS
        << " abs_tol="  << _absolute_stress_tolerance
        << std::endl;
    }

    ++counter;
  }

  if (counter == _max_its &&
     delS > _absolute_stress_tolerance &&
     (delS/first_delS) > _relative_tolerance)
  {
    mooseError("Max stress iteration hit during plasticity-creep solve!");
  }

  _strain_increment = elastic_strain_increment;
  _stress[_qp] = stress_new;

}
Ejemplo n.º 2
0
void
CombinedCreepPlasticity::computeStress( const Elem & current_elem,
                                        unsigned qp, const SymmElasticityTensor & elasticityTensor,
                                        const SymmTensor & stress_old, SymmTensor & strain_increment,
                                        SymmTensor & stress_new )
{
    // Given the stretching, compute the stress increment and add it to the old stress. Also update the creep strain
    // stress = stressOld + stressIncrement
    // creep_strain = creep_strainOld + creep_strainIncrement

    if(_t_step == 0) return;

    if (_output_iteration_info == true)
    {
        Moose::out
                << std::endl
                << "iteration output for CombinedCreepPlasticity solve:"
                << " time=" <<_t
                << " temperature=" << _temperature[qp]
                << " int_pt=" << qp
                << std::endl;
    }

    // compute trial stress
    stress_new = elasticityTensor * strain_increment;
    stress_new += stress_old;

    const SubdomainID current_block = current_elem.subdomain_id();
    const std::vector<ReturnMappingModel*> & rmm( _submodels[current_block] );
    const unsigned num_submodels = rmm.size();

    SymmTensor inelastic_strain_increment;

    SymmTensor elastic_strain_increment;
    SymmTensor stress_new_last( stress_new );
    Real delS(_absolute_tolerance+1);
    Real first_delS(delS);
    unsigned int counter(0);

    while(counter < _max_its &&
            delS > _absolute_tolerance &&
            (delS/first_delS) > _relative_tolerance &&
            (num_submodels != 1 || counter < 1))
    {
        elastic_strain_increment = strain_increment;
        stress_new = elasticityTensor * (elastic_strain_increment - inelastic_strain_increment);
        stress_new += stress_old;

        for (unsigned i_rmm(0); i_rmm < num_submodels; ++i_rmm)
        {
            rmm[i_rmm]->computeStress( current_elem, qp, elasticityTensor, stress_old, elastic_strain_increment,
                                       stress_new, inelastic_strain_increment );
        }

        // now check convergence
        SymmTensor deltaS(stress_new_last - stress_new);
        delS = std::sqrt(deltaS.doubleContraction(deltaS));
        if (counter == 0)
        {
            first_delS = delS;
        }
        stress_new_last = stress_new;

        if (_output_iteration_info == true)
        {
            Moose::out
                    << "stress_it=" << counter
                    << " rel_delS=" << (0 == first_delS ? 0 : delS/first_delS)
                    << " rel_tol="  << _relative_tolerance
                    << " abs_delS=" << delS
                    << " abs_tol="  << _absolute_tolerance
                    << std::endl;
        }

        ++counter;
    }

    if(counter == _max_its &&
            delS > _absolute_tolerance &&
            (delS/first_delS) > _relative_tolerance)
    {
        mooseError("Max stress iteration hit during CombinedCreepPlasticity solve!");
    }

    strain_increment = elastic_strain_increment;

}