Macha Posted October 17, 2011 Share Posted October 17, 2011 (edited) I am building a custom smoke/fluid solver and guess my way through most of the stuff. I've got something working and I think I understand how things work in a rough way. However, I noticed that the gassubstep dop and gasintegrator dop do more or less the same thing. Is the gassubstep a simpler version of the integrator? Does anybody understand the difference between the two? (The integrator seems to have some solver options build in and some extra stuff that could be useful for particles.) Edited October 17, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
johner Posted October 17, 2011 Share Posted October 17, 2011 Hi Marc, GasSubstep is more straightforward and most likely what you want: it applies all the input solvers left-to-right, and can adaptively substep by looking at a supplied Velocity Field and/or particle system to determine the maximum velocity present in the simulation and the scale of the discretization, i.e. voxel size or particle pscale, to make sure the simulation isn't taking stepping steps too large to maintain accuracy. But it only applies the attached solvers; it doesn't have any built-in solve behavior itself. GasIntegrate operates on particles and does have built-in solve behavior: it updates particle position and velocities accurately in the presence of temporally and spatially varying forces, and can even perform particle/object collision detection. For the higher order Simulation Methods like Runge-Kutta it will evaluate the forces at several different times and positions within the timestep. Generally the second input for it will be DOPs that apply forces to particles, like the various SPH forces in the ParticleFluidSolver. You can plug a GasIntegrate into GasSubstep, as that solver does as well. Hope that helps. Quote Link to comment Share on other sites More sharing options...
Macha Posted October 17, 2011 Author Share Posted October 17, 2011 (edited) Ah, I see! Thanks for the information John! In general, where does the "solving" part actually take place? Some of those microsolvers seem to do just simple operations like performing multiplication or addition of fields. I am under the impression that solving involves looking around a voxel in space and time, and iterating until some kind of condition is fulfilled. I can see that the integrator is doing this. But, for example, the gascalculate? Are the microsolvers misnomers that are just classified as solvers because they are components of a solving setup? Sorry, so many questions but I want get a bigger picture of how this works. Edited October 17, 2011 by Macha Quote Link to comment Share on other sites More sharing options...
johner Posted October 18, 2011 Share Posted October 18, 2011 In general, where does the "solving" part actually take place? Some of those microsolvers seem to do just simple operations like performing multiplication or addition of fields. I am under the impression that solving involves looking around a voxel in space and time, and iterating until some kind of condition is fulfilled. I can see that the integrator is doing this. But, for example, the gascalculate? Are the microsolvers misnomers that are just classified as solvers because they are components of a solving setup? This goes back to the two step solve. When the network cooks, the various solvers are attached to the GasSubstep solver, which in turn is attached to the DOP object itself. When the actual solve pass happens and GasSubstep is asked to solve itself, it figures out how big a timestep to take and then tells each "child" solver to solve itself. Internally, that means calling each DOP's solveGasSubclass method, as in this example from the HDK. A "solver" in this context means a DOP that modifies/updates the data on an object, rather than creating objects or data. Some of the solvers like GasAdvect and GasProjectNonDivergent are solving complicated partial differential equations, but it could really do anything that modifies data. Even that simple GasAdd example from the HDK happens to be solving an equation: dest = dest + src, that could be part of a larger simulation. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.