Add temperature parameters for RefJC viscoplasticity, along with GP output #1879
Conversation
There was a problem hiding this comment.
Pull request overview
Extends the Reformulated Johnson–Cook viscoplasticity model with temperature-related parameters and introduces runtime Gauss-point output plumbing for multiplicative-split inelastic materials and viscoplastic laws.
Changes:
- Added temperature parameters (reference temperature, melting temperature, temperature sensitivity) to Reformulated Johnson–Cook and updated affected tests/input files.
- Extended viscoplastic law interface to accept a parameter list in
pre_evaluate()and added hooks for GP runtime output registration/evaluation. - Added runtime output forwarding in multiplicative split material and inelastic defgrad factors; added additional state packing (e.g., defgrad / equiv stress history).
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| unittests/mat/vplast/4C_vplast_reform_johnsoncook_test.cpp | Updates unit test to provide temperature parameters and call new pre_evaluate(params,gp) signature. |
| unittests/mat/4C_inelastic_defgrad_factors_test.cpp | Updates test material input container to include new required RefJC temperature parameters. |
| tests/input_files/poro_solid_nitsche_contact3D_twoelem_twosided_new_struc_vplast.4C.yaml | Adds required RefJC temperature parameters to test input. |
| tests/input_files/poro_new_solid_nitsche_contact3D_twoelem_new_struc_vplast.4C.yaml | Adds required RefJC temperature parameters to test input. |
| tests/input_files/poro_new_solid_nitsche_contact3D_new_struc_vplast.4C.yaml | Adds required RefJC temperature parameters to test input. |
| tests/input_files/mat_transviso_viscoplast_refJC_standard_substep.4C.yaml | Adds required RefJC temperature parameters to test input. |
| tests/input_files/mat_transviso_viscoplast_refJC_log_substep.4C.yaml | Adds required RefJC temperature parameters to test input. |
| tests/input_files/mat_iso_viscoplast_refJC_log_substep.4C.yaml | Adds required RefJC temperature parameters to test input. |
| src/mat/vplast/4C_mat_vplast_reform_johnsoncook.hpp | Adds temperature parameter accessors and new GP output/state members; updates law interface overrides. |
| src/mat/vplast/4C_mat_vplast_reform_johnsoncook.cpp | Implements temperature handling in pre_evaluate(), GP output for yield strength, and packing/unpacking of law state. |
| src/mat/vplast/4C_mat_vplast_law.hpp | Updates pre_evaluate signature to accept Teuchos::ParameterList; adds runtime output hooks to the law interface. |
| src/mat/4C_mat_multiplicative_split_defgrad_elasthyper.hpp | Adds runtime output forwarding API declarations to multiplicative split material and its handler. |
| src/mat/4C_mat_multiplicative_split_defgrad_elasthyper.cpp | Implements runtime output forwarding to inelastic defgrad factors. |
| src/mat/4C_mat_inelastic_defgrad_factors_service.hpp | Extends error enum and time-step quantities to store additional history (equiv stress, defgrad). |
| src/mat/4C_mat_inelastic_defgrad_factors_service.cpp | Initializes/resizes/updates/packs/unpacks new time-step quantities fields. |
| src/mat/4C_mat_inelastic_defgrad_factors.hpp | Adds runtime output hooks to inelastic defgrad factors interface and overrides in the viscoplastic factor. |
| src/mat/4C_mat_inelastic_defgrad_factors.cpp | Passes parameter list down to viscoplastic law pre_evaluate, improves matrix-log error handling, and adds GP runtime output evaluation. |
| src/global_legacy_module/4C_global_legacy_module_validmaterials.cpp | Registers new required RefJC input parameters in material validation/spec. |
3557745 to
8e3279c
Compare
src/global_legacy_module/4C_global_legacy_module_validmaterials.cpp
Outdated
Show resolved
Hide resolved
src/global_legacy_module/4C_global_legacy_module_validmaterials.cpp
Outdated
Show resolved
Hide resolved
| InelasticDefgradTransvIsotropElastViscoplastUtils::ErrorType yield_strength_err_status{ | ||
| InelasticDefgradTransvIsotropElastViscoplastUtils::ErrorType::no_errors}; | ||
| const double yield_strength = | ||
| (parameter()->init_yield_strength() + | ||
| parameter()->isotrop_harden_prefac() * | ||
| std::pow(equiv_plastic_strain, parameter()->isotrop_harden_exp())); | ||
| compute_flow_resistance(equiv_stress, equiv_plastic_strain, yield_strength_err_status); | ||
| FOUR_C_ASSERT_ALWAYS(yield_strength_err_status == | ||
| InelasticDefgradTransvIsotropElastViscoplastUtils::ErrorType::no_errors, | ||
| "Something went wrong when evaluating the yield stress: error = {}", | ||
| EnumTools::enum_name(yield_strength_err_status)); |
There was a problem hiding this comment.
It seems like the error_status parameter is unused in compute_flow_resistance but adds a lot of code. I would remove it.
There was a problem hiding this comment.
True for now ;) This gets used for the Anand law that I will add in a couple of weeks, but I already introduced the common framework here.
|
|
||
| Core::LinAlg::Matrix<10, 10> jacMat(Core::LinAlg::Initialization::zero); | ||
| viscoplastic_law_->pre_evaluate(gp_); // set last_substep <- last_ | ||
| viscoplastic_law_->pre_evaluate(params_, gp_); // set last_substep <- last_ |
There was a problem hiding this comment.
Is this pre_evaluate needed here?
There was a problem hiding this comment.
Good question. The original motivation was to set correct history variables in the case of substepping for the subsequent evaluations. Since my approach has deviated a lot from the original substepping approach, I do not actively use this anymore. But I think that an additional pre_evaluate call does not break anything, although I will have to look at this in more detail at some point. Thanks for spotting it!
| std::vector<double> last_plastic_strain; | ||
|
|
||
| //! equivalent stress at the previous time instant (for all Gauss points) | ||
| std::vector<double> last_equiv_stress; |
There was a problem hiding this comment.
I don't think storing last_equiv_stress is necessary. As far as I can see, it is only used for plotting anyway, so it could be sufficient to only store current. This might also apply to all other TimeStepQuantities which are not "real" history variables.
There was a problem hiding this comment.
Again, not necessary now, but necessary in future PRs.
Sadly, it's kind of difficult to add only code that is directly used, and I had to add such "unnecessary code" to pave the way for upcoming changes.
But thanks anyway for spotting this.
- Extended Reformulated Johnson-Cook with temperature parameters and pre-evaluate context handling. Also improved handling of perfect plasticity. - Added runtime gauss-point output registration/evaluation for multiplicative split material, elasto-viscoplastic material and viscoplastic laws - Saved additional inelastic state data (stress and defgrad) - Updated unit tests and affected input files for new required Reformulated Johnson-Cook parameters Temp: Add copilot changes
8e3279c to
4185208
Compare
Uh oh!
There was an error while loading. Please reload this page.