Fluids

Fluids

Scalar source term

Tagged: ,

    • ehsan.sadeghi
      Subscriber

      I am little bit confused with the source term definition in my UDF. My question is if I should devide potential_source by cell volume or not? I have read in some posts here that it should be devided by cell volume and in manual there is no mention of such devision.

      DEFINE_SOURCE(S_potential,c,t,dS,eqn)
      {
          real potential_source;
          dS[eqn] = 0.0;
          potential_source = (C_UDSI(c,t,1)*E_E)/EPS_0;
          C_UDMI(c,t,4) = potential_source;
          return potential_source;
      }

       

    • DrAmine
      Ansys Employee

      Whatever you return back in Ansys Fluent should be per cell volume. Example for continuity the Source term dimension should be in kg/s/m³. As in the UDF everything is "dimensionsless" you should take care about the right dimensions and magnitude.

    • ehsan.sadeghi
      Subscriber

      Thanks @DrAmine for your response. I have another question regarding MHD module. In my source terms I need access to potential gradiants. What macro should I use? I couldn´t find anything related to MHD macros in manual.

    • DrAmine
      Ansys Employee

      I think that part is not documented and I cannot share any information on the non documented macros. If you have access to the customer portal you might find some knoweledge material showing to access potential variable and its gradient.

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