Initial state - calm particles

Discussions about the use of Realflow 2012
Primus
Posts: 38
Joined: Wed May 18, 2011 9:23 am

Initial state - calm particles

Postby Primus » Thu May 16, 2013 5:40 pm

Hi

I want to produce a calm initial state of particels in a bucket, SPH particels. I created a bucket used it as an Fill_Object, used a Drag_Force daemoen and an k_Speed daemen. The k_speed daemon is animated , the vmax parameter is animated from 100 down to 0.1 over 1500 frames.

My question:

The particels are calm after 1000 frames , vmax of the particels is 0.15, everything is fine. I used this as an initial state. Ok.
But when i deactivate the k_speed daemon now, the particlesspeed up again up to 90 . ?!?!

What i´m doing wrong ? I don't understand that behavior .

Best,
Tom
-----------------------------------------------------------
Maxwell 2.7.20 - RF 2012, Cinema 4D Studio , MacPro 12 core, 48 GB
-----------------------------------------------------------


User avatar
stascrash
Posts: 65
Joined: Tue Sep 18, 2012 8:21 pm
Location: World Wide Web
Contact:

Re: Initial state - calm particles

Postby stascrash » Mon May 20, 2013 3:31 pm

hey, i am not sure what is up with the Kspeed, but to settle the particles i use a script daemon, it is pretty easy to setup, check this out:
1. Create a Scripted Daemon.
2. Link it to the Emitter you need to affect (or use global link)
3. Copy/paste this inside the section " APPLY FORCE to EMITTER"

Code: Select all

def applyForceToEmitter( emitter ):
   p = emitter.getFirstParticle()
   while p:
      vel = p.getVelocity().module()
      if vel < 0.005:
         p.setVelocity(Vector.new(0.0, 0.0, 0.0))
      p = p.getNextParticle()
   pass

here is what you can change in the code to make it more suitable for your needs.
if vel < 0.005: - change the value from 0.005 to higher or lower values, that is what detecting the motion of the particles, and slows them down, or stops them .
play around with the values, and i am sure you will be able to get the fluid settled under 1000 frames.

Primus
Posts: 38
Joined: Wed May 18, 2011 9:23 am

Re: Initial state - calm particles

Postby Primus » Mon May 20, 2013 10:17 pm

... thank you, that´s sounds good :). I will test it next day ... you motivate me too to go in more scripting :).

Best,
Tom
-----------------------------------------------------------
Maxwell 2.7.20 - RF 2012, Cinema 4D Studio , MacPro 12 core, 48 GB
-----------------------------------------------------------

Primus
Posts: 38
Joined: Wed May 18, 2011 9:23 am

Re: Initial state - calm particles

Postby Primus » Mon May 20, 2013 10:17 pm

... thank you, that´s sounds good :). I will test it next day ... you motivate me too to go in more scripting :).

Best,
Tom
-----------------------------------------------------------
Maxwell 2.7.20 - RF 2012, Cinema 4D Studio , MacPro 12 core, 48 GB
-----------------------------------------------------------

Primus
Posts: 38
Joined: Wed May 18, 2011 9:23 am

Re: Initial state - calm particles

Postby Primus » Mon May 20, 2013 10:17 pm

... thank you, that´s sounds good :). I will test it next day ... you motivate me too to go in more scripting :).

Best,
Tom
-----------------------------------------------------------
Maxwell 2.7.20 - RF 2012, Cinema 4D Studio , MacPro 12 core, 48 GB
-----------------------------------------------------------

User avatar
stascrash
Posts: 65
Joined: Tue Sep 18, 2012 8:21 pm
Location: World Wide Web
Contact:

Re: Initial state - calm particles

Postby stascrash » Tue May 21, 2013 2:22 pm

no problem, i hope this works out for you. If you copy/paste the code from here, make sure you properly format it inside the Realflow script editor, tabs and white space is important for python.
thanks.

Primus
Posts: 38
Joined: Wed May 18, 2011 9:23 am

Re: Initial state - calm particles

Postby Primus » Thu May 23, 2013 9:08 am

I test your script and tip yesterday, it works well , i get much better results ... i played with the limit value of the speed in your script , i did a kind of manual cascading from higher speed limits to the lowest one ( nearly 0.015) ... works fine. The side effect is, i going now more into Phyton :) ...

Best,
Tom
-----------------------------------------------------------
Maxwell 2.7.20 - RF 2012, Cinema 4D Studio , MacPro 12 core, 48 GB
-----------------------------------------------------------

User avatar
Oldcode
Posts: 779
Joined: Thu Nov 03, 2011 11:28 pm

Re: Initial state - calm particles

Postby Oldcode » Thu May 23, 2013 10:53 am

Hi,

One thing you can do that's a little simpler is use a the K_Speed demon this way....

Set the K_Speed to Limit and Keep, then set the min speed to 0, and the max speed to 1. Lock the simulation in place and let it run. I find this helps settle the particles much faster. When the particles are settled to my liking, I then set the max speed on the K_Speed demon to 10 and then unlock the simulation and go from there. I make adjustments to the min/max speed as needed.

Good luck,
"My sword and my service are yours."

"Then forever remind him of his vow, Knight of the Old Code."


Return to “Realflow 2012”

Who is online

Users browsing this forum: No registered users and 1 guest