Copyright 2006 by gINT Software. All rights reserved worldwide.
GR002.TXT
gINT Rules Code Samples - 002
Requires gINT version 6.1.013 or later.
NOTE: Code samples are provided free of charge and as-is. gINT Software makes no claim or warranty as to the accuracy of the samples. It is the responsibility of the user to ensure that the code performs as it should. Comments, suggestions, and error reports are appreciated.
Description
===========
gINT Lab table manipulations:
1. WC DENSITY Table:
A. Adds three additional fields for diameter and three for height. These are in inches. The program averages these values and converts to millimeters, which is what gINT requires. Can input one, two, or three values in these new fields or none, in which case you must supply the millimeter values. This procedure is called from the Pre-processing property of the table.
B. After calculating water content, checks to see if there is a corresponding record in the ATTERBERG table. If there is, it calculates liquidity index and inserts the value into a new, read-only Liquidity Index field in the ATTERBERG table. This procedure is called from the procedure on save property of the table.
2. ATTERBERG Table:
A. Adds two additional read-only fields for Plasticity Index and Liquidity Index. On saving, calculates these two values and populates these new fields.
B. If there is a corresponding record in the CONSOLIDATION table, inserts the Liquid Limit and Plasticity Index into these two new, read-only fields in that table.
3. HYDROMETER Table:
The gINT hydrometer calculations are based on the assumption that the specimen is dry. If you use a specimen that has hydroscopic moisture, you must run a moisture content determination and then calculate the dry specimen weight from the original wet weight and the moisture content. Five fields were added to the HYDROMETER table to encapsulate this calculations. The total wet specimen weight used in the test is provided along with an optional tare weight (assumed to be 0 is blank). Three fields for the determination of the moisture content are also provided. The code takes these data and writes the dry weight into the built-in gINT field.
4. CONSOLIDATION table:
On save, if there is a corresponding record in the ATTERBERG table, pulls the Liquid Limit and Plasticity Index values from that table into the two new, read-only fields in this table.
Notes:
1. Some of the above procedures may appear redundant, for example, the CONSOLIDATION table pulls the LL and PI from the ATTERBERG table and the ATTERBERG table inserts those same values into the CONSOLIDATION table. The reason for this is input order. If the ATTERBERG is run before the CONSOLIDATION, the ATTERBERG code will not create a new CONSOLIDATION record and therefore these data are not inserted so it is up to the CONSOLIDATION table to extract the values when a record is added. Further, the ATTERBERG data may be changed so it must resave the updated values into the CONSOLIDATION table.
2. The water content for the liquidity index calculations are taken from the WC DENSITY table. This is not completely correct. Water Content could also be in UNCONF COMPR, DIRECT SHEAR, CONSOLIDATION, or FALLING HEAD K tables. We leave expanding this code to include these tables as an exercise for the reader.
Revision History
================
10 March 2006:
If there was a record in the WC DENSITY table with no water content value, the ATTERBERG procedure generated an error. The previous code assumed that if there was a record there would be an water content value. This has been fixed. Previous code:
If PointIDDepthRecordsetFnB(dsTemp, _
"WC DENSITY", _
sPointID, sDepth, _
ms_Field_WC) _
Then
'Recordset returned data. Calculate liquidity Index.
sLI = Format$(CStr((CDbl(sWC) - CDbl(iPL)) / _
CDbl(iPI)), _
"0.00")
dsTemp.Close
Set dsTemp = Nothing
...
New code:
If PointIDDepthRecordsetFnB(dsTemp, _
"WC DENSITY", _
sPointID, sDepth, _
ms_Field_WC) _
Then
'Recordset returned data.
'Check to make sure there is data for the moisture content
sWC = "" & dsTemp(ms_Field_WC)
If Len(sWC) Then
'Calculate liquidity Index.
sLI = Format$(CStr((CDbl(sWC) - CDbl(iPL)) / _
CDbl(iPI)), _
"0.00")
Else
sLI = ""
End If
dsTemp.Close
Set dsTemp = Nothing
...
--------------------------
15 August 2004:
Added the calculation of dry specimen weight for the hydrometer test from a wet weight and hydroscopic moisture determination.
--------------------------
05 January 2004:
The calculation of the Liquidity Index performed in the GR002.WaterContentDensityPostProcess procedure was not converting the plastic limit to an integer before performing the calculation. This was incorrect and is now fixed.
--------------------------
03 November 2003:
Initial upload
*************************************************
INCLUDED FILES:
GR002.GLB:
gINT Rules code modules:
GR002 Main
Atterberg
Consol
WaterContentDensityPostProcess
WaterContentDensityPreProcess
GR002 COMMON PROCEDURES AddBracketsFnS
InitFieldsFnB
PointIDDepthRecordsetFnB
RunningTotal
GR002.GPJ:
Sample project that makes use of the code modules.
*************************************************
INSTALLATION PROCEDURE:
Copy the files wherever you prefer. To see the gINT Rules code modules you must either merge the GLB into your library (Utilities:Lib Merge/Copy) or change to the included library (File:Change Library).
*************************************************
SPECIAL NOTES:
None
*************************************************