Plot 3D blocks from Vorpal .in file

Vorpal lets you define several blocks using upper and lower bounds. Sometimes these are hard to visualise so it would be nice for the computer to do it for you. Sadly Tech-x don’t supply any means of doing this at this time. This is a little matlab script that takes an .in file and plots the blocks in 3D.

Vorpal Plotter

The output for an example geometry (you can see my mistakes).

At this time it can only plot blocks which are defined using coordinates but it could be altered to plot blocks defined using distances also. I’ve used plotcube for the drawing. As vorpal uses upper and lower bounds as opposed to origin and dimensions the coordinate systems need rearranging with bounds.m.

parser.m takes the in file you present it with (which must have been processed by txpp.py) and runs through looking for code blocks who’s type is in plotList (where a block is defined <type name>). It then plots it with the colour in plotColorList.

%set up a list of things to draw and their colors (ignore everything else
plotList = {'ParticleSink'};
plotColorList = {[1 0 0]};

In addition to plotcube the two files you need are in the archive: Vorpal Plotter

Leave a Reply