Skip to content

ChemicalComposition: add configurable output-name separator and prefix namespacing for generated Thermochimica variables #32434

@chaibhave

Description

@chaibhave

Motivation

Current Thermochimica naming can cause two practical problems:

  • Name collisions when multiple ChemicalComposition blocks use overlapping elements (e.g. both need Cr).
  • Hardcoded : separator in output names (mu:Na, gas_ideal:NiCl2, etc.), which may conflict with user conventions and downstream tooling.

Design

1) Prefix for generated variables

  • New parameter: prefix
  • If non-empty and missing trailing _, _ is appended.
  • Prefix is applied to all variables generated by the action (elements and Thermochimica outputs).
  • Example: prefix = salt -> salt_Cr, salt_mu:Cr, etc.

2) Configurable output separator

  • New parameter: output_name_separator
  • MooseEnum values:
    • colon (default, backward-compatible)
    • slash
    • underscore
  • Affects parsing, ALL expansion, and generated/coupled names for:
    • output_species
    • output_element_potentials
    • output_vapor_pressures
    • output_element_phases
  • Strict mode by selection: if separator is slash or underscore, colon-formatted entries are rejected.

Impact

This issue tracks improvements to ChemicalComposition variable naming for Thermochimica workflows:

  1. Prefix support for generated variables (already implemented)
  2. Configurable output-name separator for Thermochimica output variables (already implemented)

Together, these changes let users avoid variable-name collisions and choose output token separators beyond :. Default behavior remains fully backward compatible (output_name_separator=colon).

Metadata

Metadata

Assignees

No one assigned

    Labels

    T: taskAn enhancement to the software.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions