User Tools

Site Tools


Introductory Batch Tutorial

Please note that these practical sessions are designed to be completed in sequential order. This tutorial should take approximately 1.5 hours.

Practical Sessions

Scenario

Let’s assume an organization uses analysis tools, which may include in-house codes and/or models created using commercial applications such as Excel® or MATLAB®. Let’s also assume there is a requirement to deploy some of these tools, in an easy-to-use form, to end-users who may not be expert at using these tools in their “native” form.

This tutorial is a guide through the creation of a custom web application called an EASAP to simplify and automate the use of an analysis tool. We create an intuitive interface to enable error-free usage with a minimal learning curve for end-users. In addition, we would like end-users to be able to store results in a central repository and to share results with colleagues.

Tutorial Summary

Any batch mode software, either in-house or commercial, can be driven by an EASAP. Here we use a batch mode program that performs a simple structural analysis of a rectangular plate. This application was written by Herbert Whitman (herbgw2@yahoo.com) and is freely available at http://www.fseas.info/.

This application is an example of a simple DOS program that does not have a graphical user interface—it is ‘command-line driven code’. To run this program as intended in its original form, open a DOS command prompt, change to the directory containing the program, and type in the name of the main executable femrctpl.exe. The user is prompted for a series of inputs, as shown in the figures below.

As can be seen in the above popup window, the program prompts for the name of an input data file that must be created with a text editor prior to running the program. An example of the expected form for this input data file is shown in the figure below.

The program produces lines of text and tabular data output. A portion is shown in the figure below.

The results computed by the program include:

  • local displacements
  • local bending moments
  • reactions on the supported edges.

Clearly, this is not a process that you would expect a new user to be able to execute in its current form without some training. More generally—while many commercial applications offer capable GUIs—they are usually designed to allow expert users to solve many different types of problems, rather than enabling a non-expert to quickly and intuitively execute a specific process.

In this tutorial, we will take a difficult, “expert-only” process, and “wrap” the process into an intuitive web application, enabling error-free usage by non- experts.


Note: This tutorial is designed for use with an EASA Server that is running under Windows. If your EASA Server is running under Linux, then please contact our support personnel at support@easasoftware.com to make arrangements for receiving a Linux server compatible version of the tutorial.

Tutorial Files

For this tutorial, both the planning of the EASAP and the generation of batch files for the underlying software application have been completed previously. Additionally the report template has been already created to focus on learning to Author an EASAP.

The files that you will need to complete the tutorial are listed in the table below:

File Name Description
femrctpl.exe Main executable of rectangular plate analysis program
input.txt File containing inputs for rectangular plate analysis program
plate.txt Data file for rectangular plate analysis program
EASAlogo.jpg Image file of EASA logo
plate.gif Image file used as a thumbnail or selection image
load.gif Image file used in application diagram
report.html Template HTML file for report of results
PLATE.OUT Template file for extracting output













Practical Session 1: Initiate EASAP

Estimated completion time = 15 minutes.

In this practical session, you will create the new EASAP, set its properties, and create its data entry objects. At the end of this session, your EASAP will look like the sample shown below.


Please follow the instructions below to complete this practical session. Detailed information on the objects created in this session can be found at the Author's Pages.

Create a new EASAP

The first task is to create a new EASAP within EASA.

In the New Application wizard, set some PROPERTIES for our EASAP.

  • Title can be anything you like, for example ‘Cantilever Plate Loading Analysis’.
  • You can control which Categories (rather like folders) in which your EASAP be will accessible for Users. Let’s set the Category to ‘Training’.

Note: Optionally, you can select an Image such as plate.gif, included with this tutorial, and a brief description such as: ‘This application performs a loading analysis on a cantilevered rectangular plate having a variable thickness and length and a fixed width of 1 ft. The displacement of the plate is predicted for a user defined uniformly distributed load’. Both the image and the description will be visible to Users once you publish your EASAP.

  • Click Next, then Use EASAP Builder, click Finish, and EASAP Builder (shown below) opens.

EASAP Builder is one of the main tools used within EASA to create applications without coding. As you can see, it consists of a tree with objects on the left and associated parameters on the right. During this tutorial, all we will do to build a fully functioning application is to create various objects and populate their parameters. There will be no coding involved.

