Open andrisfreimanis opened 1 year ago
@bwspenc @dschwen as you guys were kind enough to volunteer for peridynamics ownership, do you have any thoughts on this or who we might dispatch this issue to?
I looked into this a bit. The problem here is the execution order of UOs. If at the timestep end the SingularShapeTensorEliminatorUserObjectPD would always be executed first, then it would set the shape tensor to identity before other UOs use the singular one. Instead, PPs and UOs are executed in (I guess) the order they were created, so some other UO forces evaluation of a singular shape tensor, before the SingularShapeTensorEliminatorUserObjectPD can fix it.
Setting execution_order_group = 0
to SingularShapeTensorEliminatorUserObjectPD and execution_order_group = 1
for all other UOs and PPs seems to make it work.
Not sure if this is a bug or working as intended.
They only get executed in the order they are created if there is no explicit dependency between the UOs. Without looking at the code a getUserObject< SingularShapeTensorEliminatorUserObjectPD >("nameparameter")
issued by the UOs that need it to execute first, could possible resolve this dependency automatically. If not, then the execution_order_group
flag will be a viable solution, too. We should just be explicit about that in the docs.
Bug Description
SingularShapeTensorEliminatorUserObjectPD is not called when other UserObjects, such as NodalDamageIndexPD and NodalNumIntactBondsPD, are active.
Steps to Reproduce
I modified Peridynamics module test "failure_tests/2D_singular_shape_tensor_H1NOSPD.i" by adding either NodalDamageIndexPD, or NodalNumIntactBondsPD UserObject. Enabling "singular_shape_tensor" and either "damage" or "intact_bonds" shows that the problem is with both UOs. I copied the two blocks below and the full input files are attached.
Running both files with "show_actions=true" shows that UOs are added
and
Enabling " show_execution_order = 'TIMESTEP_END'" shows that "bond_status" and "damage" is executed, but singular_shape_tensor UO is not. The SingularShapeTensorEliminatorUserObjectPD is not run, the shape tensor becomes singular, and an error is thrown. The same (save "damage" changes to "intact_bonds") output is given when "intact_bonds" are enabled.
The expected output of SingularShapeTensorEliminatorUserObjectPD, which h
The expected output with only SingularShapeTensorEliminatorUserObjectPD enabled is:
Impact
Not enabling SingularShapeTensorEliminatorUserObjectPD means peridynamic correspondence models will fail with singular shape tensor, when damage is high in some local area. This highly reduces model usability.
NodalDamageIndexPD UO automatically calculates damage at each node. Technically, it could be done as a post-processing step after Moose simulation finishes by extracting node and element data from the results file and calculating it separately. However, it is much more convenient for visualization and saves time if the damage results are available already in the exodus output file.
Not working together with NodalNumIntactBondsPD is annoying, but I doubt critical.
singular_and_dmg_ind_UO.txt singular_and_intact_bonds_UO.txt