Add optional pressure field output to snapshots (ADIOS2)#280
Merged
ia267 merged 8 commits intoxcompact3d:mainfrom Mar 3, 2026
Merged
Add optional pressure field output to snapshots (ADIOS2)#280ia267 merged 8 commits intoxcompact3d:mainfrom
ia267 merged 8 commits intoxcompact3d:mainfrom
Conversation
… centres to vertices
CFD-Xing
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
palongside velocity fieldu, v, w. Closes #222Pressure is excluded from checkpoint files because it's a derived quantity that's recomputed from velocity (it's not required for restarts).
Changes:
output_pressure(default.false.) tocheckpoint_config_tand namelist parsingoutput_pressurein user docspressure_correctionsubroutine to retain pressure whenkeep_pressure=.true.compute_pressure_vert()to convert pseudo-pressure to kinematic pressure via division bydtinterpl_c2v()invector_calculus_t(general scalar interpolation fromCELL (DIR_Z)toVERT (DIR_X)checkpoint_mgrtoio_mgrinbase_caseNote that when pressure output is enabled, extra memory is used to store
pressure (CELL, DIR_Z)andpressure_vert (VERT, DIR_X). Ifoutput_pressureis not set (or.false.) then we get the current behaviour.Tested on TGV case (see output below)
