Skip to content

Added 2D flow over cylinder example#162

Open
hsalehipour wants to merge 2 commits into
Autodesk:mainfrom
hsalehipour:dev
Open

Added 2D flow over cylinder example#162
hsalehipour wants to merge 2 commits into
Autodesk:mainfrom
hsalehipour:dev

Conversation

@hsalehipour
Copy link
Copy Markdown
Collaborator

Contributing Guidelines

Description

Added 2D flow over cylinder example requested in #144 and fixed some error reporting bugs in `operator.py'

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • All pytest tests pass

Linting and Code Formatting

Make sure the code follows the project's linting and formatting standards. This project uses Ruff for linting.

To run Ruff, execute the following command from the root of the repository:

ruff check .
  • Ruff passes

@hsalehipour hsalehipour requested a review from massimim May 26, 2026 15:00
Copy link
Copy Markdown
Collaborator

@massimim massimim left a comment

Choose a reason for hiding this comment

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

@hsalehipour, the PR looks good. I just lest some minor comments.
Thank you!


Compute backends
----------------
* **WARP (default):** Recommended for large 2D GPU runs.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The list of backends excludes Neon. Is there a specific reason?

# -------------------------- Simulation Setup --------------------------

diam = 80 # Cylinder diameter in lattice units; reduce (e.g. 20) for faster runs
reference_diam = 80
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think some comments would help highlight the need for a second variable for the diameter.

Comment on lines +97 to +99
grid_shape = (int(22 * diam), int(4.1 * diam))
cylinder_center = (2.0 * diam, 2.0 * diam)
cylinder_radius = diam / 2.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd move these after line 88 to keep all geometric parameters in the same place.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants