Skip to content

Implement fix for updating viscosity profile data

Eugenio D'Ascoli requested to merge edascoli/ViscosityHandlingTerraNeo into master

If a custom viscosity profile is provided the re-dimensionalisation is done using the minimum viscosity as new reference viscosity to ensure the non-dimensional minimum viscosity is equal to 1. Previously, updating the reference viscosity was performed after the first initial solution step which could result in a non-dimensional viscosity value below 1. This has been fixed and now a minimum non-dimensional viscosity of 1 will be ensured during runtime. Addtionally, the function udpateRefViscosity() was renamed to updateViscosity() for improved readability and the viscosity profile log will output the viscosity in SI unit (Pa s). Also, if a viscosity profile is provided and the element to interpolate the viscosity onto lies between two data points from the viscosity profile a linear interpolation is performed to estimate the viscosity of the element at the given radius. This linear interpolation is improved by looping over the profile with a "while" loop.

Merge request reports