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

Some confusion about using pysph #379

Open
Ordinaryxian opened this issue May 11, 2023 · 1 comment
Open

Some confusion about using pysph #379

Ordinaryxian opened this issue May 11, 2023 · 1 comment

Comments

@Ordinaryxian
Copy link

Hello, I met two problems when I used the pysph framework to write the simulation of planetary collision: (1) How to delete the particles that have little effect on the system during operation; (2) How to calculate the gravity, my current practice is to traverse all the particles and then calculate, such equation takes a long time to calculate, is there any other method to calculate the gravity

@nauaneed
Copy link
Contributor

nauaneed commented May 12, 2023

I have not simulated planetary collisions with pysph but,

(1) You could use the remove_particles method to remove particles from a particle array. There is a remove_tagged_particles method as well. You can search the pysph codebase for usage of this method, and you will find plenty of occurrences that could serve as an example.
(2) I assume you are describing a non-pysph implementation when you mention,

my current practice is to traverse all the particles and then calculate such equation takes a long time to calculate

In fact, pysph's nearest neighbour search capabilities lets you traverse only the particles that are near enough to a given particle to be able to influence it significantly.

I think this is better suited in Discussions as it is not an Issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants