Hello!
According to the Help of Realflow distance between particles can be found like this: radius = 1.0 / (1000.0 · Resolution^1/3) (in meters)
So, for resolution 1.0 distance is 0.001. For the resolution 2.0 distance is 0.000794.
Emitter is a square, 1m*1m.
When I calculate the distance with a script like this:
dom = scene.get_PB_Emitter("Square01")
p_1 =dom.getParticle(1)
p_2 =dom.getParticle(2)
pPos_1 = p_1.getPosition()
pPos_2 = p_2.getPosition()
Dist = pPos_1 - pPos_2
d = Dist.module()
print (str(d))
scene.setGlobalVariableValue("defDist", d)
(or if I use just d = pPos_1.distance(pPos_2))
the result is always 100 times more then it should be. instead of 0.001 for resolution 1.0 I get 0.1. For resolution 2.0 I get 0.0794 instead of 0.000794, and so on. I've tried it with Dyverso particles and I got the same results.
Am I doing something wrong?
Distance between particles
-
- Posts: 178
- Joined: Tue Aug 29, 2017 12:35 pm
Re: Distance between particles
Just an idea, but what's your scene scale?
Re: Distance between particles
Scale is default, 1.0
-
- Posts: 178
- Joined: Tue Aug 29, 2017 12:35 pm
Re: Distance between particles
Argh... Wanted to add another note, but deleted the post by accident
Ok, the result of 0.1 m is correct. In a square of 1m x 1m and a resolution of 1.0 you have exactly 100 particles. So, the distance between each particle is 0.1 m.
You've compared distance with radius. It's true that resolution affects radius and distance, but this doesn't mean that radius == distance. Otherwise the particles wouldn't be able to collapse under the influence of gravity, and parameters like Int/Ext Pressure wouldn't have any effect. And you can see that particles can get very close in a fluid with resolution = 1.0.
Ok, the result of 0.1 m is correct. In a square of 1m x 1m and a resolution of 1.0 you have exactly 100 particles. So, the distance between each particle is 0.1 m.
You've compared distance with radius. It's true that resolution affects radius and distance, but this doesn't mean that radius == distance. Otherwise the particles wouldn't be able to collapse under the influence of gravity, and parameters like Int/Ext Pressure wouldn't have any effect. And you can see that particles can get very close in a fluid with resolution = 1.0.
Re: Distance between particles
Oh I feel a bit shame now )) I misunderstood the particle radius term ))) Thanks for clarification
By the way I was looking of some way to get initial distance between particles before the simulation is lunched Zero frame usually has no particles (unless Emitter's volume parameter is set to something more then 0) and I can't find distance between particles. Do you have any suggestions?
Thank you for helping
Andrey
By the way I was looking of some way to get initial distance between particles before the simulation is lunched Zero frame usually has no particles (unless Emitter's volume parameter is set to something more then 0) and I can't find distance between particles. Do you have any suggestions?
Thank you for helping
Andrey
-
- Posts: 178
- Joined: Tue Aug 29, 2017 12:35 pm
Re: Distance between particles
Well, you can simply create an initial state from frame 1 or 2 or whatever. Then you'll have particles at frame 0.
Re: Distance between particles
Oh, it make senseThomas Schlick wrote: ↑Mon Feb 05, 2018 12:59 pmWell, you can simply create an initial state from frame 1 or 2 or whatever. Then you'll have particles at frame 0.
Thank you