July 19, 2023 at 7:00 amKhodor SleimanSubscriber
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 amRobAnsys Employee
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 amRobAnsys Employee
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 amRobAnsys Employee
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.
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
© 2023 Copyright ANSYS, Inc. All rights reserved.