Plot fields with Vorpal Plotter

It occurred to me that it might be fairly straight forward to plot the fields on top of the block plots. It turns out that it is!


Vorpal Plotter 0.31

  • Interpolates fields and grid bounds to plot them more accurately.
  • Fixed field arrow plots (so the arrows point in faintly the right direction)
  • Fixed some of the over plotting issues. STL and contour are now compatible.

Plot Fields

Don’t try and plot large field files. A 200mb file currently balloons to 2GB in memory. It simply isn’t clever enough to deal with large data sets.

I’ve put in two ways of plotting fields over the blocks. A relatively normal vector arrow plot and a field magnitude “ultimate” 3D contour plot.

fields.fieldPlot('deymittraSphere_YeeElecField_1.h5',scale, origin,0.1e-4);
fields.ultimateContour('deymittraSphere_YeeElecField_1.h5',origin, cells, length);
Arrow plot of deymittraSphere electric field

Arrow plot of deymittraSphere electric field (VP 0.3 plotted this field wrongly)

The contour plot is generated using the magnitude of the field vector. I’ve cheated a little as I’ve just rescaled the plot so the node values that I’ve now plotted as volumes fit in the right place. I should really have interpolated to the centre of the cells and plotted that. This is close though. I’ve set up some fairly simple minded interpolation, the plots fit rather better now.

Ultimate contour plot of deymittraSphere

Ultimate contour plot of deymittraSphere

These can of course be combined with the block plotting function to make something quite instructive.

pmlSlab ultimate contour and blocks

The pmlSlab example and with ultimate contour and blocks plotted

Plot GridBounds

If you aren’t using an stl I’ve put in a way of plotting the stair step mesh used by vorpal (I couldn’t quite work out the cut-cell mesh format). I’m not convinced it’s an accurate representation, it has the same fiddle as the ultimate contour. I’ve interpolated this and the grids fit to the rest of the data far better.

plotMesh.plotGridBounds('deymittraSphere_sphere_1.h5',origin, cells, length);
deymittra Sphere with grid bounds

deymittra Sphere with grid bounds plotted along with a field plot. (VP 0.3 plotted this field wrongly)

Sadly plotGridBounds and ultimateContour are not compatible. One appears to wipe out the other. plotGridBounds and ultimateContour and plotStl are a bit more compatible now, YMMV.

Plot Points

I’ve also added position and point to the plottable entities in plot blocks. Now you can plot various histories such as fieldOnCoords by editing the plotList.


All these examples are in example/ in the archive.

Old version

Vorpal Plotter 0.3

  • Plots fields incorrectly
  • No interpolation on field plots.

Leave a Reply