[Feature] Ability to set initial accumulated plastic strain#41
Conversation
|
Thanks, this is a very useful contribution that we in fact discussed not long ago!
|
|
Thanks for this interesting contribution. We indeed discussed implementing just that a couple of days ago. The codes look good, but unfortunately I'm fully booked until mid September, because of GeoMod. I will look at the PR just after the conference. Thanks again! |
|
Tests added to the best of my ability. Note that running the tests also produces PVD output that can be inspected (but is gitignored). |
|
Hi Mitchell, Thanks again for your valuable contribution. There is a little issue. I accidentally overlooked two rather big binary files with markers in your pull request and merged them into master. After realizing my mistake I purged them form the repository history using the filter-repo script and temporarily deactivated the associated test. Would it be possible to modify this test such that these files are generated on the fly? That would be really great. Thanks, |
|
No problem! I created a new PR for that. |
Motivation
I want to add the ability to set the initial APS, similar to how we can set the initial temperature and phases on the domain. Although pretty simple, this feature involves coordinated PRs in LaMEM, LaMEM.jl and GeophysicalModelGenerator.jl (see below). The changes are meant to be fully backwards compatible. I am leaving this as a draft as I want to get some feedback on the approach.
Summary of changes
LaMEM.jl (JuliaGeodynamics/LaMEM.jl#92)
plast_strainas a cross-section (name matches Paraview field)out_ptr_APSoption to include APS on passive tracers (defaults to 0)GeophysicalModelGenerator.jl (JuliaGeodynamics/GeophysicalModelGenerator.jl#184)
LaMEM (this PR)
Outstanding questions
There is some averaging of initial APS that seems to be related to projecting from grid, to markers, back to grid, e.g., setting random values between 0 and 1 gives a result where the values are between ~0.4 and 0.6. I think it has something to do with APS being a deviatoric variable. Is there a way to work around this? Does it even matter given that the markers retain values between 0 and 1 (see below)?
Should I write a test for this, and which repository would be best for that?
Is this something that can eventually be merged into all 3 repositories?
Example & screenshots
Using the code
Cross section of initial conditions with initial APS is set to 0-1 in the crust:

Model3D.vts where APS is still between 0 and 1. Note: this mesh is not uniform, so the smearing at the edges is correct:
output.pvd at

t=0where APS is now ~0.4 to 0.6:Markers after 1 time step with APS output (values between 0 and 1):

Passive tracers with APS output:
