# Plot a 3D Grid when solving Partial differential Equations

**URL:** <https://discourse.julialang.org/t/plot-a-3d-grid-when-solving-partial-differential-equations/20636>\
**Category:** General Usage\
**Created:** [February 11, 2019, 3:01am UTC](https://discourse.julialang.org/t/plot-a-3d-grid-when-solving-partial-differential-equations/20636 "2019-02-11T03:01:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santiago\_Cuervo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santiago_cuervo/32/7403_2.png) [@Santiago\_Cuervo](https://discourse.julialang.org/u/Santiago_Cuervo)\
**Post date:** [February 11, 2019, 3:01am UTC](https://discourse.julialang.org/t/plot-a-3d-grid-when-solving-partial-differential-equations/20636/1 "2019-02-11T03:01:29Z")

</div>

I would like to plot a 3D grid in which each cell has different values of properties. This is to view the results of solving partial differential equations PDE. In octave I plotted with patch function

thanks

 ![unnamed%20(1)](https://global.discourse-cdn.com/julialang/original/3X/d/2/d299727f9d64988d1be1f91e9080d754717c5c86.png) ![unnamed](https://global.discourse-cdn.com/julialang/original/3X/9/6/96e218092ec1f8f1be2dead60ec1b3f58418dcdd.png)

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [February 11, 2019, 3:07am UTC](https://discourse.julialang.org/t/plot-a-3d-grid-when-solving-partial-differential-equations/20636/2 "2019-02-11T03:07:06Z")

</div>

Export your grid as VTK (VTKWrite.jl). Visualize in Paraview.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [February 11, 2019, 2:28pm UTC](https://discourse.julialang.org/t/plot-a-3d-grid-when-solving-partial-differential-equations/20636/3 "2019-02-11T14:28:08Z")

</div>

> [@PetrKryslUCSD](#):
>
> VTKWrite.jl

[WriteVTK.jl](https://github.com/jipolanco/WriteVTK.jl)

---

<div class="post-metadata">

**Author:** ![Santiago\_Cuervo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/santiago_cuervo/32/7403_2.png) [@Santiago\_Cuervo](https://discourse.julialang.org/u/Santiago_Cuervo)\
**Post date:** [September 5, 2019, 3:06pm UTC](https://discourse.julialang.org/t/plot-a-3d-grid-when-solving-partial-differential-equations/20636/4 "2019-09-05T15:06:42Z")

</div>

Hi, I successfully created a PVD file that stores a grid with some properties on different timesteps

```julia
using WriteVTK
pvd1 = paraview_collection("my_pvd_file1")

vtkfile1 = vtk_grid("my_vtk_file1", x, y, z) # 3-D
vtk_cell_data(vtkfile1, sw, "Saturation")
vtk_cell_data(vtkfile1, pwi, "Pressure")
collection_add_timestep(pvd1, vtkfile1, 1)

vtkfile2 = vtk_grid("my_vtk_file", x, y, z) # 3-D
vtk_cell_data(vtkfile2, so, "Saturation")
vtk_cell_data(vtkfile2, poi, "Pressure")
collection_add_timestep(pvd1, vtkfile2, 2)

```

Now I want to add some Static properties that does not depend on time. How is the syntaxis to do that?.

How to add a trayectory of points to represent Oil Wells surveys?

Thank you
