Fluids

Fluids

the method to define cell temperature in named expression

    • ahmed ibrahim
      Subscriber

      how to make the same thing such that C_T(c,t) at the centriod in udf in named expression because i have a peoblem in running the udf?

    • SRP
      Subscriber

      Hi,

      Can you please explain what problem you are facing in running UDF?

      Thank you

      • ahmed ibrahim
        Subscriber

        when i run a udf in ansys 2021r2 and above for single precision 
        i have

        Node 0: Process 15576: Received signal SIGSEGV.
         
        ==============================================================================
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        999999: mpt_accept: error: accept failed: No such file or directory
         
        and in double precision
        BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
         
         

         

    • DrAmine
      Ansys Employee

      Does depend on what you want to achieve per UDF? I see you created another thread so please try to answer to that thread!

      C_T is just Static Temperature Variable in Ansys Fluent Expression Language

      • ahmed ibrahim
        Subscriber
        DEFINE_SOURCE(elec_power,c,t,ds,eqn)
        {
        real x[3];
        real ir;
        real source;
        C_CENTROID(x,c,t);
        ir=1.687E+06+31657*x[0]+62239*x[1]-4.902E+08*x[0]*x[0]-1.869E+06*x[0]*x[1]-4.944E+08*x[1]*x[1]+1.008E+06*x[0]*x[0]*x[0]+1.698E+07*x[0]*x[0]*x[1]+6.09E+06*x[0]*x[1]*x[1]-3.391E+07*x[1]*x[1]*x[1]+8.459E+09*x[0]*x[0]*x[0]*x[0]+4.648E+08*x[0]*x[0]*x[0]*x[1]+1.584E+11*x[0]*x[0]*x[1]*x[1]+1.243E+08*x[0]*x[1]*x[1]*x[1]+9.672E+09*x[1]*x[1]*x[1]*x[1];
        source=-(0.0144*0.55894609*ir*(((0.21+((-0.002)*(C_T(c,t)-298.15)))*(1+((((2.62323E-23)*(C_T(c,t)))/((1.602176E-19)*(0.93040049+((-0.002)*(C_T(c,t)-298.15)))))*((double)log((double)833)))))-(((0.0263+(0.0000355*833)+(0.00178*(C_T(c,t)-298)))*833*833*(pow((0.009637761+((-0.0007)*(C_T(c,t)-298.15))),2.))))))/0.00000864;
        C_UDMI(c,t,0)=source;
        return source;
        }
        this is my udf which i have a problem in ansys
         
        so i want to make the same thing in named expression
        so i had a problem in defining the cell temperature at centriod in named expression like udf
    • ahmed ibrahim
      Subscriber

      is that what you mean?

    • ahmed ibrahim
      Subscriber

      • ahmed ibrahim
        Subscriber

        so when i use the same thing in the picture in the equation

        it will be read as cell temperature at cetriod for the part i want or not

        this is the question

    • ahmed ibrahim
      Subscriber

      c_t (i want it at the centroid of each cell in the part)

      how i can do this in named expression

    • DrAmine
      Ansys Employee
      Yes that variable corresponds to the cell centroid static temperature.
    • DrAmine
      Ansys Employee

      As you are not liniarzing you can directly provide the source term via Fluent Expressions. Please check your region you are trying to emit the source if it is correct.

      • ahmed ibrahim
        Subscriber

         

        i swear, you solved a big problem for me 

        thank you ftom my heart

        but what is the meaning of (not linearizing)

         

        • DrAmine
          Ansys Employee

          I refer here to the Customization Manual where DEFINE_SOURCE is explained.

          Another good reference is to go through the basics with reading the simple introduction of Patankar "Numerical Heat Transfer and Fluid Flow".

          Linearization will help on stability.

Viewing 7 reply threads
  • You must be logged in to reply to this topic.