Tasks and Classes

The Simulation Assistant consists of a list of tasks to be done in order.

Example:

  1. Import the geometry
  2. Create the regions from the parts
  3. Create and set up the physics of the simulation
  4. Set up and generating the mesh
  5. Visualize the solution
  6. Run the simulation

In turn, these tasks often consist of subtasks. Example:

3a. Create physics continuum

3b. Set material properties

3c. Set initial conditions and boundaries

Set up the structure of classes in the Java code of the assistant to parallel the task structure, so that each high-level class performs one high-level class. Classes for subtasks are called by the top level tasks. See Supplied Classes for the classes that Simcenter STAR-CCM+ provides.

Use the following rules:

  • Create a Java file containing the class for your Simulation Assistant, extended from SimulationAssistant. See SimulationAssistant Class.
  • Within your Simulation Assistant class, create a list of tasks for the top-level outline of the Simulation Assistant.
  • Create a series of Java files, one for each task, extended from Task. See Task Class.
  • Create XHTML code for each task, supplying the text and links for the user interface.
    • For extended text, use a separate XHTML file. Link to it with the contentPath parameter of the annotation for the task, or pass an HTMLFileContent object to the setContent() method of the task.
    • For small sections of XHTML code, specify them with the contentPath parameter of the annotation for the task, or pass an HTMLFragmentContent object to the setContent() method of the task.
  • Define the actions for the tasks in extensions of AbstractTaskController.
  • Where necessary, define the pre-conditions and post-conditions for the tasks, using Condition, ConditionTrigger, and their extentions.