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


John Bonn called last week. This time he had a suggestion for a COW.

"You can make fixed weights as easy to manage as tanks if you use MAX," he said.

Weights added to light ship are of two kinds: tank contents and "Fixed" weights. Fixed Weights are called that because they stay fixed in location and magnitude whereas tank contents are subject to shifting when trim and heel angles change.

"Instead of four numbers -- weight and C.G. -- you can get it down to one number and not worry about the other three," he said.

Managing a Fixed Weight generally involves at least four numbers in addition to its name. On the other hand, the weight of a tank's contents is easier to manage because the geometry dictates the center of gravity, so only a load fraction need be given.

Simple Fixed Weights can be managed as easily as tanks in the Load Editor, thanks to the /MAX parameter on the ADD command, which specifies the maximum magnitude of the weight. The input then becomes a percentage of the maximum weight while the location is protected from being accidentally changed.

This feature is commonly used when GHS is packaged for shipboard use (as GHS Load Monitor or GLM).

If you use Load Editor to assemble load conditions, you might try John's suggestion. Simply append a /MAX:value to any ADD command. Then it will appear in Load Editor with an extra column on the right showing the editable percentage of the given maximum.

"Doesn't the VCG, at least, usually depend on the amount of the weight?" we asked John.

"Yes, of course. But usually the weight item is either there or not there, so the percentage is either zero or 100. Otherwise I don't use MAX."

"Are you aware of the /FREE parameter, John?"

"On the ADD command?"

"Yes. In addition to /MAX you can put /FREE VCG which will allow the VCG to be edited as well as the percentage of MAX."

"Thanks! I'll give that a try."

"By the way, how do you assemble your load conditions?" we inquired.

"I like to keep it simple. After setting the tank loads and fixed weights in Load Editor and checking it out, I store the condition on a file using the WRITE (LOADS) command. It's perfect for that purpose because any number of loading conditions can included in a single file."

Here is an example of what John was referring to where the current load case is appended to a file named CASES.RF:

"Then what do you do with that file?" we asked him.

"I use it to retrieve conditions and perform calculations on them -- using a CASE macro, of course."

So John is making use of the fact that when a file like CASES.RF is run, each loading condition executes a macro (which you must supply) called CASE.

For example, here is a minimal CASE macro:

Simply run CASES.RF, and whatever CASE does it will do for each load condition in the file:

"What if you want to ignore certain cases?" we asked John.

"Oh, that's easy," he said. "In fact I always have it ignore all but one case. Then I can select the case I want and get them in the final order I want."

"So you make use of 'the parameter' in the WRITE (LOADS) command?"

"That's right. Often I just use a number to tag the case, which keeps it simple."

There is a parameter option with the WRITE (LOADS) command which shows up as the parameter passed to CASE. For example, to tag a loading condition as "7" his WRITE command would be,

Then to select case 7 and ignore the others, his CASE macro would be,
IF "%1"<>"7" THEN EXIT

To take this a step further for added convenience, a variable would be used in place of the literal case-matching number:
IF "%1"<>"{C}" THEN EXIT



There was one final issue with the John Bonn method that we wondered about:

"When you have to make changes to a load condition in your file, isn't that a problem?"

"Not at all," he said. "Just capture the condition with the STOP command."

"The STOP command? There is no STOP command."

"Go back and look at your COW028."

"Okay, so you put a STOP to the RUN that's bringing in the conditions?"


IF "%1"<>"7" THEN EXIT

"Then I simply make the change and append the revised condition to the same file using a slightly different tag."

"That's very clever, John. We'll pass that idea along.

One more thing: did you notice the COW about the so-called Magnificent Interface?"

"Yes I did. Someday when I have more time I'll try it out. But I think there's more there than what I need. You guys should come up with something in between that elaborate interface and the basic commands."

"We're working on it."

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

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

Click here for an index to this and previous COWs