Uploading files to the EASAP

After creating your EASAP, the next task is to upload any files required by the EASAP. When uploaded, these files are copied from your computer to the EASA Server and stored in the development folder for the EASAP. This folder contains the single, centralized definition of the EASAP, which once published will be used by all users of the EASAP.

  • Select the Files tab just above the tree in EASAP Builder.
  • Click on the Browse button.
  • Select the folder on your computer in which you downloaded and unzipped the tutorial files.
  • Select the file, EASAlogo.jpg, by either clicking on Open or double-clicking the file name, and then click on the Upload button.

The file will be added to the list of current files shown below the Browse and Upload buttons.

  • Upload plate.gif and load.gif also.
  • Let's save our work. Click on the Save button ().

Note: The Save button is enabled only when you have unsaved changes. Upon saving the EASAP settings, the button will be disabled or grayed out until you make another change.

Adding Data Entry Objects

You are now ready to proceed with adding data entry objects to the user interface of your EASAP.

  • Return to the Tree tab.
  • Expand the TABBED PANE LIST sub-branch, by clicking on its () icon. The first tabbed pane, tabbed_pane1, will already be present. Rename it input and then edit the parameter Tab: to 'Input Data'

Let's check our work.

  • Save (), then click on the Test Web Browser button () at the far left of the 2nd toolbar, and you should see this:

  • Return to EASAP Builder.

Now we start to add data entry objects to the user interface of your EASAP: on input users will choose a plate material and specify its dimensions.

  • Right-click the TABBED PANE input and select Child→Add CHOICE LIST. Rename it mat and set:
Parameter Name Parameter Value
Choices:Steel, Aluminum, Titanium
Default:Steel
Label:Plate material

Now add a SUB PANE.

  • Right-click mat and then select Sibling→Add SUB PANE. Rename it dim and set Border:'Plate Dimensions'.
  • Right-click dim and select Child→Add REALBOX. Rename it L and set:
Parameter Name Parameter Value
Default:5.0
Label:Length
Upper Bound:10
Lower Bound:0.5
Units:Length

After setting the parameter values as shown in the table above,

  • Click back into the parameter value cells for Default:, Upper Bound: and Lower Bound: and select the unit of ‘ft’ for each in the drop down list at the right end of the cell.

The parameter table for the REALBOX L will appear as follows:

Create another REAL BOX.

  • Right-click L and select Sibling→Add REALBOX. Rename it t (object names are case sensitive) and set parameters below:

Note: Set Units: first to create a dropdown 'units' menu for the other parameters.

Parameter Name Parameter Value
Default: 1, in
Label:Thickness
Upper Bound:2, in
Lower Bound:0.25, in
Units:Length
  • Save your work, File→Save.
  • Right-click dim and select Sibling→Add SUB PANE. Rename it load and set: Border:'Uniform Load'
  • Right-click load and select Child→Add REALBOX. Rename it Lu and set:
Parameter Name Parameter Value
Default:50, lbf/ft
Label:Load magnitude
Upper Bound:200, lbf/ft
Lower Bound:20, lbf/ft
Units:Force per Unit Length
  • Save your EASAP by clicking on the Save button.

If you have errors, you will see error messages directing you to problems within your objects that you will need to fix.

At this point, the EASAP tree should look like this:

Let's check our work.

  • Click on the Test Web Browser button () at the far left of the 2nd toolbar. Our interface should look like this:

  • Close the test window to return to EASAP Builder.
  • Exit EASAP Builder by selecting File→Exit. If a pop-up window asks whether to save or not, select Yes.
  • To see the current name and status of your EASAP, from the EASA webpages select EASA→Author→Applications→My EASAPs.

Your EASAP will have a title such as ‘Cantilever Plate Loading Analysis (*)’, where the asterisk will be a number.

Note: The reason you may get a number within parentheses after your EASAP title is that EASA automatically adds this number in order to keep the title unique. Therefore, if another EASAP already exists with the same name then the number will be added to your EASAP’s title.

  • When you find your EASAP, click on its title link or the thumbnail image in the far left column of its row, and you will be taken to a new page, which will look like this:

Congratulations. You have finished Practical Session 1.














