# Thread: Explosion gravity?

1. ## Explosion gravity?

I've been working on creating explosions in space. With the new native VDB creation tools I've been getting pretty good results. But there's one thing I can't figure out. The explosions always have a -Y gravity effect. I can't figure out how to make it go away. Explosions in space should quickly dissipate with no gravity bias. It doesn't seem to matter if I flip the HV creation null.

Any ideas anyone? Am I missing something? Also, I'm including my nodes just in case I'm doing something else dumb too. Thanks.

2. Maybe it has something to do with your buoyancy scale?

You need to figure out the average between your density, temperature, and velocity to get the buoyancy you are looking for.

Maybe in this case, you simply don't have enough buoyancy to keep your gas aloft at its current density / velocity?

3. The Solver node has a Gravity entry.

B

4. BeeVee, thanks, but the solver does not have a gravity entry. You'll note that if you look at the image I uploaded.

RPSchmidt, increasing buoyancy to dissipate the gas before it has the chance to "fall" is an interesting idea but there are two things I don't understand. Why wouldn't one change the dissipation to do that? And you suggest averaging three things: density is 1, temperature starts at 2400º (but varies and goes down), and velocity is 10. The average of those three figures is just above 800. I don't think you meant that I should change the buoyancy scale to 800. Perhaps change it to 0.08? But even that is probably not what you meant. Sorry I don't fully understand your suggestion. --Hal

5. I would suggest almost turnin buoyancy off, I don´t think it is valid with an uplift force in vaccum.

Se my image, the gas solver is only pushing the smoke outwards.
In this sample it was initially working with particles which may also be a way to go, and only use the particles velocity as the force to push the fluids, but in this sample I turned that off though

6. Thanks prometheus. That fixed it. How appropriate. You gave me fire, just like your namesake!

7. Originally Posted by hdace
BeeVee, thanks, but the solver does not have a gravity entry. You'll note that if you look at the image I uploaded.

RPSchmidt, increasing buoyancy to dissipate the gas before it has the chance to "fall" is an interesting idea but there are two things I don't understand. Why wouldn't one change the dissipation to do that? And you suggest averaging three things: density is 1, temperature starts at 2400º (but varies and goes down), and velocity is 10. The average of those three figures is just above 800. I don't think you meant that I should change the buoyancy scale to 800. Perhaps change it to 0.08? But even that is probably not what you meant. Sorry I don't fully understand your suggestion. --Hal
In your OP, you said that your explosion had a -Y gravity effect (the gas would start falling down).

That's why I recommended adjusting your buoyancy up to keep the gas aloft until it dissipates. It would be a matter of finding the right balance between your temperature and density, and ideally it would decay just like your temperature and density.

There's a calculation in the LW2019 help docs for figuring out buoyancy. I don't fully understand it myself (as I suck at math) so I didn't just point you there... also because I didn't think it was a total solution for your situation.

BUT it does speak to the calculation as being part of the determination of the amount of "gravity" in your simulation. So it would, at a minimum, provide you with a baseline to estimate the amount of buoyancy you might need for various explosion simulations.

Excertp from https://docs.lightwave3d.com/lw2019/.../openvdb-nodes

"Gas solver. Use Stam's stable fluids method to advect density and temperatures. Both the density and the temperature affect the fluid’s velocity. Heavy smoke tends to fall downwards due to gravity while hot gases tend to rise due to buoyancy. We use a simple model to account for these effects by defining external forces that are directly proportional to the density and the temperature.

buoyancy = (-densityscale * density * Vec3f(0, 1, 0)) + (temperaturescale * temperature * Vec3f(0, 1, 0));
External forces can be added on the Force Grid input. This input accounts for external forces like gravity, wind, turbulence and merely is added onto the end of the momentum equation."

At the end, it mentions the Force Grid input. That might be useful for simulations like yours as well.

Overall, I just figured it had something to do with buoyancy, whether up or down.

Very glad that Prometheus' solution gave you the answer you were looking for!

8. Thanks, RPSchmidt. You were definitely on the right track.

After I replied to BeeVee I finally found that Help document, that you've now linked, also. I felt bad about being slightly snarky because I realized maybe there is some kind of method for applying force, whether gravity or not, but I still don't know exactly which node to feed into it and how to correctly configure the force. But none of that matters at the moment because what I really want is the complete absence of force. Apparently zeroing buoyancy is the way to do that.

The gas solver really needs some kind of update to take into account not only that there can be an explosion or fire in space, but also that other planets have different levels of force of gravity.

9. Originally Posted by hdace
The gas solver really needs some kind of update to take into account not only that there can be an explosion or fire in space, but also that other planets have different levels of force of gravity.
Seems like the issue is less about the gas solver, and more about the LW UI wrapper/integration. If automatically enabling gravity, then also give either single or triad numeric fields where customers can adjust the value used (incl. zeroing it if desired). Requiring a complex vector-field-based setup just to zero a global gravity value is bad UX.

10. Originally Posted by jwiede
Seems like the issue is less about the gas solver, and more about the LW UI wrapper/integration. If automatically enabling gravity, then also give either single or triad numeric fields where customers can adjust the value used (incl. zeroing it if desired). Requiring a complex vector-field-based setup just to zero a global gravity value is bad UX.
I'm not sure that bad UX is necessarily the case here.

My impression is that the node was set up so that you could emulate real world gas reactions using the actual data from representative gasses / explosives data.

I think even in Houdini, "gravity" by itself isn't what affects gasses... isn't it gas external forces?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•