Jump to content

Incomprehensible fluids? Theoretical/Physics question...


Recommended Posts

Hi,

I am trying to understand the basic physics behind fluid simulation used in Pyro solver. All physics books say that density must be constant (otherwise the equations will be too hard to solve). However, when I do any smoke sim in Pyro, density field is not constant, i.e. one can compute max/min/average density for a Pyro smoke simulation. So my question: how come all books say that density must be constant and yet when I sim smoke in Houdini I have different densities?

Thanks,

Link to comment
Share on other sites

It refers to different density

- density of the fluid like air or water is assumed to be more or less constant, however in sims divergence affects how much the fluid compresses or expands which can be linked to temperature or other fields to achieve more realistic results of "changing" density of the fluid

- but density field in pyro doesn't represent density of the fluid. It is more like density of the solid matter suspended in the fluid, that is observed as smoke

As regardless of whether you have nonzero  density field or not, you can solve for fluid motion

  • Like 1
Link to comment
Share on other sites

Thanks Tomas! So one way to see pyro density as just a property advected by velocity field, and dissipation parameter removes percentage of it on each frame?

As per divergence, can I think of it as a way to adding/removing the density property above?

As per vusta, sorry, simple typo :)

Link to comment
Share on other sites

Divergence isn't adding or subtracting density... it's a property that's automatically computed by the Gas Project Non Divergent microsolver inside the Pyro solver. It represents areas where the velocity field is collapsing or expanding, which is generally a no-no when you're trying to simulate incompressible fluids. The microsolver does some complicated wizardry to remove the divergence from the velocity field, which gets you that characteristic swirly motion you expect. 

That microsolver also has the option to provide a "goal" divergence field, which allows the user to define areas where they actually want the gas to expand or contract. If you create a scalar field named "divergence" and source it into your sim, positive areas will expand and negative areas will contract. 

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...