Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

How to set wall temperature in Fluent as a function of the z-axis using Matlab?

    • zhengxh1
      Subscriber

      By installing the FLUENT_AAS package in MATLAB, it is possible to change the constant values for FLUENT material density and wall temperature. However, setting the wall temperature as a function expression of the Z-axis results in an error. Is there someone who can help with this? Thank you very much!!!

    • NickFL
      Subscriber

      I have never used the Fluent_AAS package, but you should be able to add the variable wall temperature using Named Selections and applying it using the TUI. You would have to have the journal file write some commands that look like:

      /define/named-expressions/add "Twall" definition "270 [K] + 2 [K m^-1] * z" q
      /define/boundary-conditions/wall my-wall , , , , y temperature n "Twall" , , , , , , , , , , 

      The first one creates a Named Selection called Twall. Your expression would go in the " ".  Note there are units on z, therefore I have a m^-1 in the unit of the slope to ensure we have units of [K].  Also note that it is always better to write Named Selections using [K] and not [C]. The second line applies the Named Selection temperature boundary condition to the boundary named my-wall (you can change that). Depending on what models you have enabled, the number of commas may be slightly different. That is something you will have to debug yourself.

      For the part about the density, I am a bit confused.  Are you trying to apply a variable density to a solid material? Fluent expects that the density of solids are constant. If it is a variable density for a fluid, the solver will compute the density as part of the flow solution. Or are you trying to set the initial condition with a variable density? Then you could use a Custom Field Function through initialization and patch. 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.