Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improving and expanding solid material model tests #249

Open
1 task done
aabrown100-git opened this issue Aug 24, 2024 · 0 comments
Open
1 task done

Improving and expanding solid material model tests #249

aabrown100-git opened this issue Aug 24, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@aabrown100-git
Copy link
Collaborator

aabrown100-git commented Aug 24, 2024

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

$$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.

I have implemented this in this branch.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant