-
Notifications
You must be signed in to change notification settings - Fork 57
docs: Added example on transient compressible flow #4504
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 | ||
# -------------- |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
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.
# -------------- | |
# --------- |
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") |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
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'.
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") |
Copilot
AI
Oct 13, 2025
There was a problem hiding this comment.
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.
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.
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.