sandialabs / CACTUS

CACTUS (Code for Axial and Cross-flow TUrbine Simulation) is a turbine performance simulation code, based on a free wake vortex method, to study wind turbines and marine hydrokinetic (MHK) devices.
BSD 3-Clause "New" or "Revised" License
18 stars 12 forks source link

Using wall files #42

Closed danrhouck closed 3 years ago

danrhouck commented 3 years ago

I am trying to create and use a wall file to represent the turbine tower and nacelle in a simulation. I have created a mesh in Pointwise and exported it in plot3d format, but it's come to my attention that CACTUS is not using the "standard" plot3d format.

From the Wikipedia entry on plot3d files: A multiblock, 3 dimensional grid file begins with a single integer for the number of blocks M on its own line. The next M lines contain three integers for each of the blocks, which give the i, j, and k dimension sizes for each block. The M blocks are read in next. Each block contains a coordinate value iterated over i, j, k, and then the three coordinates, x, y, and z.

From the plot3d.f95 source file: subroutine read_p3d_multiblock(xyz_filename,nblocks,ni,nj,nk,x,y,z) ! read_p3d_multiblock() : Read a formatted (ASCII) Plot3D multi-block mesh file. ! Coordinates must be specified one number per line.

Also, I'm less sure of this, but apparently different programs may export plot3d files in different formats. The mesh that I created in Pointwise did open correctly in Paraview, so it's right in some sense. As is, it seems like CACTUS wants one coordinate per line and I have four per line, but it's not totally clear to me how to convert between formats. Has anyone run into this and figured it out?

whophil commented 3 years ago

The Plot3D reader here only supports ASCII types, and even does that incorrectly. I think this should be pretty easy to fix. A good goal would be to fix the reader to support any multi-block Plot3D ASCII that ParaView can read.

whophil commented 3 years ago

Fixed now, see limitations discussed in #43