You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently added solid material model tests (#225, #229). These test whether the implementations for the 2nd PK stress S and material elasticity tensor CC in get_pk2cc() are correct by comparing them against finite difference approximations of the same quantities (S_FD, CC_FD). In these comparisons, we must specify a tolerance, that is, check that S = S_FD and CC = CC_FD within a user-defined tolerance. It can be difficult to determine what is an appropriate tolerance. A more reliable method is to calculate the order of convergence of S - S_FD and CC - CC_FD. If everything is correct, then the order of convergence will match the order of the finite difference scheme.
Solution
Modify solid material model tests to check the order of convergence of S - S_FD and CC - CC_FD. This can be done by computing S_FD for several finite difference perturbations $$h$$. For each $$h$$, we can compute the error, for example for S
$$e(h) = ||S - S_{FD}(h)||$$
where we can use the Frobenius norm
Then, the order of convergence can be calculated by considering $$log(e)$$ vs. $$log(h)$$ and computing the slope of the line that best fits this data.
Problem
I recently added solid material model tests (#225, #229). These test whether the implementations for the 2nd PK stress S and material elasticity tensor CC in
get_pk2cc()
are correct by comparing them against finite difference approximations of the same quantities (S_FD, CC_FD). In these comparisons, we must specify a tolerance, that is, check that S = S_FD and CC = CC_FD within a user-defined tolerance. It can be difficult to determine what is an appropriate tolerance. A more reliable method is to calculate the order of convergence of S - S_FD and CC - CC_FD. If everything is correct, then the order of convergence will match the order of the finite difference scheme.Solution
Modify solid material model tests to check the order of convergence of S - S_FD and CC - CC_FD. This can be done by computing S_FD for several finite difference perturbations$$h$$ . For each $$h$$ , we can compute the error, for example for S
where we can use the Frobenius norm
Then, the order of convergence can be calculated by considering$$log(e)$$ vs. $$log(h)$$ and computing the slope of the line that best fits this data.
I have implemented this in this branch.
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: