CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

convert viewFactorField to ascii and visualization

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By wyldckat
  • 1 Post By eddi0907

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 28, 2013, 10:23
Default convert viewFactorField to ascii and visualization
  #1
New Member
 
Join Date: Jan 2013
Posts: 15
Rep Power: 13
eddi0907 is on a distinguished road
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

Last edited by eddi0907; February 28, 2013 at 10:41.
eddi0907 is offline   Reply With Quote

Old   March 2, 2013, 07:39
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Edmund and welcome to the forum!

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

Best regards,
Bruno
__________________

Last edited by wyldckat; March 2, 2013 at 07:41. Reason: what -> which
wyldckat is offline   Reply With Quote

Old   March 4, 2013, 03:16
Default
  #3
New Member
 
Join Date: Jan 2013
Posts: 15
Rep Power: 13
eddi0907 is on a distinguished road
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
eddi0907 is offline   Reply With Quote

Old   March 4, 2013, 18:53
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 likes this.
__________________
wyldckat is offline   Reply With Quote

Old   March 7, 2013, 03:54
Default
  #5
New Member
 
Join Date: Jan 2013
Posts: 15
Rep Power: 13
eddi0907 is on a distinguished road
Hi Bruno,

thanks a lot for the perfect answer.

Kind Regards.

Edmund
eddi0907 is offline   Reply With Quote

Old   March 29, 2013, 05:23
Default
  #6
New Member
 
Join Date: Jan 2013
Posts: 15
Rep Power: 13
eddi0907 is on a distinguished road
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
Attached Images
File Type: jpg viewfactors_sphere.jpg (39.8 KB, 87 views)
eddi0907 is offline   Reply With Quote

Old   March 29, 2013, 20:15
Default
  #7
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   April 3, 2013, 10:19
Default
  #8
New Member
 
Join Date: Jan 2013
Posts: 15
Rep Power: 13
eddi0907 is on a distinguished road
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
Attached Images
File Type: jpg 380_cells.jpg (64.0 KB, 53 views)
File Type: jpg 1100_faces.jpg (87.4 KB, 54 views)
File Type: jpg 420000_faces.jpg (92.8 KB, 66 views)
Attached Files
File Type: gz viewfactorgen_sphere.tar.gz (23.3 KB, 13 views)
eddi0907 is offline   Reply With Quote

Old   April 4, 2013, 09:54
Default
  #9
New Member
 
Join Date: Jan 2013
Posts: 15
Rep Power: 13
eddi0907 is on a distinguished road
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
Attached Images
File Type: jpg viefactors_rays_default.jpg (96.9 KB, 87 views)
File Type: jpg viefactors_rays_modified.jpg (96.4 KB, 74 views)
wyldckat likes this.
eddi0907 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM native format data visualization and workflow zeliboba OpenFOAM Post-Processing 0 September 12, 2008 09:44
visualization.... queram Main CFD Forum 6 September 22, 2005 14:27


All times are GMT -4. The time now is 16:40.