CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Data of massflow for selected phase in VOF (https://www.cfd-online.com/Forums/fluent/30512-data-massflow-selected-phase-vof.html)

Victor November 14, 2002 04:17

Data of massflow for selected phase in VOF
 
Hello!

I have a problem with the VOF modell: I am modelling a two-phase flow of water and air in a pipe and I would like to be able to get data of the massflow at the outlet for one of the phases at every timestep during the calculation. As it is right now the only way to get this data is to stop the calculation after every timestep and go into Report/Fluxes/Massflowrate and choose the phase of interest. With 10000 timesteps during the calculation this is something I just canīt do. Do I have to create an UDF-file to solve this matter? and if so, how do I do that?

Cheers Victor

Victor November 14, 2002 08:14

Ok, but thereīs another problem...
 
Ok, I have figured it out by using a macro! But one problem remains... I would like Fluent to write the value of the massflow of water in to an out-file so that I can use it with another program such as Excel. How do I do this?

/Victor

PEO November 14, 2002 08:50

Re: Data of massflow for selected phase in VOF
 
Victor,

Have you tried this...

Go to "Solve/Monitors/Surface/Define", and then under "Report Type" pick "Flow Rate". Under "Report of", select "Phases" and then pick the phase of your choice (either air or water). Then, under "Surface" you can select the surface of your choice (in this case the outlet). Pick a file name to write the output to, and you should be set.

This should give you the mass flow rate of the given phase at each iteration.

Good Luck.

Phil :)

Victor November 14, 2002 11:00

Re: Data of massflow for selected phase in VOF
 
Thank you for your answer Phil but I have tried that and it gives a another value compared to the correct one I get when I check the Report/Fluxes/Massflowrate... :( Victor

mahdi saniee nezhad November 24, 2002 01:17

Re: Data of massflow for selected phase in VOF
 
Dear sir I have a problem with this title. If it's possible for you please send me your received responses. Very thanks for your attention to my request. With the best regards. Mahdi saniee nezhad


Victor November 24, 2002 11:26

Re: Data of massflow for selected phase in VOF
 
Hello Mahdi! In fact, I solved this problem last week! If you , like me, need to get the results for the massflow of any phase at a specific surface during simulation you will have to create a Custom Field Function by following this steps (If you have a copy of the Fluent Manual, I advise you to look up chapter 27.5):

1. Enter Define/Custom Field Functions

2. Define your function... In this case the function will look like: Density(of the phase)*VolumeFraction(of the phase)/Density(Total density). If you take a look at eq. (26.5-5) in the Fluent manual you will see that by introducing this function in that eq. you will get the massflow of the specific phase through any given surface.

3. Specify a name for the function. Be sure not to specify a function name that is already used by Fluent.

4. Click on the Define button. Fluent will now put this function under the list of Custom Field Functions.

5. Before starting a new simulation, enter Solve/Monitors/Surface and choose write (or plot and print if you wish). Click on Define and under Report Type you choose Flow Rate, under Report Of you choose Costum Field Function and select the function that you defined in step 4. Under File Name you will type where the data should be stored. And donīt forget to specify the surface of your interest!

6. Run the simulation.

7. Open the datafile with some appropiate program like Excel and you will have your results of the massflow for the choosen phase!

I hope that this will help you!

/Victor



All times are GMT -4. The time now is 15:50.