Fluids

Fluids

problem with udf

    • pavankonchada123
      Subscriber

      when Initializing I am getting the value of bt as 1.25 but it is actually 0.011. So I lost my dynamic viscosity I ve attached the udf please check and let me know

    • Rob
      Ansys Employee

      Please can you add the UDF in as text, staff are not allowed to open files. Depending on what "bt" is, have you initialised the system with physically sensible values? 

    • pavankonchada123
      Subscriber

      I have initialized with sensible values

    • pavankonchada123
      Subscriber

      real tempe2,mu,bt;
      bt=(6722811.795)-(67319.37*tempe2)+(224.7*tempe2*tempe2)-(0.25*tempe2*tempe2*tempe2);
      printf("bt=%f n",bt);

    • pavankonchada123
      Subscriber

      if ((tempe2 >= 298.6) && (tempe2 <= 300.6))
      mu=0.001798(1+((100000(1-bt)*(1-bt))/((bt*bt*bt)+0.001)));

    • pavankonchada123
      Subscriber

      the value of bt is 0.011 and hence mu value is 175632.39
      but the value I am getting for bt when initializing is 1.5 and dynamic viscosity is coming wrong

    • pavankonchada123
      Subscriber

      Problem is
      0.25*tempe2*tempe2*tempe2=6655940.5 (fluent value)
      0.25*tempe2*tempe2*tempe2=6655941.9189(Actual value)

    • DrAmine
      Ansys Employee

      What is your initial temperature and which viscosity formula are you willing to implement.? Which compiler are you using? 

    • pavankonchada123
      Subscriber

      I have initialized with 298.6 K and interpreted. Viscosity = 0.001798(1+((100000(1-bt)*(1-bt))/((bt*bt*bt)+0.001)));

    • Rob
      Ansys Employee

      Please can you post an image of the viscosity curve you're matching?


      The difference in values above is showing an error of 1.5 in 6.66 million so if the model is that sensitive it suggests rounding error will cause problems later on. It also means the model will be very unstable during the solution process as temperature varies slightly and viscosity changes a lot. 

    • pavankonchada123
      Subscriber

      Yes my viscosity changes from 18000pas( 298.6K ) to 0.00178 pas (300.6K). So I converted into polynomial and trying to solve 

    • pavankonchada123
      Subscriber

      Can you suggest any other way for PCM to get simulated to incorporate the drastic change in dynamic viscosity with in the temp range (298.6 to 300.6)

    • Rob
      Ansys Employee

      With that big a change is it melting?  Rather than a polynomial use piecewise linear.  Polynomials with large coefficients may over/under shoot the correct values so whilst they seem to be suitable mathematically they're not in an engineering sense. This is why I wanted to see the viscosity data overlaid with the polynomial you're using. 

    • pavankonchada123
      Subscriber

      Thank u for your solution

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