Practical Session 2: Add Diagram

Estimated completion time = 10 minutes.

In this practical session, you will create a diagram representing a dynamic schematic of the plate. The figure below provides a view of how your EASAP will look at the end of this session.

Please follow the instructions below to complete this practical session.

  • Under the EASA→Author→Applications menu, select My EASAPs and find your EASAP.
  • Click on it and then click on the EASAP Builder link in the new page.

Now you are ready to create your first diagram. Child

  • Right-click STYLE LIST and select Sibling→Add DIAGRAM. Rename this diagram object plate1.

We add a rectangle to act as a white background for your diagram.


Note: The Child objects under DIAGRAM are drawn in the order that they appear on the Tree from top-to-bottom. Thus we draw the background first, and then draw the two rectangles afterward. If we drew the background last, it would hide the rectangles from view.


  • Right-click plate1 and select Child→Add RECTANGLE. Rename it backgrd and set:
Parameter Name Parameter Value
Origin:-0.5 [ft], -5 [ft]
Size:11 [ft], t + 10 [ft]
Fill Style:White

Expressions that pass the automatic checks will be colored blue. If a problem is detected, the expression will be colored red.

  • Right-click backgrd, Copy () and then Paste (Sibling) (). Rename it wall. Set:
Parameter Name Parameter Value
Size:0.5 [ft], t + 10 [ft]
Fill Style:Gray
Line Style:Black t1 full

We will add a third rectangle to show the plate length and thickness.

  • Right-click wall and select Sibling→Add RECTANGLE. Rename it plate and set:
Parameter Name Parameter Value
Origin:0, 0
Size:L, t
Fill Style:Red
Line Style:Black t1 full

The final step is to associate the new DIAGRAM with the TABBED PANE in which it will be displayed.

  • Expand the TABBED PANE LIST, and select input. Click in the Diagram: parameter value box, and a pop-up window showing plate1 will appear. Select it and hit OK.
  • Save and check your work.

The first TABBED PANE window will now look like this:

You can also check on the diagram functionality by making changes to values for the 'Length' or 'Thickness'.

  • Save the EASAP by clicking on the Save button.
  • Check your work.

The EASAP tree should look like this:

  • When you are done checking your EASAP, exit EASAP Builder.

You are now finished with Practical Session 2.














Practical Session 3: Connect EASAP to Software

Estimated completion time = 20 minutes.

In this practical session, you will create a process to run the software application, manipulate user inputs into a form suitable for the batch file, and edit a batch input file into a template with Delimited Object References (DORs).

  • Start EASA, log in, and Set Mode→Author.
  • Find your EASAP under EASA→Author→Applications→My EASAPs.
  • Click on it and in the new page click on the EASAP Builder.

The first task is to upload a few files required by the EASAP.

  • Select the Files tab just above the tree in EASAP Builder.
  • Click on the Browse button and select the folder on your computer in which you downloaded and unzipped the tutorial files.
  • Double-click the file, input.txt and click on the Upload button.

The input.txt file will be added to the list of current files shown below the Browse and Upload buttons.

  • Upload the following files as well: plate.txt, femrctpl.exe, report.html, input.txt.

femrctpl.exe is the executable, plate.txt contains input data, and input.txt contains responses to queries from the executable that would otherwise be typed at the command prompt.

Now we create the PROCESS for running the plate analysis software.

  • Click on the Tree.
  • Right-click the PROCESSES branch and select Child→Add PROCESS. Rename it runplate and set:
Parameter Name Parameter Value
Run Using:cmd.exe /C "femrctpl.exe < input.txt"
Software:demo

Now we set up the objects needed to manipulate the user input data into a form appropriate for replacement within the batch input file, in this case plate.txt.

Now we create a MAP to map a particular plate material into the modulus of elasticity which is required by the plate analysis software.

  • Right-click SCALAR under the new DATA PROCESSING and select Child→Add MAP. Rename it modulus and set parameters below:

Tip: Copy the contents of the Choices: parameter of the TABBED PANE LIST→input→mat and Paste it as the modulus→Inputs: parameter value.

Parameter Name Parameter Value
Value:mat
Inputs:Steel, Aluminum, Titanium
Outputs:27600, 10600, 15000

