aspect
aspect copied to clipboard
Mesh deformation function plugin misses conversion to m/yr
When prescribing a mesh deformation rate through the function
plugin, the velocity always has to be given in m/s, even if Use years in output instead of seconds = true
. The function variable time will however be interpreted as years.
Fix suggested by Rene:
I think the way to fix this would be to wrap the stored function inside another function object (not a parsed function) that scales it correctly to years or seconds, similar to what the VectorFunctionFromVelocityFunctionObject inside core.cc does.
@anne-glerum It looks like this is resolved here: https://github.com/geodynamics/aspect/blob/406b2cde9da697bb291656dc08afcaad849100f7/source/mesh_deformation/function.cc#L44-L47, but if I look it was last changed in 2019. Is this still valid. Otherwise this would be a good starter project.
Hi @MFraters , those lines only correct the time from seconds to years. The unit of the velocity that the function returns, is still m/s, see the plugin description:
"Although the function's time variable is interpreted as "
"years when Use years in output instead of seconds is set to true, "
"the boundary deformation velocity should still be given "
"in m/s.