Skip to content

Conversation

MohammedAnsys
Copy link
Collaborator

This PR provides a example of simulating transient compressible flow

The example tries to follow the provided guidelines with #4378 and uses the new API implementation.

@MohammedAnsys MohammedAnsys self-assigned this Sep 29, 2025
@github-actions github-actions bot added documentation Documentation related (improving, adding, etc) examples Publishing PyFluent examples maintenance General maintenance of the repo (libraries, cicd, etc) CI/CD Related to CI/CD labels Sep 29, 2025
@Copilot Copilot AI review requested due to automatic review settings October 13, 2025 09:07
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive example demonstrating transient compressible flow simulation in PyFluent. The example simulates airflow through a nozzle with time-varying boundary conditions, showcasing steady-to-transient coupling, dynamic boundary conditions, and adaptive meshing for high-speed flows.

Key changes:

  • Adds a new transient compressible nozzle workflow example with complete meshing and solver setup
  • Integrates the example into documentation build configuration and CI/CD workflow
  • Includes changelog entry documenting the new feature

Reviewed Changes

Copilot reviewed 4 out of 9 changed files in this pull request and generated 3 comments.

File Description
examples/00-fluent/transient_compressible_nozzle_workflow.py Complete workflow example demonstrating transient compressible flow simulation with meshing, solver configuration, and post-processing
doc/source/conf.py Updates filename pattern to include the new example in documentation generation
.github/workflows/execute-examples-weekly.yml Adds execution step for the new example in CI/CD pipeline
doc/changelog.d/4504.documentation.md Changelog entry documenting the addition of the transient compressible flow example

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


# %%
# Steady-State Initialization and Mesh Adaptation
# --------------
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected section header formatting - should use dashes for consistency with other section headers.

Suggested change
# --------------
# ---------

Copilot uses AI. Check for mistakes.

)
solver.settings.mesh.adapt.manual_coarsening_criteria = "density_scaled_gradient_crsn"

solver.tui.mesh.adapt.manage_criteria.add("adaption_criteria_0")
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'adaption' to 'adaptation'.

Suggested change
solver.tui.mesh.adapt.manage_criteria.add("adaption_criteria_0")
solver.tui.mesh.adapt.manage_criteria.add("adaptation_criteria_0")

Copilot uses AI. Check for mistakes.

outlet.momentum.gauge_pressure.value = "(0.12*sin(2200[Hz]*t)+0.737)*101325.0[Pa]"

# Configure mesh adaptation: Refine every 25 iterations
solver.tui.mesh.adapt.manage_criteria.edit("adaption_criteria_0", "frequency", "25")
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'adaption' to 'adaptation' for consistency.

Suggested change
solver.tui.mesh.adapt.manage_criteria.edit("adaption_criteria_0", "frequency", "25")
solver.tui.mesh.adapt.manage_criteria.edit("adaptation_criteria_0", "frequency", "25")

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/CD Related to CI/CD documentation Documentation related (improving, adding, etc) examples Publishing PyFluent examples maintenance General maintenance of the repo (libraries, cicd, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants