Jump to content
Skybar

Gas Particle Neighbour Update?

Recommended Posts

How does this microsolver work? I wire it into a flip solver and it creates subdata like this:

post-9276-0-51643200-1432223105_thumb.jp

But then I'm clueless. How can I access this data or even view what it contains?

Share this post


Link to post
Share on other sites

Hello.

I don't know how it works. But particle fluid solver uses it. You could look into. And may be this information will help you.

Regards

Share this post


Link to post
Share on other sites

My guess is some microsolvers (ie the Gas Compute Particle Attributes DOP) have the option to make computations with neighboring particles and this DOP allows you to specify when the neighbor update takes place. 

Share this post


Link to post
Share on other sites

That microsolver is used in the old SPH fluids to maintain a list of neighbor particles within a search radius.  These days you're better off just using pcfind and storing the results in array attributes.  

 

So using a POP or Geometry Wrangle:

// next two variables could be parameters
int maxn = 100;
float scale = 2.5;

float searchrad = f@pscale * scale;

// find nearby particles
int n[] = pcfind(0, "P", @P, searchrad, maxn + 1);
// remove this particle from list
removevalue(neighbors, @ptnum);

i[]@neighbors = n;

On the Inputs tab set Input 1 to Myself or Myself (no reads of Outputs), the latter being faster.

 

You can then loop through that array to do various neighbor-lookup type things. The POP Grains solver does lots of this if you want to look inside.

Edited by johner
  • Like 4

Share this post


Link to post
Share on other sites

Ah I see, thanks a lot guys! And thanks for that example Johner, very helpful :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×