You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If anyone can help me with understanding two things from the video I will be eternally grateful. These are kind of math things and a lack of understanding in how they are avoided in the code shown in the video. I specify the video because I am not very familiar with reading and understanding hlsl and c# even though I have tried; in this scenario I have not found what I am looking for.
When we calculate the pressure we are basically doing a calculation of the value of the slope(derivative) of the smoothing kernel divided by the density(basically original kernel function). You can mark these two functions down as basically some scalar multiplied by the difference between the radius and the distance between the particles to the power of some integer which for math reasons we can just ignore the scalar for simplicity when talking about how functions act as they approach certain points. This gives us a smoothing kernel where we have this distance to some power and its derivative where we have this distance to the power of 1 less than the original smoothing function. So we now have (d^(n-1))/(d^n) where d is distance, however, I see a problem where when the distance between your current particle you are trying to find the total pressure for and the particle you are trying to find the current pressure for approaches the edge of the smoothing radius we get an increasingly small number for distance d. This creates a situation where when you do smoothingfunctionsderivative/smoothingfunction we have (small number)/((small number)^2) (for arguments sake I am using 2 as our power) which gives us (small number)/(extremely small number) because of how raising small numbers to the power of integers larger than 1 works. This gives us an insane pressure force because even if the difference is just something like 0.01 we end up getting 0.01/0.001=100, 100 is quite large and this gets even bigger quadratically. We can even simplify this down to the fact that x/x^2=1/x or (x^(n-1))/(x^n)=1/x and lim as x->0^+ of 1/x=infinity making a situation where the simulation should quickly go completely out of control with an insane acceleration being added once this happens. So the main question is why does Sebastian's simulations not show this problem and how is he avoiding it specifically in code?
This is a much more simple question; why at 7:08 in the video does he multiply his smoothing kernel by x in the integrand to find the volume of the smoothing function. It has been a while since I have done this type of math and just do not understand where the x came from. So can anyone tell me why it was included?
Thanks in advance!
The text was updated successfully, but these errors were encountered:
If anyone can help me with understanding two things from the video I will be eternally grateful. These are kind of math things and a lack of understanding in how they are avoided in the code shown in the video. I specify the video because I am not very familiar with reading and understanding hlsl and c# even though I have tried; in this scenario I have not found what I am looking for.
Thanks in advance!
The text was updated successfully, but these errors were encountered: