Fluids

Fluids

Creation of Fluid Database to use in Fluent

    • DanMynhart
      Subscriber

      Hi there,


      I'm trying to model the flow of a viscous oil through a straight pipeline.  I have made a PVT file in PVTP (Schlumberger software) but I am not sure how to import into Ansys.


      Is there a way I can create a similar database in Ansys?


      Regards,


       


      Dan

    • Keyur Kanade
      Ansys Employee

      I am not sure about PVT files. Can you please elaborate on it? What exactly this file has?


      In Fluent, you can always define new material and can give user specific properties to this material. 


      Regards,


      Keyur

    • DrAmine
      Ansys Employee

      You can check if your fluid is included in the NIST library inside Fluent. The list of materials supported by REFPROP v9.1 can be found in the Fluent User's Guide 7.16.4.


      Otherwise have to write some UDF to read the content of your PVT file and fill in the material definition by using dedicated DEFINE Macros. Which porperties are included in the PVT file?

    • DanMynhart
      Subscriber

      Hi Keyur,


      The file is made using schlumberger software (petroleum experts - .pvi file) and contains information such as the mole% and mass% of the fluid.  The fluid is a waxy crude oil with a Wax appearance temperature of 40 degrees celcius.  The point of this simulation is to bulding a start up model that determine the pressure required to start up a pipe line that has wax deposition.


      The predefined hydrocarbons in ANSYS are not enough to represent the fluid composition.  Other information such as Wax appearance temperature, wax content, viscosity and density should also be required at a minimum.


      Therefore I need some advice on how to build a file that ANSYS can import and run through a simulation.


      In the meantime I will investigate the UDF option.


      Many thanks.


       


       


       


       

    • DanMynhart
      Subscriber

      Thank you Amine also!

    • DanMynhart
      Subscriber

      I am trying to build a working UDF, but keep getting this error.


       


      Error: The UDF library you are trying to load (libudf11112) is not compiled for parallel use on the current platform (win64).nnThe system cannot find the file specified.


      nnU:Waxy Crude Oil PipelineUDF_RukthongRukthongTrial_filesdp0FFFFluentlibudf11112win643ddp_hostlibudf.dll


       


      Error Object: #f

    • DanMynhart
      Subscriber

      /*********************************************************************/


      /* UDF for specifying a temperature-dependent viscosity property     */


      /*********************************************************************/


       


       


       


      D1;


      FD1;


      temp;


      viscosity;


      volume; /* real variable named volume is declared globally */


      main(compute_volume, domain)


      {


      /* code that computes volume of some zone */


      volume = ((3.141*D1*D1)/4)*FD1;


      }


       


      C_T(cell_viscosity, cell, thread)


      {


      viscosity; /* local variable */


      temp = C_T(cell, thread); /* local variable */


      if (temp > 288.)


      viscosity = 5.5e-3;


      else if (temp > 286.)


      viscosity = 143.2135 - 0.49725 * temp;


      else


      viscosity = 1.;


      return viscosity;


      }


       

    • DanMynhart
      Subscriber

      This is the code we are using...

    • Keyur Kanade
      Ansys Employee

      Hello, 


      If you have udf which is working in serial mode then you will need to make some changes to that udf to work in parallel mode. Please see following link. 


      https://www.learncax.com/knowledge-base/blog/by-category/cfd/parallelization-of-udfs-in-ansys-fluent


      Also for defining property you can use DEFINE_PROPERTY macro as shown in image below. 


      Regards,


      Keyur


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