:mod:`woo.pre` =========================== .. automodule:: woo.pre :members: :undoc-members: :mod:`woo.pre.toys` -------------------------------- .. inheritance-diagram:: woo.pre.toys :parts: 3 .. automodule:: woo.pre.toys :members: :undoc-members: :exclude-members: NewtonsCradle .. rst-class:: html-toggle .. rst-class:: emphasized NewtonsCradle +++++++++++++ :obj:`~woo.core.Object` → :obj:`~woo.core.Preprocessor` → :obj:`~woo.pre.toys.NewtonsCradle` .. autoclass:: NewtonsCradle :members: :exclude-members: nSpheres, nFall, fallAngle, rad, cabHtWd, cabRad, model, gravity, plotEvery, dtSafety, __init__, __getstate__, __setstate__ :special-members: [:woosrc:`py/pre/toys.py `] .. attribute:: nSpheres (= 5) Total number of spheres [type: int] .. attribute:: nFall (= 1) The number of spheres which are out of the equilibrium position at the beginning. [type: int] .. attribute:: fallAngle (= 0.7853981633974483) Initial angle of falling spheres. [type: float, unit: rad, preferred unit: deg] .. attribute:: rad (= 0.005) Radius of spheres [type: float, unit: m] .. attribute:: cabHtWd (= Vector2(0.1,0.1)) Height and width of the suspension [type: Vector2, unit: m] .. attribute:: cabRad (= 0.0005) Radius of the suspending cables [type: float, unit: m] .. attribute:: model (= ) Select contact model. The first material is for spheres; the second, optional, material, is for the suspension cables. [type: ContactModelSelector] .. attribute:: gravity (= Vector3(0,0,-9.81)) Gravity acceleration [type: Vector3] .. attribute:: plotEvery (= 10) How often to collect plot data [type: int] .. attribute:: dtSafety (= 0.7) :obj:`woo.core.Scene.dtSafety` [type: float] :mod:`woo.pre.horse` --------------------------------- .. inheritance-diagram:: woo.pre.horse :parts: 3 .. automodule:: woo.pre.horse :members: :undoc-members: :exclude-members: NewtonsCradle, FallingHorse .. rst-class:: html-toggle .. rst-class:: emphasized FallingHorse ++++++++++++ :obj:`~woo.core.Object` → :obj:`~woo.core.Preprocessor` → :obj:`~woo.pre.horse.FallingHorse` .. autoclass:: FallingHorse :members: :exclude-members: radius, relGap, halfThick, relEkStop, gravity, dir, pattern, model, deformable, stand, meshDamping, dtSafety, reportFmt, vtkStep, vtkFlowStep, vtkPrefix, grid, __init__, __getstate__, __setstate__ :special-members: [:woosrc:`py/pre/horse.py `] .. rubric:: ► General .. attribute:: radius (= 0.002) Radius of spheres (fill of the upper horse) [type: float, unit: m, preferred unit: mm] .. attribute:: relGap (= 0.25) Gap between particles in pattern, relative to :obj:`radius` [type: float] .. attribute:: halfThick (= 0.002) Half-thickness of the mesh. [type: float, unit: m, preferred unit: mm] .. attribute:: relEkStop (= 0.02) Stop when kinetic energy drops below this fraction of gravity work (and step number is greater than 100) [type: float] .. attribute:: gravity (= Vector3(0,0,-9.81)) Gravity acceleration vector [type: Vector3] .. attribute:: dir (= Vector3(0,0,1)) Direction of the upper horse from the lower one. The default is upwards. Will be normalized automatically. [type: Vector3] .. attribute:: pattern (= 'hexa') Pattern to use when filling the volume with spheres [type: str, choices: hexa, ortho] .. attribute:: model (= ) Select contact model. The first material is for particles; the second, optional, material, is for the meshed horse (the first material is used if there is no second one). [type: ContactModelSelector] .. rubric:: ► Deformability .. attribute:: deformable (= False) Whether the meshed horse is deformable. Note that deformable horse does not track energy and disables plotting. [type: bool] .. attribute:: stand (= False) Whether the bottoms of the legs should be fixed (applicable with :obj:`deformable` only) [type: bool] .. attribute:: meshDamping (= 0.03) Damping for mesh nodes; only used when then contact :obj:`model` sets zero :obj:`~woo.dem.Leapfrog.damping`. In that case, :obj:`Leapfrog.damping ` is set to :obj:`meshDamping` and all other nodes set :obj:`woo.dem.DemData.dampingSkip`. [type: float] .. rubric:: ► Tunables .. attribute:: dtSafety (= 0.3) Safety factor for :obj:`woo.utils.pWaveDt` and :obj:`woo.dem.DynDt`. [type: float] .. rubric:: ► Outputs .. attribute:: reportFmt (= '/tmp/{tid}.xhtml') Report output format; :obj:`Scene.tags ` can be used. [type: str, filename] .. attribute:: vtkStep (= 40) How often should :obj:`woo.dem.VtkExport` run. If non-positive, never run the export. [type: int] .. attribute:: vtkFlowStep (= 40) How often should :obj:`VtkFlowExport` run. If non-positive, never run. [type: int] .. attribute:: vtkPrefix (= '/tmp/{tid}-') Prefix for saving :obj:`woo.dem.VtkExport` and :obj:`woo.dem.VtkFlowExport` data; formatted with ``format()`` providing :obj:`woo.core.Scene.tags` as keys. [type: str, filename] .. attribute:: grid (= False) Use grid collider (experimental) [type: bool] :mod:`woo.pre.ell2d` --------------------------------- .. inheritance-diagram:: woo.pre.ell2d :parts: 3 .. automodule:: woo.pre.ell2d :members: :undoc-members: :exclude-members: NewtonsCradle, EllGroup, FallingHorse .. rst-class:: html-toggle .. rst-class:: emphasized EllGroup ++++++++ :obj:`~woo.core.Object` → :obj:`~woo.core.Preprocessor` → :obj:`~woo.pre.ell2d.EllGroup` .. autoclass:: EllGroup :members: :exclude-members: rRange, spheres, semiMinRelRnd, semiRelFixed, boxSize, vMax, model, exportFmt, vtkStep, vtkEllLev, ell2Step, dtSafety, __init__, __getstate__, __setstate__ :special-members: [:woosrc:`py/pre/ell2d.py `] .. attribute:: rRange (= Vector2(0.02,0.04)) Range (minimum and maximum) for particle radius (greatest semi-axis); if both are the same, all particles will have the same radius. [type: Vector2, unit: m] .. attribute:: spheres (= False) Use spherical particles instead of elliptical [type: bool] .. attribute:: semiMinRelRnd (= 0.0) Minimum semi-axis length relative to particle radius; minor semi-axes are randomly selected from (:obj:`semiMinRelRnd` … 1) × greatest semi-axis. If non-positive, :obj:`semiRelFixed` is used instead. [type: float] .. attribute:: semiRelFixed (= Vector3(1,0.5,0.5)) Fixed sizes of semi-axes relative (all elements should be ≤ 1). The :math:`z`-component is the out-of-plane size which only indirectly influences contact stiffnesses. This variable is only used if semi-axes are not assigned randomly (see :obj:`semiMinRelRnd`). [type: Vector3] .. attribute:: boxSize (= Vector2(2,2)) Size of the 2d domain in which particles move. [type: Vector2, unit: m] .. attribute:: vMax (= 1.0) Maximum initial velocity of particle; assigned randomly from 0 to this value; intial angular velocity of all particles is zero. [type: float, unit: m/s] .. attribute:: model (= ) Select contact model. The first material is for particles; the second, optional, material is for walls at the boundary (the first material is used if there is no second one). [type: ContactModelSelector] .. attribute:: exportFmt (= '/tmp/ell2d-{tid}-') Prefix for saving :obj:`woo.dem.VtkExport` data, and :obj:`woo.pre.ell2d.ell2plot` data; formatted with ``format()`` providing :obj:`woo.core.Scene.tags` as keys. [type: str, filename] .. attribute:: vtkStep (= 0) How often should :obj:`woo.dem.VtkExport` run. If non-positive, never run the export. [type: int] .. attribute:: vtkEllLev (= 1) Tesselation level of ellipsoids when expored as VTK meshes (see :obj:`woo.dem.VtkExport.ellLev`). [type: int] .. attribute:: ell2Step (= 0) How often should :obj:`woo.pre.ell2d.ell2plot` run. If non-positive, never run that one. [type: int] .. attribute:: dtSafety (= 0.5) Safety coefficient for critical timestep; should be smaller than one. [type: float] :mod:`woo.pre.chute` --------------------------------- .. inheritance-diagram:: woo.pre.chute :parts: 3 .. automodule:: woo.pre.chute :members: :undoc-members: :exclude-members: NewtonsCradle, EllGroup, DissipChute, FallingHorse .. rst-class:: html-toggle .. rst-class:: emphasized DissipChute +++++++++++ :obj:`~woo.core.Object` → :obj:`~woo.core.Preprocessor` → :obj:`~woo.pre.chute.DissipChute` .. autoclass:: DissipChute :members: :exclude-members: dim, finNum, finLen, finSlope, gen, model, feedRate, feedTime, stopTime, vtkStep, vtkOut, dtSafety, saveDone, __init__, __getstate__, __setstate__ :special-members: [:woosrc:`py/pre/chute.py `] .. attribute:: dim (= Vector3(0.2,0.2,2)) Chute dimensions: width, depth, height [type: Vector3, unit: m] .. attribute:: finNum (= 5) Number of fins protruding from the sides (alternating from left/right [type: int] .. attribute:: finLen (= 0.15) Length of fins [type: float, unit: m] .. attribute:: finSlope (= 0.5235987755982988) Slope of fins (positive downwards). [type: float, unit: rad, preferred unit: deg] .. attribute:: gen (= ) Particle generator, placed above the chute [type: ParticleGenerator] .. attribute:: model (= ) Contact model [type: ContactModelSelector] .. attribute:: feedRate (= 5.0) Feed mass rate [type: float, unit: kg/s] .. attribute:: feedTime (= 0.5) Time for which the feed is activated [type: float, unit: s] .. attribute:: stopTime (= 2.0) Time when to stop the simulation [type: float, unit: s] .. attribute:: vtkStep (= 400) Interval to run VTK export [type: int] .. attribute:: vtkOut (= '/tmp/{tid}') Output for VTK files. Tags will be expanded. If empty, VTK export will be disabled. [type: str] .. attribute:: dtSafety (= 0.7) :obj:`woo.core.Scene.dtSafety` [type: float] .. attribute:: saveDone (= '') File to same simulation at the end; not saved if empty. [type: str] :mod:`woo.pre.triax` --------------------------------- .. inheritance-diagram:: woo.pre.triax :parts: 3 .. automodule:: woo.pre.triax :members: :undoc-members: :exclude-members: FallingHorse, NewtonsCradle, EllGroup, DissipChute, TriaxTest .. rst-class:: html-toggle .. rst-class:: emphasized TriaxTest +++++++++ :obj:`~woo.core.Object` → :obj:`~woo.core.Preprocessor` → :obj:`~woo.pre.triax.TriaxTest` .. autoclass:: TriaxTest :members: :exclude-members: preCooked, sigIso, maxRates, stopStrain, planeStrain, shape, iniSize, generator, model, reportFmt, saveFmt, dtSafety, maxUnbalanced, cylDiv, massFactor, rateStep, __init__, __getstate__, __setstate__ :special-members: [:woosrc:`py/pre/triax.py `] .. rubric:: ► Predefined config .. attribute:: preCooked (= '') Apply pre-cooked configuration (i.e. change other parameters); this option is not saved. [type: str, not dumped, choices: , Spheres in cylinder, Capsules in cylinder, Ellipsoids in box, Sphere clumps in box] .. rubric:: ► General .. attribute:: sigIso (= -500000.0) Confining stress (isotropic during compaction) [type: float, unit: Pa, preferred unit: kPa] .. attribute:: maxRates (= Vector3(0.2,0.2,1)) Maximum strain rate during the compaction phase (for all directions), during the triaxial phase in axial sense, and during the triaxial phase in radial sense(s). [type: Vector3] .. attribute:: stopStrain (= -0.3) Goal value of axial deformation in the triaxial phase [type: float, unit: -, preferred unit: %] .. attribute:: planeStrain (= False) (For demonstration purposes only:) during the triaxial phase, prescribe zero displacement along :math:`x` and stress-control only :math:`y`-axis. [type: bool] .. attribute:: shape (= 'cell') Shape of the volume being compressed; *cell* is rectangular periodic cell, *box* is rectangular :obj:`~woo.dem.Wall`-delimited box, *cylinder* is triangulated cylinder aligned with the :math:`z`-axis [type: str, choices: cell, box, cylinder] .. attribute:: iniSize (= Vector3(0.3,0.3,0.6)) Initial size of the volume; when :obj:`shape` is ``cylinder``, the second (:math:`y`) dimension is ignored. [type: Vector3, unit: m] .. attribute:: generator (= ) Particle generator; partices are then randomly placed in the volume. [type: ParticleGenerator] .. attribute:: model (= ) Select contact model. The first material is for particles; the second, optional, material, is for the boundary (the first material is used if there is no second one). [type: ContactModelSelector] .. rubric:: ► Outputs .. attribute:: reportFmt (= '/tmp/{tid}.xhtml') Report output format; :obj:`Scene.tags ` can be used. [type: str] .. attribute:: saveFmt (= '/tmp/{tid}-{stage}.bin.gz') Savefile format; keys are :obj:`Scene.tags `; additionally ``{stage}`` will be replaced by * ``init`` for stress-free but compact cloud, * ``iso`` after isotropic compaction, * ``backup-011234`` for regular backups, see :obj:`backupSaveTime`, 'done' at the very end. [type: str] .. rubric:: ► Tunables .. attribute:: dtSafety (= 0.7) See :obj:`woo.core.Scene.dtSafety`. [type: float] .. attribute:: maxUnbalanced (= 0.1) Maximum unbalanced force at the end of compaction [type: float] .. attribute:: cylDiv (= 40) Number of segments to approximate the cylinder with. [type: int] .. attribute:: massFactor (= 0.2) Multiply real mass of particles by this number to obtain the :obj:`woo.dem.WeirdTriaxControl.mass` control parameter [type: float] .. attribute:: rateStep (= 0.01) Increase strain rate by this relative amount at the beginning of the triaxial phase, until the value given in :obj:`maxRates` is reached. [type: float] :mod:`woo.pre.cylTriax` ------------------------------------ .. inheritance-diagram:: woo.pre.cylTriax :parts: 3 .. automodule:: woo.pre.cylTriax :members: :undoc-members: :exclude-members: FallingHorse, NewtonsCradle, EllGroup, DissipChute, TriaxTest, CylTriaxTest .. rst-class:: html-toggle .. rst-class:: emphasized CylTriaxTest ++++++++++++ :obj:`~woo.core.Object` → :obj:`~woo.core.Preprocessor` → :obj:`~woo.pre.cylTriax.CylTriaxTest` .. autoclass:: CylTriaxTest :members: :exclude-members: htDiam, memThick, cylDiv, sigIso, stopStrain, maxRates, model, psd, clumps, spheresFrom, suppTanPhi, reportFmt, packCacheDir, saveFmt, vtkStep, vtkFmt, dtSafety, massFactor, maxUnbalanced, __init__, __getstate__, __setstate__ :special-members: [:woosrc:`py/pre/cylTriax.py `] .. rubric:: ► Geometry & control .. attribute:: htDiam (= Vector2(0.06,0.04)) Initial size of the cylinder (radius and height) [type: Vector2, unit: m] .. attribute:: memThick (= -1.0) Membrane thickness; if negative, relative to largest particle diameter [type: float, unit: m] .. attribute:: cylDiv (= 40.0) Number of segments for cylinder (first component) [type: float] .. attribute:: sigIso (= -500000.0) Isotropic compaction stress, and lateral stress during the triaxial phase [type: float, unit: Pa] .. attribute:: stopStrain (= -0.2) Goal value of axial deformation in the triaxial phase [type: float, unit: -, preferred unit: %] .. attribute:: maxRates (= Vector2(0.2,1)) Maximum strain rates during the compaction phase (for all axes), and during the triaxial phase in the axial sense. [type: Vector2] .. rubric:: ► Materials .. attribute:: model (= ) Select contact model. The first material is for particles; the second, optional, material, is for the membrane (the first material is used if there is no second one, but its friction is nevertheless reduced during the compaction phase to :obj:`suppTanPhi`). [type: ContactModelSelector] .. attribute:: psd (= [Vector2(0.002,0), Vector2(0.0025,0.2), Vector2(0.004,1)]) Particle size distribution of particles; first value is diameter, scond is cummulative mass fraction. [type: [Vector2, …], units: [m,-], preferred units: [mm,%]] .. attribute:: clumps (= []) Clump definitions (if empty, use spheres, not clumps) [type: [SphereClumpGeom, …]] .. attribute:: spheresFrom (= '') Instead of generating spheres, load them from file (space-separated colums with x,y,z,r entries). The initial cylinder is made to fit inside the packing's axis-aligned bounding box (the user is responsible for having those spheres inside cylinder). Cylinder geometry (:obj:`htDiam`) and particle sizes (:obj:`psd` and :obj:`clumps`) are ignored. .. note:: :obj:`packCacheDir` is still used as usual to cache packings after compaction (to disable packing cache, set it to empty string), and will take precedence over :obj:`spheresFrom` if compacted packing for the same parameters is already cached. [type: str, existing filename] .. attribute:: suppTanPhi (= nan) Friction at supports; if NaN, the same as for particles is used. Supports use the same material as particles otherwise. [type: float] .. rubric:: ► Outputs .. attribute:: reportFmt (= '/tmp/{tid}.xhtml') Report output format; :obj:`Scene.tags ` can be used. [type: str, filename] .. attribute:: packCacheDir (= '.') Directory where to store pre-generated feed packings; if empty, packing wil be re-generated every time. [type: str, directory name] .. attribute:: saveFmt (= '/tmp/{tid}-{stage}.bin.gz') Savefile format; keys are :obj:`Scene.tags `; additionally ``{stage}`` will be replaced by ``pre-triax`` after membrane stabilization (right before the triaxial compression actually starts) and ``done`` at the very end. [type: str, filename] .. attribute:: vtkStep (= 0) Periodicity of saving VTK exports [type: int] .. attribute:: vtkFmt (= '/tmp/{title}.{id}-') Prefix for VTK exports [type: str, filename] .. rubric:: ► Tunables .. attribute:: dtSafety (= 0.9) Safety factor, stored in :obj:`woo.core.Scene.dtSafety` and used for computing the initial timestep as well as by :obj:`woo.dem.DynDt` later during the simulation. [type: float] .. attribute:: massFactor (= 10.0) Multiply real mass of particles by this number to obtain the :obj:`woo.dem.WeirdTriaxControl.mass` control parameter [type: float] .. attribute:: maxUnbalanced (= 0.05) Maximum unbalanced force at the end of compaction [type: float] :mod:`woo.pre.psdrender` ------------------------------------- .. inheritance-diagram:: woo.pre.psdrender :parts: 3 .. automodule:: woo.pre.psdrender :members: :undoc-members: :exclude-members: PsdRender, FallingHorse, NewtonsCradle, EllGroup, DissipChute, TriaxTest, CylTriaxTest .. rst-class:: html-toggle .. rst-class:: emphasized PsdRender +++++++++ :obj:`~woo.core.Object` → :obj:`~woo.core.Preprocessor` → :obj:`~woo.pre.psdrender.PsdRender` .. autoclass:: PsdRender :members: :exclude-members: size, sizeExtraRel, gen, relHt, gravity, porosity, stepPeriod, dtSafety, maxUnbalanced, model, povEnable, camPos, out, imgDim, povLights, saveShapePack, __init__, __getstate__, __setstate__ :special-members: [:woosrc:`py/pre/psdrender.py `] .. attribute:: size (= Vector2(0.2,0.3)) Region to be rendered (the particle area will be larger by :obj:`sizeExtraRel` [type: Vector2, unit: m] .. attribute:: sizeExtraRel (= 0.2) Enlarge particle area by this much, relative to size. [type: float] .. attribute:: gen (= ) Particle generator [type: ParticleGenerator] .. attribute:: relHt (= 2.0) Bed height relative to largest particle diameter (computed via mass, supposing porosity of :obj:`porosity`) [type: float] .. attribute:: gravity (= Vector3(0,0,-9.81)) Gravity acceleration. [type: Vector3] .. attribute:: porosity (= 0.4) Approximate porosity to convert bed height (:obj:`relHt`) to mass; it will not influence porosity itself, which is given almost exclusively geometrically. [type: float] .. attribute:: stepPeriod (= 200) Periodicity for the factory. [type: int] .. attribute:: dtSafety (= 0.7) Safety factor for timestep. [type: float] .. attribute:: maxUnbalanced (= 0.5) Unbalanced force/energy to wait for before declared settled. [type: float] .. attribute:: model (= ) Contact model and material type; since the simulation is trivial, this has practically no influence, except of friction: less (or zero) friction will make the packing more compact. [type: ContactModelSelector] .. attribute:: povEnable (= True) Enable POV-Ray export. [type: bool] .. attribute:: camPos (= Vector3(0,0,0.5)) Camera position; x, y components determine offset from bed normal; z is height above the highest particle center. [type: Vector3] .. attribute:: out (= '/tmp/{tid}') Prefix for outputs (:obj:`woo.core.Scene.tags` are expanded). [type: str] .. attribute:: imgDim (= 2000) Larger image dimension when the scene is rendered; the scene can be re-rendered by calling POV-Ray by hand anytime with arbitrary resolution. [type: int] .. attribute:: povLights (= '// light_source{<-8,-20,30> color rgb .75}\n // light_source{<25,-12,12> color rgb .44}\n light_source{<-.5,-.5,10> color White area_light <1,0,0>,<0,1,0>, 5, 5 adaptive 1 jitter }\n ') Default light specifications for POV-Ray [type: str] .. attribute:: saveShapePack (= True) Create a .shapepack file with particle geometries. [type: bool]