Hi @sibiao - Thanks for posting these questions and tests to the forum.
First, I think the good news is that your test shows that the strain magnitude updates with each time step (0.01) are correct. Do you agree?
My question is how the old_plastic_strain is calculated? Could the inconsistency in the test results be attributed to the iterative solution of the plastic_strain system?
The explanation below largely follows from the discussion from pull request 4336.
To start, in.composition
is an extrapolation of the old solution at the current time step. Thus, when we were originally subtracting the values from in.composition to update the reaction terms, there was always a small error that only became noticeable in models with very small time steps.
The old_plastic_strain
(or any other of the other “old” strain values) are the old solution (previous time step) extracted at the current cell.
I imagine this difference you see between the expected and observed old values are created during this extraction (interpolation?), but this is then canceled out somewhere else during the updates.
I’m not sure exactly where it is canceled out, but I imagine it may be during the reaction term updates where in.composition
is used.
For example, can you print out the value of in.composition[i][this->introspection().compositional_index_for_name("plastic_strain")
in strain_dependent.cc to see if it also has similar deviations from the expected values?
I also tested the continental_extension case in the cookbooks and it failed. Here I attach the error message and the log file.
That’s weird. We have a test case for that cookbook, that also runs for two time steps. Your model crashed on the second timestep, with an error I haven’t seen before:
An error occurred in line <2721> of file </home/projects/shk00051/candi_dealii9.4.2/tmp/unpack/deal.II-v9.4.2/include/deal.II/dofs/dof_accessor.templates.h> in function
void dealii::DoFCellAccessor<dim, spacedim, lda>::get_dof_values(const InputVector&, ForwardIterator, ForwardIterator) const [with InputVector = dealii::TrilinosWrappers::MPI::Vector; ForwardIterator = double*; int dimension_ = 2; int space_dimension_ = 2; bool level_dof_access = false]
The violated condition was:
this->is_artificial() == false
Additional information:
Can’t ask for DoF indices on artificial cells.
What version of deal.II and ASPECT did you use to run this model? I’m unfortunately not on a computer where I can easily test the most recent ASPECT master, but can do so in a day or two.
Cheers,
John