Skip to content

Add optional pressure field output to snapshots (ADIOS2)#280

Merged
ia267 merged 8 commits intoxcompact3d:mainfrom
ia267:222_output_pressure_adios2
Mar 3, 2026
Merged

Add optional pressure field output to snapshots (ADIOS2)#280
ia267 merged 8 commits intoxcompact3d:mainfrom
ia267:222_output_pressure_adios2

Conversation

@ia267
Copy link
Copy Markdown
Collaborator

@ia267 ia267 commented Feb 25, 2026

This PR adds optional pressure output to snapshots. When enabled, pressure is retained after pressure correction, interpolated from cell-centred grid to vertex grid, rescaled to physical (kinematic) pressure, and written as p alongside velocity field u, v, w. Closes #222

Pressure is excluded from checkpoint files because it's a derived quantity that's recomputed from velocity (it's not required for restarts).

Changes:

  • added output_pressure (default .false.) to checkpoint_config_t and namelist parsing
  • documented output_pressure in user docs
  • updated pressure_correction subroutine to retain pressure when keep_pressure=.true.
  • added compute_pressure_vert() to convert pseudo-pressure to kinematic pressure via division by dt
  • Added interpl_c2v() in vector_calculus_t (general scalar interpolation from CELL (DIR_Z) to VERT (DIR_X)
  • Renamed checkpoint_mgr to io_mgr in base_case
  • In snapshot manager build the field list dynamically

Note that when pressure output is enabled, extra memory is used to store pressure (CELL, DIR_Z) and pressure_vert (VERT, DIR_X). If output_pressure is not set (or .false.) then we get the current behaviour.

Tested on TGV case (see output below)
pressure_output

@ia267 ia267 added this to the Enhancing IO functionality milestone Feb 25, 2026
@ia267 ia267 requested a review from CFD-Xing February 25, 2026 12:27
@ia267 ia267 self-assigned this Feb 25, 2026
@ia267 ia267 added the enhancement New feature or request label Feb 25, 2026
@ia267 ia267 merged commit e49f6f4 into xcompact3d:main Mar 3, 2026
2 checks passed
@ia267 ia267 deleted the 222_output_pressure_adios2 branch March 3, 2026 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional pressure output in snapshots

2 participants