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

Dem insertion from file #1054

Merged
merged 18 commits into from
Mar 11, 2024
Merged

Dem insertion from file #1054

merged 18 commits into from
Mar 11, 2024

Conversation

OGaboriault
Copy link
Collaborator

Description of the problem

  • Particle insertion can take a lot of time. Currently, it's not possible to change the triangulation being used before and after a restart. If it was possible to load particle with a certain triangulation (ex. enabling bigger insertion boxes and smaller cells) and running the rest of the simulation with the real triangulation, this could possibly save a lot of time.

Description of the solution

This PR adds the from_file insertion method. It's really similar to what has been done in the CFD-DEM Resolve solver. Basically, particles properties are stored in a text file. Each line is associated with a particle and each columns to a kind of properties.

It's basically the same thing as the list insertion but without the limitation from the number of character on a single line.

I've also include a python code to extract the properties of the last vtu of a simulation.

How Has This Been Tested?

  • I ran one of my pp_jkr application test to see if the result was affected by this method, which is not the case.
  • I also extracted the properties of all the particles from one of my LPBF simulations. (1.2 million to be exact) and it worked. It took about 20 seconds.

Documentation

  • Insertion section.

@OGaboriault OGaboriault self-assigned this Mar 4, 2024
@OGaboriault OGaboriault added Enhancement New feature or request Ready for review labels Mar 4, 2024
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.

Just a few comments. Can you add an application_tests? Maybe even a unit test?
Otherwise, very good PR

contrib/utilities/extract-particles-properties-from-vtu.py Outdated Show resolved Hide resolved
doc/source/parameters/dem/insertion_info.rst Outdated Show resolved Hide resolved
doc/source/parameters/dem/insertion_info.rst Outdated Show resolved Hide resolved
include/core/parameters_lagrangian.h Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
source/dem/from_file_insertion.cc Outdated Show resolved Hide resolved
Copy link
Collaborator

@acdaigneault acdaigneault left a comment

Choose a reason for hiding this comment

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

Some comments. I did not test it yet. I will today :)

doc/source/parameters/dem/insertion_info.rst Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
include/dem/from_file_insertion.h Outdated Show resolved Hide resolved
source/dem/from_file_insertion.cc Outdated Show resolved Hide resolved
source/dem/from_file_insertion.cc Outdated Show resolved Hide resolved
source/dem/from_file_insertion.cc Outdated Show resolved Hide resolved
source/dem/from_file_insertion.cc Outdated Show resolved Hide resolved
source/dem/from_file_insertion.cc Outdated Show resolved Hide resolved
@blaisb
Copy link
Contributor

blaisb commented Mar 8, 2024

I am good with it so @acdaigneault if you are good I think this is ready for merge
I'll wait for your OK :)

Copy link
Collaborator

@acdaigneault acdaigneault left a comment

Choose a reason for hiding this comment

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

I tested it with 2 simulations with different meshes and it worked well :)
Maybe just explain that you have to read vtu and use the preprocess tool in the doc. :)

doc/source/parameters/dem/insertion_info.rst Outdated Show resolved Hide resolved
doc/source/parameters/dem/insertion_info.rst Outdated Show resolved Hide resolved
include/core/parameters_lagrangian.h Outdated Show resolved Hide resolved
OGaboriault and others added 2 commits March 9, 2024 16:49
Audrey's first batch of comments

Co-authored-by: Audrey Collard-Daigneault <71884806+acdaigneault@users.noreply.github.com>
@blaisb
Copy link
Contributor

blaisb commented Mar 10, 2024

@OGaboriault some parameter files need to be updated I think

@blaisb blaisb merged commit 2d7ab84 into master Mar 11, 2024
8 checks passed
@blaisb blaisb deleted the dem_insertion_from_file branch March 11, 2024 00:25
M-Badri pushed a commit to M-Badri/lethe that referenced this pull request Sep 29, 2024
Description of the problem
Particle insertion can take a lot of time. Currently, it's not possible to change the triangulation being used before and after a restart. If it was possible to load particle with a certain triangulation (ex. enabling bigger insertion boxes and smaller cells) and running the rest of the simulation with the real triangulation, this could possibly save a lot of time.
Description of the solution
This PR adds the from_file insertion method. It's really similar to what has been done in the CFD-DEM Resolve solver. Basically, particles properties are stored in a text file. Each line is associated with a particle and each columns to a kind of properties.

It's basically the same thing as the list insertion but without the limitation from the number of character on a single line.

I've also include a python code to extract the properties of the last vtu of a simulation.

How Has This Been Tested?
I ran one of my pp_jkr application test to see if the result was affected by this method, which is not the case.
I also extracted the properties of all the particles from one of my LPBF simulations. (1.2 million to be exact) and it worked. It took about 20 seconds.
Documentation
Insertion section.

Co-authored-by: Audrey Collard-Daigneault <71884806+acdaigneault@users.noreply.github.com>
Former-commit-id: 2d7ab84
blaisb pushed a commit that referenced this pull request Sep 30, 2024
Description of the problem
Particle insertion can take a lot of time. Currently, it's not possible to change the triangulation being used before and after a restart. If it was possible to load particle with a certain triangulation (ex. enabling bigger insertion boxes and smaller cells) and running the rest of the simulation with the real triangulation, this could possibly save a lot of time.
Description of the solution
This PR adds the from_file insertion method. It's really similar to what has been done in the CFD-DEM Resolve solver. Basically, particles properties are stored in a text file. Each line is associated with a particle and each columns to a kind of properties.

It's basically the same thing as the list insertion but without the limitation from the number of character on a single line.

I've also include a python code to extract the properties of the last vtu of a simulation.

How Has This Been Tested?
I ran one of my pp_jkr application test to see if the result was affected by this method, which is not the case.
I also extracted the properties of all the particles from one of my LPBF simulations. (1.2 million to be exact) and it worked. It took about 20 seconds.
Documentation
Insertion section.

Co-authored-by: Audrey Collard-Daigneault <71884806+acdaigneault@users.noreply.github.com>
Former-commit-id: 2d7ab84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants