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

Add pydrex.viscosity module #201

Merged
merged 16 commits into from
Jul 26, 2024
Merged

Add pydrex.viscosity module #201

merged 16 commits into from
Jul 26, 2024

Conversation

adigitoleo
Copy link
Member

First part of adding variable viscosity support. The main things I add here are:

  • pydrex.viscosity module with functions to get effective viscosity contributions from different mechanisms
  • a bunch of references and details to docstrings of the default parameter choices
  • a draft of the Fluidity 2D ridge variable viscosity example, but without the actual variable viscosity implemented yet (will add that in a part 2, this flml is just from an older branch)
  • support for custom constraints in the gmsh rectangular mesh generator (so I can have high resolution at the top centre, for 2D ridges)

Unfortunately the ridge example doesn't work with the mesh generator for some reason, so I have to use a .geo file instead. Might be able to fix this at some point but will focus on getting the full variable viscosity tests validated first.

Copy link
Member

@Patol75 Patol75 left a comment

Choose a reason for hiding this comment

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

Looking great so far; another significant contribution!

src/pydrex/core.py Outdated Show resolved Hide resolved
src/pydrex/viscosity.py Outdated Show resolved Hide resolved
- remove `harmonic_mean` because `scipy.stats.hmean` already exists
- remove comment about units because they are correct
@Patol75 Patol75 merged commit afa9d7d into main Jul 26, 2024
10 checks passed
@adigitoleo adigitoleo deleted the effective-viscosity branch July 31, 2024 13:59
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