aspect
aspect copied to clipboard
Add visco plastic composition mask
This pull request adds the option for the user to mask compositional fields from use in the volume fraction calculation in the visco plastic material/rheology model (setting the volume fraction to zero). This is useful for for example the cpo code, since it requires a water compositional field which should not be used by the visco plastic plugin.
I have added a test which shows that the result has not changed by adding the extra composition compared to visco_plastic_complex
(only extra degree's of freedoms).
Thanks for the quick review. I agree that a list of names of compositional fields to use
is preferable. I have changed it and expended the explanation a bit. Is this more clear?
@bobmyhill Thanks for the review! I really like the idea of being able to set different field types. My guess would be that it would be a bit of work to make sure every part of the code accepts those directives. Since you are more aware of the code which uses it, what do you think?
I hadn't thought of those field masks yet, so I will try them out and see if that can improve the code in the short term.
I really like the idea of being able to set different field types. My guess would be that it would be a bit of work to make sure every part of the code accepts those directives. Since you are more aware of the code which uses it, what do you think?
It would certainly be a bit of work to sift through all the code. Adding the new parameter wouldn't be a breaking change, so the changes could be split into small PRs. The current hard-coding in some of the material models is confusing, so I'd quite like to see this feature implemented.
The prm files and source code could be modified in tandem so that users don't see changes in behaviour.
@MFraters @bobmyhill @anne-glerum @tjhei - should we return to this PR? Related to #4182 and #4246
Where needed rheologies already set masks for the fields they know to not be used as material fractions, but those rheologies do control the evolution of those fields. If there are fields for which the evolution is not controlled by the used rheology, I think the rheology should not decide on their masks. Masking of those fields should happen on a higher level, like in Compositional fields as Bob suggested.