Fluids

Fluids

DEFINE_DOM_SPECULAR_REFLECTIVITY is not compiling.

    • aleo
      Subscriber

      Hi everyone,

      I'm working on a Radiation-problem in Fluent (2022R1) and am trying to implement the following UDF for a BC.

      #include "udf.h"

      DEFINE_DOM_SPECULAR_REFLECTIVITY(user_dom_spec_refl123,f,t, nb, n_a, n_b, ray_direction, e_n, total_internal_reflection, specular_reflectivity, specular_transmissivity)

      {real angle, cos_theta; real PI = 3.141592; cos_theta = NV_DOT(ray_direction, e_n); angle = acos(cos_theta); if (angle >0 && angle <75) {*specular_reflectivity = 0; *specular_transmissivity = 0;}}

      which leads when compiling to the following error message:

      c_sources_ ['UDF_Specular_Reflectivity.c']

      Access is denied.

      scons: *** [UDF_Specular_Reflectivity] Error 1

      Thanks in advance for your help and Best, Leo

    • Rob
      Ansys Employee

      I assume you're using the built in compiler?

      https://ansyshelp.ansys.com/account/Secured?returnurl=/Views/Secured/corp/v221/en/flu_udf/flu_udf_sec_define_dom_specular_reflectivity.html  covers the macro. 

    • aleo
      Subscriber

       

      Hi Robert,

      I am unable to open the above mentioned link as a customer number is necessary, which although I have a student license cannot retrieve.

       

      But yes, I am using the inbuilt compiler and am having problems compiling it.

       

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