Skip to content

Add temperature parameters for RefJC viscoplasticity, along with GP output #1879

Open
dragos-ana wants to merge 1 commit into4C-multiphysics:mainfrom
dragos-ana:viscoplast-modify-viscoplast-laws-add-return-mapping
Open

Add temperature parameters for RefJC viscoplasticity, along with GP output #1879
dragos-ana wants to merge 1 commit into4C-multiphysics:mainfrom
dragos-ana:viscoplast-modify-viscoplast-laws-add-return-mapping

Conversation

@dragos-ana
Copy link
Copy Markdown
Contributor

@dragos-ana dragos-ana commented Mar 20, 2026

  • Extended Reformulated Johnson-Cook with temperature parameters and pre-evaluate context handling
  • 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

@dragos-ana dragos-ana self-assigned this Mar 20, 2026
@dragos-ana dragos-ana requested a review from Copilot March 20, 2026 14:25
@dragos-ana dragos-ana changed the title Add further parameters for RefJC viscoplasticity, along with GP output Add temperature parameters for RefJC viscoplasticity, along with GP output Mar 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@dragos-ana dragos-ana force-pushed the viscoplast-modify-viscoplast-laws-add-return-mapping branch 2 times, most recently from 3557745 to 8e3279c Compare March 20, 2026 18:52
Comment on lines +104 to +111
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));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the error_status parameter is unused in compute_flow_resistance but adds a lot of code. I would remove it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this pre_evaluate needed here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@dragos-ana dragos-ana force-pushed the viscoplast-modify-viscoplast-laws-add-return-mapping branch from 8e3279c to 4185208 Compare March 27, 2026 19:12
@dragos-ana dragos-ana requested a review from rjoussen March 30, 2026 09:12
@dragos-ana dragos-ana enabled auto-merge March 30, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants