# Visualization of a Geometry with ParaView

**URL:** <https://openmc.discourse.group/t/visualization-of-a-geometry-with-paraview/5067>\
**Category:** User Support\
**Created:** [December 16, 2024, 8:33pm UTC](https://openmc.discourse.group/t/visualization-of-a-geometry-with-paraview/5067 "2024-12-16T20:33:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gglamzn](https://avatars.discourse-cdn.com/v4/letter/g/e19adc/32.png) [@gglamzn](https://openmc.discourse.group/u/gglamzn)\
**Post date:** [December 16, 2024, 8:33pm UTC](https://openmc.discourse.group/t/visualization-of-a-geometry-with-paraview/5067/1 "2024-12-16T20:33:55Z")

</div>

# Visualization of a Geometry with ParaView

## Objective

I am creating a detector in OpenMC with the goal of running simulations. As a first step, I need to create the geometry and verify it in 3D using ParaView.

* * *

## Steps

### 1. Create the Geometry

I write the geometry in my Python script.

### 2. Compile the Program

I run my script, which generates a file named `plot_1.h5`.

### 3. Convert the `plot_1.h5` File to VTI Format

I use the following command to convert the `plot_1.h5` file into a format that ParaView can read:

openmc-voxel-to-vtk plot\_1.h5 -o geometry.vti

### 4. Open ParaView

I open ParaView and set some parameters according to this previous topic:  
[OpenMC Discourse - Geometry Plotting Issue](https://openmc.discourse.group/t/geometry-plotting-not-working-as-expected/3218)

I still have issues with the visualization; I cannot see my geometry in the file as you can see with this image:

 ![paraview](https://global.discourse-cdn.com/free1/uploads/openmc/original/2X/f/f29fdd419d22b672aec3931497e2c82d6e3a8b8e.jpeg)

Could you please help me?

I am sending you the OpenMC modeling file attached. However, I am not able to send the `plot_1.h5` and `geometry.vti` files.

Best regards,  
Gauthier GOUSSET  
[detector.py](https://openmc.discourse.group/uploads/short-url/6nMC2kYsjCClfTjJQliZ3ey74tY.py) (4.7 KB)

---

<div class="post-metadata">

**Author:** ![fott](https://avatars.discourse-cdn.com/v4/letter/f/d78d45/32.png) [@fott](https://openmc.discourse.group/u/fott)\
**Post date:** [December 18, 2024, 1:09pm UTC](https://openmc.discourse.group/t/visualization-of-a-geometry-with-paraview/5067/2 "2024-12-18T13:09:04Z")

</div>

I suggest to have a look at the following tutorial

> **[neutronics-workshop/tasks/task\_03\_making\_CSG\_geometry at main ·...](https://github.com/fusion-energy/neutronics-workshop/tree/main/tasks/task_03_making_CSG_geometry)**
>
> A workshop covering a range of fusion relevant analysis and simulations with OpenMC, DAGMC, Paramak and other open source fusion neutronics tools - fusion-energy/neutronics-workshop

However,  
(a) It is a bit tedious to get a geometry to look good in paraview  
(b) hence debugging a geometry with paraview does not sound as a good solution
