[Bf-blender-cvs] [a45e818dc84] fluid-mantaflow: adjusted boundary width for set obstacle velocities

Sebastián Barschkis noreply at git.blender.org
Mon Jun 5 16:37:14 CEST 2017


Commit: a45e818dc84c9a90acae4a10ccd29400e4a18ce8
Author: Sebastián Barschkis
Date:   Mon Jun 5 16:23:28 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rBa45e818dc84c9a90acae4a10ccd29400e4a18ce8

adjusted boundary width for set obstacle velocities

boundary width was one cell too big. in some cases with moving obstacles, particles would just stay next to wall.

===================================================================

M	intern/mantaflow/intern/strings/liquid_script.h

===================================================================

diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h
index 5c5fa5374d2..e6f296934b9 100644
--- a/intern/mantaflow/intern/strings/liquid_script.h
+++ b/intern/mantaflow/intern/strings/liquid_script.h
@@ -200,7 +200,7 @@ def liquid_step_$ID$():\n\
     # ensure velocities inside of obs object, slightly add obvels outside of obs object\n\
     extrapolateVec3Simple(vel=obvel_s$ID$, phi=phiObsIn_s$ID$, distance=int(res_s$ID$/2), inside=True)\n\
     extrapolateVec3Simple(vel=obvel_s$ID$, phi=phiObsIn_s$ID$, distance=obvelBorderWidth_s$ID$+1, inside=False)\n\
-    setObstacleVelocity(flags=flags_s$ID$, vel=vel_s$ID$, obvel=obvel_s$ID$, boundaryWidth=2, borderWidth=obvelBorderWidth_s$ID$)\n\
+    setObstacleVelocity(flags=flags_s$ID$, vel=vel_s$ID$, obvel=obvel_s$ID$, boundaryWidth=1, borderWidth=obvelBorderWidth_s$ID$)\n\
     \n\
     mantaMsg('Advecting particles')\n\
     pp_s$ID$.advectInGrid(flags=flags_s$ID$, vel=vel_s$ID$, integrationMode=IntRK4, deleteInObstacle=False, stopInObstacle=False)\n\
@@ -238,7 +238,7 @@ def liquid_step_$ID$():\n\
     \n\
     #extrapolateMACSimple(flags=flags_s$ID$, vel=vel_s$ID$, distance=2, intoObs=True) # TODO: uncomment for fractions\n\
     setWallBcs(flags=flags_s$ID$, vel=vel_s$ID$)#, fractions=fractions_s$ID$, phiObs=phiObs_s$ID$) # TODO: uncomment for fractions\n\
-    setObstacleVelocity(flags=flags_s$ID$, vel=vel_s$ID$, obvel=obvel_s$ID$, boundaryWidth=2, borderWidth=obvelBorderWidth_s$ID$)\n\
+    setObstacleVelocity(flags=flags_s$ID$, vel=vel_s$ID$, obvel=obvel_s$ID$, boundaryWidth=1, borderWidth=obvelBorderWidth_s$ID$)\n\
     \n\
     solvePressure(flags=flags_s$ID$, vel=vel_s$ID$, pressure=pressure_s$ID$, phi=phi_s$ID$)#, fractions=fractions_s$ID$) # TODO: uncomment for fractions\n\
     \n\




More information about the Bf-blender-cvs mailing list