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/)
-   -   convert viewFactorField to ascii and visualization (https://www.cfd-online.com/Forums/openfoam-post-processing/113882-convert-viewfactorfield-ascii-visualization.html)

eddi0907 February 28, 2013 10:23

convert viewFactorField to ascii and visualization
 
Dear Forum,

is there a way to convert the viewFactorField generated with viewFactorsGen from binary to ascii format?

Is it possible to visualize the facesAgglomeration with paraview?

Thanks in advance.

Edmund

wyldckat March 2, 2013 07:39

Greetings Edmund and welcome to the forum!

Could you let us know which tutorial case you're referring to?

Best regards,
Bruno

eddi0907 March 4, 2013 03:16

Hi Bruno,

I used the multiRegionHeaterRadiation in /tutorials/heatTransfer/chtMultiRegionSimpleFoam

In this tutorial the radiation view factors are created with the faceAgglomerate and viewFactorsGen utility.

And I would like to know if it is possible to have a look with paraview at the created surfaces by faceAgglomerate that are used for viewFactorsGen and defined by patches in the viewFactorsDict. The files are located in /0/bottomAir/facesAgglomeration or 0/topAir/facesAgglomeration

The viewFactorField generated by viewFactorsGen in 0/topAir/viewFactorField or 0/bottomAir/viewFactorField is in binary format, Is it possible to output or convert this to ascii?

Kind Regards.

Edmund

wyldckat March 4, 2013 18:53

Hi Edmund,

Binary to ascii:
  1. Edit the file "system/controlDict" and change "writeFormat" to "ascii".
  2. Then run:
    Code:

    foamFormatConvert -time 0 -region bottomAir
    It will load all of the fields and write them back in "ascii" format, for the specified time and region.

ParaView:
  1. Open in ParaView the file "multiRegionHeaterRadiation{bottomAir}.OpenFOA M", which the script Allrun created. Or run:
    Code:

    paraFoam -region bottomAir
  2. In the "Object Inspector":
    1. Under "Volume Fields", choose the fields "facesAglomeration" and "viewFactorField".
    2. Under "Mesh Parts", choose all patches if you want to see values assigned for "viewFactorField", because this field is all zeros in the internal field. "facesAglomeration" has values for both the internal mesh and the patches.
Best regards,
Bruno

eddi0907 March 7, 2013 03:54

Hi Bruno,

thanks a lot for the perfect answer.

Kind Regards.

Edmund

eddi0907 March 29, 2013 05:23

1 Attachment(s)
Dear Bruno,

I'm not able to get correct view factors for a complex surface.

Do you have an idea how to get better viewfactor results for a sphere comparing to the unusable ones attached?

Kind Regards.

Edmund

wyldckat March 29, 2013 20:15

Hi Edmund,

I've seen that you've also added your comment on the bug tracker: http://www.openfoam.org/mantisbt/view.php?id=656

This is currently beyond my level of expertise, but without a test case and some idea of the result of what it should look like, it makes it even harder to figure out how to help!? :(
The aforementioned bug report already gives some hints, but there is no clear test case that can be used for confirming if and what is wrong or right...

Best regards,
Bruno

eddi0907 April 3, 2013 10:19

4 Attachment(s)
Hi Bruno,

I attached a case to calculate view factors using snappy hex mesh.

I'm not sure about the viewFactorField ParaView is displaying but I assume it is the viewfactor sum of the displayed face regarding all correlated (visible) faces. (If it is the control sum every value should be 1)

I attached as well the outcome for different resolutions by changing the snappyHexMeshDict.

However I assume for this case more or less homogeneously distributed view factors all over the sphere surface because every single sphere face "sees" nearly the same therefore the result of the fine mesh should be OK.

But for sure the zero entries in the viewFactorField are wrong. They appear for coarse meshes And that is the point I would start searching for.
Knowing where the zero entries come from might fix the problem.

Kind Regards.

Edmund

eddi0907 April 4, 2013 09:54

2 Attachment(s)
Hi once more,

I was able to locate the problem.

For debugging I added the following lines to viewFactorsDict:

debug 1;
dumpRays true;

The "zero entries" are due to aglomeratedFaces that are choosen to have no visble faces in shootRays.H. (This can als bo checked in globalFaceFaces in the constant directory. There should be faces belonging to the coarse faces)

Changing the following lines in shootRays.H as done here shows interesting results:
00043 start.append(fc ); 00045 end.append(fc );


I have no more zero entries but now there are rays entering the sphere and I have an overestimation of the surrounding patch.
I'll add it to the bug report.

Kind Regards

Edmund


All times are GMT -4. The time now is 01:23.