User Tools

Site Tools

Manipulate User Input

“Design for Usability”

Before an EASAP may begin processing, a User will need to enter data as input.

Input fields to an EASAP should well organized, easy to understand, and intuitive.

An Author should use DATA PROCESSING objects to modify User input into a format required by the underlying software.

Example 1: MAP a name to a material's properties

Consider an EASAP which runs a structural analysis which depends on the material properties of type of material being used.

We would like to be able to allow a User to select a material type and have each property of that material substituted where needed.

This example is a continuation of the example found in Material Property Database Example where a CHOICE LIST is populated from a file containing several types of material's properties, below.

Here we want to substitue a material's 'Modulus of Elasticity' and 'Poisson ratio' once a material name is selected by a User.

  • Create a MAP using material choices from the CHOICE LIST mat as Input: into Modulus of Elasticity as Output:

  • Create a second MAP using values for the Poisson ratio as Output:

Use the values of the two MAP's as direct input into the template batch file for the structural analysis software.

Example 2: MAP a User choice to an integer flag

Integer value flags are used to designate various states of an analytic model. We want to insulate a User from needing to know the actual flag values and instead let them choose among several text descriptions.

In our example from the Advanced Batch Tutorial, a structural analysis code needs to have the support conditions specified for a loading analysis of a beam or plate. The three possible conditions are ‘free’, ‘pinned’ or ‘fixed’, but the code uses flags to represent these settings in its input file. Namely, these flags are: 0 for free, 1 for pinned, and 2 for fixed. The steps for accomplishing the necessary data manipulation are as follows:

  • Create a CHOICE LIST with the available support conditions.

  • Create a MAP mapping the support condition choices from Step 1 into the proper flag settings.

  • Use the MAP’s value as direct input into the template batch file for the structural analysis software.

Example 3: COMPUTE a finite element's size

Any software applications that make use of finite difference, finite element, finite volume or similar numerical methods will need to somehow divide the geometry of the object or area being analyzed into smaller, discrete pieces. This discretization of a whole into a sum of smaller pieces is also known as gridding or meshing. These types of software applications will require inputs defining how the meshing or gridding process should take place.

In general, authors should avoid requesting gridding or meshing specific inputs from users. One of the benefits of an EASAP should be the capturing of best practices, and EASAP.

Authors are expected to be expert users of the underlying software applications. Therefore, where possible, authors should make the determination of how the meshing of a particular problem should be performed. Users should only be asked for geometric information and maybe in addition an indication of their accuracy and turn around time expectations. From this information, an author can then determine the settings for the meshing performed in the underlying software applications.

For this example, we’ll look at the analysis of a flat rectangular plate. The analysis software expects two inputs per side of the rectangle to govern the meshing process:

  1. the number of elements along a side, and
  2. the uniform element size along a side.

It does not expect the full dimension of the side. However, the full dimensions of the rectangle are exactly what the user should be asked to supply. The steps for accomplishing the necessary data manipulation are as follows:

  • Create a REALBOX requesting the width of the plate, W.

  • Create a COMPUTE that computes the uniform element size along the width of the plate. The expression used for the COMPUTE’s Value: parameter takes the width of the plate and divides by the number of elements that have been determined to be adequate for the analysis. In this case, 10 elements have been deemed to be adequate.

  • Fix the number of divisions to 10 in the template batch file, and then use the COMPUTE’s value as direct input into the template batch file for the uniform element size.

Example 4: Combined DATA PROCESSING for regime selection

Often in an analysis application User input values will specify a physics model.

In structural analysis stress will cause either elastic or plastic deformation. In fluid mechanics flow may be laminar or turbulent, a fluid itself may be compressible or in-compressible.

We want the regime selection (ie. the underlying physics model) to automatically derive from the values the User has entered.

In this example we demonstrate how input GUI objects, COMPUTE, and MAP may combine to create an EASAP that uses the correct regime, either laminar or turbulent for fluid flow in a pipe.

  • Create,
    1. REALBOX D for the pipe diameter
    2. CHOICE LIST fluid for the fluid type selection
    3. REALBOX Q for the volumetric flow rate
    4. MAP rho to set the fluid density based on fluid
    5. MAP mu that sets the value for the fluid molecular viscosity based on fluid
    6. COMPUTE A that computes the pipe inlet area
      • Value: 0.25*pi* D^2
    7. COMPUTE U that computes the inlet fluid velocity,
      • Value: Q/A
    8. COMPUTE Re that computes the inlet flow Reynolds number
      • Value: rho*D*U/mu
    9. COMPUTE turbflag which is laminar if false and turbulent if true
      • Value: Re>2300
    10. Two EXPAND's with command lines for laminar and for turbulent flow
    11. MAP the value of turbflag into the laminar or turbulent command lines using the EXPAND's created in Step 10

  • Now, the values of the objects rho, mu, D and the series of MAP's created in Step 11 can be inserted directly into the input files for the fluid flow analysis software.

As an alternative to steps 10 and 11 two input files created, one laminar the other turbulent; use Run If: in separate PROCESS's.

Page Tools