Fluids

Fluids

UDF or macro to extract results of mass velocity temperature phases fraction for each cell in VOF

    • OliviaH
      Subscriber

      Hello. This message is to kindly ask you for your support with some suggestion for the following problem.


      In this exercise, water is injected during 1 s at 0.1 m/s, then air is injected also during 1 s at 0.1 m/s, after that the inlet is closed for the last 8 s. I need to obtain the product of the mass and velocity, Cp, Hfusion, temperature and the volume fraction of each phase in each cell for a certain period.I know the amount of data will be huge, but I think it is possible. I tried with report definitions, but for velocity it is not possible to get only the velocity only of a certain phase. I know I have to use a UDF, but since I have not experience with this, I would really appreciate some advice. It has been difficult for me to find some examples, maybe UDF are more commonly used to “input” data (like a temperature condition varying according to certain equation), rather than to “extract” results. Maybe you can guide me mentioning some macros or commands that I should use. Also, I do not know where to charge the UDF (I don’t think is in the same way used for boundary conditions).Thanks inadvance.

    • OliviaH
      Subscriber

    • DrAmine
      Ansys Employee

      If you are using VOF you will only get a single velocity field and single temperature field. So you just write an ASCII file with all what you require + VOF fraction. Based on that VOF fraction you can then know whether you are in one phase or in the other. If it is between 0 and 1 you are at the interface region.

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