Is volume export not supporting prisms?

On a recently cloned develop branch. Trying to export to vtu with

pyfr export volume mesh.pyfrm output.pyfrs output.vtu

I get the following error

Traceback (most recent call last):
  File "../venvs/pyfr-devel/bin/pyfr", line 7, in <module>
    sys.exit(main())
             ~~~~^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/__main__.py", line 242, in main
    args.process(args)
    ~~~~~~~~~~~~^^^^^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/__main__.py", line 456, in process_export
    writer.process(solnf, outf)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/writers/vtk/base.py", line 549, in process
    self._write_vtu(outfname)
    ~~~~~~~~~~~~~~~^^^^^^^^^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/writers/vtk/base.py", line 613, in _write_vtu
    self._write_data(lambda b: fh.Write(b), etype)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/writers/vtk/base.py", line 748, in _write_data
    vpts, vsoln, curved, part = self._prepare_pts(etype)
                                ~~~~~~~~~~~~~~~~~^^^^^^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/writers/vtk/volume.py", line 49, in _prepare_pts
    mesh_vtu_op, soln_vtu_op = self._opmats(etype, self.cfg)
                               ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/cache.py", line 44, in newmeth
    res = cache[key] = meth(self, *args, **kwargs)
                       ~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "../venvs/pyfr-devel/src/pyfr/pyfr/writers/vtk/volume.py", line 33, in _opmats
    svpts = [svpts[i] for i in self._nodemaps[etype, nsvpts]]
                               ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: ('pri', 1)

Please advise.

Volume export by default attempts to generate a high-order VTK file. This, however, is not possible for p = 0. Here, subdivision must be used.

Regards, Freddie.

1 Like

Thanks p=0 was indeed the problem. Restarting with 1st order allows me to export the outputs.

Though can I ask for advice here on a related note. I am running with 0th order as target order is unstable for initial transient. The only reason for me to visualise the field is figure out how much of the constant initial field is gone. What would be a good way of doing it?

I could perhaps set up probes in important points of the domain and see what’s happening. This is probably the only approach that will scale to large meshes.

Will Ascent plugin help me here?

I think all I need is a consistent output across orders and see how it changes in time.

You can just get PyFR to export a linearly sub-divided VTK file (as opposed to a high order one). These will work fine with p = 0 solutions.

Regards, Freddie.