-
Notifications
You must be signed in to change notification settings - Fork 63
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 3D motion of non spherical objects #979
Conversation
You'll need to rebase, No hurry though |
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.
First batch of comments, will continue most likely early next week :)
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
a262c1f
to
1d914bf
Compare
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.
Nice PR! The comments I have so far. I still have some files to review
applications_tests/lethe-fluid-sharp/two_non_sphere_contact.prm
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
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.
Still not finish, on last file to review
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.
First batch of suggestions.
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.
Other bunch of comments. I only have 3 files left. Most likely tomorrow morning
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.
First batch finish. Good work
|
||
Tensor<1, 3> point_to_particle_vector = | ||
particle_position_3d - point_on_boundary_3d; | ||
Tensor<1, 3> normal = |
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.
Same think here, I would add comments about who is i and who is j
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.
Second small batch
7e78060
to
7859a7e
Compare
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.
One more batch of comments.
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
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.
Other batch of comments. I will continue this week. This is a chunky PR to review really...
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: Victor Oliveira Ferreira <[email protected]>
Co-authored-by: OGaboriault <[email protected]> Co-authored-by: Bruno Blais <[email protected]>
7a99138
to
4bbcbb3
Compare
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.
I'm arriving after the war, mostly typos and some questions about the implementation.
* The ``enable lubrication force`` parameter enables or disables the use of lubrication forces. This parameter must be set to ``false`` when using non-newtonian fluid. | ||
* The ``explicit contact impulsion`` parameter enables or disables the use of explicit contact impulsion evaluation in the resolution of the coupling of the particle. When it is set to true, this parameter results in the code only performing the DEM calculation once per CFD time step and using the resulting contact impulsion to evaluate all the other Newton's iterations. This reduces the number of times the DEM calculation is made. However, since the position is still implicitly evaluated in the absence of contact, the cut cell mapping must be performed at each Newton iteration. | ||
|
||
* The ``explicit position integration`` parameter enables or disables the use of explicit position integration in the resolution of the coupling of the particles. When it is set to true, this parameter results in the code only performing the DEM calculation once and using the resulting position and orientation to evaluate all the other Newton's iterations. This reduces the number of times the cut cell mapping must be performed and the number of call to the DEM calculations. However, this can affect the stability of the scheme. |
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.
* The ``explicit position integration`` parameter enables or disables the use of explicit position integration in the resolution of the coupling of the particles. When it is set to true, this parameter results in the code only performing the DEM calculation once and using the resulting position and orientation to evaluate all the other Newton's iterations. This reduces the number of times the cut cell mapping must be performed and the number of call to the DEM calculations. However, this can affect the stability of the scheme. | |
* The ``explicit position integration`` parameter enables or disables the use of explicit position integration in the resolution of the coupling of the particles. When it is set to true, this parameter results in the code only performing the DEM calculation once and using the resulting position and orientation to evaluate all the other Newton's iterations. This reduces the number of times the cut cell mapping must be performed and the number of calls to the DEM calculations. However, this can affect the stability of the scheme. |
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
doc/source/parameters/sharp-immersed-boundary/sharp-immersed-boundary.rst
Outdated
Show resolved
Hide resolved
* @brief | ||
* initialised the particle | ||
* | ||
* @brief This class defines values related to a particle used in the sharp interface IB. Each particle defined will have these value used in the solver. |
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.
* @brief This class defines values related to a particle used in the sharp interface IB. Each particle defined will have these value used in the solver. | |
* @brief This class defines values related to a particle used in the sharp interface IB. Each particle defined will have these values used in the solver. |
Co-authored-by: PierreLaurentinCS <[email protected]> Co-authored-by: Olivier Guévremont <[email protected]>
I think this PR is now ready to merge. |
Description of the problem This PR aims to add support for the coupled angular motion of any 3D object. This includes the coupling with the fluid and the DEM interaction between these objects. The following elements are added: integration of the Euler angles in the DEM and in the CFD coupling, relevant parameters for the inertia and volume of the objects, A function to evaluate the distance between the two objects using the intersection of their level-set and their bounding box, a set of three boolean parameters that aimed at limiting the number of call to the DEM calculation. While implementing these features, two bugs were found: A bug that affected the evaluation of the force when two particles were in contact. This bug was changing the force evaluation on a particle depending on the number of processors that were used. This bug comes from overconstrained cells (cells with all their DOF imposed by boundary conditions were poorly treated in the force evaluation). This modification changed the results of a few tests where contact played a role. However, the solution's behavior does not change significantly, and new results still agree well with previous results for cases with particle contact. The modification to the function generate_cut_cell_map and force_evaluation only addresses this bug. Another bug for the evaluation of the gradient of superquadric was found. The gradient had a sign error if evaluated inside of the particle. The evaluation of the supequadric was also optimized by avoiding overshoot. The new inertia required a modification of the load particle from the file option. To add the possibility of defining the inertia matrix in the load particle from the file option, we modified the syntax to be semicolon-separated instead of space-separated and added the volume variable. Description of the solution Add support for integrating the Euler angle in the coupling formulation and in the DEM. Move all the DEM calculations for contact force in the ib_particle_dem to take the contact point into account correctly and simplify the code. Add the new function in the shape classes called distance_to_shape. This function looks for the minimum of the level set defined by the intersection of two shapes. Using this minimum, we can evaluate the overlap of the two shapes. This function combines a Cartesian search with a gradient direction search and a numerical gradient descent. How Has This Been Tested? A new test was added that modeled two ellipsoids in contact with each other and a wall. All previous tests were verified, and an investigation was performed when the results were modified (e.g., pp_contact_test). Previous examples were tested and run successfully. A modified example was performed to test multiple superquadric shapes (64). Documentation The documentation was updated to reflect the new options and add some tips on using the new feature. Future changes This feature version remains experimental, and more tests and validation should be performed. An example with a validation case should be added. Co-authored-by: Pierre <[email protected]> Co-authored-by: Bruno Blais <[email protected]> Co-authored-by: Olivier Guévremont <[email protected]> Co-authored-by: OGaboriault <[email protected]> Co-authored-by: Victor Oliveira Ferreira <[email protected]> Co-authored-by: PierreLaurentinCS <[email protected]> Former-commit-id: 72412e7
Description of the problem This PR aims to add support for the coupled angular motion of any 3D object. This includes the coupling with the fluid and the DEM interaction between these objects. The following elements are added: integration of the Euler angles in the DEM and in the CFD coupling, relevant parameters for the inertia and volume of the objects, A function to evaluate the distance between the two objects using the intersection of their level-set and their bounding box, a set of three boolean parameters that aimed at limiting the number of call to the DEM calculation. While implementing these features, two bugs were found: A bug that affected the evaluation of the force when two particles were in contact. This bug was changing the force evaluation on a particle depending on the number of processors that were used. This bug comes from overconstrained cells (cells with all their DOF imposed by boundary conditions were poorly treated in the force evaluation). This modification changed the results of a few tests where contact played a role. However, the solution's behavior does not change significantly, and new results still agree well with previous results for cases with particle contact. The modification to the function generate_cut_cell_map and force_evaluation only addresses this bug. Another bug for the evaluation of the gradient of superquadric was found. The gradient had a sign error if evaluated inside of the particle. The evaluation of the supequadric was also optimized by avoiding overshoot. The new inertia required a modification of the load particle from the file option. To add the possibility of defining the inertia matrix in the load particle from the file option, we modified the syntax to be semicolon-separated instead of space-separated and added the volume variable. Description of the solution Add support for integrating the Euler angle in the coupling formulation and in the DEM. Move all the DEM calculations for contact force in the ib_particle_dem to take the contact point into account correctly and simplify the code. Add the new function in the shape classes called distance_to_shape. This function looks for the minimum of the level set defined by the intersection of two shapes. Using this minimum, we can evaluate the overlap of the two shapes. This function combines a Cartesian search with a gradient direction search and a numerical gradient descent. How Has This Been Tested? A new test was added that modeled two ellipsoids in contact with each other and a wall. All previous tests were verified, and an investigation was performed when the results were modified (e.g., pp_contact_test). Previous examples were tested and run successfully. A modified example was performed to test multiple superquadric shapes (64). Documentation The documentation was updated to reflect the new options and add some tips on using the new feature. Future changes This feature version remains experimental, and more tests and validation should be performed. An example with a validation case should be added. Co-authored-by: Pierre <[email protected]> Co-authored-by: Bruno Blais <[email protected]> Co-authored-by: Olivier Guévremont <[email protected]> Co-authored-by: OGaboriault <[email protected]> Co-authored-by: Victor Oliveira Ferreira <[email protected]> Co-authored-by: PierreLaurentinCS <[email protected]> Former-commit-id: 72412e7
Description of the problem
Another bug for the evaluation of the gradient of superquadric was found. The gradient had a sign error if evaluated inside of the particle. The evaluation of the supequadric was also optimized by avoiding overshoot.
Description of the solution
How Has This Been Tested?
Documentation
Future changes