Ronald D. Kriz, Associate Professor
Engineering Science and Mechanics
Virginia Polytechnic Institute and State University
Blacksburg, Virginia 24061
For educators NPIB provides a format that instructors can use to develope
interactive modules based on computer simulation legacy codes that students can
access and learn across a platform independent Java environment of a Web server.
Instructors can more accurately monitor and evaluate students progress.
For researchers NPIB provides a format that scientists and engineers can
develope a collaborative environment where participants can submit, monitor, and
share computer simulation results running in real-time on a heterogeneous network
of different remote-site computers unique to each researcher.
tar -xvf npib.tar
Example: mkdir /usr/local/npib
Example: cp ssh.exp scp.exp local.sh /usr/local/npib
Example: mkdir /apache/htdocs/cgi-bin
cp npib.cgi npib.command npib.config /apache/htdocs/cgi-bin
Example: mkdir /apache/htdocs/output
Example: mkdir /apache/htdocs/form
NOTE: The directorys relative web location will be required
Make the following changes:
Make the following changes:
b.) Change the last line of the script so that it points the
For NPIB1.6 modules a split web page appears with the NPIB1.6 form in the lower frame
and the upper frame appears with the "how-to-use" instructions. The lower frame
is created by a java form1.6 builder. This web page describes how to create the
NPIB1.6 form for the polar plot module02 as an example.
The NPIB1.6 form, shown below, appears in the lower frame.
We provide a NPIB1.6 form editor ("form.jar") that creates new NPIB1.6 (*.html) files
or edits existing NPIB1.6 (*.html) files.
On the server spelunker.sv.vt.edu this NPIB1.6 form editor is located in two places:
In this case the /home/"username"/npib/form.jar is accessed by setting both the PATH
and CLASSPATH to this directory. With these two paths set any NPIB file (*.html)
can be edited in any directory when you logged onto the server (i.e. spelunker.sv.vt.edu).
For this example on the server spelunker.sv.vt.edu we can go to the directory
/www/jwave/crcd/kriz/modules/module02 and edit the file new_polar.html with the
following command at the UNIX prompt.
spelunker% form1.6 -e polar.html
To create a new NPIB file at the UNIX prompt type...
spelunker% form1.6 -e
You can give this file a name using the Save option when you leave the editor.
Only one "Working Window" should appear on your monitor**: (1) "NPIB Creator".
The earlier 1.5 version also generated a second window: "Output Editor".
IF you are logged onto the server (i.e. spelunker) from a remote
workstation and are using NPIB1.6 form.jar file on the sever (i.e. spelunker),
then you must have setup the environmental DISPLAY variable to display
X-windows back to your remote workstation**. But if you are using NPIB1.6,
we recommend that you install your own NPIB1.6 form.jar file in the ~/bin
directory off of your home directory similar to how the NPIB1.6 form.jar
file was setup on the ~/bin directory on the server (i.e. spelunker). If
you are creating the NPIB1.6 file (*.html) on a remote machine it is not
necessary to ftp transfer the NPIB1.6 file (*.html) to the server
(i.e. spelunker) because the newer NPIB1.6 form editor has a "Save Local"
or "Save Ftp" feature built into NPIB1.6 form editor that transfers the
edited NPIB1.6 form file to a directory on the server (i.e. spelunker).
This will be explained in more detail below.
At the top of the NPIB Creator "Working Window" you can select from a number of
pulldown menu options.
At the top of the NPIB Creator window under File, the choices are as
expected New, Open, Save and
Exit. Under Edit there is only one choice --
Remove which removes the last entry that was created form the items
under Insert shown below.
Under Insert the choices are
Text Field, Label, and Button.
The majority of the time you will select a Text Field box with a
Label above the box. A Button is
used to select or initiate a task, for example the Submit button is used to create
a file, in this case polar.dat, from the information on the NPIB form and then
submit this file to the application for processing.
When and item is selected under Insert an Insert-window appears
prompting you to enter a unique name for this item: Text-Field, Label, Button.
This name will be used again in the Output Editor "Working Window".
After you have entered a unique name followed by OK, the item should appear in the
the upper left corner of the NPIB Creator window. To move and reposition the button,
label, or text-field items, simply select the item to be moved by holding down the
left mouse button over the item on the NPIB Creator "Working Window" and drag (hold
down mouse button while moving the mouse) the item by moving the mouse to the desired
location. When you let go of the mouse button the item will appear in the new
location. NOTE: you will not see the item "move" but rather the item will re-appear
in the new position of the NPIB form near the location where the left mouse button
was released. You may have to reposition the selected item a second time and
"fine-tune" the the exact location. This is not intuative and takes some practice.
In this way all of the items (Text Field, Label, Button) of a working NPIB form can
be created and positioned as desired.
Next you will want to assign more information to your button, label or text-field.
When a text field, label, or button is selected with the left mouse button a
"Properties" window appears that requires you enter specific infomation for that item.
For example the figures below show Property windows for each of the items: Text
Field, Label, and Button.
Common to all these windows are constraints, foreground, background, and font. If
the item is the last in a row you must specify this by changing the "Grid Width"
constraint parameter from 1 to 0. Default for the "Grid Width" parameter is one "1".
Experiment with and change foreground, background, and font as needed.
Text Field Property Window options: selectionStart, text, columns,
caretPosition, and selectionsEnd:
Label Property Window options: alignment
Button Property Window options: actionCommand
This "Working Window" describes how the data that is displayed in the NPIB form
will be formatted in the file submitted to the shell script.
For comparison the resulting file polar.dat shown below
corresponds to the syntax shown above.
At the top of the "Working Window" there are two entries: (1) the name of the
shell script and (2) is any other parameter the shell script might need.
The next entry links the TextField_name as the return email address when
shell script is completed.
The final entry is the window where the format is set with links to each of
the textfield_names. The very first line in this window defines the filename
where data is stored according to the format specified in the lines below.
Here spaces are important if the program reading this file as data input
requires accurate spacing which seperates the numbers associated with
textfield_name. Notice that all numbers associated with textfield_names use
the syntax, <link="textfield_name"\> . Recall that the textfield_names
were assigned when the textfield was first created. This is why the HELPFUL
HINT recommended that you keep a sketch of textfiled_names associated with
the numbers in the boxes on the NPIB form. You can always verify the
textfield_name associated with the texfield_item on the NPIB Creator "Working
Window" but it is quicker if you use a sketch.
Direct Editing NPIB1.6 Files Using a Text Editor: It is possible to directly
edit the syntax of the NPIB1.6 (*.html) file because it is a text file and the syntax
is simple enough to understand. We only recommend that in some instances this may
be an option to consider when the forms are particularly large where you may
want to copy and paste large blocks. In this case again the item_name is key
to finding the portion to edit.
For NPIB modules a split web page appears with the NPIB form in the lower frame
and the upper frame appears with the "how-to-use" instructions. The upper frame
also includes a link to an archived WYSIWYG result if the user submits the NPIB
form "as-is". The upper frame can also include supporting information and other
links to supporting information about the module such as definitions and
background information.
Example of Upper frame instructions:
Example of Lower frame NPIB form:
The user can highlight and change any values in the NPIB form except....
Make sure you change the email address so that the link to the results are
sent to your email address.
When the submit button in the NPIB form is selected a new web page appears with
a unique directory name. We suggest that the user "Reload/Refresh" this web
page and observe the numerical calculations dynamically. When the calculates
are completed the excess files are removed and the user can select the appropriate
*.html file to see a visual summary of the results.
After a few minutes the calculations are completed and excess files removed.
Of course this particular
job is archived in the http://www.jwave.vt.edu/output for future reference and
this directory name should be written down for future access. Unlike the JWave
interface, the NPIB interface allows the user to dynamically view the numerical
calculations as they are taking place and when completed the user has access to
all results for future analysis.
1.0 Introduction:
Newtwork Programming Interface Builder (NPIB) is a Graphical User Interface (GUI)
tool that educators and researchers can use to create, maintain, and archive
numerous parametric studies based on their legacy computer simulations. With NPIB
users can create an interactive and collaborative Web-based working environment.
Although NPIB uses standard Java, it is designed so that the community of scientists
and engineers can build an NPIB working environment without knowledge of Java
programming.
Below we provide instructions on how to install, create and use NPIB. NPIB is not
commercially supported, hence we provide NPIB here AS IS with out any implied
waranty. While we did our best to create an application that performed well
without errors, we do no make any quarantees about its suitability to any
particular purpose. By installing and running this program you explicitly agree
to accept the terms of this statement. If you find a bug please send us a
description of the bug, including as much information as you can. While we cannot
guarantee a prompt fix, we would appreciate your feedback and try to help as we can.
2.0 Installation
I. Software:
Apache was used to develop NPIB. It can be obtained from http://apache.org
It can downloaded from http://java.sun.com
which may already be installed on your system.
II. Setting up NPIB
This directory should not be web accessible.
These files should have been extracted from the npib.tar file in step 1.
the CGI-accesible directory you created in step 4.
These files should have been extracted from the npib.tar file in step 1.
which the web server has permission to write to.
chmod 755 /apache/htdocs/output
chown nobody /apache/htdocs/output
which the web server has permission to write to.
chmod 755 /apache/htdocs/form
when users create NPIB forms.
This file should have been extracted from the npib.tar file in step 1.
The npib.config file should look like:
webroot /output/
commandfile npib.commands
tempname npib.in
sshScriptDir /www/jwave/cgi-bin/
hostname www.jwave.vt.edu
email rlevensa@spelunker.sv.vt.edu
webroot - set this to the path of the outroot directory,
as seen by the web server.
commandfile - this does not need to be modified.
This file states where the users command files are located.
tempname - this does not need to be modified
sshScriptDir - set this to the path of the directory you created in step 2
hostname - set this to the full dns name of this web server
email - this address will be the FROM address used when results
are mailed to users. Set this as desired.
The npib.cgi file should look like:
export CLASSPATH
CLASSPATH=/usr/local/java2/lib/:/apache/htdocs/form/form.jar
/usr/local/java2/bin/java form.run.CGIReceiver $QUERY_STRING
and the standard java runtime classes
java runtime binary on your machine.
The npib.commands file should look like:
Each record is used to tell NPIB the commands file for each user.
A line consists of two fields, delimited by a space:
The format of a users command file is discussed in the
NPIB General Users Guide.
3.0 Set up "public_html" for JWave and NPIB
4.0 "How-to" NPIB-form tutorials
4.1 How-to-create NPIB1.6-forms. Example: Polar Plot, module02
(form.jar ver1.6 is archived in this directory)
NOTE: a home-directory "username" corresponds to a user-account on the server.
GRAPHITE-EPOXY
EPOXY ELASTIC PROPERTIES ( N/M**2 )
EPOXY YOUNGS MODULUS, EM=+5.280E+09
EPOXY POISSONS RATIO, NUM=0.354
FIBER ELASTIC PROPERTIES ( N/M**2 )
FIBER LONGITUDINAL YOUNGS MODULUS, EFL=+2.320E+11
FIBER TRANSVERSE YOUNGS MODULUS, EFT=+1.500e+10
FIBER SHEAR MODULUS L-T PLANE, GFLT=+2.400e+10
FIBER SHEAR MODULUS T PLANE, GFTT=+5.020E+09
FIBER PLANE STRAIN BULK MODULUS, KFTT=+1.500E+10
FIBER VOLUME FRACTIONS: 0.00 0.60 1.00
**NOTE: If you are logged onto the server (i.e. spelunker.sv.vt.edu from a remote
workstation make sure you either use ssh or setup xhost "server-name" and setenv
DISPLAY "remote-workstation.IP.name:0.0" so that X-Windows are sent back to your
remote-workstation monitor. YOU MAY NEED TO REPOSITION THE WINDOWS USING ALT-F7
4.2 How-to-use NPIB1.6 forms. Example: Polar Plot, module02
Plane Stain Bulk Modulus
5.0 Frequently asked questions
6.0 Known bugs
Contact: Dr. Ron Kriz
Created 6/24/01 | Revised
http://www.jwave.vt.edu/crcd/archives/npib1.6/usersguide/usersguide.html