Skip to content

CSV writer implementation#86

Draft
nlaing613 wants to merge 11 commits intodevelopfrom
csv-output-writer
Draft

CSV writer implementation#86
nlaing613 wants to merge 11 commits intodevelopfrom
csv-output-writer

Conversation

@nlaing613
Copy link
Contributor

I know @jjhans built the original but since I pushed the most recent version I thought I'd go ahead and explain the logic of the version I pushed so we can discuss everything.

The main summary is that at a user-selected interval, the primitives, sound-speed, temperature, and cell-centers are written to the file according to a fixed precision. This is meant to replace the previous spatial for-loop that collected the fluid state; I found it slowed down the runs significantly.

The original version computed the heat flux within the csv_writer.py, but I believe this should be linked to the actual boundary layer evaluation; that said, I haven't had the chance to link this. It might also be helpful to add the skin friction coefficient. Regardless, both are omitted in this version. I still like the idea and would like to include them.

@TimothyEDawson, I understand you mentioned changing the file formatting to hdf5 to be compatible with restart files. Is this something we want to pursue further? I probably need to get up to speed with the restart functionality, I admit I haven't used it yet.

@TimothyEDawson
Copy link
Collaborator

@nlaing613 @jjhans There are two main things which I'm thinking about, here:

  1. I would like to expand and use the variable_info_map idea I introduced in Plotting facilities overhaul #83 where, for each variable you request by name, there is an associated function call which takes in the FluidState and returns the requested variable.
  2. The existing FluidState.save/restore functions write and read the FluidState into a much more efficient file format already, and combined with 1. you could use that data to compute whatever you'd like as a post-processing step.

I still think the CSV writer is worthwhile as a runtime output option, similar to the probes. It should be possible to insert more complex functions into the variable_info_map including heat flux and skin friction, and then include them within the CSV output upon request. I'm thinking that the Combustor should generate and retain a variable_info_map within the __init__ method, and then add new methods like heat flux into it when the corresponding source terms are being added to the time integration.

I'll take a pass at adding this functionality soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants