LS Dyna

LS Dyna

Topics related to LS-DYNA, Autodyn, Explicit STR and more.

Discrete Element Method (DEM)

    • gentleman1990
      Subscriber

      Dear All,

      I have a quick question about DEM in LS-DYNA and would appreciate your feedback.

      Can we generate a certain number of particles (let's say 10) with different radii inside a cube in ls-PrePost? Based on what I see, we can only define Min R and Max R and we don't have any control over the number of the particles. Am I wrong?

      Thanks,

      M.

       

    • Ram Gopisetti
      Ansys Employee

      Hi, 

      Yes, LSPP has no control over the number of particles, however, there is a workaround with SPH and then with conversion, you can first create an SPH in place of DES and then use the following sudo routine to replace the SPH with DES . It would be easier if you isolate the SPH as a separate include file  

      READ input_filename 

      SET output_filename 

      SET density TO 1000

      OPEN input_file FOR READING

      OPEN output_file FOR WRITING

      FOR EACH line IN input_file:

       IF line STARTS WITH "*ELEMENT_SPH":

      WRITE "*ELEMENT_DISCRETE_SPHERE_VOLUME" TO output_file

      WRITE header_line TO output_file

      ELSE IF line STARTS WITH "*":

      CONTINUE

      ELSE IF line IS NOT EMPTY AND NOT COMMENT:

      SPLIT line INTO data SET mass TO FLOAT(data[2])

       // Calculate volume, radius, and inertia

      SET volume TO mass / density

      SET radius TO ((3 / (4 * PI)) * volume)^(1 / 3)

      SET inertia TO (2 / 5) * mass * radius^2

      // Format output 

      WRITE formatted_output TO output_file

      CLOSE input_file

      CLOSE output_file

      END

      Cheers, Ram 

    • gentleman1990
      Subscriber

      Dear Ram,

      Thanks so much for your prompt response. Can you elaborate on how your proposed method can be implemented? Is that through the command line or any other way? I have never used this approach. If a document/tutorial shows how the "sudo routine" implementation works, I can also read it. Sorry in advance if my request is dumb.

      Best Regards,

      M

Viewing 2 reply threads
  • You must be logged in to reply to this topic.