Create a similar MAP for the material’s Poisson ratio.

  • Right-click modulus. Copy and Paste (Sibling). Rename the new MAP poisson and set:
Parameter Name Parameter Value
Outputs:0.305, 0.33, 0.34
  • Time to save your work, click Save.

Now we will move on to translate the plate’s dimensions into the uniform element size that is expected in the input file. The plate is divided into 20 elements along its length. Create a COMPUTE:

  • Right-click poisson and select Sibling→Add COMPUTE. Rename it dx and set:
Parameter Name Parameter Value
Value:L/20
Unit Group:Length

The next step for the runplate process is to add a REPLACEMENT object for its input file, plate.txt.

  • Right-click runplate and select Child→Add REPLACEMENT. Then set its File: parameter by selecting plate.txt from the choice list.

The PROCESSES branch of the EASAP Tree should look like this:

  • Note: The order of execution within a PROCESS object is always:
    1. DATA PROCESSING objects,
    2. REPLACEMENT objects,
    3. Commands specified in the Run Using: parameter of the PROCESS object,
    4. The CLEAR FILESPACE object.

Therefore the order of objects on the tree within a PROCESS is not important. However, the order of execution of multiple PROCESS objects is based on their order on the Tree, occurring from top to bottom.


  • Save the EASAP.
  • Select replacement1 and click on the Open Template Editor button () in the toolbar.

The Template Editor will start in a new window. We will now go through the process of replacing fixed input values, such as text strings and numbers, with DORs.

  • On the third line of the file, highlight 0.5 and insert the DOR dx by double-clicking on dx in the DOR List. Then set its Units: setting to ‘ft’ in the toolbar.

Tip: If you encounter problems setting the units of the DOR, ensure that the Unit Group: parameter has been set properly for the dx COMPUTE. If you need to go back and make a change in EASAP Builder, you should keep Template Editor open and just select File→Reload after saving your changes in the Builder.

  • Still on the third line, highlight 1.5, double-click on t and set its Units to ‘in’.
  • Next highlight 3500 and insert the DOR modulus.
  • Finally on the third line, highlight 0.2 and insert the DOR poisson.
  • Moving to the sixth line below the word ‘LOADS’, you should replace 2.5 with the DOR Lu and then set its Units to ‘kip/ft’.
  • Save the file by clicking on the Save button ().

At this point the file will appear in the Template Editor as follows:

  • Once your file looks correct, exit the Template Editor by selecting File→Exit.

At this point, your EASAP will be ready for its first test run. Even though the OUTPUT branch is empty and nothing will be displayed on the results pages, you can still submit a test run and take a look at what is produced at this point.

  • In the Builder click on the Test Web Browser button () at the far left of the 2nd toolbar.
  • After the EASAP window appears, click on the Submit EASAP button ().

After a second or two, a pop-up window will appear when the EASAP has been submitted successfully.

  • Click OK on this pop-up window.
  • Close the EASAP window and focus back on the EASA→Authoring→Testing page.

The page should look like:

  • You should now locate the application that you just submitted in the testing table.

It will probably be the only entry in the table. If you do not see any rows in the table, try clicking the refresh button on your browser. Now, look at the Status column for the run you just submitted. It may show a variety of messages. If you see ‘Queued’ then the job is waiting for some other jobs to finish before starting to run. If you see a percentage number, then your job is currently running. Finally, if you see ‘Completed’ then your job is done.

Once your job has completed, you can take a look at some of the files produced by the test run.

  • In the Files column for your EASAP run, click on the Browse Files button (}}).

A pop-up window will appear that will look like the following:

Let’s look at the input file, plate.txt, and see the result of the DOR replacements.

  • Click on the link and the window’s display should look like the following:

If you do not see the file content shown above, then you may have an error in your EASAP settings or in your template input file. You can attempt to fix these problems at this time or wait until Practical Session 5, in which you will be testing and debugging your completed EASAP.

  • After reviewing the file, click on the Back button.

Now let’s look at the output file, PLATE.OUT, produced by the underlying software application.

  • Click on the link and the window’s display should look like the following:

If you do not see the PLATE.OUT link or the file content shown above, then you have an error in your EASAP settings or in your template input file. After reviewing the file, close the window.

