saving . . . saved
0
How to find/call each individual cell in a computational domain
Title
Question

Hi, I have a test domain contains only 25 cells and this 25 cell geometry is only for test purpose. While running the simulation, the value of volume fraction I am getting is the volume fraction of the complete domain. But, I want to know the volume fraction of each cell (Cell 1, 2, 3....25) and that should be printed in my terminal. How to find/call each individual cell in a computational domain and to print it in the terminal ? A quick answer from any body would be highly helpful. Many thanks for your patience and time on this matter. Thank you, With regards, Saroj


OpenFOAM 08-03-17, 7:20 p.m. sarojdip

Answers:

0

Hi Saroj,

The terminal window is not for post-processing and to print results. You will have to use ParaView to analyze volume fraction. You may use the setFieldsDictdictionary to divide your domain according to initial volume fraction.
Regards
Viraj

09-03-17, 12:50 p.m. virajbelekar

Hi Viraj,

Yes, I know terminal is not for post-processing. But, some purpose, I want to print separately values (any value) for each cell. Suppose my volume fraction is named as volFrac. So, my terminal should print volFrac for 25 cells separately. For this, I need to write 4/5 line code (how to print volFrac), but I am not getting any way/solution. I want to have control over each cell rather control over main domain. Once I have control over each cell, I can define source term for each cell. That is my main goal (source term to each cell) once having control over each cell. 2-3 line code in this purpose would be a great help.

Thank you for your time and help.

With regards,
Saroj


09-03-17, 1:04 p.m. sarojdip

Login to add comment


0

Hi,

We analyze results using different vectors, glyphs, contours on ParaView. I think you are an excellent coder, please go ahead and write a code to print values of volume fraction. As far as I know, there is no printing of values in almost any of the CFD software.
Regards
Viraj

09-03-17, 1:17 p.m. virajbelekar

Hi,

No no, I am not a good coder. But, I am terribly facing some problem (how to assign/calculate any values for each cell and always it is possible to print the values in the terminal for test purpose) and want to have some solution asap. Yes, we can print values in FLUENT also and we did it in past using UDF. Sometimes printing of values are necessary from solver as those values should match with the hand calculated values. Hence, we can ensure that the solver is correct and working fine.

Many thanks on this matter.

With regards,
Saroj


09-03-17, 3 p.m. sarojdip

Login to add comment


0

Hi Saroj,

Open your results in ParaView. Then File -> Save Data.
You will get point-wise data.
Is this what you need? You can open this saved file in the terminal if you like.

09-03-17, 3:15 p.m. virajbelekar

Hi,
The above problem was solved in a different way. Now, my doubt is in the continuity equation file which is in '0' folder. As we know, the continuity equation solved for each cell in a computational domain. I want to know the loop by which the continuity equation solved for each cell in one time step. Would you please tell the exact line/code (loop) in the continuity equation.

Many thanks on this matter.


With regards,
Saroj


16-03-17, 6:33 p.m. sarojdip

Login to add comment


Log-in to answer to this question.