CGNS unsteady dilemna
Currently I have a dilemna with using CGNS to store flow solution data for unsteady problems. Perhaps someone out there has gotten around this problem doing something simple that I've overlooked.
I'm attempting to write multiple flow solutions to a CGNS file. I'm doing this for two reasons: 1) when running my code in an unsteady mode, I use a 3 level, fully implicit technique which requires two solutions be stored in the file for clean restarts. 2) storing temporal snapshots of the flow solution for post-processing.
I have gone through the documentation in terms of writing BITER/ZITER data in order to "manage" the storage of time step values, iteration values, and flow solution pointers as the flow solution is written. The examples listed in the documentation have CGNS files opened with MODE_MODIFY.
If the files are opened with MODE_MODIFY, it is possible to overwrite BITER/ZITER data. If the files are opened with MODE_WRITE, it is not possile to overwrite the data (unless the CGNS file is built from scratch again, which is tantamount to closing and reopening).
I believe I am currently restricted to using MODE_WRITE because I'm trying to develop a system that writes partial flow solution data to a file.
If I write partial flow solution data to the file in MODE_MODIFY, part of the existing solution is deleted, and the part I'm attempting to write, writes ok. The point is, when I call a cg_field_partial_write, the part of the flow solution that I am not currently writing gets clobbered with MODE_MODIFY.
Is there a way to either
a) use MODE_WRITE, write and overwrite BITER/ZITER data, as needed duing an unsteady simulation?
b) use MODE_MODIFY, and write out partial field data without clobbering the flow solution.
|All times are GMT -4. The time now is 21:52.|