Now, review the values of data produced in the EASAP.

  • In the DORs column for your EASAP run, click on the View DOR Information button () and a new table will appear in your browser window that will look like the following:

You are now finished with Practical Session 3.














Practical Session 4: Produce Output

Now we will create an output report on the EASA→Authoring→Testing page which includes a summary of user input and a results table, above.


  • Find your EASAP at EASA→Author→Applications→My EASAPs.
  • Click on it and then click on the EASAP Builder link in the new page.
  • On the Tree right-click OUTPUT and select Child→Add REPORT.
  • Right-click report1 and select Child→Add HTML OUTPUT. Rename it body and set one parameter:
Parameter Name Parameter Value
File:report.html

We need to extract some data from the underlying analysis software output file.

  • Right-click LIST and select Child→Add EXTRACT. Set its
Parameter Name Parameter Value
File:PLATE.OUT

This file name will not appear in the pull-down list because it is created after the plate software application is run.

In order to help in the creation of EXTRACT, FIND, and REPEAT objects:

  • Right-click on extract1 and select Extract Tool at the bottom.

When the Extract Tool window appears,

  • Click on the Open button ().
  • At the top of the Load sample file window:
    • Select Local file and browse to your tutorial files, select PLATE.OUT and click OK.

The window should appear as follows:

















  • In the preview pane scroll down until you find ‘JOINT DISPLACEMENTS’.
  • Highlight ‘JOINT DISPLACEMENTS’, right-click and select Add Literal Find from the icon bar.

JOINT DISPLACEMENTS will appear in the left Matched Lines column.

  • Next, highlight the number 1 below ‘JOINT DISPLACEMENTS’. Right-click and select Add Variable Find.
  • After the Add Variable Find window opens, name the DOR ‘node’ and select ‘Integer’ for the DOR type.
  • Highlight the first 0.000000 after 1. Right-click and select Add Variable Find.
  • After the Add Variable Find window opens name the DOR xd and select ‘Real’ for the DOR type.
  • Highlight the second 0.000000 after 1. Right-click and select Add Variable Find.
  • After the Add Variable Find window opens name the DOR yd and select ‘Real’ for the DOR type.
  • Highlight the last 0.000000 after 1. Right-click and select Add Variable Find.
  • After the Add Variable Find window opens name the DOR zd and select ‘Real’ for the DOR type.

Next we set up a repeating FIND to pull out the desired data.

  • Highlight the second line (‘node xd yd zd’) in the Matched Lines column.
  • After the line becomes yellow select the Repeat () button within the Extract Tool toolbar.
  • The Set Repeat Parameters window opens, select 'Match up to a maximum number of lines'. Enter ‘21’ within the 'Maximum number of matches'.
  • Select OK to close the Extract Tool window.

Finally we compute the maximum displacement on the plate. In the OUTPUT branch:

  • Right-click SCALAR and select Child→Add STATISTICS. Rename it MaxD and set:
Parameter Name Parameter Value
List:zd
Function:MAXIMUM
  • Time to save your work, click Save.

Now let’s display the calculated maximum displacement of the plate in our report.

  • Right-click body and select Sibling→Add TEXT OUTPUT. Rename it MaxDisp and set:
Parameter Name Parameter Value
Text:Maximum Plate Displacement = %MaxD% in.
Style:Normal

Now add a heading.

  • Right-click MaxDisp select Sibling→Add HTML OUTPUT. Rename it heading and Set:
Parameter Name Parameter Value
Text:<h4>Table of Plate Displacement</h4>

Finally display our extracted nodal displacement data in a table.

  • Right-click heading and select Sibling→Add TABULATED DATA. Rename it DispTable and set:
Parameter Name Parameter Value
Column Titles:Node, Displacement [in]
Columns:node, zd
  • Now save the EASAP, and then check the EASAP tree to ensure that the OUTPUT branch looks like this:

At this point, you can also get a preliminary view of the report that will be generated by the objects in the OUTPUT branch.

  • Back in your browser window select EASA→Authoring→Testing and then click on the View Results button () in the Output column for the test run completed in the previous practical session.

The following will appear in the browser window:

