cortner / JuLIPMaterials.jl

Collection of Tools for Computational Materials Science
Other
9 stars 3 forks source link

Overhaul of CLE and addition of anisotropic fracture #16

Closed jameskermode closed 3 years ago

jameskermode commented 3 years ago

I'll leave this as a draft until the corresponding PR to JuLIP is merged (coming up next)

jameskermode commented 3 years ago

Corresponding JuLIP PR is JuliaMolSim/JuLIP.jl#144

jameskermode commented 3 years ago

These changes are quite extensive so happy to discuss anything before merging.

The old elastic_moduli() was out by a factor of -2. I found the factor of 2, which came from only setting the upper triangle of the deformation matrix and not the lower triangle as well as required for a symmetric strain. However, I couldn't find the minus sign nor understand how the +h followed by inv(-2h) deformations were supposed to work, so I've rewritten in a simpler way that also returns the Atoms to their original state.

Anisotropic fracture CLE is ported from matscipy, and appears to give the correct decay in the residual forces of $r^{-2}$, at least for a single lattice. Haven't thought about how to extend to a multi-lattice yet.

This PR also enables GitHub CI, but since the tests now require dev version of JuLIP it's not passing for me. Not sure if there's a proper way to specify that in Project.toml, or if I should just add Pkg.develop("JuLIP") to the build step.

jameskermode commented 3 years ago

CI now passing: https://github.com/jameskermode/JuLIPMaterials.jl/actions/runs/1150066628

cortner commented 3 years ago

sorry I'd forgotten about this. I'll merge it now and test it.