Write Data
EDEMpy provides functionality to modify decks for the purposes of automated pre-processing.
-
Specify
mode='w'
flag.For more information about specifying the mode, see Load a Deck. -
Modify only the last Time Step in a deck to prevent corrupted and inconsistent
decks.
For this reason, the following methods are members of the base Deck object and Time Step does not need to be specified. The only exception is specified in Custom Properties.Examples of the available editing functions
deck.addFactory(geom_name, factory_name) deck.setFactoryCreationRate(factory_name, is_mass_generation, creation_rate) deck.setFactoryTotalNumber(factory_name, total_to_create) deck.createGeometry(name, material, coords, triangles) deck.createInteraction(material1_name, material2_name, restitution, static_friction, rolling_friction) deck.createLinearTranslationKinematic(geom_name, kinematic_name='') deck.deleteKinematic(geom_name, kinematic_name) deck.setKinematicStartPoint(geom_name, kinematic_name, point) deck.setKinematicStartTime(geom_name, kinematic_name, value) deck.createMaterial(name, poisson, shear_modulus, density, work_function, is_bulk_material) deck.setMaterialDensity(name, value) deck.createParticle(name, position, velocity=None, ang_velocity=None, orientation=None, scale=None) deck.createParticles(name, positions, velocities=None, ang_velocities=None, orientations=None, scales=None) deck.setParticlePosition(name, particle_id, position, clear_forces=False) deck.setParticleVelocity(name, particle_id, velocity) deck.setParticleTypeMass(name, mass) deck.setMultisphereSpherePosition(name, sphere_index, position) deck.setPolyhedralCuboidDefinition(name, width, length, height) deck.setSpheroCylinderHalfLength(name, halfLength) deck.createPhysicsModelSurfSurf(new_model_name, model_data) deck.deletePhysicsModelSurfSurf(model_name) deck.setDomainMax(position) deck.setDomainMin(position) deck.setGravity(gravity) deck.setInteractionRestitution(material1_name, material2_name, restitution)
Note: For more information about the complete list of functions, see the EDEMpy API Reference Help included in the EDEM installation folder.