I am trying to work through this problem so that I can understand how to convert from pressure values to radius values inside a planetary core in a code. The core has variable density depending on whether the radius is in a solid inner core region or in a liquid outer core.
I was able to obtain two different pressures (those accounting for pressures of Fe-snow in the core). Given Fe-snow is developing in the core, the snow region has a different density than pure Fe or pure FeS. This density changes as the core changes. I am having trouble converting these from pressure values to radius values given the non-uniform density profile in the core.
I tried to break the core up into small discrete shells but was having trouble trying to figure out how to deal with the gravity issue.
Could someone point me in the correct direction?