Fluid3D
Eulerian 3D fluid
Target: SofaEulerianFluid
namespace: sofa::component::behaviormodel::eulerianfluid
parents:
- BehaviorModel
Data
Name | Description | Default value |
---|---|---|
name | object name | unnamed |
printLog | if true, emits extra messages at runtime. | 0 |
tags | list of the subsets the object belongs to | |
bbox | this object bounding box | |
componentState | The state of the component among (Dirty, Valid, Undefined, Loading, Invalid). | Undefined |
listening | if true, handle the events, otherwise ignore the events | 0 |
nx | grid size along x axis | 16 |
ny | grid size along y axis | 16 |
nz | grid size along z axis | 16 |
cellwidth | width of each cell | 1 |
center | position of grid center | 0 0 0 |
height | initial fluid height | 5 |
dir | initial fluid surface normal | 0 1 0 |
tstart | starting time for fluid source | 0 |
tstop | stopping time for fluid source | 60 |
Links
Name | Description | Destination type name |
---|---|---|
context | Graph Node containing this object (or BaseContext::getDefault() if no graph is used) | BaseContext |
slaves | Sub-objects used internally by this object | BaseObject |
master | nullptr for regular objects, or master object for which this object is one sub-objects | BaseObject |
Examples
Fluid3D.scn
<Node dt="0.04" gravity="0 -10 0">
<VisualStyle displayFlags="showForceFields showCollisionModels showMappings" />
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
<RequiredPlugin name="SofaEulerianFluid"/> <!-- Needed to use components [Fluid3D] -->
<Fluid3D nx="32" ny="32" nz="32" tstart="0" tstop="0" height="20.5" dir="0.5 0 1" />
</Node>
def createScene(root_node):
node = root_node.addChild('node', dt="0.04", gravity="0 -10 0")
node.addObject('VisualStyle', displayFlags="showForceFields showCollisionModels showMappings")
node.addObject('RequiredPlugin', name="Sofa.Component.Visual")
node.addObject('RequiredPlugin', name="SofaEulerianFluid")
node.addObject('Fluid3D', nx="32", ny="32", nz="32", tstart="0", tstop="0", height="20.5", dir="0.5 0 1")