Skip to content

Validator error message references non-existent parameter bc_{dir}%Tw_out (should be Twall_out) #1480

Description

@sbryngelson

In toolchain/mfc/case_validator.py, the isothermal-out wall-temperature positivity check prints a parameter name that does not exist. The value is correctly fetched as bc_{dir}%Twall_out, but the error string in the prohibit call says bc_{dir}%Tw_out:

# line 1366 — correct fetch
tw_out = self.get(f"bc_{dir}%Twall_out")
# line 1367 — correct message
self.prohibit(tw_out is None, f"Isothermal Out (bc_{dir}%isothermal_out) requires a wall temperature to be set (e.g., bc_{dir}%Twall_out).")
if tw_out is not None and self._is_numeric(tw_out):
    # line 1369 — WRONG name in the message
    self.prohibit(tw_out <= 0.0, f"Wall temperature bc_{dir}%Tw_out must be strictly positive for thermodynamics (got {tw_out}).")

The actual parameter is Twall_out, defined in toolchain/mfc/params/definitions.py:86 ("Twall_out": "Temperature of the exit-side isothermal wall."); there is no Tw_out parameter anywhere. The parallel Twall_in branch (line 1356) correctly prints bc_{dir}%Twall_in.

Impact. A user who sets a non-positive exit wall temperature gets an error telling them to fix bc_x%Tw_out, a parameter that doesn't exist — misdirecting the fix. Diagnostic-message-only; no validation logic is affected.

Fix. Change bc_{dir}%Tw_out to bc_{dir}%Twall_out on line 1369.

Output-neutral / golden-file-safe. Yes — error-message string only.


Filed from a repo-wide code-cleanliness review; locations verified against master @ 40dde5e.

Code references

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or doesn't seem rightgood first issueGood for newcomers

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions