-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1190 from epernod/inf_sph_PSource
[SofaSphFluid] Clean code of ParticleSource and update scenes
- Loading branch information
Showing
7 changed files
with
487 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 30 additions & 12 deletions
42
applications/plugins/SofaSphFluid/examples/ParticleSource.scn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,34 @@ | ||
<Node dt="0.005" gravity="0 -10 0"> | ||
<RequiredPlugin name="SofaOpenglVisual"/> | ||
<RequiredPlugin name="SofaImplicitField"/> | ||
<?xml version="1.0" ?> | ||
<Node dt="0.005" gravity="0 -10 0" bbox="-4 -4 -4 4 4 4"> | ||
<RequiredPlugin name="SofaOpenglVisual"/> | ||
<RequiredPlugin name='SofaSphFluid' /> | ||
<VisualStyle displayFlags="showBehaviorModels showForceFields showWireframe" /> | ||
<Node name="Fluid"> | ||
<RungeKutta4 /> | ||
<MechanicalObject name="MModel" /> | ||
<ParticleSource name="Source" center="
								 -0.375 0 -0.75
								 0.0 0 -0.75
								 0.375 0 -0.75
								 -0.75 0 -0.375
								 -0.375 0 -0.375
								 0.0 0 -0.375
								 0.375 0 -0.375
								 0.75 0 -0.375
								 -0.75 0 0.0
								 -0.375 0 0.0
								 0.0 0 0.0
								 0.375 0 0.0
								 0.75 0 0.0
								 -0.75 0 0.375
								 -0.375 0 0.375
								 0.0 0 0.375
								 0.375 0 0.375
								 0.75 0 0.375
								 -0.375 0 0.75
								 0.0 0 0.75
								 0.375 0 0.75
								 " translation="0 3 0" radius="0.01 0.1 0.01" velocity="0 -20 0" delay="0.01875" start="-0.1" stop="2" /> | ||
<UniformMass name="M1" vertexMass="1" /> | ||
<Node id="Visual"> | ||
<OglModel name="VModel" color="blue" /> | ||
<ImplicitSurfaceMapping name="MarchingCube" input="@../MModel" output="@VModel" isoValue="0.5" radius="0.75" step="0.25" /> | ||
</Node> | ||
|
||
<Node name="Particles"> | ||
<EulerSolver symplectic="1" /> | ||
<MechanicalObject name="MModel" showObject="1"/> | ||
<ParticleSource name="Source" translation="0 4 0" radius="0.01 0.1 0.01" velocity="0 -1 0" delay="0.1" start="-0.1" stop="10" printLog="0" | ||
center="-0.375 0 -0.75 | ||
0.0 0.0 -0.75 | ||
0.375 0.0 -0.75 | ||
-0.75 0.0 -0.375 | ||
-0.375 0.0 -0.375 | ||
0.0 0.0 -0.375 | ||
0.375 0.0 -0.375 | ||
0.75 0.0 -0.375 | ||
-0.75 0.0 0.0 | ||
-0.375 0.0 0.0 | ||
0.0 0.0 0.0 | ||
0.375 0.0 0.0 | ||
0.75 0.0 0.0 | ||
-0.75 0.0 0.375 | ||
-0.375 0.0 0.375 | ||
0.0 0.0 0.375 | ||
0.375 0.0 0.375 | ||
0.75 0.0 0.375 | ||
-0.375 0.0 0.75 | ||
0.0 0.0 0.75 | ||
0.375 0.0 0.75" /> | ||
<UniformMass name="M1" vertexMass="1.0" /> | ||
</Node> | ||
</Node> |
46 changes: 46 additions & 0 deletions
46
applications/plugins/SofaSphFluid/examples/SPHParticleSource.scn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" ?> | ||
<Node dt="0.01" gravity="0 -10 0" bbox="-4 -4 -4 4 4 4"> | ||
<RequiredPlugin name="SofaOpenglVisual"/> | ||
<RequiredPlugin name='SofaSphFluid' /> | ||
<VisualStyle displayFlags="showBehaviorModels showForceFields showWireframe" /> | ||
|
||
<Node name="Particles"> | ||
<EulerSolver symplectic="1" /> | ||
<MechanicalObject name="MModel" /> | ||
<ParticleSource name="Source" translation="0 10 0" radius="0.01 0.1 0.01" velocity="0 -10 0" delay="0.02" start="-0.1" stop="4" printLog="0" | ||
center="-0.375 0 -0.75 | ||
0.0 0.0 -0.75 | ||
0.375 0.0 -0.75 | ||
-0.75 0.0 -0.375 | ||
-0.375 0.0 -0.375 | ||
0.0 0.0 -0.375 | ||
0.375 0.0 -0.375 | ||
0.75 0.0 -0.375 | ||
-0.75 0.0 0.0 | ||
-0.375 0.0 0.0 | ||
0.0 0.0 0.0 | ||
0.375 0.0 0.0 | ||
0.75 0.0 0.0 | ||
-0.75 0.0 0.375 | ||
-0.375 0.0 0.375 | ||
0.0 0.0 0.375 | ||
0.375 0.0 0.375 | ||
0.75 0.0 0.375 | ||
-0.375 0.0 0.75 | ||
0.0 0.0 0.75 | ||
0.375 0.0 0.75" /> | ||
|
||
<UniformMass name="M1" totalMass="1.0" /> | ||
<PointSetTopologyContainer name="con" /> | ||
<PointSetTopologyModifier name="mod" /> | ||
|
||
<SpatialGridContainer cellWidth="0.75" /> | ||
<SPHFluidForceField radius="0.7" density="25" kernelType="1" viscosityType="2" viscosity="10" pressure="1000" surfaceTension="-1000" printLog="0" /> | ||
|
||
<PlaneForceField normal="1 0 0" d="-4" showPlane="1" /> | ||
<PlaneForceField normal="-1 0 0" d="-4" showPlane="1" /> | ||
<PlaneForceField normal="0.5 1 0.1" d="-4" showPlane="1" /> | ||
<PlaneForceField normal="0 0 1" d="-4" showPlane="1" /> | ||
<PlaneForceField normal="0 0 -1" d="-4" showPlane="1" /> | ||
</Node> | ||
</Node> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.