CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to print the cell value row wise? (https://www.cfd-online.com/Forums/openfoam-post-processing/222336-how-print-cell-value-row-wise.html)

Fahmida November 20, 2019 05:34

How to print the cell value row wise?
 
1 Attachment(s)
Hello everyone,

I want to print the volume fraction values (alpha) of each cell and print them in row wise. As fur as I know Openfoam calculates the whole domain during each iteration. But I want to have the values of 0.078x0.06 portion of the domain only during my simulation.

Something in C programming like...

Code:


for (i=0; i<0.078; i++)
{
 for (j=0; j<0.06; j++)
  {
        printf("%f ", alpha[j]);
  }
printf("\n");
}

Thank you

Bazinga November 29, 2019 00:15

Quote:

Originally Posted by Fahmida (Post 750266)
Hello everyone,

As fur as I know Openfoam calculates the whole domain during each iteration. But I want to have the values of 0.078x0.06 portion of the domain only during my simulation.

Can you please specify what you mean. Do you want OpenFOAM to only calculate a certain region of the domain at each time step? Or do you want the values in a certain region be printed to the terminal? Or something else?

Fahmida December 22, 2019 12:00

Thank you for your reply.

Actually I want the second case that you have mentioned. I want the values of a certain region, specifically for the area 0.078x0.06 for post processing only.

Bazinga December 22, 2019 22:37

You can define a probe in each of the cells to get time histories of your alpha.

Fahmida December 26, 2019 19:24

Thank you for your reply.

Can you please explain a bit more on how to implement it?

Bazinga December 27, 2019 03:13

Well, search this forum the tutorials and/or the user guide and you will find explanation there immediately.


All times are GMT -4. The time now is 07:57.