TAGGED: fluent, material-property, thermal-conductivity, udf-fluent
-
-
January 25, 2021 at 2:28 pm
vsjay3
SubscriberHi all,nI'm a beginner of Ansys Fluent and therefore I have a simple question:nI am modelling a solid which has a thermal conductivity that varies with the position of the solid (vertical direction). But the relationship between thermal conductivity and position is not complicated - it is polynomial in nature.nSo I know the obvious answer is the UDF creation. But since I am a beginner, instead of creating UDF, I am wondering if there is any other easier way to input a thermal conductivity that varies with position to the material properties dialogue box, since UDF would take some time to create.nYour kind advice in this regard is highly appreciated!nThank you!n -
January 25, 2021 at 4:22 pm
Rob
Ansys EmployeeExpressions, they're a relatively new feature (taken from CFX) in Fluent and replace many of the more straightforward UDF functions. n -
January 25, 2021 at 4:34 pm
vsjay3
SubscriberThank you for your answer. But my Fluent version is 17.2 (my university is currently not willing to upgrade). So is the expression feature available in Fluent 17.2? If not is there any other option apart from UDFs?nThank you very much for your help!n -
January 25, 2021 at 4:40 pm
Rob
Ansys EmployeeIn R17.2 you're stuck with UDFs. You may want to point out to your University that they're now 5 major releases out of date and therefore missing out on 5 years of development. n -
January 25, 2021 at 4:43 pm
vsjay3
SubscriberHi Rob, thank you for your answer. Will try to upgrade. May I know what version did the expression feature first arrive in Fluent? Was it 19R1?n -
January 25, 2021 at 5:28 pm
Rob
Ansys Employee2019R1 I think, but the functionality has been improving with each release so the range of usage in 2021R1 is massively increased. n -
January 26, 2021 at 4:30 am
vsjay3
SubscriberHi, thanks Rob. May I know if I updated Ansys Fluent, say to 2021R1 version or 2020 version - will that 2021/2020 version of Ansys Fluent be able to accept a model created using the old 17.2 Designmodeler and 17.2 Ansys mesher? Will they be compatible?n -
January 26, 2021 at 10:19 am
Rob
Ansys EmployeeYou can read files created in older versions of the code into newer versions of the same code. However, as you'd be jumping 5 versions there may be some errors as model defaults (and entire models) have been changed. Mesh files should be safe as the format is largely unchanged in about 20 years (assuming you're not using any of the new cell types). nYou will NOT be able to read files from 2020 or 2021 into R17 as there have been a lot of changes in the last few years. n -
January 26, 2021 at 10:29 am
vsjay3
SubscriberThank you very much. Noted. I have requested for the update from my university already. But just have one more clarification: nI have watched some videos of ansys fluent latest version - but seems as if the expression feature can be only be used for material properties dependent on variables such as temperature, pressure etc.,and not spatial cordinates. My requirement is to enter material properties that vary by spatial cordinatesnHence just to confirm, are you positive that the expressionfeature can be used to establish a polynomial relationship between material properties and spatial cordinatesspecifically (such as y direction)?nThanks for the advice!n -
January 26, 2021 at 10:34 am
DrAmine
Ansys EmployeeWhich properties do you want to change?n -
January 26, 2021 at 10:39 am
vsjay3
SubscriberI want to have thermal conductivity changing with y direction (vertical direction) of my solid and also specific heat capacity changing with y direction as well. The relationships between material properties and spatial cordinate will be simple polynomial functions:nEg : k = 2.3(y^2)+3y - 4nc = 2(y^2)+5y - 8nWhere k is thermal conductivity and c is specific heat capacity.n -
January 26, 2021 at 10:50 am
DrAmine
Ansys EmployeeFor that in 21R1 you will need to use UDF. n -
January 26, 2021 at 11:18 am
vsjay3
SubscriberThank you. If I use UDFs, then for specific heat capacity specifically I cannot useDefine PropertyUDF right ? Instead, I have to useDefine specific heatUDF ? -
January 26, 2021 at 12:01 pm
DrAmine
Ansys EmployeeFor heat conductivity you can use DEFINE_PROPERTY, for specific heat DEFINE_SPECIFIC_HEAT. Be aware that the specific heat udf does not allow for cell access. I recommend using UDRGM UDF to deal with this. UDRGM will allow you to code whatever you want.n -
January 26, 2021 at 12:15 pm
vsjay3
SubscriberHi, thank you for your answer.nI am modelling a solid, so I am not sure if I can use the UDRGM UDF since it seems like it is for gases.nAlso, more importantly, you mentioned that the specific heat UDF does not allow for cell access. I'm sorry, but since I'm new to the software, would you mind telling me what that means exactly? Do you mean to say that the DEFINE_SPECIFIC_HEAT UDF cannot possibly be used to link the specific heat material property to spatial coordinates of my solid since the DEFINE_SPECIFIC_HEAT UDF can not accept spatial coordinates of the cell centroids?nThank you!n -
January 26, 2021 at 1:07 pm
DrAmine
Ansys EmployeeNo Cell Access: you cannot make it dependent on x,y,z and other things. You can workaround that by using providing the quantity density*cp as density with cp=1 [K/kg/K]. For the density you can use DEFINE_PROPERTY and make it temperature and spatial coordinates dependent.n -
January 26, 2021 at 3:56 pm
vsjay3
SubscriberThank you DrAmine for your response. But I am a bit confused. The density of my solid is constant and cannot change with spatial coordinates. Also where do I insert the density x Cp UDF into? I cannot insert it into density value in materials window since density is constant for my solid.nn -
January 26, 2021 at 7:23 pm
DrAmine
Ansys EmployeeFor that reason the hint is to vary the density as density times cp as that is what is required if you look into a heat equation of solid. Fluent uses that density tome cp to solve the transient term. You now just tell Fluent that what it understands as density is actually what you provide as density ?cp.n -
January 27, 2021 at 2:50 am
vsjay3
SubscriberThank you drAmine for your response. I will look into that.nAs another way around, I was wondering if instead of me modelling a single solid and trying to insert a varying material property, I could try modelling a series of seperate solid regions stacked on top of one another and then assigning different material property to each discrete solid region seperately (as constant values). That should also work yes?n -
January 27, 2021 at 4:10 am
YasserSelima
SubscribernIf you do this, you will have heat transfer in the axial direction inside your wall. This will affect the accuracy of the results. It will become like one composite walln -
January 27, 2021 at 4:20 am
vsjay3
SubscribernThank you for your kind response. But the wall/interface dividing the solids would not have any thickness ( zero thickness) and would be assigned coupled condition (i.e. wall-shadow wall). I believe the heat transfer would occur via pure conduction between the solid layers across the wall/interface. Since the wall has no thickness, there would not be any thermal resistance or any wall property that would effect the results i think.n -
January 27, 2021 at 4:31 am
YasserSelima
SubscriberTrue, if you are not simulating conduction inside the wall, you will not have heat transfer there ... Sorry, my fault, I understood from your first post that you want to change the solid thermal conductivity, not the fluid. Now there is another issue, is this natural convection? If yes, you can't play with the density .. will affect the flown -
January 27, 2021 at 4:39 am
vsjay3
SubscriberHi no problem. There is no fluid in the simulation just a solid block with varying thermal conductivity and specific heat capacity across its depth. Density stays the same throughout the solid. Heat is applied to top surface of solid. The density should not change which is why I'm not sure I could implement the density varying solution drAmine mentioned. I guess ill model seperate solid blocks stacked on one another with different thermal properties but same density.n -
January 27, 2021 at 4:45 am
YasserSelima
SubscriberIf you have no flow, the density is very smart solution. I believe it will work fine. Good Luck!n -
January 27, 2021 at 4:47 am
vsjay3
SubscriberThank you. But what solution did you mean will work fine? DrAmine's density varying solution?n -
January 27, 2021 at 4:55 am
YasserSelima
Subscriberyes .. n -
January 27, 2021 at 5:00 am
vsjay3
SubscriberBut my solid's density can not change and should be constant. Just my thermal properties should vary. Not really sure how changing density would solve the thermal properties issue.n -
January 27, 2021 at 5:08 am
YasserSelima
SubscriberThe thermal capacity which controls how much energy is required to increase he temperature is equal to Density * Volume * Cp nAlso the thermal diffusivity k/(Density*Cp)nWhat DrAmine meant, if you control Density*Cp , you will have the same effect. And that is true if you have no flow. n -
January 27, 2021 at 5:17 am
vsjay3
SubscriberThank you very much. I had a feeling that was what he was referring to but now you confirmed it. Appreciate it. That way works as long as density is always multiplied by Cp in the relevant equations. But I was looking at the energy equation in fluent (provided below) and I noticed that there are instances in the equation where only density is used (without being multiplied by Cp) and Cp is not even present. So in this case, I was wondering how the density × Cp term work...nn
-
January 27, 2021 at 5:22 am
YasserSelima
SubscriberTrue ... the density is used in all transport equations without Cp .. but it will multiplied by the velocity. So. If you have no flow ... the momentum and continuity are redundant and the energy has a velocity = 0. Now all densities are multiplied by Cpn -
January 27, 2021 at 5:24 am
YasserSelima
SubscriberIn the equation you put, first term, E includes Cp .. second term, has velocity n -
January 27, 2021 at 5:31 am
vsjay3
SubscriberThank you very much for the detailed explanation. Still new to this field. I will look into it more deeply. However,just want to know your opinion on the other method I proposed - the one where I use discrete stacked solid regions with different thermal properties assigned to each solid region. Do you believe it would also work and that it is a suitable alternative solution?nThank youn -
January 27, 2021 at 5:42 am
YasserSelima
SubscriberI can not confirm until I see a sketch. But you can simplify it by yourself. Plot a sketch and see if there is undesired heat transfer will happen between the stacks. If NO, it should work. But you will need to define different origins as your equations are dependent on the position.nSorry, I have to go now. Will reply back when I join again. Good Luck!n -
January 27, 2021 at 5:57 am
vsjay3
SubscriberThank you Array for the response. Appreciate it. Just for your reference, my sketch is attached below (k = thermal property):nThe coordinate system is same. On the left side is the ideal solution where I model one single solid block and employ UDF and make thermal property a function of y coordinate (k(y)). On the right side what is what I meant by discrete method where instead of using UDF, I model several solid layers on top of one another and assign separate individual constant thermal properties to each solid layer (no equation is used for varying thermal property in this approach). Thermal property variation across the solid layers won't be as smooth as UDF method, but I'm guessing it will be quite similar. I don't think I need to define different origins in the discrete method since I won't be using any k(y) equation in the discrete method (just assigning different constant thermal properties to each solid region). Let me know if you have any view on this ArraynThanks.n -
January 27, 2021 at 9:44 am
DrAmine
Ansys EmployeeMy Cp workaround is for sure only for solid without solid motion. For fluids you can go the way of UDRGM which is more generalized.n -
January 27, 2021 at 11:15 am
vsjay3
SubscriberThank you for your kind response. In the Cp workaround, I would have to learn to code UDF anyways. Just out of curiosity, instead of using UDFs do you think that the discrete method I have shown in the above image could also work as a viable alternative to using UDFs?n -
January 27, 2021 at 11:40 am
DrAmine
Ansys EmployeeDiscrete method (what you are calling discrete) might work too but using UDF is much more elegant and easy to learn!n -
January 27, 2021 at 11:41 am
Rob
Ansys Employeeyes, if the solids are connected with coupled walls then heat will transfer axially as expected. Just be aware of the cell count doing this as you may over-refine the solids depending on the thickness of the sections. n -
January 27, 2021 at 11:53 am
vsjay3
Subscriberand Thank you very much for your valuable advice. Appreciate it.n -
January 27, 2021 at 3:03 pm
YasserSelima
SubscriberYes it works. nTake it as a learning experience. Do both ... UDF and Your Discrete layers. And compare the results. So, you learn more from this project. n -
January 27, 2021 at 3:47 pm
vsjay3
SubscriberThank you for the explanations and advice. Appreciate it.n -
January 28, 2021 at 12:48 pm
YasserSelima
SubscriberYou are welcome! Good luck!n -
January 28, 2021 at 1:59 pm
vsjay3
SubscriberThank you!n
-
- 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.

Ansys Blog
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.
- Suppress Fluent to open with GUI while performing in journal file
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Getting graph and tabular data from result in workbench mechanical
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Time Step Size and Courant Number
- Mesh Interfaces in ANSYS FLUENT
- error: Received signal SIGSEGV
-
5414
-
3391
-
2471
-
1310
-
1022
© 2023 Copyright ANSYS, Inc. All rights reserved.