-
Notifications
You must be signed in to change notification settings - Fork 23
Added new functionality to generate DEM from SPH generator that allow… #409
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
base: develop
Are you sure you want to change the base?
Conversation
…s for easy iteration of list of radii. Also added simple rotation to some DEM boundary classes.
| const auto p = position - mPoint; | ||
| const auto pnMag = p.dot(mAxis); | ||
| const auto pn = pnMag * mAxis; | ||
| const auto r = p - pn; // Radial vector from the axis to the position |
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.
Why did you remove the radial component here on the position, would that assume that mAngularVelocity and mAxis are aligned?
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.
Yeah I assume that the angular velocity is always around the central axis
| const Vector& axis, | ||
| const Scalar radius, | ||
| const Scalar length, | ||
| const RotationType& angularVelocity): |
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.
If angularVelocity must be aligned with the axis this should be enforced somehow
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.
What would you suggest for enforcement of that? I feel like keeping it a simple vector makes sense for conveying that it can't do complex rotation. But I'm open to ideas.
| #-------------------------------------------------- | ||
| if type(particleRadius) in [float,int]: | ||
| if isinstance(particleRadius, list): | ||
| radii = list(particleRadius) |
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.
ln 36 might not be need? its already a list right?
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 way it seemed to be working before was that if you input in a "particleRadius" argument it had to be a float, int, or function. So if you already have an exact list of particle dimensions that you want to be consistent from sph generation to dem generation it would not accept that list.
In particular I created a list of radii that fit a gaussian distribution from a custom sph generator, but without feeding in that list the sph-to-dem generator would overwrite the particle sizes with the radius guess from h below. Adding in the capability to just drop in a list of radii just seemed easier and more straightforward for future use than having to create a function for potentially every simulation.
| if isinstance(particleRadius, list): | ||
| radii = list(particleRadius) | ||
| counter = {"i" : 0} | ||
| def radiusFunc(position): |
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.
does this pattern work for SPH generators that are parallel?
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 have only tested for serial generation, but I would imagine that the list would have to be globally concatenated before passing it in for it to work.
…DEM tests to now work with rotating boundaries.
Made a very small change to GenerateDEMfromSPHGenerator.py in NodeGenerators, that adds functionality for easy iteration of list of radii for more complex particle generation. Also added simple rotation to some DEM boundary classes.
Summary
ToDo :
RELEASE_NOTES.mdwith notable changes.