forked from Dynamitos/Seele
More fluid simulation settings
This commit is contained in:
1 parent
b1004d5c80
commit
f2a3f59ab1
5 files changed
+221
-19
No files matched your search
@@ -76,6 +76,14 @@ void setBound(uint3 dispatchThreadID : SV_DispatchThreadID)
|
||||
|
||||
if (numAffecting > 0)
|
||||
{
|
||||
// For all quantities (velocity components AND scalars: pressure,
|
||||
// divergence, density) the boundary cell takes the (factor-scaled)
|
||||
// interior neighbor value. For scalars the factor is 1 (Neumann / copy),
|
||||
// which is the correct boundary condition for the pressure Poisson solve
|
||||
// (zero normal gradient) and for the divergence. Do NOT zero the scalar
|
||||
// boundary: zeroing the pressure shell breaks the Poisson Neumann
|
||||
// condition, corrupts the projection, and injects energy into the
|
||||
// velocity field (observed as |vel|_sum runaway).
|
||||
grid[uint3(pos)] = valueSum / float(numAffecting);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user