Can density, viscosity, specific heat capacity and other items of material properties in UDF be defined as functions of position coordinates, and I use C language to call subfunctions, as shown in the following figure. Is there any mistake in using this method?
problem of "define_property"
- 206 Views
- Last Post 09 December 2018
- Topic Is Solved
density, viscosity and specific heat capacity is Position Dependent ,as a function of position,Thank you!!
Yes, properties might be defined as coordinate dependent. I would not comment on what you shared as it is not easy to check and as ANSYS Stuff we cannot debug UDF's.
What do you mean with "calling sub-functions"?
As I wrote in my program,"step(__,__)"is a function which I want to call in "DEFINE PROPERTY",but I do not know how to do in UDF for a function call and
That is standard C when dealing with functions:
Declaration: real myfunc( real Argument)
myfunc could be then declared as
You need to correct your function and the arguments to accept real arguments!
The problem is described in picture below,I want define the density as coordinate dependent.
According to your suggestion,I have changed the source code to:
and the result should be:
However,the result of Fluent calculation is:
The result show the function “step（real Argument,real Argument）”do not work,so I think that there are something wrong in the function “step（real Argument,real Argument）”,but I don't know how to solve it,looking forward for your help!
You Need to debug your step function. Alternative using nested if conditions. Much better alternative having three different cell zones assigned to different solid materials.
Thank you. I see this in the help file of Fluent. Does this mean that the "density" can't change too much, and it can only be a function of temperature, not a function of position coordinates?
Small variations only. For large variations and pressure dependency only UDRGM is possible. You cna use the temperature as variable to change the density but do not solve temperature equation. But why not creating three difrent cell zones? I can however use variable density in DEFINE_PROPERTY but this is not recommended (for solid might be okay..). If conditions are workring for me but I dono recommend them for Fluid zones.
The problem actually is：
A possible numerical approach would be to have a GGI interface between each conductor and insulator, but this would generate an extremely high number of interfaces in the solid domain.Therefore, the chosen method is to develop a mathematical function that makes the physical properties of the disc (r, k and cp) vary in the axial and radial directions simultaneously in order to mimic the presence of a copper or a paper element .
in a word,the way to simply the problem by define the density as coordinate dependent.
And there are so many cell zones to create,for this reason,I begin to try to simply the problem by
You can create a conformal mesh where the jump between one material to the other will be through shadow coupled wall. Anyway the other approach also works and worked for me and might be only suitable for solids or small variations.
Okay，thanks for your reply，and the density and the specific heat of solid could be define as coordinate dependent?
Documentation tells theat cp can only temperature dependent otherwise UDRGM. You can try spatial variance for cp. I guess would work like it worked for me with density. Still favorite separate cells zones before having isues with material properties.
- All Categories
- Community Rules, Guidelines, and Tips
- News & Announcements
- Student Products
- Pre and Post Processing
- Physics Simulation
- Tutorials, Articles and Textbooks
- Installation and Licensing
- Student Competition Teams
- eMasters Degree from UPM
- Site Feedback