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

CHNS example : bubble detachment in a shear flow #1334

Merged
merged 19 commits into from
Nov 13, 2024

Conversation

PierreLaurentinCS
Copy link
Collaborator

@PierreLaurentinCS PierreLaurentinCS commented Oct 29, 2024

Description

This is the second example of the Cahn-Hilliard-Navier-Stokes solver. The solver is used to simulate the detachment of bubbles in a shear flow in three dimensions. The quantities of interest (detachment time and volume) are compared to values from the literature. An excellent agreement is observed, which confirms that the CHNS solver is able to describe complex interface physics, involving break-up and jet formation.

All the necessary files to run the parametric sweep are included (only on the shear rate) and python scripts are provided to reproduce the figures if needed (see the previous PR : #1307).

Checklist (will be removed when merged)

Code related list:

  • All in-code documentation related to this PR is up to date (Doxygen format)
  • Copyright headers are present and up to date
  • Lethe documentation is up to date
  • The branch is rebased onto master
  • Code is indented with indent-all and .prm files (examples and tests) with prm-indent

Pull request related list:

  • Labels are applied
  • There are at least 2 reviewers (or 1 if small feature) excluding the responsible for the merge
  • The PR description is cleaned and ready for merge
  • Changelog is modified

Copy link
Contributor

@blaisb blaisb left a comment

Choose a reason for hiding this comment

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

Few last comments, this is very nice

@@ -0,0 +1,14 @@
#!/bin/bash
#SBATCH --account=rrg-blaisbru
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#SBATCH --account=rrg-blaisbru
#SBATCH --account=acount-name


- Solver: ``lethe-fluid`` (Q1-Q1)
- Two phase flow handled by the Cahn-Hilliard-Navier-Stokes (CHNS) approach
- Dimensionality of the length
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- Dimensionality of the length
- Dimensionality of the length

I understand what you mean here and I don't know how to word that better, but I still think the wording here could be improved

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I suggest "Changing the unit of length of the problem using the dimensionality option"


Bubble detachment in shear flow plays a key role in multiphase flows, where shear forces influence the separation of air bubbles from surfaces. This process is important in industries like petroleum engineering, where bubble behavior affects oil extraction, and chemical processing, where it impacts mixing and mass transfer. In this example, we simulate an air bubble in water under shear flow, highlighting how shear forces drive detachment from the interface.

The problem consists of a rectangular box of length :math:`L = 12 \ \text{mm}`, height :math:`H = 5 \ \text{mm}` and thickness :math:`l = 5 \ \text{mm}`. The liquid phase flows from left to right following a Couette profile, that is determined with a given **shear rate**. At the bottom wall is a circular air inlet of radius :math:`R_0 = 0.5 \ \text{mm}`. Air is injected from this inlet following a Poiseuille profile. As the time passes, the bubble, which is initialized as a semi-sphere of radius :math:`R_0`, grows, until the shear force from the surrounding liquid and the buoyancy force detach it.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is shear-rate in italic like that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I want to emphasize that the Couette profile is determined from the shear rate, since we're only using the shear rate in what follows

+-------------------------------------------------------------------------------------------------------------------+

The quantity of interest of this problem is the detachment time :math:`t_\text{det}`. It is defined as the last time where the number of closed contour of the phase order field is equal to 1. From this, we derive the detachment volume :math:`V_\text{det}`, which is the bubble volume at :math:`t_\text{det}`. We perform numerous simulations by changing the shear rate and compute the detachment times and volumes using the python scripts provided. Those results are then compared to the results from Mirsandi *et al.* [#mirsandi2020]_
Below, all the parameters are set for a simulation whose shear rate :math:`S = 500 \ \text{s}^{-1}`. Detailed instructions on how to generate the parameters files automatically are given in the "Running the Simulation" section of this example.
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe italic for running the simulation instead of just quotes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree that quoted is not great, but maybe bold would be better?

Comment on lines 101 to 102
.. Note:: When using the dimensionality parameters, the problem and the physical properties are rescaled using the new units specified by the user. This means that physical properties can be given their value in SI units and will automatically be rescaled. The resulting fields (velocity and pressure for instance) will also be rescaled accordingly. One exception to this is the source terms and the initial conditions, which need to be specified in rescaled units.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess also boundary conditions right?
It only rescales the unit for the physical properties in the end.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I clarified this part

Copy link
Collaborator Author

@PierreLaurentinCS PierreLaurentinCS left a comment

Choose a reason for hiding this comment

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

Once the capillary rise example is merged into master, the branch will be rebased and pass the tests (related to the architecture of the documentation)


- Solver: ``lethe-fluid`` (Q1-Q1)
- Two phase flow handled by the Cahn-Hilliard-Navier-Stokes (CHNS) approach
- Dimensionality of the length
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I suggest "Changing the unit of length of the problem using the dimensionality option"


Bubble detachment in shear flow plays a key role in multiphase flows, where shear forces influence the separation of air bubbles from surfaces. This process is important in industries like petroleum engineering, where bubble behavior affects oil extraction, and chemical processing, where it impacts mixing and mass transfer. In this example, we simulate an air bubble in water under shear flow, highlighting how shear forces drive detachment from the interface.

The problem consists of a rectangular box of length :math:`L = 12 \ \text{mm}`, height :math:`H = 5 \ \text{mm}` and thickness :math:`l = 5 \ \text{mm}`. The liquid phase flows from left to right following a Couette profile, that is determined with a given **shear rate**. At the bottom wall is a circular air inlet of radius :math:`R_0 = 0.5 \ \text{mm}`. Air is injected from this inlet following a Poiseuille profile. As the time passes, the bubble, which is initialized as a semi-sphere of radius :math:`R_0`, grows, until the shear force from the surrounding liquid and the buoyancy force detach it.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I want to emphasize that the Couette profile is determined from the shear rate, since we're only using the shear rate in what follows

+-------------------------------------------------------------------------------------------------------------------+

The quantity of interest of this problem is the detachment time :math:`t_\text{det}`. It is defined as the last time where the number of closed contour of the phase order field is equal to 1. From this, we derive the detachment volume :math:`V_\text{det}`, which is the bubble volume at :math:`t_\text{det}`. We perform numerous simulations by changing the shear rate and compute the detachment times and volumes using the python scripts provided. Those results are then compared to the results from Mirsandi *et al.* [#mirsandi2020]_
Below, all the parameters are set for a simulation whose shear rate :math:`S = 500 \ \text{s}^{-1}`. Detailed instructions on how to generate the parameters files automatically are given in the "Running the Simulation" section of this example.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree that quoted is not great, but maybe bold would be better?

Comment on lines 101 to 102
.. Note:: When using the dimensionality parameters, the problem and the physical properties are rescaled using the new units specified by the user. This means that physical properties can be given their value in SI units and will automatically be rescaled. The resulting fields (velocity and pressure for instance) will also be rescaled accordingly. One exception to this is the source terms and the initial conditions, which need to be specified in rescaled units.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I clarified this part

@PierreLaurentinCS PierreLaurentinCS force-pushed the bubble_detachment_example branch 2 times, most recently from 7a402f9 to 24131e7 Compare November 5, 2024 16:53
| |
+-------------------------------------------------------------------------------------------------------------------+

Below are the plots of the contour of the bubble in the plane :math:`z = 0` when detachment occurs for different values of the shear rate.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you want to add one of your video?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes! I still need to make them prettier with @AmishgaAlphonius though

Copy link
Contributor

@blaisb blaisb left a comment

Choose a reason for hiding this comment

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

I am good with this @PierreLaurentinCS . So if this is ready for merge, just tell me and I will merge it.

@PierreLaurentinCS PierreLaurentinCS force-pushed the bubble_detachment_example branch from 642e151 to 469eaaa Compare November 11, 2024 19:54
@blaisb blaisb merged commit a7b5f8d into master Nov 13, 2024
11 checks passed
@blaisb blaisb deleted the bubble_detachment_example branch November 13, 2024 15:46
OresteMarquis pushed a commit that referenced this pull request Nov 14, 2024
Description
This is the second example of the Cahn-Hilliard-Navier-Stokes solver. The solver is used to simulate the detachment of bubbles in a shear flow in three dimensions. The quantities of interest (detachment time and volume) are compared to values from the literature. An excellent agreement is observed, which confirms that the CHNS solver is able to describe complex interface physics, involving break-up and jet formation.

All the necessary files to run the parametric sweep are included (only on the shear rate) and python scripts are provided to reproduce the figures if needed (see the previous PR : #1307).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants