Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Quesiton about profile for fluent

    • lzfneu
      Subscriber

      Hi all,

      I intend to load heat generate rate to source term, which is in a cylinder shape.

      I try to write profile in r-phi-z format and the attachment is my transient profile file. The field I set is r, angle, z, respectively. Please help to check if I am right? and how to set the source term in cell zone conditions in cylinder coordinate.

      Thank you very much in advance.

    • Rob
      Forum Moderator
      Source terms are set via DEFINE_SOURCE or expressions, and (I think) are limited to x, y and z coordinates.
    • lzfneu
      Subscriber
      Thanks for your reply.
      The heat generate rate of source term in my problem is discrete values and is in cylindral coordinate. I want to consult you is there a method to perform this kind of heat transfer calculation in fluent.
      I have to find a method to import discrete values of heat generate rate which is in cylindral coordinate to source term so that I could do the next step water cooling calculation.
      Any suggestions or help will be appreciated, and thank you in advance.
    • Rob
      Forum Moderator
      Heat transfer calcs, yes, they're fairly routine.
      Using polar coordinates in code however isn't as we add sources based on position (x, y & z) as w, r and axial are relative. So, you'll need to convert the data in some way. If the data is being read to a UDF then you can convert the data as it's read in, or do the conversion externally then read the x, y & z position and it's attached data.
    • lzfneu
      Subscriber
      Thanks for your suggestions. I prefer your suggestion to do the conversion externally then read the x, y & z position and it's attached data.
      I want to confirm that if I am right: I intend to write the externally conversed data to profile and then read to my source term. The field in profile I use should be x,y,z and the attached data (heat generate rate).
      Thank you very much for your help.
    • Rob
      Forum Moderator
      Profiles are for surfaces. For source terms you'll need to read & assign the data into the source term so you'll need the file read functions and (possibly) some interpolation routines to add in values assuming the mesh & points don't line up.
    • lzfneu
      Subscriber
      Dear Rob Thanks for your reply.
      I want to import the heat generation rate (W/cm3) to the source term according to different x, y, z coordinations.
      For example, the heat generation is 1000W/cm3 in the location x=1.11cm, y=2.22cm, z=3.33cm; and is 2000W/cm3 in the location x=8.88cm, y=9.99cm, z=10.10cm; 3000W/cm3 in the location x=20.22cm, y=30.33cm, z=40.44cm;
      In order to achieve that, I write the source term as follows:
      #include "udf.h"
      DEFINE_SOURCE(test, c, t, dS, eqn)
      {
      real x[ND_ND];
      real a, b, c, source;
      C_CENTROID(x, c, t);
      a=x[0]; b=x[1]; c=x[2]; // x,y,z coordinate
      if(a==1.11 && b==2.22 && c==3.33) {source=1000;}
      if(a==8.88 && b==9.99 && c==10.10) {source=2000;}
      if(a==20.22 && b==30.33 && c==40.44) {source=3000;}
      dS[eqn]=0;
      return source;
      }
      Is it right?
      And is there any convinent method to use if there are many x, y, z coordiantes and heat generations, thank you very much in advance.
    • Rob
      Forum Moderator
      Sort of. You need to give the source a volume rather than a position so it'll be
      if( a>1.0 && a<1.2 && b.....
      Remember source terms are per m3 so be careful with the definitions.
Viewing 7 reply threads
  • The topic ‘Quesiton about profile for fluent’ is closed to new replies.