Computing the Cargo Force


Q: How can I compute the Cargo Forces on many points and how can I find the maxima for different periods and headings?
REV 7.01

A: The quickest way to do this is with loops. This file shows how to report forces for a set of points and how to report forces for each point for a set of environments. Basically, the sample is a sample of a loop within a loop. Briefly, the points are first defined and then a macro is used to loop on the point names. In the file the points are defined within the MEDIT menu. This section is labeled as "Define Report Pts". The points can also be defined as part of the body description in the data file. A variable, which is the list of points, is made after the points are generated. In this file a set of environments is generated with a loop. This section is labeled as "Devine env". After the environments are generated the frequency response menu is used for calculations and reporting. The rao's are computed outside the loop. The rest of the computations are done within the loops. The outer loop (using p as the index) uses the point names are first used to generate the response and force operators at the location of the point. This is done with the fr_point and fr_frcargo commands. The inner loop (using e as the index) uses the list of environment names to calculate and report the forces for each point-environment combination. Calculation of the cargo forces is done with the st_fcargo command. There is a section labeled "get max" where variables are set so that the user will have the data available to sort through. The command set_var is used to retrieve the data from the database and the command &set is used to save the maximum of the values calculated to that point. Once all the point names and the environment names have been exhausted the loops are closed. Be sure to close both loops. The final section is labels as "report". Here the maximum of the values collected earlier are printed to the screen and the log file.  There is a sample showing this. Please see the “loop” samples under the “how_to” section of the samples.