General HydroStatics
Ship Stability Software
Command of the Week
(New or interesting aspects of GHS that you may not know about)

FRAME


From the Part Maker documentation:
FRAME "description" @ location
Stores the given description (maximum 12 characters) along with its longitudinal location. Up to 255 frame locations can be assigned.

Example: FRAME "FR1" @ 1.23F

If frames are a convenient reference for longitudinal locations, you can make use of the FRAME command in Part Maker to build frame locations into the Geometry File. Doing so does not restrict you to using frame locations in your longitudinal coordinates, but it gives you the option.

Though not required by the FRAME command, it is best to avoid spaces in the frame description. Short frame names make it easier to process them with string functions (in case you get into that).

Typically Longitudinal Strength reports make reference to frames. You can have them show frames and their locations, as in the brief example below, or frame names only.


The Load Editor optionally displays weight locations relative to the nearest frame:


And likewise the LOAD STATUS report:


If the Geometry File lacks frame definitions, GHS will look for a file having the same name as the Geometry File with a .FRA extension. Here is an example that writes a frame file:

 `Writing frame file for SV.GF
 variable (len) x
 macro frames
  unit m
  set x= minus %1 times 1.25
  unit f
  me ""FR%1" {x}
 /
 me (report) "SV.FRA"
 .frames (41,-1) 40
 me (report) off

(The code above would be more extensive if the intervals between frames varied or if the frame names were more varied.)

Beginning with GHS version 15.80, two new frame functions are available. One of them converts a frame reference to a simple number so that it can be used in commands where numbers, not frame names, are expected. Below is an example where the frame references are used when inputting weight items:

 .add "Pipe"           17.0 "FR6 + 0.1F"     0 7.5 "/max:30"
 .add "Anchors"         7.0 "FR4 + 0.2F"     0 6.3
 .add "Buoys"           1.0 "FR7 + 0.25F"    0 8.4
 .add "Ice allow"      12.0 "FR8"            0 6.8
 .add "Wire"            3.0  30.5F           0 7.0

You will notice that a macro is doing something between the input data and the actual ADD command. Evidently the macro is able to recognize the plus sign or simply the frame name or just a number.

 variable (str) s1, s2, s3
 variable L
 macro add
  set s1 = item 1, "%3"
  set s2 = item 2, "%3"
  set s3 = item 3, "%3"
  if "{s2}"="+" then set s1="{s1} plus {s3}"
  set L=FRLOC {s1}
  if {L}="" then set L=%3
  add "%1", %2, {L}, %4 %5 %6 %7 %8
 /


Questions, comments, or requests?
Contact Creative Systems, Inc.

support@ghsport.com

USA phone: 360-385-6212 Fax: 360-385-6213
Office hours: 7:00 am - 4:00 pm Pacific Time, Monday - Friday

Mailing address:
PO Box 1910
Port Townsend, WA 98368 USA

www.ghsport.com

Click here for an index to this and previous COWs