Skip to content

Add example for DEM angle of repose#220

Open
streeve wants to merge 16 commits intoORNL:mainfrom
streeve:angle_of_repose
Open

Add example for DEM angle of repose#220
streeve wants to merge 16 commits intoORNL:mainfrom
streeve:angle_of_repose

Conversation

@streeve
Copy link
Copy Markdown
Collaborator

@streeve streeve commented May 29, 2025

Initial case for AoR

  • Does not yet have a loop for particle resampling
  • Gravity BC not used since the custom wall boundary is applied
  • Could try a custom cylinder as well

@streeve streeve requested a review from msaffarini90 May 29, 2025 19:20
@streeve streeve self-assigned this May 29, 2025
@streeve streeve added the example New example problem label May 29, 2025
Copy link
Copy Markdown
Collaborator

@msaffarini90 msaffarini90 left a comment

Choose a reason for hiding this comment

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

I have added few comments, which most are clarifications rather than anything else.

Couple of things that are not clear regarding "BodyTerm", and I added my questions at the corresponding location.

In general, I am going to submit this review as "Request Changes" instead of "Comment" in case my questions inspired any change. However, I don't find any showstoppers or anything that prevents the example from running properly.

@@ -0,0 +1,20 @@
{
"dx" : {"value": [0.0025, 0.0025, 0.01], "unit": "m"},
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 am not sure if this is used somewhere else, but I don't see it in any of the added or updated files.

@@ -0,0 +1,20 @@
{
"dx" : {"value": [0.0025, 0.0025, 0.01], "unit": "m"},
"system_size" : {"value": [0.25, 0.25, 1.0], "unit": "m"},
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 am not sure if this is used somewhere else, but I don't see it in any of the added or updated files.

Comment thread examples/dem/inputs/angle_of_repose.json
Comment thread examples/dem/inputs/angle_of_repose.json
Comment thread examples/dem/inputs/angle_of_repose.json
Comment thread examples/dem/inputs/angle_of_repose.json
Comment thread src/CabanaPD_Types.hpp
{
};
template <>
struct is_particle_init<Cabana::InitUniform> : public std::true_type
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.

Is this added in advance in case they are needed in the future? I don't see them used in the new additions.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, this is used in the Particles class. On rereading, it isn't necessary here and could be separated into a new PR

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Could be separated, but directly supports the needs here and will need to match #256 at any rate

Comment thread src/CabanaPD_Types.hpp
Comment thread examples/dem/angle_repose.cpp Outdated
double vz = v( p, 2 );
double rz = y( p, 2 );
double vn = vz * rz;
vn /= rz;
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.

Isn't this vz? You are multiplying vz by rz on line 127, and then divide by rz on line 128, meaning that
vn = ( vz * rz ) / rz
= vz
?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You are correct. Ideally this would be a more general wall boundary, but it's pretty simplistic

Comment thread src/CabanaPD_BodyTerm.hpp Outdated
Copy link
Copy Markdown
Collaborator Author

@streeve streeve left a comment

Choose a reason for hiding this comment

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

Thanks for the review; most important is does the problem run well for you?

Comment thread examples/dem/inputs/angle_of_repose.json
Comment thread src/CabanaPD_BodyTerm.hpp Outdated
Comment thread src/CabanaPD_Types.hpp
Comment thread src/CabanaPD_Types.hpp
{
};
template <>
struct is_particle_init<Cabana::InitUniform> : public std::true_type
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

No, this is used in the Particles class. On rereading, it isn't necessary here and could be separated into a new PR

Comment thread examples/dem/angle_repose.cpp Outdated
double vz = v( p, 2 );
double rz = y( p, 2 );
double vn = vz * rz;
vn /= rz;
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

You are correct. Ideally this would be a more general wall boundary, but it's pretty simplistic

@streeve streeve force-pushed the angle_of_repose branch from 10f9ee3 to ac918f2 Compare July 2, 2025 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

example New example problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants