Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set species mode to partially-premixed-combustion #3613

Open
2 tasks done
PaulCreusy opened this issue Jan 3, 2025 · 0 comments
Open
2 tasks done

Unable to set species mode to partially-premixed-combustion #3613

PaulCreusy opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@PaulCreusy
Copy link

PaulCreusy commented Jan 3, 2025

🔍 Before submitting the issue

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

🐞 Description of the bug

I would like to create a fluent case using partially premixed combustion. To do this, I need to change the species model to partially-premixed-combustion. This mode is referenced in the documentation here and with all its options here. However, when trying to change the mode, the setting is not applied and the state remains unchanged, making it impossible to set the partially premixed options.

📝 Steps to reproduce

Here is my script:

import ansys.fluent.core as pyfluent

# Start the fluent instance
solver = pyfluent.launch_fluent(
    precision=pyfluent.Precision.DOUBLE,
    dimension=pyfluent.Dimension.TWO,
    cwd="fluent_files",
    # processor_count=2
)

# Load the mesh
solver.settings.file.read_mesh(
    file_name="old_chamber.msh"
)

# Set the 2D space type
general = pyfluent.General(settings_source=solver)
general.solver.two_dim_space = "axisymmetric"
# general.print_state()

# Set turbulent model
viscous = pyfluent.Viscous(settings_source=solver)
viscous.model = "k-epsilon"
# viscous.print_state()

# Turn energy on
energy = pyfluent.Energy(settings_source=solver)
energy.enabled = True
# energy.print_state()

# Set the chemistry type
species = pyfluent.Species(settings_source=solver)
print(species.model.option.allowed_values())
species.model.option = "partially-premixed-combustion"
species.model.print_state()

# Try to change a parameter
species.partially_premixed_model_options.chemistry.state_relation.allowed_values()

And here is the traceback:

Multicore SMT processors detected. Processor affinity set!
Reading "old_chamber.msh"...
Buffering for file scan...

   38375 nodes, binary.
    1062 nodes, binary.
   76941 2D interior faces, zone  1, binary.
     338 2D interior faces, zone  2, binary.
     494 2D wall faces, zone  6, binary.
      25 2D velocity-inlet faces, zone  7, binary.
      20 2D velocity-inlet faces, zone  8, binary.
     400 2D wall faces, zone  9, binary.
      78 2D wall faces, zone 10, binary.
       5 2D wall faces, zone 11, binary.
      40 2D pressure-outlet faces, zone 12, binary.
   38905 quadrilateral cells, zone  3, binary.

Building...
     mesh
     materials,
     interface,
     domains,
     zones,
        outlet
        wall_lip
        wall_injector
        wall_chamber
        air_inlet
        fuel_inlet
        centerline
        solid-geom-1_surface
        geom-1_surface
        interior-geom-1_surface
     parallel,
Done.

Adjusting the following setting:
Changing Discretization Scheme for Turbulent Kinetic Energy:   from: Second Order Upwind   to: First Order Upwind
['off', 'species-transport', 'non-premixed-combustion', 'premixed-combustion', 'partially-premixed-combustion', 'pdf-transport']

option : off
number_vol_spec : False
Traceback (most recent call last):
  File "c:\Users\paulc\Documents\Projets\rozanoff-fluent-simulation\github_issue_script.py", line 38, in <module>
    species.partially_premixed_model_options.chemistry.state_relation.allowed_values()
  File "C:\Users\paulc\Documents\Projets\rozanoff-fluent-simulation\venv\lib\site-packages\ansys\fluent\core\solver\flobject.py", line 1077, in __getattribute__
    attr = super().__getattribute__(name)
AttributeError: 'species' object has no attribute 'partially_premixed_model_options'.

The most similar API names are:
<solver_session>.setup.models.species.partially_premixed_model_options (Object)
<solver_session>.tui.define.models.species.partially_premixed_combustion (Command)
<solver_session>.tui.define.models.species.partially_premixed_combustion_expert (Command)
<solver_session>.tui.define.models.species.partially_premixed_combustion_grids (Command)
<solver_session>.tui.define.models.species.partially_premixed_properties (Command)

It can be noted that although the species model is set to partially-premixed-combustion and although this value appears in the allowed values, the model option remains off causing the crash when trying to print the allowed values for the state relation.

If needed, I can provide the mesh but I don't think it is related to the issue.

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

2024.R2

🐍 Which Python version are you using?

3.10

📦 Installed packages

ansys-api-fluent==0.3.30
ansys-api-platform-instancemanagement==1.1.0
ansys-api-tools-filetransfer==0.1.1
ansys-fluent-core==0.27.0
ansys-platform-instancemanagement==1.1.2
ansys-tools-filetransfer==0.1.1
ansys-units==0.3.4
asttokens==3.0.0
certifi==2024.12.14
charset-normalizer==3.4.1
click==8.1.8
colorama==0.4.6
comm==0.2.2
debugpy==1.8.11
decorator==5.1.1
docker==7.1.0
exceptiongroup==1.2.2
executing==2.1.0
grpcio==1.68.1
grpcio-health-checking==1.62.3
idna==3.10
importlib_metadata==8.5.0
ipykernel==6.29.5
ipython==8.31.0
jedi==0.19.2
joblib==1.4.2
jupyter_client==8.6.3
jupyter_core==5.7.2
lxml==5.3.0
matplotlib-inline==0.1.7
nest-asyncio==1.6.0
nltk==3.9.1
numpy==2.2.1
packaging==24.2
pandas==2.2.3
parso==0.8.4
pdf2image==1.17.0
pillow==11.0.0
platformdirs==4.3.6
prompt_toolkit==3.0.48
protobuf==4.25.5
psutil==6.1.1
pure_eval==0.2.3
Pygments==2.18.0
python-dateutil==2.9.0.post0
pytz==2024.2
pywin32==308
PyYAML==6.0.2
pyzmq==26.2.0
regex==2024.11.6
requests==2.32.3
six==1.17.0
stack-data==0.6.3
tornado==6.4.2
tqdm==4.67.1
traitlets==5.14.3
typing_extensions==4.12.2
tzdata==2024.2
urllib3==2.3.0
wcwidth==0.2.13
zipp==3.21.0
@PaulCreusy PaulCreusy added the bug Something isn't working label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant