Closed akuraan closed 1 year ago
Implemented recommended fix for part 3. Part 1 looks to be addressed as well. Those some weird zone names!
Looking into part 2. Tecplot itself has some "auto-assign" kind of flag for StrandIDs, so I don't want to end up with unreadable files in either format.
Indeed, you can't write strandid=-1
in a .dat
file (b/c tec360
will refuse to open it). So now if you read a .plt
file and have a StrandID of -1
, Plt.WriteDat()
will skip it. Similarly, Plt.ReadDat()
will use a default value of -1
instead of creating a counter like you mentioned in part 2. This should address the remaining portion of your issue. However, there does not appear to be a way to differentiate StrandID values of 0
and -1
in the .dat
files. That's out of my control, though.
Thank you again for the promptness.
After some deeper digging, have discovered that Multi-Core FUN3D outputs are even more awkward. The 'base' zone names are stored as strings while the appended indices are stored in binary.
Your fix for Issue 1 is surely more robust, but unfortunately does not factor this in. I don't think know if the added value is worth considering this any further, but I leave this up to you.
Thanks for the clarification wrt Issue 3.
That sounds pretty weird.... The zone names are already written in a weird format. Calling them "strings" is generous b/c Tecplot expects 4 bytes per character. In other words, there are a lot of zeros in there. I'm curious if these _1
, _2
suffixes are coming from a different part of the file? Or is FUN3D just writing them in a weird way? It sound apparent from your knowledge that tec360
can open these files though, so maybe there's something I can do.
Obviously I've never paid attention to these multi-core files before.
I have not experimented with tec360, but have been able to open these files in paraview.
Which FUN3D namelist flags are you using to write such files? It sounds like you are getting the boundary in multiple cores, which surprises me. For the cutting planes I think I have always been getting a behavior like this but was happy to pretend it was all in one zone.
The boundary names were parsed from cutting planes, so exactly what you've described.
I think this issue should probably be closed unless you have some more specific problems. It now is pretty reliable on writing and rereading a FUN3D cut plane file going back and forth between .dat
and .plt
w/o changes, and I think the odd zone names you were seeing were specifically a Paraview property. Those indices on repeated zone names do not actually appear anywhere in the files on disk.
Discovered a few bugs when using
cape.plt.Plt()
'sRead()
andReadDat()
functions.Zone Name parsing does not handle Multi-Core zone name outputs:
plt.Plt.Read()
Line 260zone = capeio.read_lb4_s(f).strip('"')
StrandID are defined differently between reading from .dat files and .plt.
Plt.Read()
) the StrandIDs are parsed in lines 266-268i, = np.fromfile(f, count=1, dtype='i4')
Plt.WriteDat()
), StrandIDs are auto generated in lines 775-780Plt.ReadDat()
, the StrandIDs from the .dat do not match those from the .pltAnother, minor bug when reading zone names in
Plt.ReadDat()
lines 632-640k, v = s.split("=")
tok, v = s.split("=", maxsplit = 1)