Rob
Forum Moderator

To clarify. Powder is 1810kg/m3 which melts to a liquid at 2760kg/3 and then solidifies to a solid at 2704kg/m3? 

What material sits in the gaps in the powder?

You may need to move the UDM checks outside of the DEFINE_PROPERTY macro, and then be more careful with the IF statements. 

What are you trying to model?