Note: If your results pages do not look like what is shown above, you may have a problem with the original EASAP run or with the objects on your OUTPUT branch. You can try to resolve the problem now or wait until Practical Session 5 when you will be testing and troubleshooting your EASAP.

  • After reviewing the Latest Output content, return to EASAP Builder and exit.

Practical Session 5: Test & Publish EASAP

Estimated completion time = 10 minutes.

In this practical session, you will test the EASAP from the previous sessions. Then you will publish your EASAP for other users on EASA→User→Applications.

Lets get started:

  • Start EASA, log in, and Set Mode→Author.
  • Select EASA→Applications→My EASAPs and find your EASAP.
  • Click on it and you will be taken to a new page.
  • Under EASA→Authoring→Testing click on the Test EASAP link on the page that appears.
  • After the EASAP window appears, click on the Submit EASAP button () in the upper right corner. A pop-up window will appear when the EASAP has been submitted successfully. Click OK.
  • Now close the EASAP window, and focus back on the EASA→Authoring→Testing which will look something like the following:

  • Now locate the application that you just submitted in the testing table. You may need to click your browser’s refresh button to see the run. The Date and Application columns should provide enough information to find it.
  • Now examine the Status column for the run you just submitted, there are various messages.

If you see ‘Queued’ then the job is waiting for some other jobs to finish before starting to run. If you see a percentage number, then your job is currently running. Finally, if you see ‘Completed’ then your job is done and you can view the results by clicking on the icon under Output ().

Now let’s look at the files that will help you diagnose problems you may encounter getting an EASAP to run properly.

  • Under the Files column for your latest EASAP run, click on the Browse Files icon () and a pop-up window will appear that will look like the following:

  • In this window, look for the err1-runplate.txt file in the list.

This file should have a Size of 0.0 kb to the right of the file name. If the number is greater than zero, then click on the link for the file and examine the error messages given in the file. If you are unable to determine the cause of these messages, then contact your instructor or EASA support representative. At this point, you may need to go back to EASAP Builder and make changes to your EASAP based on suggestions from the EASA support person. You will then resubmit the EASAP for another test. Iterate in this way until all errors in the err1-runplate.txt file are eliminated.

Note: Depending on the type of underlying software driven, not all messages captured in the diagnostic files, such as err1-runplate.txt, will need to be eliminated. Often, software applications send other types of messages to the standard error stream.

  • Finally, look to see that a PLATE.OUT file has been created.

If not, then there is a problem with either the EASAP or the input file, plate.txt.

  • Open this file and check if all DORs were replaced correctly.

The file should look like the following:

If the input file does not look like the one above and you are unable to determine the cause of the problem, contact your instructor or EASA support representative. At this point, you may need to either go back to EASAP Builder and make changes to your EASAP or make modifications to your template plate.txt file in the template editor. You will then resubmit the EASAP for another test. Iterate in this way until the DORs in the plate.txt file get replaced properly and a valid PLATE.OUT file is produced.

At this point, you have successfully completed an EASAP run. You can close the file browsing window now, and if you haven’t already done so, you can now examine the reported results by clicking on the View Results button () in the Output column. The report will look similar to what you saw in your initial tour of EASA in Practical Session 1 and when you developed the Output branch in Practical Session 5.

If the report does not appear correctly, please contact your instructor or EASA support representative for assistance. Again, you may need to go back to EASAP Builder and make changes to your EASAP based on suggestions from the EASA support person. You will NOT have to resubmit the EASAP for another test: just save your changes in the Builder and then click on the Re-generate report using the latest version of this EASAP link to see an updated report. Iterate in this way until the report appears as expected.

Your EASAP will now be ready for publishing.

  • Select EASA→Authoring→Publish, add a relevant comment in the input area and then click on the 'Major Revision' button. A new window will state ‘The EASAP has been successfully published.’

Let's check whether our EASAP will be visible to Users on the EASA system.

  • Set EASA→Set Mode→User in the browser.
  • Now click on the EASA→Applications tab and then select ‘Training’ as the Category.

Your EASAP will now be visible in the EASA→Applications table. If you like, you can open up your EASAP, modify some inputs and then submit it to run as a User. As a User the output from an EASAP run will appear in EASA→Results→My Results.

  • Finally, you can Log Out of EASA.