An Example of How to Set Up a Database and How to Use It
An Example of How to Set Up a Database and How to Use It
A user 'guest' has set up:
- An oa_database file in their home directory ( $HOME ) which is /guest.
- There is also a global oa_database file in directory $OASYS.
These files are:
| in $OASYS |
$ oa_database file for PRIMER in $OASYS $ $ Any databases which are defined in here will be available to all users $ $======================================================================= $ $ type directory to find oa_index file in database name $ ==== ================================== ============= $ LCUR* /disk/database/loadcurve/seismic seismic loadcurve database LCUR* /disk/database/loadcurve/material material loadcurve database MATL* /disk/database/material material database MODEL* /disk/database/project1.dba model build database proj 1 MODEL* /disk/database/project2.dba model build database proj 2 |
| in $HOME |
$ oa_database file for PRIMER, user 'guest' in $HOME (/guest) $ $ Any databases defined here will only be available to the user 'guest' $ $==================================================================== $ $ type directory to find oa_index file in database name $ ==== ================================== ============= $ LCUR* /guest/my_database/loadcurve my loadcurve database MATL* /guest/my_database/material my material database MODEL* /guest/my_database/build.dba my build database |
Oa_index files
In this example when creating a material in PRIMER, we will import a material stress strain curve from a database. Note that this example describes a loadcurve database, while the more common database type is the material database. The material definitions then include the curve data (*DEFINE_CURVE as well as *MAT).The database we will import the curve from is 'example material loadcurve database'. This database is in the directory ' /disk/database/loadcurve/material '. In this directory there MUST be an oa_index file which contains the database information.
The oa_index file located in this directory is shown on the next page.
The database contains 8 fields per entry and there are 10 entries (4 cold reduced steels and 6 hot rolled steels). Each entry refers to a T/HIS curve file (as this is a LCUR database) in the directory /disk/database/loadcurve/material
|
$ Material stress-strain curves
$ $============================== $ NUMBER OF COLUMNS IN DATABASE 8 $============================== $ THE COLUMN NAMES (FILENAME FIRST) Filename Material Grade (GB) Grade (Germany) Grade (Japan) Grade (USA ASTM) Units Description $============================== $ THE DATABASE ENTRIES $ $ COLD REDUCED STEELS $ ------------------- cr4_steel.cur Steel CR4 St12 SPCC A366 MPa Cold Reduced - Forming and Drawing $ cr3_steel.cur Steel CR3 St13 SPCD - MPa Cold Reduced - Forming and Drawing $ cr2_steel.cur Steel CR2 - SPCE A619 MPa Cold Reduced - Forming and Drawing $ cr1_steel.cur Steel CR1 RRSt14 SPCEN A620 MPa Cold Reduced - Forming and Drawing $ [continued on next column] |
[from previous column]
$--------------------------- $ HOT ROLLED STEELS $ ----------------- hr15_steel.cur Steel HR15 - - - Mpa Hot Rolled - Forming and Drawing $ hr14_steel.cur Steel HR14 - - A569 Mpa Hot Rolled - Forming and Drawing $ hr4_steel.cur Steel HR4 - SPHC - Mpa Hot Rolled - Forming and Drawing $ hr3_steel.cur Steel HR3 StW22 SPHD - Mpa Hot Rolled - Forming and Drawing $ hr2_steel.cur Steel HR2 StW23 - A621 Mpa Hot Rolled - Forming and Drawing $ hr1_steel.cur Steel HR1 StW24 SPHE A622 Mpa Hot Rolled - Forming and Drawing |
In the material creation window for PRIMER a material which refers to a loadcurve ( PIECEWISE_LINEAR_PLASTICITY ) is selected.
To import a loadcurve for the stress strain curve use the right mouse button to bring up the LCSS popup box. Select CREATE from the menu and this will start the Loadcurve creation box.
The loadcurve creation box allows a new curve to be created.
The IMPORT button on the bottom right of the window allows a curve to be read in from a file or database. Press this button.
The Import part of the loadcurve creation box allows a curve to be read from a database by pressing the DATABASE button.
Pressing the DATABASE button in the loadcurve creation window starts the database selection window. Each button in the window corresponds to an entry in an oa_database file. The first two buttons are from the oa_database file in $OASYS. The last button is from the oa_database file in $HOME.
Only 3 databases are shown as these are the only ones which refer to LCUR databases.
Until a database is selected the button is inactive (greyed out).
When a database file is selected it is highlighted and the button becomes RED allowing the user to select that database.
A different database can be selected as required. The one which is highlighted when is pressed is the one which will be read.
In our example we select a file from 'example material loadcurve database'.
When
in the database selection window
is pressed, PRIMER reads the oa_index file which is in that directory and creates
a window with the entries from this file.
In this example you can see that the 10 entries which were in the oa_index file are all present in the window, each appearing on a row. If there were more then 10 entries in the oa_index file a scroll bar would allow you to scroll through the entries. Eight fields were defined for each entry. The first (the filename) has not appeared in the window but is stored internally. The remaining seven field headers appear above each column in yellow. If the number of fields does not fit on the window a scroll bar will be displayed.
Until a file is selected the button is greyed out.
When a database entry is selected it is highlighted and the button becomes RED allowing the user to select that entry. A different entry can be selected as required. The one which is highlighted when is pressed is the one which will be read.
Here the HR15 steel is selected.
If is pressed this will be imported into the loadcurve editor and plotted.
The curve can be modified if required in the editor.
When a label has been given to the curve the button will be ungreyed (made active) allowing the curve to be created.
When this is done the LCSS field in the material editor is updated with a new loadcurve ID referencing the imported data.