PyFluent: How to get the zone ID when zone name is known?

Rolf Reinelt
Rolf Reinelt Member, Employee Posts: 2

I know that I can get face and cell zones with

From this I can get the names.
But some commands require to use the ID (a number) instead, for example

Is there a PyFluent way to figure out the ID of a zone?



  • PabloA
    PabloA Member, Employee Posts: 2
    Name Dropper First Comment First Anniversary Ansys Employee

    Hi @Rolf Reinelt ,

    For models that are not yet exposed, you can trigger an auxiliary Scheme interface to get those. In your case, you can get the id of a zone "mywall" as follows

    bcname = "mywall"
    id = solver.scheme_eval.scheme_eval(f'(thread-name->id "{bcname}")')

    Note that this way should be superseded by new, pythonic forms as the API develops.