Skip to content

ABLATE to CHREST Format

kolosret edited this page Jun 12, 2023 · 25 revisions

This guide will explain how to convert the ABLATE output files to the CHREST format.

  1. Clone the post-processing repo to your local machine.

    git clone https://github.com/UBCHREST/post-processing.git
  2. Setup your python environment as needed.

  • UB CCR:module load python/py38-anaconda-2021.05
  • LLNL Quartz: module load python/3.10.8

The following paths are just examples. Update with paths on your system.

  1. Run the following command to view script options:
     python chrest/ablateData.py --help
    
     Generate a chrest data file from an ablate file
    
     optional arguments:
       -h, --help            show this help message and exit
       --file FILE           The path to the ablate hdf5 file(s) containing the ablate data. A wild card can be used to supply more than one file.
       --start START [START ...]
                         Optional starting point for chrest data. Default is [0., 0.0, -0.0127]
       --end END [END ...]   Optional ending point for chrest data. Default is [0.1, 0.0254, 0.0127]
       --delta DELTA [DELTA ...]
                         Optional grid spacing for chrest data. Default is [0.0005, 0.0005, 0.0005]
       --fields FIELDS [FIELDS ...]
                         The list of fields to map from ablate to chrest in format --field aux_temperature:temperature aux_velocity:vel
       --print_fields        If true, prints the fields available to convert
    
       --max_distance MAX_DISTANCE
                         The max distance to search for a point in ablate
       --batchsize BATCHSIZE
                         The number of files to be loaded in at once
  2. Export the path to the post processing repo
  • UB CCR: export POST_PROCESSING=/projects/academic/chrest/mtmcgurn/post-processing/
  • LLNL Quartz: export POST_PROCESSING=/usr/workspace/ubchrest/post-processing/
  1. Generate the CHREST files from the ABLATE hdf5 files. You must specify the file(s) and fields.
     # From within the result directory like 6G-280x40-pmma-rad-12844839
    
     # the domain files
     python3 $POST_PROCESSING/chrest/ablateData.py --file "domain/domain*.hdf5" --field aux_temperature:temperature aux_velocity:vel solution_euler:euler
    
     # the flowField_mixtureFraction files
     python3 $POST_PROCESSING/chrest/ablateData.py --file "flowField_mixtureFraction/flowField_mixtureFraction*.hdf5" --field monitor_zMix:zMix monitor_Yi:Yi:H2O,CO,CO2,OH,O2,MMETHAC_C5H8O2,CH3,C2H2
    
     # surface info for slab boundary_monitor (slice down z = 0)
     python3 $POST_PROCESSING/chrest/ablateData.py --file="slab boundary_monitor/slab boundary_monitor*.hdf5" --field "slab boundary_monitor_conduction:qcond" "slab boundary_monitor_radiation:qrad" "slab boundary_monitor_regressionRate:rdot" --max_distance=0.0003 --start 0.0 0.0 0.0 --end .1 0.0254 0.0 --delta 0.0005 0.0005 0.0005

Clone this wiki locally