pyVorpal

PyVorpal-1.2.1

  • Uses VorpalDom
  • Extracts all or some blocks which can be plotted
  • Creates a Visit friendly .h5 file
  • There must be a .in file
  • VorpalComposer/VisIt can’t plot meshs with 0 or 1 cells in any dimension (at least on windows). As a workaround these are set to have 2 cells for plotting. It’s better than nothing for now.

With VorpalComposer you can integrate block plotting with the inbuilt visualisation. As the blocks are saved to an .h5 file as a mesh VorpalComposer lists the blocks as mesh’s and is able to plot them.

Plot the blocks as well as the fields in VorpalComposer

If you “Enable VisIt Context Menu” under “Visualisation Options” in Tools/Settings you can right click on the visualization pane and open the visit GUI. This lets you edit the colours and opacity of the plot.
Read More

Vorpal Blocks in VisIt

VorpalVisIt 0.11

  • Uses VorpalDom
  • Extracts all or some blocks which can be plotted
  • Creates a Visit friendly .h5 file
  • There must be a .in file and “”*_Globals_1.h5″.

Having become frustrated with Matlab’s inability to draw more than about 10,000 electrons without becoming unusable slow I thought I’d have a look at VisIt. It’s always nice to be able to plot the blocks from your .pre file so I thought I’d write something like VorpalPlotter to work with VisIt.

pmlSlabBlocks

pmlSlab example with blocks plotted

Read More

Vorpal In File to XML tree structure

VorpalDOM 0.1

  • Parses Vorpal .in files to a XML DOM structure using xml.etree.ElementTree
  • Block finding functions (by type and by name)
  • Scale class to convert between grid and length coordinate systems

With a little fiddling about, python’s built in XML packages can be used to parse the vorpal .in file. xml.etree.ElementTree only needs the block titles (“” for instance) to be altered to “” and a wrapping tag added (the equivalent of an “” tag) for it to be able to parse the file.

Read More

SolidLink (CST Studio to Solidworks interface)

CST View

CST View

Sometimes the CAD features in CST Studio can be limiting especially with complex rounding. SolidWorks allows you to draw much more intricate geometries but exporting and importing .SAT files can be irritating, and parameter sweeps become very time consuming.

SolidWorks View

SolidWorks View

This macro links the parameters in CST to equations in SolidWorks and automates the .SAT link between the two programs. With the link established a parameter change in CST (and a history update from the History List diaglogue box) updates the SolidWorks model and imports the new version into CST. This allows parameter sweeps to be performed on models with imported geometries.

Read More

Condor password authentication (with windows nodes)

This guide doesn’t let you submit jobs. I’ll get back to you when I’ve sorted that problem.
For simplicity I’m using condor password authentication. It’s reasonably simple to setup once you’ve worked out what’s going on.

Just as a bit of background I have a Linux central server and windows nodes. I’m using condor 7.6.0 installed with the .deb package. I recommend you attempt this on a test pool of at least 2 as you will most likely kill it repeatedly. Make sure condor is running on both machines with debugging turned on.

Read More

Turn on condor debugging

It’s easy to turn on debugging. Remember to do this on both the central manager and at least one test node. Then you can see what you are doing and the logs say MUCH more useful things.

In condor_config set this flag (it’s around line 595)

##--------------------------------------------------------------------
##  Settings that control the daemon's debugging output:
##--------------------------------------------------------------------

##
## The flags given in ALL_DEBUG are shared between all daemons.
##
ALL_DEBUG = D_FULLDEBUG

If you want to you can always set this just for a single daemon.  You do of course need to have some idea of which daemon you think is wrong.

Read More

Build master document from child in LyX

When you’ve got a large document with lots of children it’s nice to be able to build the whole document from a child document with one click. You can add some buttons to the standard toolbar to let you do this.

First find this bit of code in $LyX$\Resources\ui\stdtoolbars.inc:

Toolbar "view/update" "View/Update"
   Item "View DVI" "buffer-view dvi"
   Item "Update DVI" "buffer-update dvi"
   Item "View PDF (pdflatex)" "buffer-view pdf2"
   Item "Update PDF (pdflatex)" "buffer-update pdf2"
   Item "View PostScript" "buffer-view ps"
   Item "Update PostScript" "buffer-update ps"
End

Then add these two lines:

  Item "View PDF (pdflatex)" "master-buffer-view pdf2"
  Item "Update PDF (pdflatex)" "master-buffer-update pdf2"

If you want image buttons rather than text, save the two images below to $LyX$\Resources\ui\Resources\images\ (it's the file name that is important).

Enjoy!

Read More

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!

Update

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.
Read More

Lyx reverse search in windows

I’m still using this setup in Lyx 2.0.0 as the method they describe in Help/Additional Features doesn’t take into account spaces in file names. I can’t get the reverse search button to do anything of value either.

I’ve had this working for a while. I’ve not noticed anyone posting about how to use it without cygwin. This works with the standard windows version of lyx rather than the cygwin version. Its a bit of a stupid method with some cludges but it does work fine, its not as neat as the cygwin version (which it’s basically a port of). If anyone manages to clean it up a bit and remove some of the dependancies that would be good.

Read More

Plot 3D blocks from Vorpal .in file (now with .stl files)

Following on from the last vorpal plotter I’ve updated things a bit. Instead of plotting everything in grid coordinates I’ve added a parser and appropriate conversion functions to plot everything in meters.

[scale, distanceOrigin, cellBounds, distanceBounds] = coords.getScales(file);

Where scale is the distance per cell; distanceOrigin is the position of grid position [0 0 0]; cellBounds is the boundary in cells; distance bounds is the same in meters.

Plot of pmlSlab.pre

This is a direct plot of Plot of pmlSlab.in using vorpal plotter.

Read More