Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

Marangoni Shear Stress

    • pourya.heidari
      Subscriber
      DEAR all
      I want to simulate the laser welding with the FLUENT. I just activate the solidification and melting (without VOF). I face a problem to import the Marangoni effect into my simulation. In the BOUNDARY CONDITION (MARANGONI STRESS), I found the formula for surface tension gradient variation base on the temperature. Since I could not import the surface tension gradient by UDF in the MARANGONI STRESS, I try to import this effect by UDF in the SPECIFIED SHEAR. I attach the formula for this part and shot screen of specified stress.
       
       
       
      To be honest, I do not know which Macro I should use to write this formula. I try DEFINE_PROPERTY and DEFINE_PROFILE. In my UDF, I consider the surface tension graidient as a constant. Everytime I run this code, Fluent would close. It is very painful. Please help me to find the error of this UDF.
      Here you can find the UDF that I wrote for this part.
      DEFINE_PROFILE(marangonix, t, i)
      {
      face_t f;
      cell_t c;
      Thread *tc;
      real grad_temp, gama_temp;
      begin_f_loop(f,t)
      {
      c=F_C0(f,t);
      tc = THREAD_T0(t);
      //tc=F_C0_THREAD(f,t);
      grad_temp= C_T_G(c,tc)[0];
      gama_temp=-0.00043;
      F_PROFILE(f,t,i)=gama_temp*grad_temp;
      }
      end_f_loop(f,t)
      }
       
      DEFINE_PROFILE(marangoniy, t, i)
      {
      face_t f;
      cell_t c;
      Thread *tc;
      real grad_temp, gama_temp;
      begin_f_loop(f,t)
      {
      c=F_C0(f,t);
      tc = THREAD_T0(t);
      //tc=F_C0_THREAD(f,t);
      grad_temp= C_T_G(c,tc)[1];
      gama_temp=-0.00043;
      F_PROFILE(f,t,i)=gama_temp*grad_temp;
      }
      end_f_loop(f,t)
      }
       
      DEFINE_PROFILE(marangoniz, t, i)
      {
      face_t f;
      cell_t c;
      Thread *tc;
      real grad_temp, gama_temp;
      begin_f_loop(f,t)
      {
      c=F_C0(f,t);
      tc = THREAD_T0(t);
      //tc=F_C0_THREAD(f,t);
      grad_temp= C_T_G(c,tc)[2];
      gama_temp=-0.00043;
      F_PROFILE(f,t,i)=gama_temp*grad_temp;
      }
      end_f_loop(f,t)
      }

       

    • RK
      Ansys Employee

      Hello, 

      What is the error message that you are getting? It would be sometimes easier to debug knowing the error message and where to look at. 

      • pourya.heidari
        Subscriber

        Thank you Ruhal.

        It gives the following error and then it close the FLUENT in few seconds. I feel deep pain with this error. I do not know why it closes the software. 

    • RK
      Ansys Employee

      This could be a systems related issue, can you please try to run it without UDF to see if the simulation runs fine? We could then narrow down the issue to UDF. 

      • pourya.heidari
        Subscriber

        Dear Rahul 

        I tried it without UDF. It works fine, and the results are reasonable. I am sure that the error is because of the UDF. I can not debug the UDF. 

    • DrAmine
      Ansys Employee

      Check if you can access the temperature gradients first. My question: why are'nt you using the default Marangoni Stress Wall BC?

Viewing 3 reply threads
  • The topic ‘Marangoni Shear Stress’ is closed to new replies.
[bingo_chatbox]