Fluids

Fluids

Topics relate to Fluent, CFX, Turbogrid and more

Divergence and float points issue with Atmospheric Boundary Layers inlet UDF

    • jasonsum25
      Subscriber

      Hi, I am simulating the wind flowing across a Y-shape building to evaulate the wake effect behind. 

      Mesh was done in Fluent Meshing, with minimum orthogonality of 0.2, and 5 inflation laters added to ground and building surface.

      with BOI refinement in volume near the building

      To be more accurate towards reality, I want to take the atmospheroc boundry layer for the wind flow inlet condition.

      However, divergence and float points popped up on console when initiaizing. (while just using constant input to inlet velocity did not cause such issues), it is earnestly hoped for some guidance on this and some additional tips on using UDF, thanks!!!!

      Error codes:

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0

      Divergence detected in AMG solver: ads-0 10 0.000000e+00

      Hybrid initialization is done.

      Error at host: floating point exception

      Error at Node 4: floating point exception

      Error at Node 0: floating point exception

      Error at Node 1: floating point exception

      Error at Node 2: floating point exception

      Error at Node 3: floating point exception

      Error at Node 5: floating point exception

      Error at Node 6: floating point exception

      Error at Node 7: floating point exception

      Error at Node 8: floating point exception

      Error at Node 9: floating point exception

      Error at Node 10: floating point exception

      Error at Node 11: floating point exception

      Error at Node 12: floating point exception

      Error at Node 13: floating point exception

      Error at Node 14: floating point exception

      Error at Node 15: floating point exception

      Error at Node 16: floating point exception

      Error at Node 17: floating point exception

      Error at Node 18: floating point exception

      Error at Node 19: floating point exception

      ===============Message from the Cortex Process================================

      Compute processes interrupted. Processing can be resumed.

      ==============================================================================

      Error: floating point exception

      Error Object: #f

      ---------------------------------------------------------------------------------------------------------------------------------------------------------

      Below is the UDF I taken reference from

      &t=2395s:

      #include "udf.h"
      #define UREF 4.491 // reference wind speed at ZREF
      #define ZREF 0.16 // height of the building, 2b
      #define LREF 0.08 // characteristic length, b
      #define CMU 0.09 // 
      
      DEFINE_PROFILE(velocity_profile, thread, position)
      {
      	float x[ND_ND];
      	float y;
      	float u;
      	face_t f;
      
      	begin_f_loop(f, thread)
      	{
      		F_CENTROID(x,f,thread);
      		y=x[1];
      		u = UREF*pow(y/ZREF,0.27);
      		F_PROFILE(f,thread,position) = u;
      	}
      	end_f_loop(f, thread)
      }
      
      /*  profile for kinetic energy, k  */
      
      
      DEFINE_PROFILE(k_profile, thread, position)
      {
      	float x[ND_ND];
        	face_t f;
      
        	float A1 = 0.0042 ;
      	float A2 = -0.0719 ;
      	float A3 = 0.2692 ; 
      	float A4 = 0.3671 ;
      	float k, y, yb;
        	begin_f_loop(f, thread)
          	{
            		F_CENTROID(x,f,thread);
      		y = x[1];
            		yb = y/LREF;
      		k = A1*pow(yb,3)+A2*pow(yb,2)+A3*yb+A4 ;
            		F_PROFILE(f,thread,position)=k;
            		
          	}
        	end_f_loop(f, thread)
      }
      
      /* profile for dissipation rate, epsilon */
      
      
      DEFINE_PROFILE(dissip_profile, thread, position)
      {
        	float x[ND_ND];
        	face_t f;
      	float A1 = 0.0042 ;
      	float A2 = -0.0719 ;
      	float A3 = 0.2692 ; 
      	float A4 = 0.3671 ;
      	float k, y, yb;
        	begin_f_loop(f, thread)
          	{
            		F_CENTROID(x,f,thread);
      		y=x[1];
      		yb = y/LREF;
      		k = A1*pow(yb,3)+A2*pow(yb,2)+A3*yb+A4 ;
            		F_PROFILE(f,thread,position)=pow(CMU,0.75)*pow(k,1.5)/LREF;
          	}
        	end_f_loop(f,thread)
      }
      
      /* 
      References:
      [1] Yan MENG and Kazuki HIBI. Turbulent measurements of the flow field around a high-rise building. Journal of wind engineering. No 76, July 1998.
      */
    • Rob
      Forum Moderator

      You may want to check your direction vector for "up". If z is up it's not [1] in the vector definition! 

Viewing 1 reply thread
  • You must be logged in to reply to this topic.