Marine Engineering Specialists -- Bentley Systems has acquired Ultramarine's MOSES Software [ Press Release ]
Using the &SURFACE Menu
This sample creates a panel model from several blocks. It is useful to get an idea of how the &SURFACE Menu works.

Most of our examples contain a common set of "beginning" commands as well as a common "ending" command. Click here to get documentation for these commands. They will not be discussed directly. The files which are discussed here are:

This file begins with the setting of several variables as is shown below.

   $
   $*********************************************      control parameters
   $
   &SET_VAR ANO   = -ANO YES
   &SET_VAR ANO   =
   &SET DEMO      = .FALSE.
   &SET_VAR ONE   = .TRUE.
   &SET_VAR TWO   = .TRUE.
   &SET_VAR THREE = .TRUE.
   &SET_VAR FOUR  = .TRUE.
   &SET_VAR FIVE  = .TRUE.
As the comment line suggests these variables are control parameters. It is easy to see that the variables on the left hand side of the equal sign are being set to the value on the right hand side. The first variable ANO is being set twice. The first time to -ANO YES and the second time the value -ANO YES is over written to a blank. The blank value is what will be saved. The next variable is set to .false. meaning that the pictures will not be sent to the screen. The rest of the variables are set to .TRUE.. The usefulness of these will become apparent when we discuss their use.

Sample files used to generate models begin by defining a Surface menu plotting macro. This macro is used in this sample as well as most of the other modeling samples. For a brief discussion on this macro click here.

The variable setting and the macro definition can be considered part of the set up procedure. In the following sets of commands we perform the actual modeling.

   $
   $*********************************************      generate
   $
   &SURFACE
All of the modeling will be done within the Surface menu. This menu is entered via the above command. Once within the Surface menu we can begin defining blocks, as is shown below.
   $
   $*********************************************      define two blocks
   $
   $
      BLOCK ONE
         PLANE 0 100 -RECT 0 20 90
      END BLOCK
      BLOCK TWO
         PLANE 25 75 -RECT  1  40 45
      END
The above commands can be grouped into two sets of three command lines. Each set of commands begins with the command BLOCK and a block name, ONE and TWO. These two sets of commands make two blocks one named ONE and the second named TWO. The cross section of both blocks is rectangular. Block one is 100 feet long, 20 feet tall and 90 feet wide. Two planes define the shape of the block, the first plane of this block is at X = 0 and the second plane is at X = 100. The second block, TWO, is 50 feet long, 39 feet tall and 45 feet wide. Again, two planes define the shape of the block, the first plane is at X = 25 and the second plane is at X = 75.

The dimensions of the rectangle are conveyed to the program by the command PLANE and the option -RECT. The two numbers after the command PLANE are the X coordinate of the two planes. The three numbers after the option -RECT are the Z coordinate of the bottom plane, the Z coordinate coordinate of the top plane, and the beam dimension. The dimensions have to be given in the order just described.

The two blocks just described are one long, squatty rectangle with a short tall rectangle in the middle. The following commands help with the visualization by using the plotting macro discussed earlier and form one block out of the two.

   $
   $*********************************************      combine
   $
      LIST_BLOCKS
      &TITLE ONE AND TWO  BEFORE
      SU_SHOW ONE TWO
      UNION ONE TWO ANS1
      &TITLE UNION ONE AND TWO
      SU_SHOW ANS1
The command LIST_BLOCKS simply gives a list of the blocks currently defined. This list will consist of two entries, ONE and TWO. After defining the title we use the macro SU_SHOW which was defined earlier. Here the plot produced will contain the blocks ONE and TWO. This plot will be channeled to the device file, in this case it is bblocks.gdv.

After producing a plot we create a third block called ANS1 which is the union of blocks ONE and TWO. We change the title and then we view the resulting block.

In the next set of commands we essentially perform the same tasks with a third block called THREE.

   $
   $*********************************************      add third block
   $
      BLOCK THREE
         PLANE 0 100 -RECT 30 70 90
      END
      &TITLE ANS1 AND THREE BEFORE
      SU_SHOW ANS1 THREE
      UNION ANS1 THREE ANS2
      &TITLE UNION ANS1 AND THREE
      SU_SHOW ANS2
The commands used in the above set are the same as those used earlier for blocks ONE and TWO, here the difference is that we are working with blocks ANS1 and THREE.

In the following set of commands we create a block named FOUR and use it to cut a hole out of our block called ANS2.

   $
   $*********************************************      cut hole
   $
      BLOCK FOUR
         PLANE 40 60 -RECT -10 100 20
      ENd
      LIST_BLOcKS
      &TITLE ANS2 AND FOUR BEFORE
      SU_SHOW ANS2 FOUR
      DIFFERENCE ANS2 FOUR ANS3
      &TITLE DIFFERENCE ANS2 AND THREE
      SU_SHOW ANS3
The only new command here is the command DIFFERENCE. Here we are cutting out block FOUR from block ANS2. Here one can think of the command DIFFERENCE as throwing away part of ANS2. Here the command DIFFERENCE "subtracts" the part of ANS2 inside FOUR and the remaining block becomes ANS3.

In the following set we find a difference between two blocks. However, here instead of cutting out a hole, we position the throw away section to be half of block ANS3.

   $
   $*********************************************      clip half
   $
      BLOCK FIVE
         PLANE 50 110 -RECT -5 200 200
      END
      LIST_BLOCKS
      &TITLE ANS3 AND FIVE BEFORE
      SU_SHOW ANS3 FIVE
      DIFFERENCE ANS3 FIVE ANS4
      &TITLE DIFFERENCE ANS3 AND FIVE
      SU_SHOW ANS4
All the commands used in the above section, used to create block ANS4, have been discussed earlier.

Finally to finish our model we emit ANS4 so that it is available as a MOSES model to be used in any hydro-dynamics/static analysis. The commands used to generating a data file which can later be used by MOSES are common to all models regardless of vessel type. These commands are discussed as part of the Command Common to Vessel Modeling, located here.

The file mod00001.txt contains a mesh suitable for use.