Examples

This section provides short examples of populated setApiParametersTemplate() and starting() functions, along with the dialog boxes that are created.

  1. In the apiGuiTestPlugin Parameter Editor dialog box, add a custom particle temperature as a Body Force.





  2. Add a custom mass for all Particle-Particle contacts.



  3. Add a custom checkbox for enabling the output of a print statement using a Body Force.







  4. Add a custom force for Particle-Geometry contacts, defined as a Material Interaction.
  5. Open the Particle-Geometry group, and then open the materials Interactions Group.
  6. Within that group, define a parameter called 'force':

    In this example, the minimum (0.0) and maximum (1000.0) values are defined.

  7. Define a force for each material pair.

  8. To access force values in the code, iterate over all material pairs.
  9. To define parameters in a table (a table is similar to a group, except that values are defined in columns):

    You can add as many rows as desired.

  10. Access the parameters by iterating over rows as follows:

  11. Define a set of default rows.
    Note: In this case, you can still edit the values of those rows but you cannot remove the rows. Therefore, a minimum number of rows is enforced.



    The row is now editable, but the icon is disabled.