TAGGED: density, melting-and-solidification, SLM, udf, udm
-
-
July 19, 2023 at 7:00 amKhodor SleimanSubscriber
Hello,Â
I am creating an SLM simulation in which I am melting powder which then resolidifies into a solid. I wrote a UDF to specify the density in powder form, liquid form, and solid form because the solid and powder are the same temperatures, so I didn't think doing a piecewise equation was wise. However, the simulation will register places that haven't melted as melted. I was wondering what is wrong with my UDF?Â
-
July 19, 2023 at 8:02 amRobForum 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?
-
July 19, 2023 at 8:08 amKhodor SleimanSubscriber
Yes, an there is supposed to be air in the gaps of the powder but for now the material is just approximated as a solid block. I am trying to simulate basalt being melted by a laserÂ
-
July 19, 2023 at 8:20 amRobForum Moderator
Sounds fun. Any links to the various ideas about melting Moon/Mars rock to 3d print buildings?Â
If you need to use air later on then you may need to be a bit careful with the multiphase models. For now, single phase with solidification/melting should be OK. So, I think my comment re splitting the code sections and being more careful with the IF statements will stand.Â
I don't know if == means a more accurate check than = but remember computers will have some numerical rounding, 0.99999999999999 and 1.000000000001 could easily creep into REAL definitions of 1.0
-
July 19, 2023 at 8:38 amKhodor SleimanSubscriber
Yeah, that's the exact idea that I am trying to model, and I thought about using a VOF model, but my deadline is this week so I won't be able to execute that in time.Â
In the loop I am assigning 1 to C_UDMI (and I assume that it is 0 before that), and then later I verify that C_UDMI is equal to 1, so I don't think there should be any rounding errors. If i move the UDM checks outside the DEFINE_PROPERTY macro, how should I call it within DEFINE_PROPERTY later on?Â
-
July 19, 2023 at 9:10 amRobForum Moderator
If you didn't initialise the UDM when you initialised the model it could be anything.
You should be able to call the UDM inside the DEFINE_PROPERTY - once set it's just a value in the cell of interest like temp(erature) is in the documentation example.Â
-
- The topic ‘UDM not storing correctly’ is closed to new replies.
-
421
-
192
-
178
-
162
-
141
© 2024 Copyright ANSYS, Inc. All rights reserved.