shimming-toolbox / CST-simulation-macros

Repository to store various macros useful for CST simulations
0 stars 1 forks source link

Modified existing macros and added two more #1

Closed kylemgilbert closed 2 years ago

kylemgilbert commented 2 years ago

I modified the existing macros to fix some issues as detailed below, and added two additional macros for calculating and exporting SAR. I have yet to figure out how to calculate the B1 plus field through a VBA macro, but will keep looking into it.

Changes to existing macros:

  1. Create_Coil_Combinations.mcr:

    • Changed the name (removed the space) to make it backwards compatible with exiting VOP code
    • Added the field-monitor combination of the h-field for individual coils; Extra Tasks combine all field monitors
    • Requires the default block name of MWSSCHEM1, which is the default name assigned to the first block simulation
  2. Create_SAR_Excitations.mcr:

    • Added the field-monitor combination of the power-loss monitor for each SAR excitation
  3. Set_tasks_magnitude_and_phase.mcr:

    • Corrected the computation of the phase for all Extra Tasks
  4. Postprocessing_CalculateSAR.mcr:

    • This new macro will calculate the SAR for each SAR excitation and Extra Tasks
    • Calculates the 10-g averaged SAR and normalizes to 1-W stimulated power, as required by the VOP code
    • Uses the C95.3 averaging scheme to calculate SAR, as recommended by CST
  5. Postprocessing_ExportSAR.mcr:

    • Exports SAR from SAR excitations and Extra Tasks
    • Exports over user-defined sub-volume and step width
    • The user must specify the output directory for exported files -- this directory must already exist or there will be an error
  6. README:

    • modified to reflect the default name of CoilCombinations and to include the required block name
jcohenadad commented 2 years ago

thank you @kylemgilbert . @Aurelienpujolm it’s a good opportunity for you to review this PR and learn about this CST macro

4rnaudB commented 2 years ago

Everything seems good, I'll test it later today before merging. I can show @Aurelienpujolm at the same time.