ansys/pyfluent

Separate Cell Zone by Register

Closed this issue ยท 4 comments

๐Ÿ” Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

๐Ÿž Description of the bug

I am unable to separate a cell-zone using a region register (e.g. hex-shape) via pyfluent as no cells are marked.
Executing the same region register with the exact same extent in an interactive session via tui commands or in the gui works perfectly fine.

๐Ÿ“ Steps to reproduce

  1. launch a fluent solver session with show_gui=False
  2. load in any mesh
  3. create a region register:
session.settings.solution.cell_registers["register_1"].type.option.allowed_values()
session.settings.solution.cell_registers["register_1"].type.option = "hexahedron"
session.settings.solution.cell_registers["register_1"].type.hexahedron.min_point = [-1,-1,-1]
session.settings.solution.cell_registers["register_1"].type.hexahedron.max_point = [1,1,1]
  1. use it to separate the cell zone:
    session.settings.mesh.modify_zones.sep_cell_zone_mark(cell_zone_name="fluid", register="register_1", move_faces=True)

N.B.: I also tried the TUI method command in python without success.

๐Ÿ’ป Which operating system are you using?

Linux

๐Ÿ“€ Which ANSYS version are you using?

24R2

๐Ÿ Which Python version are you using?

3.12

๐Ÿ“ฆ Installed packages

about-time==4.2.1
alive-progress==3.1.5
ansys-api-fluent==0.3.27
ansys-api-platform-instancemanagement==1.1.0
ansys-api-tools-filetransfer==0.1.0
ansys-fluent-core==0.24.2
ansys-fluent-visualization==0.12.0
ansys-platform-instancemanagement==1.1.2
ansys-tools-filetransfer==0.1.0
ansys-units==0.3.2
astroid @ file:///croot/astroid_1725385395289/work
beartype==0.18.5
Bottleneck @ file:///croot/bottleneck_1709069899917/work
certifi==2024.8.30
charset-normalizer==3.3.2
click==8.1.7
contourpy==1.3.0
cycler @ file:///tmp/build/80754af9/cycler_1637851556182/work
dill @ file:///croot/dill_1715094664823/work
docker==7.1.0
fonttools==4.54.1
grapheme==0.6.0
grpcio==1.66.1
grpcio-health-checking==1.62.3
idna==3.10
importlib_metadata==8.5.0
isort @ file:///croot/isort_1718289883491/work
joblib==1.4.2
kiwisolver==1.4.7
lxml==5.3.0
matplotlib==3.9.2
mccabe @ file:///opt/conda/conda-bld/mccabe_1644221741721/work
mkl-service==2.4.0
mkl_fft @ file:///croot/mkl_fft_1725370245198/work
mkl_random @ file:///croot/mkl_random_1725370241878/work
nltk==3.9.1
numexpr @ file:///work/perseverance-python-buildout/croot/numexpr_1698871031164/work
numpy @ file:///croot/numpy_and_numpy_base_1708638617955/work/dist/numpy-1.26.4-cp312-cp312-linux_x86_64.whl#sha256=1d700f51d8b4fa684d858c9e3b56b1656bc5c82b6b79ff08d4e3b491c430059f
packaging @ file:///croot/packaging_1720101850331/work
pandas @ file:///croot/pandas_1718308974269/work/dist/pandas-2.2.2-cp312-cp312-linux_x86_64.whl#sha256=92c518f7e09edd50b5caa5862636c51d6a29391803f3ada62f68aa52f27d8f92
pillow @ file:///croot/pillow_1721059439630/work
platformdirs @ file:///work/perseverance-python-buildout/croot/platformdirs_1701732573265/work
ply @ file:///work/perseverance-python-buildout/croot/ply_1698846188635/work
pooch==1.8.2
protobuf==4.25.5
psutil==6.0.0
pylint @ file:///croot/pylint_1725465875449/work
pyparsing @ file:///croot/pyparsing_1725041624202/work
PyQt5==5.15.10
PyQt5-sip @ file:///work/perseverance-python-buildout/croot/pyqt-split_1698847927472/work/pyqt_sip
python-dateutil @ file:///croot/python-dateutil_1716495738603/work
pytz @ file:///croot/pytz_1713974312559/work
pyvista==0.44.1
pyvistaqt==0.11.1
PyYAML==6.0.2
QtPy==2.4.1
regex==2024.9.11
requests==2.32.3
scooby==0.10.0
setuptools==75.1.0
sip @ file:///work/perseverance-python-buildout/croot/sip_1698846977033/work
six @ file:///tmp/build/80754af9/six_1644875935023/work
tomlkit @ file:///work/perseverance-python-buildout/croot/tomlkit_1698847005123/work
tornado @ file:///croot/tornado_1718740109488/work
tqdm==4.66.5
typing_extensions==4.12.2
tzdata==2024.2
unicodedata2 @ file:///croot/unicodedata2_1713212950228/work
urllib3==2.2.3
vtk==9.3.1
wheel==0.44.0
zipp==3.20.2

Hi @nablaV,
This is no longer reproducible in 25R1. In 24R2, the settings were somehow not getting applied. We tried saving it from gui with same settings and it worked.
cc. @mkundu1, @seanpearsonuk

Hi @nablaV, This is no longer reproducible in 25R1. In 24R2, the settings were somehow not getting applied. We tried saving it from gui with same settings and it worked. cc. @mkundu1, @seanpearsonuk

Hi @prmukherj, thanks for taking a look!
do I understand correctly that in 25R1 this won't be an issue any longer? As mentioned in 24R2 it works ok in the gui, but that won't be an option if the job is large/running on a cluster.

Hi @nablaV, This is no longer reproducible in 25R1. In 24R2, the settings were somehow not getting applied. We tried saving it from gui with same settings and it worked. cc. @mkundu1, @seanpearsonuk

Hi @prmukherj, thanks for taking a look! do I understand correctly that in 25R1 this won't be an issue any longer? As mentioned in 24R2 it works ok in the gui, but that won't be an option if the job is large/running on a cluster.

Yes @nablaV, this is working as expected in 25R1.

@nablaV, closing this issue as of now.

cc. @mkundu1, @seanpearsonuk