Coder Social home page Coder Social logo

Comments (5)

janbender avatar janbender commented on June 20, 2024

First, the explosion comes from the fact that you start with an unphysical state. The fluid particles are already inside the boundary when you start. This causes a high pressure force which leads to the explosion. You have to get rid of the fluid particles in the boundary.

I think SPlisHSPlasH can also be used for gases since they are also fluids. However, we never tried that.

The viscosity is higher for numerical reasons. You can also take the parameter for water but then you probably should also consider to use XSPH to smooth the velocity field. See the works of Monaghan for more details.

from splishsplash.

SunlayGGX avatar SunlayGGX commented on June 20, 2024

Hello,
thanks for your response. I'll go read Monaghan's works like you suggested.

For the explosion, is there a way to prevent spawning fluid particles inside the said boundary ?

Because currently, whenever we specify a Fluid in the scene using "FluidBlocks", it just spawns fluids inside a "box" whenever there are rigidbodies to put in later (the fluid particles data is spawned before rigidbodies. Therefore, fluid blocks doesn't know about rigidbodies position/orientation nor volume to compute the space to skip spawning particles. Leading to this unphysical state).
I tried making many fluid blocks to encapsulate my rigidbody, but the result was disastrous because if rigidbody volume isn't approximated finely, it created area where density is non uniform (mainly at juncture between blocks or between blocks and rigid bodies) leading to other unphysical state. Besides, this patch is not scalable because when you need to test your rigid body in another location, you need to change all fluid blocks...

So what would be the best solution to handle this issue ?
-> To invert the order of initialization (rigidbodies before fluid data to allow fluid blocks to skip spawning where a rigidbody is)
-> Or to remove fluid particles that collide with a rigid body after the rigidbody is spawned (but FluidModel does not expose a method to remove particle at runtime).
-> Or an easy external way

from splishsplash.

janbender avatar janbender commented on June 20, 2024

Hi,

there is no perfect solution for this yet. However, you can use the command line tool to sample a volume by particles. You then need one OBJ file which contains a mesh with your boundary.

Alternatively you could start the simulation with the fluid block above your boundary and let it fall down, wait until it settles and then export the partio file of this final state. Then start a second simulation by loading the final state in the scene file.

Hope that helps.

from splishsplash.

SunlayGGX avatar SunlayGGX commented on June 20, 2024

Ok, I'll try this then.
Thanks.

from splishsplash.

SunlayGGX avatar SunlayGGX commented on June 20, 2024

Thanks, it is working fine for me.

from splishsplash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.