My student Trey Brink is trying to use the melt simple and depth dependent material models together in order to modify the viscosity by a prefactor in lower mantle and is getting an “this cast can not be performed” error. (Trey just became a member of the forum and he can’t attach files for some reason). The error seems to be related to incompatible types between the Interface and MeltInterface plugins, which prevents the cast from being done. I’ve attach the output file with the error message and the PRM file here. Any ideas one how we can fix this?
-Magali and Trey
basc_WB-433591-c8-85.txt (9.9 KB)
basc_box_edit2.prm (5.3 KB)
Trey couldnt attach files, because this feature will only be unlocked for new users after a bit of time or some other activity (reading the forum / posting text without files). I manually bumped his trust level to normal, so now he should be able to post.
About your question: Unfortunately combining depth_dependent with melt models does not work at the moment. The error message could be clearer about this, but in essence the problem is this: If melt transport is enabled, the main code checks if a material model supports melting by trying to cast the type of the material model to a MeltInterface model. All material models that support melt are derived from this type, so it always works. But DepthDependent is not derived from this type, because we cannot know the base model of DepthDependent at the time ASPECT is compiled. We could have made a different decision about how it is checked whether a material model supports melt when we implemented the system, but at the moment it would require some effort to change it. It is probably easier to reimplement the functionality of DepthDependent in the material model you want to use for now.
Hi Rene, Thanks for explaining the issue. It is confusing because the manual lists melt simple as one of the material models that CAN be used with depth dependent. I guess that is just an automatically generated list of all the material models. We have moved forward with just hard-coding in the depth dependence we need into melt simple. Thanks, Magali