From 986f667753ce993412bbdb87b0f117d66e9a7dba Mon Sep 17 00:00:00 2001 From: Danny Hermawan Date: Thu, 15 Aug 2024 11:48:40 -0400 Subject: [PATCH] Add Composite Power Law Creep for multiphases - Add PowerLawCreepStressUpdate that takes into account multiple different values based on weights so different regions in the mesh can have different plasticity values. - Designed it so it is similar to Composite Elasticity Tensor - Two tests file for CSVDIFF added to: 1) results with the same materials but two phases give the same result as power_law_creep.i 2) creep computation with two different material properties work - Three tests file for RunException to test the vector length of the input parameters. closes #28368 --- .../CompositePowerLawCreepStressUpdate.md | 47 ++++ .../CompositePowerLawCreepStressUpdate.h | 106 +++++++++ .../CompositePowerLawCreepStressUpdate.C | 189 +++++++++++++++ .../composite_power_law_creep.i | 211 +++++++++++++++++ .../composite_power_law_creep_plasticity.i | 216 ++++++++++++++++++ ...omposite_power_law_creep_single_material.i | 210 +++++++++++++++++ .../composite_power_law_creep_small_strain.i | 211 +++++++++++++++++ ...r_law_creep_plasticity_tests_soln_0011.csv | 6 + ..._creep_single_material_tests_soln_0011.csv | 6 + ...law_creep_small_strain_tests_soln_0011.csv | 6 + ...posite_power_law_creep_tests_soln_0011.csv | 6 + .../test/tests/power_law_creep/tests | 65 ++++++ 12 files changed, 1279 insertions(+) create mode 100644 modules/solid_mechanics/doc/content/source/materials/CompositePowerLawCreepStressUpdate.md create mode 100644 modules/solid_mechanics/include/materials/CompositePowerLawCreepStressUpdate.h create mode 100644 modules/solid_mechanics/src/materials/CompositePowerLawCreepStressUpdate.C create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep.i create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_plasticity.i create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_single_material.i create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_small_strain.i create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_plasticity_tests_soln_0011.csv create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_single_material_tests_soln_0011.csv create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_small_strain_tests_soln_0011.csv create mode 100644 modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_tests_soln_0011.csv diff --git a/modules/solid_mechanics/doc/content/source/materials/CompositePowerLawCreepStressUpdate.md b/modules/solid_mechanics/doc/content/source/materials/CompositePowerLawCreepStressUpdate.md new file mode 100644 index 000000000000..c56c48a0ffdf --- /dev/null +++ b/modules/solid_mechanics/doc/content/source/materials/CompositePowerLawCreepStressUpdate.md @@ -0,0 +1,47 @@ +# Composite Power Law Creep Stress Update + +!syntax description /Materials/CompositePowerLawCreepStressUpdate + +## Description + +!include modules/solid_mechanics/common/supplementalRadialReturnStressUpdate.md + +!include source/materials/PowerLawCreepStressUpdate.md + +The increment of inelastic strain is computed from the creep rate in this class. + +\begin{equation} + \label{eq:composite_power_law_creep} + \dot{\epsilon} = \sum_{i=1}^N h_i \left[ A_i \left( \sigma^{trial}_{effective} - 3 G \Delta p \right)^{n_i} \exp \left( \frac{-Q_i}{RT} \right) \right] \left(t - t_o \right)^m +\end{equation} + +where subscript $i$ denotes phase specific material property, $h$ is material properties to interpolate different phases, $A_i$ is the power law creep coefficient, also known as Dorn's Constant, $\sigma^{trial}_{effective}$ is the scalar von Mises trial stress, $G$ is +the isotropic shear modulus, $Q$ is the activation energy, $R$ is the universal +gas constant, $T$ is the temperature, $t$ and $t_o$ are the current and initial +times, respectively, and $n$ and $m$ are exponent values. + +This class calculates an effective trial stress, an effective creep strain rate +increment and the derivative of the creep strain rate, and an effective scalar +inelastic strain increment based on different contributions from different phases; these values are passed to the +[ADRadialReturnStressUpdate](/ADRadialReturnStressUpdate.md) to compute the radial +return stress increment. This isotropic plasticity class also computes the +plastic strain as a stateful material property. + +This class is based on the implicit integration algorithm in +[!cite](dunne2005introduction) pg. 146 - 149. + +`CompositePowerLawCreepStressUpdate` must be run in conjunction with an inelastic +strain return mapping stress calculator such as +[ADComputeMultipleInelasticStress](ADComputeMultipleInelasticStress.md) + +## Example Input File Syntax + +!listing modules/combined/test/tests/power_law_creep/composite_power_law_creep.i block=Materials/power_law_creep + +!syntax parameters /Materials/CompositePowerLawCreepStressUpdate + +!syntax inputs /Materials/CompositePowerLawCreepStressUpdate + +!syntax children /Materials/CompositePowerLawCreepStressUpdate + +!bibtex bibliography diff --git a/modules/solid_mechanics/include/materials/CompositePowerLawCreepStressUpdate.h b/modules/solid_mechanics/include/materials/CompositePowerLawCreepStressUpdate.h new file mode 100644 index 000000000000..6c153bf7c267 --- /dev/null +++ b/modules/solid_mechanics/include/materials/CompositePowerLawCreepStressUpdate.h @@ -0,0 +1,106 @@ +//* This file is part of the MOOSE framework +//* https://www.mooseframework.org +//* +//* All rights reserved, see COPYRIGHT for full restrictions +//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#pragma once + +#include "RadialReturnCreepStressUpdateBase.h" + +/** + * This class uses the stress update material in a radial return isotropic creep + * model. This class is one of the basic radial return constitutive models; more complex + * constitutive models combine creep and plasticity. + * + * This class inherits from RadialReturnCreepStressUpdateBase and must be used + * in conjunction with ComputeMultipleInelasticStress. This class calculates + * creep based on stress, temperature, and time effects. This class also + * computes the creep strain as a stateful material property. This class extends + * from PowerLawCreepStressUpdate to include multiple different phases. + */ +template +class CompositePowerLawCreepStressUpdateTempl : public RadialReturnCreepStressUpdateBaseTempl +{ +public: + static InputParameters validParams(); + + CompositePowerLawCreepStressUpdateTempl(const InputParameters & parameters); + + virtual Real computeStrainEnergyRateDensity( + const GenericMaterialProperty & stress, + const GenericMaterialProperty & strain_rate) override; + + virtual bool substeppingCapabilityEnabled() override; + + virtual void resetIncrementalMaterialProperties() override; + + virtual void + computeStressInitialize(const GenericReal & effective_trial_stress, + const GenericRankFourTensor & elasticity_tensor) override; + virtual GenericReal computeResidual(const GenericReal & effective_trial_stress, + const GenericReal & scalar) override + { + return computeResidualInternal>(effective_trial_stress, scalar); + } + virtual GenericReal computeDerivative(const GenericReal & effective_trial_stress, + const GenericReal & scalar) override; + virtual void + computeStressFinalize(const GenericRankTwoTensor & plastic_strain_increment) override; + +protected: + virtual GenericChainedReal + computeResidualAndDerivative(const GenericReal & effective_trial_stress, + const GenericChainedReal & scalar) override + { + return computeResidualInternal>(effective_trial_stress, scalar); + } + + /// Temperature variable value + const GenericVariableValue * const _temperature; + + /// Leading coefficient + std::vector _coefficient; + + /// Exponent on the effective stress + std::vector _n_exponent; + + /// Exponent on time + const Real _m_exponent; + + /// Activation energy for exp term + std::vector _activation_energy; + + /// Gas constant for exp term + const Real _gas_constant; + + /// Simulation start time + const Real _start_time; + + /// Exponential calculated from current time + Real _exp_time; + + /// vector to keep the material property name for switching function material + const std::vector _switchingFuncNames; + unsigned int _num_materials; + + /// switching functions for each phase + std::vector *> _switchingFunc; + + usingTransientInterfaceMembers; + using RadialReturnCreepStressUpdateBaseTempl::_qp; + using RadialReturnCreepStressUpdateBaseTempl::_three_shear_modulus; + using RadialReturnCreepStressUpdateBaseTempl::_creep_strain; + using RadialReturnCreepStressUpdateBaseTempl::_creep_strain_old; + +private: + template + ScalarType computeResidualInternal(const GenericReal & effective_trial_stress, + const ScalarType & scalar); +}; + +typedef CompositePowerLawCreepStressUpdateTempl CompositePowerLawCreepStressUpdate; +typedef CompositePowerLawCreepStressUpdateTempl ADCompositePowerLawCreepStressUpdate; diff --git a/modules/solid_mechanics/src/materials/CompositePowerLawCreepStressUpdate.C b/modules/solid_mechanics/src/materials/CompositePowerLawCreepStressUpdate.C new file mode 100644 index 000000000000..6505eabd678b --- /dev/null +++ b/modules/solid_mechanics/src/materials/CompositePowerLawCreepStressUpdate.C @@ -0,0 +1,189 @@ +//* This file is part of the MOOSE framework +//* https://www.mooseframework.org +//* +//* All rights reserved, see COPYRIGHT for full restrictions +//* https://github.com/idaholab/moose/blob/master/COPYRIGHT +//* +//* Licensed under LGPL 2.1, please see LICENSE for details +//* https://www.gnu.org/licenses/lgpl-2.1.html + +#include "CompositePowerLawCreepStressUpdate.h" +#include + +registerMooseObject("SolidMechanicsApp", CompositePowerLawCreepStressUpdate); +registerMooseObject("SolidMechanicsApp", ADCompositePowerLawCreepStressUpdate); + +template +InputParameters +CompositePowerLawCreepStressUpdateTempl::validParams() +{ + InputParameters params = RadialReturnCreepStressUpdateBaseTempl::validParams(); + params.addClassDescription( + "This class uses the stress update material in a radial return isotropic power law creep " + "model. This class can be used in conjunction with other creep and plasticity materials " + "for more complex simulations. This class is an extension to include multi-phase " + "capability."); + + // Linear strain hardening parameters + params.addRequiredCoupledVar("temperature", "Coupled temperature"); + params.addRequiredParam>( + "coefficient", + "a vector of leading coefficient / Dorn Constant in power-law equation for each material."); + params.addRequiredParam>( + "n_exponent", + "a vector of Exponent on effective stress in power-law equation for each material"); + params.addParam("m_exponent", 0.0, "Exponent on time in power-law equation"); + params.addRequiredParam>("activation_energy", + "a vector of Activation energy for Arrhenius-type " + "equation of the Dorn Constant for each material"); + params.addParam("gas_constant", 8.3143, "Universal gas constant"); + params.addParam("start_time", 0.0, "Start time (if not zero)"); + params.addRequiredParam>( + "switching_functions", "a vector of switching functions for each material"); + return params; +} + +template +CompositePowerLawCreepStressUpdateTempl::CompositePowerLawCreepStressUpdateTempl( + const InputParameters & parameters) + : RadialReturnCreepStressUpdateBaseTempl(parameters), + _temperature(this->isParamValid("temperature") + ? &this->template coupledGenericValue("temperature") + : nullptr), + _coefficient(this->template getParam>("coefficient")), + _n_exponent(this->template getParam>("n_exponent")), + _m_exponent(this->template getParam("m_exponent")), + _activation_energy(this->template getParam>("activation_energy")), + _gas_constant(this->template getParam("gas_constant")), + _start_time(this->template getParam("start_time")), + _switchingFuncNames( + this->template getParam>("switching_functions")) + +{ + _num_materials = _switchingFuncNames.size(); + if (_n_exponent.size() != _num_materials) + this->paramError("n_exponent", "n exponent must be equal to the number of switching functions"); + + if (_coefficient.size() != _num_materials) + this->paramError("coefficient", + "number of Dorn constant must be equal to the number of switching functions"); + + if (_activation_energy.size() != _num_materials) + this->paramError("activation_energy", + "activation energy must be equal to the number of swithing functions"); + + if (_start_time < this->_app.getStartTime() && (std::trunc(_m_exponent) != _m_exponent)) + this->paramError("start_time", + "Start time must be equal to or greater than the Executioner start_time if a " + "non-integer m_exponent is used"); + _switchingFunc.resize(_num_materials); + // set switching functions material properties for each phase + for (unsigned int i = 0; i < _num_materials; ++i) + { + _switchingFunc[i] = + &this->template getGenericMaterialProperty(_switchingFuncNames[i]); + } +} + +template +void +CompositePowerLawCreepStressUpdateTempl::computeStressInitialize( + const GenericReal & effective_trial_stress, + const GenericRankFourTensor & elasticity_tensor) +{ + RadialReturnStressUpdateTempl::computeStressInitialize(effective_trial_stress, + elasticity_tensor); + _exp_time = std::pow(_t - _start_time, _m_exponent); +} + +template +template +ScalarType +CompositePowerLawCreepStressUpdateTempl::computeResidualInternal( + const GenericReal & effective_trial_stress, const ScalarType & scalar) +{ + const ScalarType stress_delta = effective_trial_stress - _three_shear_modulus * scalar; + ScalarType creep_rate = + _coefficient[0] * std::pow(stress_delta, _n_exponent[0]) * (*_switchingFunc[0])[_qp] * + std::exp(-_activation_energy[0] / (_gas_constant * (*_temperature)[_qp])) * _exp_time; + for (unsigned int n = 1; n < _num_materials; ++n) + { + creep_rate += + _coefficient[n] * std::pow(stress_delta, _n_exponent[n]) * (*_switchingFunc[n])[_qp] * + std::exp(-_activation_energy[n] / (_gas_constant * (*_temperature)[_qp])) * _exp_time; + } + return creep_rate * _dt - scalar; +} + +template +GenericReal +CompositePowerLawCreepStressUpdateTempl::computeDerivative( + const GenericReal & effective_trial_stress, const GenericReal & scalar) +{ + const GenericReal stress_delta = effective_trial_stress - _three_shear_modulus * scalar; + GenericReal creep_rate_derivative = + -_coefficient[0] * _three_shear_modulus * _n_exponent[0] * + std::pow(stress_delta, _n_exponent[0] - 1.0) * (*_switchingFunc[0])[_qp] * + std::exp(-_activation_energy[0] / (_gas_constant * (*_temperature)[_qp])) * _exp_time; + + for (unsigned int n = 1; n < _num_materials; ++n) + { + creep_rate_derivative += + -_coefficient[n] * _three_shear_modulus * _n_exponent[n] * + std::pow(stress_delta, _n_exponent[n] - 1.0) * (*_switchingFunc[n])[_qp] * + std::exp(-_activation_energy[n] / (_gas_constant * (*_temperature)[_qp])) * _exp_time; + } + return creep_rate_derivative * _dt - 1.0; +} + +template +Real +CompositePowerLawCreepStressUpdateTempl::computeStrainEnergyRateDensity( + const GenericMaterialProperty & stress, + const GenericMaterialProperty & strain_rate) +{ + GenericReal interpolated_exponent = 0.0; + for (unsigned int n = 0; n < _num_materials; ++n) + { + interpolated_exponent += (_n_exponent[n] / (_n_exponent[n] + 1)) * (*_switchingFunc[n])[_qp]; + } + return MetaPhysicL::raw_value(interpolated_exponent * + stress[_qp].doubleContraction((strain_rate)[_qp])); +} + +template +void +CompositePowerLawCreepStressUpdateTempl::computeStressFinalize( + const GenericRankTwoTensor & plastic_strain_increment) +{ + _creep_strain[_qp] += plastic_strain_increment; +} + +template +void +CompositePowerLawCreepStressUpdateTempl::resetIncrementalMaterialProperties() +{ + _creep_strain[_qp] = _creep_strain_old[_qp]; +} + +template +bool +CompositePowerLawCreepStressUpdateTempl::substeppingCapabilityEnabled() +{ + return this->_use_substepping != RadialReturnStressUpdateTempl::SubsteppingType::NONE; +} + +template class CompositePowerLawCreepStressUpdateTempl; +template class CompositePowerLawCreepStressUpdateTempl; +template Real +CompositePowerLawCreepStressUpdateTempl::computeResidualInternal(const Real &, + const Real &); +template ADReal +CompositePowerLawCreepStressUpdateTempl::computeResidualInternal(const ADReal &, + const ADReal &); +template ChainedReal +CompositePowerLawCreepStressUpdateTempl::computeResidualInternal( + const Real &, const ChainedReal &); +template ChainedADReal +CompositePowerLawCreepStressUpdateTempl::computeResidualInternal( + const ADReal &, const ChainedADReal &); diff --git a/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep.i b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep.i new file mode 100644 index 000000000000..c5a445252cc7 --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep.i @@ -0,0 +1,211 @@ +# 1x1x1 unit cube with uniform pressure on top face and 2 phases with different materials + +[GlobalParams] + displacements = 'disp_x disp_y disp_z' +[] + +[Mesh] + type = GeneratedMesh + dim = 3 + nx = 1 + ny = 1 + nz = 6 + zmax = 1 + xmax = 1 + ymax = 1 +[] + +[Variables] + [temp] + order = FIRST + family = LAGRANGE + initial_condition = 1000.0 + [] +[] + +[ICs] + [phase1IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 1 + outside = 0 + variable = phase1 + int_width=0.01 + [] + [phase2IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 0 + outside = 1 + variable = phase2 + int_width=0.01 + [] +[] + +[AuxVariables] + [phase1] + [] + [phase2] + [] +[] + +[Physics/SolidMechanics/QuasiStatic] + [all] + strain = FINITE + incremental = true + add_variables = true + generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy' + [] +[] + +[Functions] + [top_pull] + type = PiecewiseLinear + x = '0 1' + y = '1 1' + [] +[] + +[Kernels] + [heat] + type = Diffusion + variable = temp + [] + [heat_ie] + type = TimeDerivative + variable = temp + [] +[] + +[BCs] + [u_top_pull] + type = Pressure + variable = disp_y + boundary = top + factor = -10.0e6 + function = top_pull + [] + [u_bottom_fix] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [] + [u_yz_fix] + type = DirichletBC + variable = disp_x + boundary = left + value = 0.0 + [] + [u_xy_fix] + type = DirichletBC + variable = disp_z + boundary = back + value = 0.0 + [] + [temp_fix] + type = DirichletBC + variable = temp + boundary = 'bottom top' + value = 1000.0 + [] +[] + +[Materials] + [elasticity_tensor1] + type = ComputeIsotropicElasticityTensor + base_name = C1 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [elasticity_tensor2] + type = ComputeIsotropicElasticityTensor + base_name = C2 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [h1] + type = ParsedMaterial + property_name = h1 + coupled_variables = phase1 + expression = '0.5*tanh(20*(phase1-0.5))+0.5' + [] + [h2] + type = ParsedMaterial + property_name = h2 + coupled_variables = phase2 + expression = '0.5*tanh(20*(phase2-0.5))+0.5' + [] + [./C] + type = CompositeElasticityTensor + coupled_variables = 'phase1 phase2' + tensors = 'C1 C2' + weights = 'h1 h2' + [../] + [radial_return_stress] + type = ComputeMultipleInelasticStress + inelastic_models = 'power_law_creep' + tangent_operator = elastic + [] + [power_law_creep] + type = CompositePowerLawCreepStressUpdate + coefficient = '1.0e-15 2.0e-18' + n_exponent = '4 5' + activation_energy = '3.0e5 3.5e5' + switching_functions = 'h1 h2' + temperature = temp + [] +[] + +[VectorPostprocessors] + [./soln] + type = LineValueSampler + warn_discontinuous_face_values = false + sort_by = x + variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz' + start_point = '0 0 0.0' + end_point = '1.0 1.0 1.0' + num_points = 5 + outputs = tests + [../] +[] + +[Executioner] + type = Transient + solve_type = 'PJFNK' + + petsc_options = '-snes_ksp' + petsc_options_iname = '-ksp_gmres_restart' + petsc_options_value = '101' + + line_search = 'none' + + l_max_its = 20 + nl_max_its = 20 + nl_rel_tol = 1.0e-9 + nl_abs_tol = 1.0e-9 + l_tol = 1e-10 + start_time = 0.0 + end_time = 1.0 + num_steps = 10 + dt = 0.1 +[] + +[Outputs] + exodus = false + [./tests] + type = CSV + execute_on = final + [../] +[] + diff --git a/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_plasticity.i b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_plasticity.i new file mode 100644 index 000000000000..97f846b20684 --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_plasticity.i @@ -0,0 +1,216 @@ +# 1x1x1 unit cube with uniform pressure on top face and 2 phases with different materials + +[GlobalParams] + displacements = 'disp_x disp_y disp_z' +[] + +[Mesh] + type = GeneratedMesh + dim = 3 + nx = 1 + ny = 1 + nz = 6 + zmax = 1 + xmax = 1 + ymax = 1 +[] + +[Variables] + [temp] + order = FIRST + family = LAGRANGE + initial_condition = 1000.0 + [] +[] + +[ICs] + [phase1IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 1 + outside = 0 + variable = phase1 + int_width=0.01 + [] + [phase2IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 0 + outside = 1 + variable = phase2 + int_width=0.01 + [] +[] + +[AuxVariables] + [phase1] + [] + [phase2] + [] +[] + +[Physics/SolidMechanics/QuasiStatic] + [all] + strain = FINITE + incremental = true + add_variables = true + generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy' + [] +[] + +[Functions] + [top_pull] + type = PiecewiseLinear + x = '0 1' + y = '1 1' + [] +[] + +[Kernels] + [heat] + type = Diffusion + variable = temp + [] + [heat_ie] + type = TimeDerivative + variable = temp + [] +[] + +[BCs] + [u_top_pull] + type = Pressure + variable = disp_y + boundary = top + factor = -10.0e6 + function = top_pull + [] + [u_bottom_fix] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [] + [u_yz_fix] + type = DirichletBC + variable = disp_x + boundary = left + value = 0.0 + [] + [u_xy_fix] + type = DirichletBC + variable = disp_z + boundary = back + value = 0.0 + [] + [temp_fix] + type = DirichletBC + variable = temp + boundary = 'bottom top' + value = 1000.0 + [] +[] + +[Materials] + [elasticity_tensor1] + type = ComputeIsotropicElasticityTensor + base_name = C1 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [elasticity_tensor2] + type = ComputeIsotropicElasticityTensor + base_name = C2 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [h1] + type = ParsedMaterial + property_name = h1 + coupled_variables = phase1 + expression = '0.5*tanh(20*(phase1-0.5))+0.5' + [] + [h2] + type = ParsedMaterial + property_name = h2 + coupled_variables = phase2 + expression = '0.5*tanh(20*(phase2-0.5))+0.5' + [] + [./C] + type = CompositeElasticityTensor + coupled_variables = 'phase1 phase2' + tensors = 'C1 C2' + weights = 'h1 h2' + [../] + [radial_return_stress] + type = ComputeMultipleInelasticStress + inelastic_models = 'power_law_creep plas' + tangent_operator = elastic + [] + [power_law_creep] + type = CompositePowerLawCreepStressUpdate + coefficient = '1.0e-15 2.0e-18' + n_exponent = '4 5' + activation_energy = '3.0e5 3.5e5' + switching_functions = 'h1 h2' + temperature = temp + [] + [./plas] + type = IsotropicPlasticityStressUpdate + hardening_constant = 1 + yield_stress = 1e30 + [../] +[] + +[VectorPostprocessors] + [./soln] + type = LineValueSampler + warn_discontinuous_face_values = false + sort_by = x + variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz' + start_point = '0 0 0.0' + end_point = '1.0 1.0 1.0' + num_points = 5 + outputs = tests + [../] +[] + +[Executioner] + type = Transient + solve_type = 'PJFNK' + + petsc_options = '-snes_ksp' + petsc_options_iname = '-ksp_gmres_restart' + petsc_options_value = '101' + + line_search = 'none' + + l_max_its = 20 + nl_max_its = 20 + nl_rel_tol = 1.0e-9 + nl_abs_tol = 1.0e-9 + l_tol = 1e-10 + start_time = 0.0 + end_time = 1.0 + num_steps = 10 + dt = 0.1 +[] + +[Outputs] + exodus = false + [./tests] + type = CSV + execute_on = final + [../] +[] + diff --git a/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_single_material.i b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_single_material.i new file mode 100644 index 000000000000..2cbe8ac81a2b --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_single_material.i @@ -0,0 +1,210 @@ +# 1x1x1 unit cube with uniform pressure on top face and 2 phases but the same material + +[GlobalParams] + displacements = 'disp_x disp_y disp_z' +[] + +[Mesh] + type = GeneratedMesh + dim = 3 + nx = 1 + ny = 1 + nz = 6 + zmax = 1 + xmax = 1 + ymax = 1 +[] + +[Variables] + [temp] + order = FIRST + family = LAGRANGE + initial_condition = 1000.0 + [] +[] + +[ICs] + [phase1IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 1 + outside = 0 + variable = phase1 + int_width=0.01 + [] + [phase2IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 0 + outside = 1 + variable = phase2 + int_width=0.01 + [] +[] + +[AuxVariables] + [phase1] + [] + [phase2] + [] +[] + +[Physics/SolidMechanics/QuasiStatic] + [all] + strain = FINITE + incremental = true + add_variables = true + generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy' + [] +[] + +[Functions] + [top_pull] + type = PiecewiseLinear + x = '0 1' + y = '1 1' + [] +[] + +[Kernels] + [heat] + type = Diffusion + variable = temp + [] + [heat_ie] + type = TimeDerivative + variable = temp + [] +[] + +[BCs] + [u_top_pull] + type = Pressure + variable = disp_y + boundary = top + factor = -10.0e6 + function = top_pull + [] + [u_bottom_fix] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [] + [u_yz_fix] + type = DirichletBC + variable = disp_x + boundary = left + value = 0.0 + [] + [u_xy_fix] + type = DirichletBC + variable = disp_z + boundary = back + value = 0.0 + [] + [temp_fix] + type = DirichletBC + variable = temp + boundary = 'bottom top' + value = 1000.0 + [] +[] + +[Materials] + [elasticity_tensor1] + type = ComputeIsotropicElasticityTensor + base_name = C1 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [elasticity_tensor2] + type = ComputeIsotropicElasticityTensor + base_name = C2 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [h1] + type = ParsedMaterial + property_name = h1 + coupled_variables = phase1 + expression = '0.5*tanh(20*(phase1-0.5))+0.5' + [] + [h2] + type = ParsedMaterial + property_name = h2 + coupled_variables = phase2 + expression = '0.5*tanh(20*(phase2-0.5))+0.5' + [] + [./C] + type = CompositeElasticityTensor + coupled_variables = 'phase1 phase2' + tensors = 'C1 C2' + weights = 'h1 h2' + [../] + [radial_return_stress] + type = ComputeMultipleInelasticStress + inelastic_models = 'power_law_creep' + tangent_operator = elastic + [] + [power_law_creep] + type = CompositePowerLawCreepStressUpdate + coefficient = '1.0e-15 1.0e-15' + n_exponent = '4 4' + activation_energy = '3.0e5 3.0e5' + switching_functions = 'h1 h2' + temperature = temp + [] +[] + +[VectorPostprocessors] + [./soln] + type = LineValueSampler + warn_discontinuous_face_values = false + sort_by = x + variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz' + start_point = '0 0 0.0' + end_point = '1.0 1.0 1.0' + num_points = 5 + outputs = tests + [../] +[] + +[Executioner] + type = Transient + solve_type = 'PJFNK' + + petsc_options = '-snes_ksp' + petsc_options_iname = '-ksp_gmres_restart' + petsc_options_value = '101' + + line_search = 'none' + + l_max_its = 20 + nl_max_its = 20 + nl_rel_tol = 1.0e-9 + nl_abs_tol = 1.0e-9 + l_tol = 1e-10 + start_time = 0.0 + end_time = 1.0 + num_steps = 10 + dt = 0.1 +[] + +[Outputs] + exodus = false + [./tests] + type = CSV + execute_on = final + [../] +[] diff --git a/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_small_strain.i b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_small_strain.i new file mode 100644 index 000000000000..d35376b6d374 --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/composite_power_law_creep_small_strain.i @@ -0,0 +1,211 @@ +# 1x1x1 unit cube with uniform pressure on top face and 2 phases with different materials + +[GlobalParams] + displacements = 'disp_x disp_y disp_z' +[] + +[Mesh] + type = GeneratedMesh + dim = 3 + nx = 1 + ny = 1 + nz = 6 + zmax = 1 + xmax = 1 + ymax = 1 +[] + +[Variables] + [temp] + order = FIRST + family = LAGRANGE + initial_condition = 1000.0 + [] +[] + +[ICs] + [phase1IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 1 + outside = 0 + variable = phase1 + int_width=0.01 + [] + [phase2IC] + type = BoundingBoxIC + x1 = -1 + x2 = 1.5 + y1 = -1 + y2 = 1.5 + z1 = -1 + z2 = 1.0 + inside = 0 + outside = 1 + variable = phase2 + int_width=0.01 + [] +[] + +[AuxVariables] + [phase1] + [] + [phase2] + [] +[] + +[Physics/SolidMechanics/QuasiStatic] + [all] + strain = SMALL + incremental = true + add_variables = true + generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy' + [] +[] + +[Functions] + [top_pull] + type = PiecewiseLinear + x = '0 1' + y = '1 1' + [] +[] + +[Kernels] + [heat] + type = Diffusion + variable = temp + [] + [heat_ie] + type = TimeDerivative + variable = temp + [] +[] + +[BCs] + [u_top_pull] + type = Pressure + variable = disp_y + boundary = top + factor = -10.0e6 + function = top_pull + [] + [u_bottom_fix] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [] + [u_yz_fix] + type = DirichletBC + variable = disp_x + boundary = left + value = 0.0 + [] + [u_xy_fix] + type = DirichletBC + variable = disp_z + boundary = back + value = 0.0 + [] + [temp_fix] + type = DirichletBC + variable = temp + boundary = 'bottom top' + value = 1000.0 + [] +[] + +[Materials] + [elasticity_tensor1] + type = ComputeIsotropicElasticityTensor + base_name = C1 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [elasticity_tensor2] + type = ComputeIsotropicElasticityTensor + base_name = C2 + youngs_modulus = 2e11 + poissons_ratio = 0.3 + [] + [h1] + type = ParsedMaterial + property_name = h1 + coupled_variables = phase1 + expression = '0.5*tanh(20*(phase1-0.5))+0.5' + [] + [h2] + type = ParsedMaterial + property_name = h2 + coupled_variables = phase2 + expression = '0.5*tanh(20*(phase2-0.5))+0.5' + [] + [./C] + type = CompositeElasticityTensor + coupled_variables = 'phase1 phase2' + tensors = 'C1 C2' + weights = 'h1 h2' + [../] + [radial_return_stress] + type = ComputeMultipleInelasticStress + inelastic_models = 'power_law_creep' + tangent_operator = elastic + [] + [power_law_creep] + type = CompositePowerLawCreepStressUpdate + coefficient = '1.0e-15 2.0e-18' + n_exponent = '4 5' + activation_energy = '3.0e5 3.5e5' + switching_functions = 'h1 h2' + temperature = temp + [] +[] + +[VectorPostprocessors] + [./soln] + type = LineValueSampler + warn_discontinuous_face_values = false + sort_by = x + variable = 'disp_x disp_y disp_z creep_strain_xx creep_strain_yy creep_strain_zz' + start_point = '0 0 0.0' + end_point = '1.0 1.0 1.0' + num_points = 5 + outputs = tests + [../] +[] + +[Executioner] + type = Transient + solve_type = 'PJFNK' + + petsc_options = '-snes_ksp' + petsc_options_iname = '-ksp_gmres_restart' + petsc_options_value = '101' + + line_search = 'none' + + l_max_its = 20 + nl_max_its = 20 + nl_rel_tol = 1.0e-9 + nl_abs_tol = 1.0e-9 + l_tol = 1e-10 + start_time = 0.0 + end_time = 1.0 + num_steps = 10 + dt = 0.1 +[] + +[Outputs] + exodus = false + [./tests] + type = CSV + execute_on = final + [../] +[] + diff --git a/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_plasticity_tests_soln_0011.csv b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_plasticity_tests_soln_0011.csv new file mode 100644 index 000000000000..f5463e4019e2 --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_plasticity_tests_soln_0011.csv @@ -0,0 +1,6 @@ +creep_strain_xx,creep_strain_yy,creep_strain_zz,disp_x,disp_y,disp_z,id,x,y,z +-0.0010964148331281,0.0021929915140151,-0.0010965766808871,0,0,0,0,0,0,0 +-0.0010986390406952,0.0021973679460039,-0.0010987289053087,-0.0002806190861507,0.00056444168367,-0.000277380729545,0.43301270189222,0.25,0.25,0.25 +-0.0011031256727134,0.0022062630203603,-0.0011031373476469,-0.00056020844053852,0.0011324389947094,-0.00055699964080945,0.86602540378444,0.5,0.5,0.5 +-0.0011192788190876,0.0022389723265108,-0.0011196935074233,-0.00084571410933404,0.0017148592490902,-0.00084022511983162,1.2990381056767,0.75,0.75,0.75 +-0.0011323794288009,0.0022638722645202,-0.0011314928357193,-0.0011428835593524,0.0023152767508013,-0.0011270152200119,1.7320508075689,1,1,1 diff --git a/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_single_material_tests_soln_0011.csv b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_single_material_tests_soln_0011.csv new file mode 100644 index 000000000000..b66f5972c1aa --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_single_material_tests_soln_0011.csv @@ -0,0 +1,6 @@ +creep_strain_xx,creep_strain_yy,creep_strain_zz,disp_x,disp_y,disp_z,id,x,y,z +-0.0010680153122616,0.0021360306245232,-0.0010680153122616,0,0,0,0,0,0,0 +-0.0010680153122615,0.0021360306245235,-0.001068015312262,-0.00027060726996221,0.00054710546828309,-0.00027060726996226,0.43301270189222,0.25,0.25,0.25 +-0.0010680153122615,0.0021360306245232,-0.0010680153122617,-0.00054121453992436,0.0010942109365663,-0.00054121453992448,0.86602540378444,0.5,0.5,0.5 +-0.0010680153122614,0.002136030624523,-0.0010680153122616,-0.0008118218098866,0.0016413164048495,-0.00081182180988663,1.2990381056767,0.75,0.75,0.75 +-0.0010680153122614,0.002136030624523,-0.0010680153122616,-0.0010824290798489,0.0021884218731326,-0.0010824290798488,1.7320508075689,1,1,1 diff --git a/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_small_strain_tests_soln_0011.csv b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_small_strain_tests_soln_0011.csv new file mode 100644 index 000000000000..7e9e81b6f9bf --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_small_strain_tests_soln_0011.csv @@ -0,0 +1,6 @@ +creep_strain_xx,creep_strain_yy,creep_strain_zz,disp_x,disp_y,disp_z,id,x,y,z +-0.0010909029205772,0.0021819593085215,-0.0010910563879443,0,0,0,0,0,0,0 +-0.0010931199322583,0.0021863210824357,-0.0010932011501774,-0.0002793793526856,0.00056101318095363,-0.00027615230164996,0.43301270189222,0.25,0.25,0.25 +-0.0010975922552659,0.0021951878378886,-0.0010975955826227,-0.00055773419768527,0.001125555473774,-0.00055452799736543,0.86602540378444,0.5,0.5,0.5 +-0.0011136953061989,0.0022278094611556,-0.0011141141549568,-0.00084199541358978,0.0017044487384201,-0.00083649553217788,1.2990381056767,0.75,0.75,0.75 +-0.0011267550995435,0.0022526548887002,-0.0011258997891567,-0.0011379009890365,0.0023012714228749,-0.001122017455491,1.7320508075689,1,1,1 diff --git a/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_tests_soln_0011.csv b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_tests_soln_0011.csv new file mode 100644 index 000000000000..f5463e4019e2 --- /dev/null +++ b/modules/solid_mechanics/test/tests/power_law_creep/gold/composite_power_law_creep_tests_soln_0011.csv @@ -0,0 +1,6 @@ +creep_strain_xx,creep_strain_yy,creep_strain_zz,disp_x,disp_y,disp_z,id,x,y,z +-0.0010964148331281,0.0021929915140151,-0.0010965766808871,0,0,0,0,0,0,0 +-0.0010986390406952,0.0021973679460039,-0.0010987289053087,-0.0002806190861507,0.00056444168367,-0.000277380729545,0.43301270189222,0.25,0.25,0.25 +-0.0011031256727134,0.0022062630203603,-0.0011031373476469,-0.00056020844053852,0.0011324389947094,-0.00055699964080945,0.86602540378444,0.5,0.5,0.5 +-0.0011192788190876,0.0022389723265108,-0.0011196935074233,-0.00084571410933404,0.0017148592490902,-0.00084022511983162,1.2990381056767,0.75,0.75,0.75 +-0.0011323794288009,0.0022638722645202,-0.0011314928357193,-0.0011428835593524,0.0023152767508013,-0.0011270152200119,1.7320508075689,1,1,1 diff --git a/modules/solid_mechanics/test/tests/power_law_creep/tests b/modules/solid_mechanics/test/tests/power_law_creep/tests index 13908f3869d7..2c6826ba6e82 100644 --- a/modules/solid_mechanics/test/tests/power_law_creep/tests +++ b/modules/solid_mechanics/test/tests/power_law_creep/tests @@ -127,4 +127,69 @@ detail = 'calculate a perfect Jacobian with the small strain formulation' [] [] + [composite_power_law_creep] + type = 'CSVDiff' + input = 'composite_power_law_creep.i' + csvdiff = 'composite_power_law_creep_tests_soln_0011.csv' + design = 'CompositePowerLawCreepStressUpdate.md' + requirement = "The system shall provide a phase-dependent power law creep that computes the strain with different material properties." + issues = '#28368' + [] + [composite_power_law_creep_single_material] + type = 'CSVDiff' + input = 'composite_power_law_creep_single_material.i' + csvdiff = 'composite_power_law_creep_single_material_tests_soln_0011.csv' + design = 'CompositePowerLawCreepStressUpdate.md' + requirement = "The system shall provide a phase-dependent power law creep that gives the same output as power_law_creep.i if given the same materials to all the phases." + issues = '#28368' + [] + [composite_power_law_creep_small_strain] + type = 'CSVDiff' + input = 'composite_power_law_creep_small_strain.i' + csvdiff = 'composite_power_law_creep_small_strain_tests_soln_0011.csv' + design = 'CompositePowerLawCreepStressUpdate.md' + requirement = "The system shall provide a phase-dependent power law creep that works with small strain." + issues = '#28368' + [] + [composite_power_law_creep_plasticity] + type = 'CSVDiff' + input = 'composite_power_law_creep_plasticity.i' + csvdiff = 'composite_power_law_creep_plasticity_tests_soln_0011.csv' + design = 'CompositePowerLawCreepStressUpdate.md' + requirement = "The system shall provide a phase-dependent power law creep that works with plasticity." + issues = '#28368' + [] + [except_composite_power_law_activation_energy] + type = 'RunException' + input = 'composite_power_law_creep.i' + cli_args = "Materials/power_law_creep/activation_energy='3.0e5 3.5e5 4.5e5'" + prereq = composite_power_law_creep + design = 'CompositePowerLawCreepStressUpdate.md' + expect_err = 'activation energy must be equal to the number of swithing functions' + requirement = "The system shall produce an error" + " if the input activation energies are not the same length as the switching functions provided." + issues = '#28368' + [] + [except_composite_power_law_coefficient] + type = 'RunException' + input = 'composite_power_law_creep.i' + cli_args = "Materials/power_law_creep/coefficient='1.0e-15 2.0e-18 1.0e-18'" + prereq = except_composite_power_law_activation_energy + design = 'CompositePowerLawCreepStressUpdate.md' + expect_err = 'number of Dorn constant must be equal to the number of switching functions' + requirement = "The system shall produce an error" + " if the input coefficients are not the same length as the switching functions provided." + issues = '#28368' + [] + [except_composite_power_law_n_exponent] + type = 'RunException' + input = 'composite_power_law_creep.i' + cli_args = "Materials/power_law_creep/n_exponent='4 5 6'" + prereq = except_composite_power_law_coefficient + design = 'CompositePowerLawCreepStressUpdate.md' + expect_err = 'n exponent must be equal to the number of switching functions' + requirement = "The system shall produce an error" + " if the input n exponents are not the same length as the switching functions provided." + issues = '#28368' + [] []