• Nie Znaleziono Wyników

An experimental integrated system for application of a computer in shipbuilding industry

N/A
N/A
Protected

Academic year: 2021

Share "An experimental integrated system for application of a computer in shipbuilding industry"

Copied!
160
0
0

Pełen tekst

(1)

wm\

Hi I i ill I II II I i I III liiiiii.iin o M ^ Ul O 00 O IN) 0» CD «O BIBLIOTHEEK TU Delft P 1969 5338

(2)

AN E X P E R I M E N T A L I N T E G R A T E D SYSTEM FOR A P P L I C A T I O N OF A C O M P U T E R IN S H I P B U I L D I N G I N D U S T R Y

(3)

AN EXPERIMENTAL INTEGRATED SYSTEM

FOR APPLICATION OF A COMPUTER IN

SHIPBUILDING INDUSTRY

PROEFSCHRIFT

TER V E R K R I J G I N G VAN DE G R A A D VAN DOCTOR IN DE T E C H N I S C H E WETENSCHAPPEN AAN DE T E C H N I S C H E

HOGESCHOOL DELFT, OP GEZAG VAN DE RECTOR M A G N I F I C U S IR. H. R. VAN NAUTA LEMKE, H O O G L E R A A R IN DE A F D E L I N G

DER E L E K T R O T E C H N I E K

VOOR EEN COMMISSIE UIT DE SENAAT TE V E R D E D I G E N OP WOENSDAG 30 SEPTEMBER 1970 TE 14.00 UUR

DOOR

ALBERT REINDER BAKKER D O C T O R A N D U S WIS- EN N A T U U R K U N D E

GEBOREN TE A M S T E R D A M

(4)

Dit proefschrift is goedgekeurd door de promotor Prof. Dr. E. van Spiegel.

(5)
(6)

CONTENTS

1. INTRODUCTION 9 2. FIELDS FOR COMPUTER APPLICATIONS IN SHIPBUILDING . . . . 11

2.0. General 11 2.1. Design of ship form 11

2.2. Hydrostatic calculations 12 2.3. Workshop preparation 14 2.4. Automation of drawing work 15 2.5. Numerical control ' 16

3. PRESENT SITUATION OFCOMPUTERAPPLICATIONS IN SHIPBUILDING 18 4. REQUIREMENTS FOR A SMOOTH COMMUNICATION BETWEEN

SHIPBUILDER AND COMPUTER 21

4.0. General 21 4.1. Description of curves 22

4.2. Description of lists 23 4.3. Insertion of formulae 24 4.4. User's own calculations 24 4.5. Identification of results 25 4.6. Check on input data 25 5. REPRESENTATION OF CURVES 27

5.0. General 27 5.1. Generation of gensplines 29

5.2. Genspline intersection with a straight line 34

5.3. Intersection of two gensplines 40 5.4. Calculation of area and moments 42 5.5. Smoothness check at measured points on a curve 44

6. DESCRIPTION OF A SURFACE 50

6.0. General 50 6.1. Representation of a surface 52

6.2. Calculation of volume and moments 66 7. PROPOSED COMMUNICATION LANGUAGE CALS 69

7.0. General 69 7.1. Basic symbols, delimiters, identifiers, numbers, strings 70

7.2. Quantities, expressions, variables, curve interpolators, labels, function

design-ators 71 7.3. Arithmetic expressions, relations 73

7.4. Statements 74 7.4.0. General, compound statements and blocks 74

7.4.1. Assignment statements 75 7.4.2. Goto statements 75 7.4.3. Dummy statements 75 7.4.4. List generator 75 7.4.5. For statements 76 7.4.6. Conditional statements 76 7.4.7. Procedure statements 77 7.4.8. Output statements 77

(7)

7.4.9. Output identifying statements 78 7.4.10. Curve generating statements 78 7.4.11. Surface specifying statements 80 7.4.12. Shell specifying statements 82 7.4.13. Calculation specifying statements Y^. . . 82

7.5. Declarations 84 Appendix to chapter 7; example of a CALS program 85

8. AN EXPERIMENTAL COMPILER FOR CALS 88

8.0. General 88 8 I. Input collection phase 90

8.2. Construction of identifierlist 91 8.3. Type determination 98 8.4. Construction of object program 98

8.5. Filling up forward references 101

8.6. Execution phase 101 Appendix to chapter 8; error messages of the compiler 102

9. STANDARD CALCULATIONS 105

9.0. General 105 9.1. Calculation of Bonjean curves 105

9.2. Hydrostatic curves calculation 105 9.3. Inclined stability calculation 109 9.4. Smoothing of hull shape 113 9.5. Shell-plate development 136 9.6. Damage stability calculation 144 10. FUTURE DEVELOPMENTS 150 10.0. General . 150 10.1. Communication language 150 10.2. Graphic information 151 10.3. Interactive design 151 10.4. Design optimisation 152 10.5. Private calculations 152 11. VOCABULARY • . . . 153 12. LIST OF REFERENCES 154 13. SUMMARY IN DUTCH 155 14. SUMMARY 156

(8)

1. I N T R O D U C T I O N

In trying to introduce the use of an electronic computer into an application

area several problems are met. The most important among them are probably the communication difficulties and the fact that the generally accepted methods are not very well suited for automatic computation. The introduction of a computer reduces the direct impact of the practical man on the procedure, forcing him not only to rely on specialists to prepare his calculations for the computer, but also to accept the fact that the way in which the computer solves his problems is for him no more than the operation of a black box.

Clearly, these facts will impede the successful introduction of a computer. The current general use of high level programming languages permits a better understanding of the algorithms used to solve practical problems by means of a computer, and we can expect that the introduction of high level languages into the educational programmes of technical institutes will reduce the amount of suspicion against the computer. The communication problem on the level of job specification still exists when computations on complicated input data have to be performed. This effect exists in many fields of application; this thesis, how-ever, will deal only with the situation in the shipbuilding industry. Although there has been a fast development in the use of a computer for shipbuilding calculations, there is not yet available an integrated system in which the prac-tical shipbuilder can communicate with the computer in a way with which he is familiar.

Programs do exist for performing calculations about the ship, but most of these are stand-alone systems in which at least for complicated shapes, the input has to be provided in a rather complicated way, not similar to the prac-tical situation at the yard or in the design office. In practice, the preparation of the input data is done mostly by specialists in computer centres. In this way, the computer centre is employed only as a subcontractor for some phases of the job of constructing a ship, and an integral use of the computer is impossible.

In this thesis the problems of better communication with the computer for use in shipbuilding will be discussed.

A problem oriented language CALS for communication on shipbuilding cal-culations is proposed. In this language the situation in practical shipbuilding is adhered to as far as possible; for example the existing terminology can be applied. Of course the shipbuilder will have to adapt himself to some extent to the system, but these adaptations are kept to a minimum and where a choice has to be made between difficulties for the system builder or for the shipbuilder, it is resolved in favour of the latter.

For this language, which to some extent resembles ALGOL 60, an experimental compiler has been developed and checked on the CDC 3300 of the NSMB (NETHER-LANDS SHIP MODEL BASIN). It is worth noting that the use of ALGOL 60 in formulating the compiler makes the system, with some minor adaptations, available for use with many other computers.

(9)

In addition to a communication language, a new method for the description of curves and surfaces is introduced, and new techniques for the technical calculations are presented. The curves are represented by 'gensplines' (gener-alised splines), which are segments of cubic curves referred to a local coordinate system having one of its axes along the chord. These gensplines, having in general continuous slope and curvature at the given points, are invariant for rotation, and are well adapted for representing the curves occurring in ship-building, which include even many-valued functions. Facilities are provided to indicate knuckles and straight portions. A part of these techniques has already been applied in the xl programset of the NSMB, which has been used for some years now with very satisfactory results for hundreds of ship calculations in a data centre environment.

It is expected that the use of a description method such as that described here will reduce the work preparation for the computer to perform the required cal-culations by a factor of about 3, while even more time can be saved by the fact that the technician can communicate himself without the direct interference of some magic computer man. This enables the naval architect to deal with various modifications of the same design in an early stage, and, after decision in favour of a modification, allows for a very fast preparation of the workshop operation and the steel plate ordering. In this way the production time of a ship can be improved, because it is in the early stages often dependent on these activities.

The system described here is essentially open ended in two senses. On one hand, the set of standard calculations can be extended very easily; on the other hand, extensions of the language which prove to be desirable can be imple -mented simply, because the compiler itself is written in a high level language, and is constructed modularly, with good facilities for extension. The set up of the compiler is well-adapted to a future extension to a conversational use of the system.

(10)

2. F I E L D S F O R C O M P U T E R A P P L I C A T I O N S I N S H I P B U I L D I N G

2.0. GENERAL

In considering the possibilities of taking advantage of the capabilities of an electronic computer it is desirable to impose certain restrictions.

In the first place only those applications will be discussed which are specific to the shipbuilding industry, so that applications of the computer for planning, payroll calculations, stock control etc. will not be discussed.

The second main restriction arises from the fact that the application is now in some stage of realisation. Only those aspects will be considered from which practical results can be expected in the near future. Thus, for instance, the design of the hull shape be means of graphical displays is not considered; in ch. 10 however some speculations are made with regard to future developments. An attempt has been made to treat the applications in a logical rather than in a chronological order. Thus, starting from the design of the hull, first the hydrostatic calculations are considered, next the automation of work in the drawing office, and then the work preparation for the yard. Finally, the possi-bilities of the application of numerical control in the ships' construction phase are dealt with.

This chapter is the first of three which serve to indicate the possibilities, restrictions and requirements.

2.1. DESIGN OF SHIP FORM

Until now, the design of a ship has been a process in which much experience and personal judgement have been applied to the requirements of the ship owner and of the classification societies to produce a rather arbitrary solution. Since in general but little time is available, and the preliminary design process is rather time consuming, very few different propositions can be considered. This is a very unsatisfactory situation, since it is known that modifications in the design can either reduce construction cost or improve performance considerably.

In general, there is no reason to suppose that in the usual way the best design is obtained. This is especially true for unusual hull shapes or dimensions (e.g. big tankers).

It is obvious that efforts will have been made to take advantage of the power of a computer in this process.

There exist several approaches to the problem;

a. Starting from a mathematical formula for the ships' hull which contains as parameters the form parameters of the ship (such as length-beam ratio, beam-draft ratio, block coefficient etc.), the computer is used to produce, for a given set of form parameters, the table of offsets or a plot of the corresponding hull shape, together with the required characteristic data. A typical example is the standard 60-series.

(11)

b. The preceeding method can be extended by a set of empirical formulae for the resistance, steelweight, propulsion power, fuel consumption etc., after which an optimization technique can be applied to optimize construction cost, exploitation cost, or some other criterion, within the restrictions given by the ship owner.

c. The employment has also been attempted of a method such as that described under b. for ships within a certain class, e.g. trawlers, tankers or coasters, without exact formulation of the hull shape, but specifying the form only by means of the form parameters, leaving the choice of the actual shape (within the restrictions of the form parameters) to the naval architect.

d. A quite different approach is that of optimizing the inner structure of a given hull shape with respect to the rules of some classification society. In this application, the classification society DET NORSKE VERITAS is especially active, and LLOYDS REGISTER is also working on the problem. This optimization process can yield considerable savings e.g. by choosing other frame spacings. e. Worthy of mention as an example of practical initiative in this field is a

method used by the iHC yards for the design within a special class of ships, the hoppers vessels. They arrive at a new hull design starting from an existing well-faired fore body, and a non-corresponding well-faired after body. These portions are transformed, and connected by a parallel middlebody, to obtain the new hull design. The method was developed first for desk calculators and subsequently adapted to a computer.

None of the approaches mentioned gives a solution to the entire problem. A combination of methods b. or c. with d. could give a reasonable optimization of the ship design. This approach, however, will require a considerable amount of computer power.

2.2. HYDROSTATIC CALCULATIONS

The hydrostatic calculations are historically the first calculations used in shipbuilding. The following calculations are commonly used.

a. Calculation of Bonjean curves or curves of sectional moments and areas as a function of the draught. These quantities were formerly often found by means of a planimeter; they served as basic material for the calculation of displacement and the related moments for the ship in upright position and the tank capacity calculations. In the present situation this calculation is of no further use, since modern computer programs work according to other prin-ciples; nevertheless, it is still required by many shipowners and so by the ship-yards.

b Calculation of hydrostatic curves for the ship in upright position, as a function of the draught; basically, the displacement with the corresponding centre of buoyancy, waterline area, and moments of inertia, have to be calcu-lated. In practice many derived quantities have to be calculated as well. Among the required quantities there are still some which were formerly required as intermediate steps in manual calculations, e.g. the calculation of waterline area.

(12)

c. Trim calculation and launching calculation.

These calculations are mainly concerned with the calculation of displacement and moments in trimmed upright position; also the initial stability data are required. For the trim calculation the data about the ship for a range of trim and weight situations have to be calculated. For the launching calculation the be-haviour of the ship while travelling along the launching way has to be deter-mined; this includes the calculation of equilibrium as soon as the lifting at the end of the launching way begins.

d. Inclined stability calculation.

This calculation deals with the stability of the ship for a series of weights and a series of angles of heel.

Principally, the calculation of the displacement and moments is required for given draught and angle of heel. A number of methods for manual calculations iias been derived, all of questionable accuracy, especially for larger angles of heel (more details are given in section 9.3.).

e. Damage stability calculation.

This calculation is concerned with the behaviour of a ship in damaged condition, some portions of the ship being open to the sea. Basically there are two variants:

I. calculation of the equilibrium position.

II. calculation of the analogue of d, now taking into account the damaged compartments and longitudinal equihbrium.

Both calculations basically require the computation of displacement and moments for given draught, trim and angle of heel, and some search process to determine the required position.

In naval architecture a basic distinction is always drawn between two methods of solution:

I. added mass method, in which the ships' weight is increased by the weight of the water in the flooded compartments.

II. the lost buoyancy method, in which the displacement is decreased by the displacement of the flooded compartments.

This may be an interesting discussion point for naval architects; mathema-tically formulated, the equilibrium relationships must be satisfied, and it is of no importance at which side of the equals sign a certain quantity is placed.

It is fundamental to any method of solution that the situation is considered to be quasi-static.

f. Calculation of shear force and bending moments to which a ship is subjected when positioned in a wave.

In this calculation a ship with a certain loading condition has to be positioned in equilibrium within a wave (normally considered to be of trochoidal shape).

The calculation requires computation of displacement and moments for a ship in trimmed position while the surface of the water has the shape of the wave. Furthermore, from the curve of sectional area the shear force and bending moment have to be calculated along the ships' length.

(13)

g. Tank capacity calculations.

These calculations should produce tables of the contents of a tank as a function of the liquid level either measured through a sounding tube or from an ullage point.

Apart from the fact that each shipowner requires his own layout and quantities, this calculation is similar to a stripped calculation of hydrostatic curves.

It will be clear from the preceeding that in all hydrostatic ship calculations we are concerned with the calculation of volume and moments of a ship or one of its compartments and the calculation of characteristics of some cross-sections. The part of the ship considered, and its position, varies for the different calcu-lations.

2.3. WORKSHOP PREPARATION

After a ship has been designed, the hydrostatic calculations have to be per-formed to check the design in detail and to supply reference data for the hand-ling of the ship, and the preparation of the actual construction work has to be done.

The most critical process, in the sense that it should precede many other processes, is the detailed fairing of the ship's hull and the production of the table of offsets.

The design of the ship's hull is described by a drawing on a small scale (typically 1:50 or 1:100); on this drawing a number of cross-sections will have been faired. The purpose of the drawing is to describe the hull to a level of detail which enables displacement-check and towing-tank tests to be made, and gives a good impression of what the ship will look like. For the actual con-struction a more accurate description is required.

Formerly this detailed fairing of the hull form was done on the loft floor, where the frames of the ship, a number of waterlines, buttocks, and often also diagonals were faired at full size by means of splines. These splines-thin wood-en bars - were first fixed by loads at points determined by measuremwood-ents from the small scale drawing, and then faired by lifting the loads successively.

When ships became very big, the full size fairing on the loft floor was re-placed in most yards by very accurate fairing on the scale 1:10; fundamentally, nothing else in the process was changed. It is obvious that automation of this process is very important, and indeed many people have tried to find solutions, as will be reported in chapter 3. There is a basic difference here, however, from the calculations mentioned in section 2.2, where the shape was fixed and charac-teristics had to be calculated; here, the shape should be modified to obtain a well-faired hull.

Another very important phase in ship construction is the determination of the outline of the flat plates which, after bending and appropriate elongation, yield the shell-plates. The process is called shell-plate development.

(14)

Formerly this was done by means of cross moulds, on the mould-loft floor. This method is time-consuming and costly; moreover, the steel plates often had to be ordered from the steel-mill before the shell-plate development had been finished, and a rough estimate of the required rectangle had to be used instead of an accurate one, thus increasing the cost of the ship.

An accurate boundary between workshop preparation and the automation of drawing work is difficult to define. The automation of the fairing of the hull can indeed be done without drawing, but for the shell-plate development many yards insist upon a drawing of the plate as a condition of accepting automation for this type of work, since optically controlled flame cutting machines are still being used. The plates are defined in general by four boundary lines on the hull surface, these lines being given on the loft floor.

2.4. AUTOMATION OF DRAWING WORK

The calculation work that has to be done in the ship-yard and design office requires relatively few man-hours as compared with the large amount of drawing work required. It is therefore attractive to consider the possibility of saving cost by automating this work.

The drawing work can be divided into a number of activities, some of which can be automated relatively easily while others appear to present more serious problems. The drawing activities discussed here are those leading to drawings which perform a function in the process of constructing a ship. For this reason, drawings made only to check computer activities or input data for a computer are not considered; while these activities can sometimes be performed with relatively inaccurate representations, the others in general need a very high accuracy (typically 0.1 mm) and a very good line quality.

Amongst the activities considered are:

a. drawing of the faired cross-sections of the hull, mainly the construction frames.

b. drawing of the developed shell-plates.

c. drawing of flat construction parts, in general after nesting. d. drawing of general plan and classification drawings. e. steelwork drawing.

This list is by no means exhaustive. It is meant to give some indication of the type of drawing work existing in the ship-yard.

The drawings mentioned at a. serve as a reference for all construction parts adjacent to the hull. They are a source of information for the drawings men-tioned at b. and c.

The drawing of the shell-plates is used in general as the input for an optically controlled flame cutting machine, so that the quality of the Une is very critical. The flat construction parts of the ship often have a structure as indicated in figure 2.4.1. where the boundaries are determined from hull, decks etc. and the cut-outs are necessary for stiffeners, frames, seams, pipings, manholes etc. In general these holes have well described dimensions and the drawing work is

(15)

o o

FiG. 2.4.1. Example of a flat plate of the inner structure of a ship.

merely the gathering of measures from other drawings, after which the required drawing can be constructed without much initiative on the part of the draughts-man. Since this activity is basically the fast and accurate handling of much information it is very well suited for automation by means of a computer. The efficient arrangement of may flat parts within one steel plate (the nesting problem) is, however, very complicated, and no acceptable automation pro-cedure has yet been found.

The activities mentioned at d. and e. are in general basically concerned with representations of data about the ship's structure, of a kind which can be stored in a computer. The fact that the drawings give many details and much annotation can cause some difficulty; perhaps a more serious problem, however, is the fact that the shipbuilding industry strongly adheres to conventions of line thickness and lay-out.

The introduction of automatic drawing work in the ship-yard may be expected to occur only gradually, and mainly in the bigger yards that can afford the necessary investments. To arrive at a good exploitation of the opportunities of automation in this field, it is desirable to have some central development and research points in various parts of the world, with a number of experimental application teams in practical shipbuilding.

2.5. NUMERICAL CONTROL

Apart from the control of drawing machines, numerical control can be applied in shipbuilding to the flame cutting of steel plates. At the moment most of the bigger yards use optically controlled cutting machines.

As soon as the automatic drawing of the control drawings for the optical cutting machine is realized, there is no basic difficulty in controlling the cutting machine in a similar way. It is then only a matter of economics to decide whether numerical control will be implemented or not.

Another possibility is the application of numerical control to the bending of frames. The main problem here is the elasticity of the frames. This problem has not yet been solved satisfactorily.

Since these numerical control appHcations offer no basically new problems once the drawing work already mentioned has been automated, they are not considered further.

The acceptance of numerical control in the yards proceeds only at a very slow pace. Only a small number of installations have become operational

(16)

during the past few years. This is not in first instance caused by technologica or computational difficulties; it is mainly a financial and a communication problem. This communication problem exists also for the automation of drawing work, and will be treated in other chapters.

(17)

3. P R E S E N T S I T U A T I O N O F C O M P U T E R A P P L I C A T I O N S I N S H I P B U I L D I N G

Since manual calculations have been used in shipbuilding for many years, for example in the calculation of hydrostatic curves, it might be expected that the electronic computer could be employed in this application with much ad-vantage. The first practical use of a computer in this area, however, occurred as late as 1956, when the DANISH SHIP RESEARCH INSTITUTE (DSRI) introduced the

DASK computer for this type of activity.

The late start of automatic computation in shipbuilding can probably be explained by:

a. the rather complicated structure of the calculations;

b. the interaction between computational and graphical methods;

c. the lack of contacts with application areas where the computer was already accepted as a tool for practical calculation work;

d. the decentralized execution of these calculations, in each ship-yard at most a dozen a year, which did not justify their automation for a single yard. The DSRI started with programs for the calculation of hydrostatic curves and Bonjean curves. The programs required as input half breadths at a grid of waterlines and sections chosen in such a way that SIMPSONS rule could be applied. Programs for stability and trim calculation were subsequently developed, followed by programs for damage stability calculation.

In 1960 the NETHERLANDS SHIP MODEL BASIN founded its computer centre

for shipbuilding and shipping, equipped in 1961 with an xl and in 1967 with a CDC 3300. In this centre, programs for the normal hydrostatic calculations about the ship's hull were developed in which an attempt was made to restrict the effort required of the shipbuilder in communicating with the system. For example, a common requirement in describing a hull form in a computer - that all sections employed shall be equidistant - was eliminated so that the available sections, of the ship could be used in describing the hull form.

The fewer the restrictions on the input, the more complicated the computer program will be. As a consequence of this, and of the rather poor performance of the x l , the programs developed had to be written in machine code in order to arrive at an economically justifiable processingtime. This fact, which was also true for at least the earlier programs of the DSRI, restricted the use of the programs to particular computers, and was a serious restriction on in-house computing at the ship-yards and design offices.

In addition to automation of the hydrostatic calculations, the automatic preparation of the table of offsets starting from a small scale linesplan was also considered. Many people made contributions in this field, among whom may be noted W. H. RÖSINGH and J. BERGHUIS [I]; P. C. PIEN [2]; J. E. KERWIN [3];

F. THEILHEIMER and W. STARKWEATHER [4]; A. F. HARLOFF [5]; J. G. HAYES [6]; F. TAYLOR [7]; and N. S. MILLER and C. Kuo [8].

(18)

because of difficulties encountered in attempting to apply the methods to prac-tical ship forms, most of the methods described by these authors were not developed further until a program for practical production runs became available. (It is remarkable to notice how many articles in literature show only results for the fore body of the ship that has an easy shape while the after body causes in general the difficulties.)

At the NSMB, a computer program for the fairing of shiplines was brought into use for production in 1963, and is still in operation. Although this program is succesful, its use is restricted to ships which are not too 'fine' ships and at even keel, and the input data sheets are not compatible with the input data for hydrostatic calculations. Similar programs have been used at other institutes. An early example is that of BULL at Amsterdam, although this activity was subsequently discontinued, and some ship-yards have developed or used pro-grams for their own computers.

The introduction of numerical control for flame cutting machines mainly in Scandinavia brought with it the development of simple languages to describe for the computer the plates to be cut (the best known example is the AUTOKON

system [9]). Since the control unit for a flame cutting machine can also be used to control a drawing machine, there is emerging, as a by-product of this activity, the automation of certain types of drawing work. Numerically controllable drawing machines can be used to prepare drawings for optically controlled flame cutting machines. This enables the ship-yards to avoid investment in numerically controlled cutting machines by pooling the drawing work, e.g. in the computer centre.

At the NSMB a big drawing machine was installed in 1964 to make drawings of plates described in an AuTOKON-like language, faired bodyplans on a required scale, e.g. 1:10 and diagrams of hydrostatic calculations.

Numerical control activity in the UK was started in 1962 by BRITISH OXYGEN

COMPANY in cooperation with FERRANTI. AS far as I know it resulted only in two experimental installations.

After successful application of the computer for the fairing of the hull shape had been achieved, a combination of Dutch yards sponsored a study of the automation of shell-plate development by means of a computer with an off-line drawing machine. This study resulted in a computer program which could furnish the required results at an economical price, but the input data for the program differed considerably from those for the other applications mentioned. By 1967 there existed at the NSMB a satisfactory set of programs, written in machine code of the x l , with different sets of input data for the various cal-culations. At the other computer centres the situation was no better, and the restrictions on the input were often more serious than at the NSMB. In the mean-time the ship-yards, being reluctant to prepare the input data themselves, had forced the computer centres to prepare the input from available drawings as a part of their service. In this way, the computer centres acted as normal subcontractors, and the computer was not really incorporated in the ship-building process. Since this situation was quite unacceptable the NSMB decided

(19)

to install a bigger computer (CDC 3300) for which a consistent system of ship-building programs would be developed. To permit a more general and inte-grated use of the computer, it was decided that the system should be formulated in a high level language, and should be well adapted the needs of the ship-yard user.

As far as I know the NSMB is ihe only place where such a system is under devel-opment; this thesis serves to give more wide-spread publicity to it, and will, I hope, also lead to an increase and coordination of efforts in the field of auto-mation in the ship-yard.

(20)

4. R E Q U I R E M E N T S F O R A S M O O T H C O M M U N I C A T I O N B E T W E E N S H I P B U I L D E R A N D C O M P U T E R

4.0. GENERAL

To allow the shipbuilder to use a computer it is unavoidable that he should give some information about his problem to the computer. At present this is in general done by filling up sets of forms, which are then sent to the computer centre either within the yard or outside. The shape of the forms and the method of description of the hull are more adapted to the computer than to the ship-builder. In practice, the filling up of the forms was such a serious restriction on the use of the computer that the computer centres were forced to accept as orders drawings of the ship with some description of the required computations, and had to hire people to fill up the forms in the computer centre.

The main problems are:

a. The forms contain only sets of numbers. For a practical shipbuilder these are difficult to understand; for this reason, the shipbuilder should be allowed to use identifiers he is familiar with.

b. The necessity of supplementing the existing drawings with additional cross-sections. It is difficult for a shipbuilder to understand that the computer, of which he always hears such impressive stories, is not able to do the job with the normal information. For this reason a good system should use all or part of the existing information about the ship.

c. It is a normal human convention to omit the value of some quantity when it is standard. The existing programs in general require the full specification of all quantities. A system adapted to the user should have facilities of this type; for example, unless otherwise stated the specific gravity of the water should be taken to be 1.025, and the Bonjean curve calculation is required for the 21 standard sections.

d. The computer programs for the various calculations do not form an inte-grated system, because the way in which the ship has to be described differs for the various calculations. For example the input data for hydrostatic cal-culations and shell-plate development may differ to such an extent that the preparation of a full set of input data is required for each class of calculations.

Although perhaps difficult to believe, this is the situation as it exists at present in most computer centres for shipbuilding calculations. This effect can be ex-plained by the rather poor facilities offered by the computers available when the programs were developed. Nowadays however, computer facilities such as mass storage, fast floating-point arithmetic and the high level programming languages, together with the experience gained in setting up large computer systems, permit the design of a more integrated system.

e. For hull shapes deviating from the normal form, e.g. hopper vessels, catamarans, trawlers with a slipway, tankers with a pronounced bulbous bow, it is at present necessary to know the computation technique used in the pro-gram in order to be able to use it without too much input data.

(21)

f. Sometimes adaptations of the standard programs to special situations are desirable but difficult to realize, because most programs are written very ingeniously in machine code to achieve optimum performance. It is clearly desirable to have the programs of an integrated system written in a high level language.

g. The computer input is prepared from lists which are often filled up by spe-cialists in the computer centre, and which have no obvious relationship to the structure described, so that there always remains some doubt as to the reliability of the results. This disadvantage can be removed by the introduction of a graphic check on the input by means of a plotter, whose output is attached as a standard procedure to the results.

The following general requirements can be listed:

a. Avoid counting items in a list. This often causes errors when done by human beings, and is better left to the computer.

b. Allow for the use of identifiers of virtually unlimited length, to permit the use of normal shipbuilding terms.

At least in the early stages of the use of the system, this reduces the reluc-tance of the practical man; on becoming acquainted with the system, he will realize the drawbacks of long identifiers, and will automatically start to use abbreviations.

c. Allow for the use of mathematical expressions. Even very simple compu-tations such as '500 mm in front of frame 53' cause many errors. Such cal-culations should be done by the computer.

d. Allow for the use of the same identifier with different meanings in different components of the ship. This is a normal situation for a shipbuilder, who will use the notation 'frame 63' for both the frame of the hull and the super-structure at that length coordinate, and even for a cross-section of a tank. e. The input data should be represented in a way which permits rapid insertions

and corrections if necessary. For this purpose, either a file in a conversational time-sharing system or a deck of punched cards will do. If punched cards are used, the system should place the cards logically in order of cardnumber.

It is clear that these requirements will increase the amount of effort necessary to design and construct the system. This effort, however, will reduce the man-hours needed to communicate with the system for each ship, and will make the introduction of the system much easier.

4.1. D E S C R I P T I O N OF CURVES

When describing curves to the computer it is required to represent them by a set of coordinate pairs. The measuring of these coordenates is time-consuming, error-prone and unpopular, so the number of points on a curve should be kept as small as possible. For this reason, measuring at a grid of coordinates that are situated in a number of regions with equal steps is not recommendable. More-over it should be possible to indicate knuckles and straight portions. The shape

(22)

of the intersection of the plane of a two-dimensional curve with a deck should be added by the system when the position of the deck is known.

Since the coordinates are measured from a drawing in some scale with in-accuracies due to extension or shrinkage of the drawing material, scale factors have to be applied to find the correct measures from the measurements. As a convention, literal values for a coordinate are interpreted as measurements and are multiplied by the current value (dependent on the compartment under con-sideration) of the appropriate scale factor. If a literal value happens to be full size, (which hardly ever occurs), it should be multiplied by the quantity M to indicate it is a full size measure.

It should be possible to indicate special points in a curve without extra work for normal points.

It should be possible to describe 3-dimensional curves either by a number of triplets of coordinates or by two projections.

If a curve is specified by one coordinate only, as for example a normal butt by one length coordinate, it should be sufficient to supply only this coordinate. If a point on a plane curve is defined as the intersection of the plane of the curve with some other curve, it should be sufficient to state only the name of the curve to indicate the intersection point; e.g., if a chine has been specified as a space curve with name CHI, the point of this chine on a section can be described by CHI.

It should be possible to interpolate on curves and to use the interpolated value in expressions. Since the curves in shipbuilding in general are many-valued, it should be possible to indicate which solution is meant; for 3-dimen-sional curves also a projection indication should be possible. Since curves are given with reference to some system of axes it should be possible to perform both the normal and the inverse interpolation.

4.2. DESCRIPTION OF LISTS

In the description of the shipform and the specification of the required cal-culations we often have to deal with lists of values. These lists can be described by one-dimensional arrays in which another quantity, the number, is associated with each value. These numbers need not to be integers. An example is the list of frames described by the length coordinates and the associated numbers.In the parallel middlebody of a tanker the increment of the number is 0.25, for ships with ice stiffness the increment of the number near the stem is 0.5. It is required that the simple situation where the number is not important, or is simply the sequence number, can be described in a simple way.

Writing out all the elements of a list in full is to be avoided. Not only is this an error-prone activity, but, even more serious, the errors are of a type which will generally not show up until results are obtained which appear to refer to situations other than that required.

(23)

4.3. INSERTION OF FORMULAE

During the preparation of input data for ship calculations small calculations often have to be performed, such as the conversion of British to metric units, the calculation of points on a stern profile, the determination of some coordinate in the reference coordinate system from the data on a drawing.

In general, these calculations are very simple; nevertheless there is an evident need for the use of:

the normal arithmetic operations -\ X / some standard functions such as SIN, COS, SQRT

the use of simple variables, list elements and interpolated values of functions. These requirements, together with the use of parentheses, require the avail-ability of a rather general arithmetic expression.

In addition to the quantities defined by the user himself, it is necessary that certain standard quantities be already known to the system, in the same way as the standard functions.

These quantities are: M for meter

MM for millimeter FT for foot INCH for inch.

This list should be open-ended.

4.4. USER 'S OWN CALCULATIONS

In addition to the facilities for dealing with arithmetic expressions, a useful feature is some type of output facility. This will enable the user to output certain intermediate quantities which may be relevant in checking the input data.

As soon as both arithmetic expressions and output facilities are available, it is only a small step for the user to perform his own calculations in addition to the standard ones incorporated in the system.

The need then becomes apparent for enabling the user to define his own functions to the system.

The facility of decribing his own calculations within the system permits a user who is familiar with the system to perform his own calculations without needing to know another programming language.

When extending the set of standard functions by the addition of functions which provide the user with the volume and moments of a compartment of the ship in a given situation, we even furnish a means to describe in a simple way calculations of which the description in ALGOL 60 or FORTRAN is too difficult for the shipbuilder who has no experience in programming.

It is acceptable that facilities for the user's own calculations may be less in some sense than those of ALGOL 60 or FORTRAN, as can be seen from the success

of the language BASIC; special facilities for the shipbuilder are of more impor-tance than e.g. multidimensional arrays.

(24)

4.5. IDENTIFICATION OF RESULTS

One of the major problems in working with the results of automatic compu-tation is the uncertainity about the effects taken into account in the computa-tion.

As to the methods applied, this can be solved by a good documentation of the method and a good instruction of the users.

As to the description of the ship, this can be done by reproduction of the input data; these, however, have until now been difficult for the users of the results to understand. An attempt has therefore been made to supply sufficient information on the cover page of the results. If this is done manually after finishing the calculations, it is an error-prone activity, and may cause very serious faults in evaluating the results; for this reason it should be done auto-matically.

As a part of the description of the ship, it should be possible to give the name and type of the ship and the name and address of the customer who ordered the calculation. Furthermore, it should be possible to give, within the input data, comment to be placed on the cover page. The main characteristics of the ship and the calculations should be extracted automatically from the input data and placed on the cover page e.g. LBP, BM, contributing components with the cor-responding shell allowance.

As a standard, the input data should be printed and attached to the results as well as a plot of the shape of the various components of the ship.

4.6. CHECK ON INPUT DATA

A basic requirement for a fruitful application of a computer in an application where the input is rather complex is a thorough check on the input data. For shipbuilding, the checks can be divided into the following groups:

a. Check on syntax.

Since the input data will be according to some coding method, probably a problem oriented language, there should be thorough check whether the source text offered to the system satisfies the syntactical rules. If not, a clear remark should be given by the system indicating the type of the error and the place in the input where it was recognized. The syntax testing of the input should then be resumed as far as this is possible, to allow for as many error detections as possible in one computer run.

b. Check on mutual practical consistency.

Since the input data is known to refer to a ship, the reasonability of various quantities and their mutual relationships can be checked. This type of check will sometimes cause only a warning of the system, rather than an error message, because some very strange hull shapes do indeed exist e.g. a catamaran. c. Check on the smoothness of a curve.

The system should check the smoothness of the curves between the special points where e.g. knuckles can be found. This check can work with a certain

(25)

tolerance depending on the main dimensions of the ship and the number of points used for the check.

Basically, the check should take into account the difference between the point actually supplied and an estimate found from surrounding points. If the differ-ence measured in a direction normal to the curve exceeds the appropriate tolerance, an error message should be given.

d. Graphic check.

The best overall check on the input data describing the shape of the various components of the ship is a drawing of a number of cross-sections and the out-line. Since these drawings are intended only for checking purposes, no extreme quality is required; they can be produced by a simple plotter. These plots should, of course contain sufficient identification information.

In addition to these checks on the input, checks on the results are also required.

These checks account for a considerable part of the effort spent in construct-ing a system for shipbuildconstruct-ing applications on a computer. Nevertheless, this effort is quite justified when it is borne in mind that much trouble can arise if the results of the calculations for quantities such as displacement, launching, stability and strength are wrong.

(26)

5. R E P R E S E N T A T I O N O F C U R V E S

5.0. GENERAL

To be able to perform automatic computation about ship forms it is clearly a basic requirement to be able to represent curves numerically. This requirement of course exists also in many other applications; in naval architecture, however, the curves have some unpleasant characteristics, such as the occurrence of straight portions and knuckles.

Long before the existence of digital computers, interpolation on curves was already being performed numerically, usually on a set of equidistant points; the interpolated values were in general calculated by means of finite differences. If the points were not equidistant, divided differences could be applied. Basically, these difference methods used approximations to the curve by means of polyno-mial segments of some degree. The first computer programs for shipbuilding applications did in fact use polynomial arcs of degree 2.

There are three evident disadvantages in using parabolic segments at equi-distant points:

a. The representation of the curve is not invariant for rotation; moreover only single-valued curves can be dealt with. This causes problems when the ship is placed in inclined position, when many-valued functions are very often found (fig. 5.0.1.).

wL FIG. 5.0.1. Example of an inclined section where a waterline has four intersection points.

b. Accurate representation of curves with straight portions and knuckles may be difficult if the points should be equidistant. Moreover the points may be chosen equidistant in some position, but after rotation the equidistancy is disturbed.

c. At given points the interpolated curve has no continuous slope which is in contrast to the desired situation.

The problem mentioned under b. can be solved simply when using an auto-matic computer by allowing the points to be non-equidistant; a parabola can then be fitted through each group of 3 points. The number of points, including the knuckles or ends of straight portions, should be odd.

The necessity of giving the midpoint as well as the endpoints of straight portions can be avoided by assigning a type indication to the points, e.g. type 1 for a normal point, type 2 for an endpoint of a straight portion or a knuckle.

(27)

The interpolation can then be done by means of parabolic arcs, for each of which 3 points are selected of which the middle one is never of type 2. If only 2 points can be found, the chord is used. This method was employed in the first computer programs of the NSMB for hydrostatic calculations by means of the xl computer.

However, near the bottom of the ship and in the deck the accuracy of appro-ximation obtained was insufficient. Furthermore, both the point preceeding the considered interval and the point following it are candidates for the extra point to determine the parabola, and no good reason exists for choosing one rather than the other.

This disadvantage can be avoided by a method which, starting from the end-points of the interval, searches for an extra point on either side of the interval. Each of these points can be used to form a parabola, and from each such para-bola an interpolated value can be computed. If two interpolated values are found, the mean value is used as the result. If no extra point is found, the linear interpolation is used.

An even better solution, which also solves problem a, is to use circular arcs instead of parabolas. This, however, requires more process power of the com-puter. This method was applied in the second version of the programs for hy-drostatic and stability calculations of the NSMB. The results were quite satis-factory for those types of calculation which consist mainly of integrations, and in which problem c is not severe. Using this type of circular interpolation, the curve element over an interval can be described by 2 parameters, the arrows of both circular arcs (see fig. 5.2.2.). If there is only one circular arc the two arrows are equal, and if there is no circular arc both arrows are zero.

The difference between the two arrows for an interval is an indication of the smoothness of the curve; errors of measurement can often be detected by a relatively large difference. One of the advantages of this method is that the para-meters used to describe the curve have a geometric meaning. In the further cal-culations the curve is described by the values of the coordinates and the arrows, so that the calculation of the arrows, though rather complicated, has to be done only once for a particular curve.

The third problem still exists, and this effect of small knuckles occurring at the given points is especially serious when curves have to be dealt with accurately, e.g. when they have to be drawn.

In drawing the curves in shipbuilding, use is generally made of a spline, a thin flexible bar kept in position by distinct loads.

From the equation M = EI/R (5.0.0.) for the shape of this spline, where

E = YOUNGS modulus,

I = the moment of inertia of the cross-section of the bar, R = the radius of curvature,

M = the moment,

it can easily be seen that the shape has continuous first and second derivatives across a point where a load has been placed.

(28)

SCHOENBERG introduced the so-called spline functions. These functions consist of polynomial segments with continuity conditions at the points sup-plied to describe the function. The equivalent of the physical spline is the curve of cubic elements with continuity of slope and curvature. This spline is derived from (5.0.0.) replacing XjR by the second derivative. Though these spline func-tions have proved to be very valuable in various applicafunc-tions, the problems concerned with rotations, many-valued functions and functions with infinite slope still exist. For this reason the genspline will be introduced here. The curve is not represented by cubic elements relative to a fixed system of axes, but by cubic elements relative to a local system of axes with the ^-axis along the chord. The cubic through the endpoints of the chord has still two free parameters, to be determined by continuity condition for slope and curvature. Analoguous to the circular interpolation method, the formula for the spline element is written as

n = A{PRl + PL{L-l)}l(L- 1)1 L' (5.0.1.) Where L is the chord length, and PL and PR are the parameters. These

para-meters are simply related to the angle between the curve and the chord at the two endpoints.

The points on the curve may have the following associated types: type 1 = normal point, slope and curvature continuous

type 2 = knuckle, no condition for slope and curvature type 3 = tangent point, slope continuity only

type 4 = tangent to following straight portion.

The next sections will deal with the determination of the parameters of a gen-spline, and with some basic manipulations such as intersection and integration.

5.1. GENERATION OF GENSPLINES

Considering a set of coordinate pairs x,, ƒ; (/ = 0, 1 , . . . ,N) where each point is a normal point, with the condition that slope and curvature at the inner points are continuous we find in total 2N—2 conditions to determine the 27V para-meters (PL and PR for each interval). So it is still necessary to introduce two more relations e.g. slope condition in the first and the last point.

Introducing the following notation

PLi, PRi'. PL and PR respectively for the /"th interval

L , = the chord length of the /'th interval = {(x;+i — x,)^ + (y.+ i — J',)^}"^ (pi = the angle between the chord and x-axis, so that

sin (pi = (}',•+1 - y,)/Li; cos cp,- = (x,+ , - x,.)/L,. We find for the local slope at the point ^ = 0 4 PLJLf for the local slope at the point ^ = L; —4 PRJLi

The continuity condition for the global slope at the A:'th point can be written then as

(29)

tan(p, + 4PLJLt tan ^ , _ i - 4 P « , _ i /L^ _, 1 - tan (p, • APLJL^ 1 + tan (p^_, • 4PR,_JL^_i

or

- 4PR,_JL,_, = ( 4PLJL, 4-tan ( . p , - . , , _ , ) j ^^ ^ ^ ^ U -4PLJL^ tan{(p„ - (p^^i)} (fc=i^2, . . . , i V - ] ) The condition for the continuity of curvature is derived from the expression

1 _ r,"

R {1 + (r,rr"

Using the basic spline segment expression we find at point k

Ll

Ü

* - l

PL,_, -2PRu-,\ {l+l-;:-::^) 1 (/c=l,2,...,N-l)

(e^)'

If the slope at first and last point is specified, this yields two additional equations.

For the first point

4PLo ^ to - tan (p^ ( 5 1 3 )

where to is the specified slope at the first point. For the last point

- 4 P / ? „ - i ^ t„ - tan(p„_t ( 5 1 4 ) L„_i 1 + r„ tan(/)„_i

where r„ is the specified slope at the endpoint.

Equations (5.1.1.), (5.1.2.), (5.1.3.) and (5.1.4.) form a system of non-hnear equations from which PLi and PR^ (/' = 0, 1,. . . , TV—1) should be determined. The solution can be obtained by a NEWTON RAPHSON iteration process.

If at an endpoint no slope condition is prescribed the parameters PL and PR for the corresponding spline element are supposed to be equal.

Introducing the notation 4 PL,/Li = XLi + ALi 4 PRilLi = XRi + ARi

(30)

where AX, and XRi stand for estimates for the solution, the equations can be rearranged neglecting second order terms of the corrections ALi, /IT?,.

The following set of equations is obtained: from (5.1.1.)

AR,_, + ^ + tan^ {cp, - cp,.,)^= (5.1.5.)

^ _ XR - -^-L/i + tan((?)fc - fflt_,)

with N^ = 1 - XL,, tan ((^^ - (p,,. i) rom (5.1.2.)

- ^ ^ AL, IxR, - 2XL,! !l + A-Li - 5 / 2

I T M"'^*"^""^! \

+

6Xi?k_izlRfc_i f^j ^ ^ p _ ^ ^ ' v 2 ^

+ ~ — \XL,_, - 2X«,_,J Jl + XR,^_ij +

M R 9 / 1 / _', 1 ' VT2\ •^k + - I^AR, - 2zlL,j jl + XLlj +

-

-I—IAL,.,

-2AR,.,] il+XRl ^

jt _ , z,zj iV|t _ 1 , I 1 - r ^ J\k - 1 I

= - A (xR. - 2A'LJ |I -I- XLil +

- 3 / 2

Ll, \ J

4- ^ {XL,_, - 2ZR,_,j {l + XRl.}^ (5.1.6.)

from (5.1.3.)

/ILo = A ^ i ^ " ^ - ;^Lo

1 -I- to tan (po from (5.1.4)

— AR„-i = - " — + XR„_i 1 + i„tan(p„_i

To ensure convergence of the iteration process described, for each equation the error made by linearization should decrease with each iteration step. For equations (5.1.3.) and (5.1.4.) no error is introduced at all.

(31)

order of magnitude of the parameters for ship lines is supplied. For normal ships, the following characteristics for the splines are found:

a. the angle between chord and spline is in absolute value less than 7t/4; in general much smaller.

b. chord length can be up to the half breadth of the ship.

c. the absolute value of the parameters PL and PR is less than 0.3 meter. Since the set of equations is obtained by neglecting the quadratic and higher order terms in the corrections AL and AR, the righthand side of the set of equations in the next iteration step are of order A^. Since the solutions of a linear system of equations are a linear combination of the righthand sides, the corrections themselves found in the next iteration step are also of order A^. If the iteration process converges the convergence is quadratic.

In general the iteration converges very fast when the first estimates are determined as follows: for the PL, by fitting a local parabola through the end-points of the chord and the preceeding point and calculating the slope at the first point of the interval. For PR, the point following the interval is used to fit a local parabola and the slope at the endpoint of the interval determines PR.

If the slope at one of the endpoints is not specified the extra equation is found from the condition that for the corresponding interval PL = PR so the segment is a local parabola.

If A'^ = 1 a special situation is met. If no slope conditions are specified for either endpoint the curve will be straight, so that PL = PR = 0. If only one slope condition exists, the value oï PL equals that o^ PR and can be found from (5.1.3.) or (5.1.4.). If two slope conditions exist, the values for PL and PR can be found from (5.1.3.) and (5.1.4.).

In naval architecture curves which contain straight portions or knuckles are often met. These curves cannot be drawn along one spline. To achieve the desired features of a curve, a type indication is associated with each point; type 1 = a normal point

type 2 = a knuckle type 3 = a tangent point

type 4 = tangent to following straight portion.

The curve is divided into a number of gensplines by points other than those of type 1. For the subcurves, the procedure indicated above is applied. Depend-ing upon the types of the endpoints, slope conditions may or may not be speci-fied. For the first point of the first subcurve and the last point of the last sub-curve, the slope condition for the first and last point applies respectively.

(32)

conment genspline produces the genspline through n points given as the arrays x,y. The type of the points is given as the array type. The integer slope indicates whether slopes are prescribed slope=0 no slope condition

slope=1 the slope at the beginpoint specified as slopebm slope=2 the slope at the endpoint specified as slopeem slope=3 the slope at begin and endpoint prescribed. The iteration process is terminated when the absolute value of the variation for each parameter < tol.

In the procedure body a procedure solband is called^this procedure is supposed to solve a system of linear equations of which the matrix is a bandmatrix.

The parameters of the spline are produced as the arrays pl^pr j procedure genspline(x^y,type,slope,slopebm,slopeem,n,pi,pr,tol);

value slope,slopebm,slopeem,n,tol; integer slope,n; real slopebm,slopeem,tol; array x,y,pl,pr; Integer array type; begin integer so,s,3lopel,i,j,k,npa,count;

real slopebl,slopeel,dx,dy,to,conb,cone,k3i,eta,c1,c2,tan,ab,de; so:=1; s:=slopel:=0;

la: s:=s+1; if s=1 A(slope=1 V slope=3) then

begin s'Töpel:=1; slopebl:=slopebm; goto la end; if s=n A(slope=2V slope=3) then

ïëgln slopel:=slopel+2; slopeel:=slopeem ; goto gen end; If type[s]=1 then goto la ;

IT type[s]=2 then goto gen; T 7 type[s]=U IHën

begin slopel:=slopel+2; slopeel:=(y[s+1]—y[3])/(x[s+1]—x[s]); goto gen end;

if typels] ^3 then begin

comment here the action to liandle an abnormal type

should be described, in this case the point is treated as a normal point ;

goto la end;

gen: npa:»s—so;

begin a r r a y a[1:2xnpa,1 : ' + ] , l , c o , s i , x r , x l [1 :npa] , r [ 1 : 2 x n p a ] ; for i:=1 s t e p 1 u n t i l npa do

begin dx:=xli+soJ-xLi+so-l77 dy:=y[i+3o]-y[i+30-1 ] ;

I[i]:=sqrt(dxxdx-Hiyxdy); c o [ i ] : = d x / l [ i ] ; s i [ i ] : = d y / l [ i ] ; i f npa=1 then

•Begin i f slopel=0 then

begin p l [ s o ] : = p r L s o ] : = 0 ; goto end end; to:=dy/dx; i f slopel=1 Vslopel=3 then

begin c o n b : = ( s l o p e b l - t o V {, 1 +slopeblXto)xl[ 1 ]/lt; i f s l o p e l - 1 then pr[so]:«conb ; p l [ s o ] :=»conb; end;

i f slopel>1 then

begin cone :=(to—sloped)/(1 +3lopeelxto)xl[ 1 ]/k; i f slopel=2 then p l [ s o ] : = c o n e ; pr[3o]:»cone; end; goto end

end ;

for i:=1 step 1 u n t i l npa do begin i f i>1 then ~ ~

begin dx: =xL i+so-2 ]-x[ i+so—1 ];dy:=y[i+so-2]-y[i+so-1 ] ; ksi:=dxXco[l]+dyXsi[i]; e t a : = d y x c o [ i ] - d x X s i [ i ] ; x l [ i ] : = e t a X l [ i ] / ( k s i x ( l [ i ] - k s i ) )

end;

~ I 7 i < npa then

begin dx:="xLl+30+1 ]-x[l+30-1];dy:»y[l+so+1 ]-y[l+so—1]; ksl:-»dxXco[i]+dyxsi[i]; e t a : " d y X c o [ i ] - d x X s l [ i ] v ' x r [ l ] : = e t a X l [ i ] / ( k s i x ( l [ i ] - k s l ) )

end end

(33)

r e p e a t : for k:=1 step 1 u n t i l Sxnpa do

begin for j : = 1 step 1 u n t i l ir~do a [ k , J ] : = 0 ; i f k=1 V k=2Xnpa then gotö~expo; jT=k:2; i f k=2xj ^Ehën beglK c 1 : = 1 + x l [ J + r i ^ ; c2:=c1>v(-1.5)/l[j+1 ] ; a[k ,3J: =-kXc2-6xxl[ j+1 ]x(xr[ j+1 ]-2xxl[ J+1 ] )xc2/c1; a[k,l+] :=-2Xc2; r [ k ] :^-2xc2x(xr[ J+1 ]-exxl[ j+1 ] ) ; c1:=1+xr[j]|e; c 2 : = c 4 ( - 1 . 5 ) / l [ j ] ; a[k,1]:^-2xc2; a [ k , 2 ] :=l+Xc2+6xxr[ j ] x ( x l [ j]-2X)tr[ j ] ) x a 2 / c 1 ; r[k]:=r[k]+2Xc2x(xl[j]-2xxr[j]) end e l s e SêginTan:=.(si[j+1]xco[j]-si[j]Xco[j+1])/ (co[J+1]xco[j]+si[j]Xsi[j+1]); c1 : = 1-xl[ j+1 ]xtan; a [ k , 1 ] : = 1 ; a[k,2]:=(1+tan>2/c1)/c1; r [ k ] : ^ x r [ j ] - ( x l [ j + 1 ] + t a n ) / c 1 ; end; expo: i f k=1 then

'Berin i f slopel=0 V slopel=2 then

b e g i n ' a [ 1 , 3 ] : - 1 ; a[1,U]:=:Ty r[1]:=-0 end e l s e begiti a [ 1 , 3 ] : « 1 ; t a n : = s i [ 1 ] / c o [ 1 ] ; r [ 1 ] :=( slcpeb]--tan)/ (1 +slopeblXtaii)-xl[ 1 ] end end; ~' ITT^=2xnpa then

•Segin i f slopel=0 V 3lopel=1 then

begin a [ k , 2 ] : = 1 ; a[k,1]:S-17 r [ k ] : = 0 end e l s e begin a[k,2]:=—1; tan:=si[npa]/co[npaJ;

r [ k ] : = (3lopeel—tan)/(l+slopeel>:tan)+xr[npa] end end end; . 'f solband(2xnpa,lt,1 , a , r ) ; ab:=0; for k:=1 s t e p 1 u n t i l npa do

Tiëgln i f aBsfr[2xk-1 J)>ab THen ab:=abs(r[2xk-1 ] ) ; T? abs(r[2xk]) >ab 'Eliën ab:=abs(r[2xk]); x l l k ] :=r[2xk-1 ]+xl[k7T^ar[k] :=r[2xk]+xr[k] end;

T7~ab>tol then

Begin count:=count+1; i f count<10 then goto repeat ;

comment e r r o r haïïHling for no convergence can be done here ; end;

for k:=1 s t e p 1 u n t i l npa do

'Sëgin pl[Tï+so-1 ] :=lLk]xxl[Trr/'f-; pr[k+so-1] :=l[k]xxr[k]/lt end; end: c1 :=-ijXpr[s-1 ]/l[npH]; c2:= s l [ n p a ] / c o [ n p a ] ;

de:=(c1+c2)/(l-c1Xc2) end

end;

i f s=n then goto f l n i ; so:=s;

T7 typeLsJ ^3 then begin s l o p e l : = 0 ; goto l a end; s l o p e b l : - d e ; slopel : = 1; goto l a ;

f i n i : end genspline ;

5.2. GENSPLINE INTERSECTION WITH A STRAIGHT LINE

The genspline is defined in a coordinate system x-y.

The straight line is defined by a point (xx, yy) and the angle a between the straight line and the A:-axis. First, the formulae to determine the intersection point(s) of the straight line with a spline element are derived.

(34)

x = xx + s cos a y = yy + s since

the i'th spline element is defined by

r, = 4 {PLi (L, - 5) + PRi • ?} (L, - l) IjL] (5.2.1.) with l = {x - Xl) cos (pi + (y - ƒ,) sin (pi

n= -(x - Xi) sin (?i + (y - ƒ,) cos </), i^, = {(x.+ . - x , ) ^ + ( 3 ; „ . - j . , ) ^ } ' / ^

cos (pi = (x,+1 - x,)/L;; sin (p, = (ƒ,+, - y.O/L,

The formula of the straight line in the ^ -»; coordinate system is

5 sin (a - (Pi) - r} cos (a - </),) -I- (x, — xx) sin « - ( ƒ , - yy) cos a = O (5.2.2.) So the intersection points are those solutions of the equation

I sin (a - q>;) - 4 {PLi (L, -l) + PRi • I] I (L, - DJL'i cos (a - <p,.) +

-I- (x, — xx) sin a — (y,- — yy) cos a = 0 (5.2.3.) which satisfy the condition 0 < ^ < L, (5.2.4.)

Equation (5.2.3.) is a third degree polynomial in ^ and can be solved in different ways.

The direct CARDANO method can be applied and complex solutions or solu-tions outside the interval (5.2.4.) can be ignored. It is also possible to consider only those intervals where the chord intersects the straight line and to determine the solution by means of an iteration process which starts with this linearized solution. If the iteration process might fail to converge a stepping process can be applied to determine the solution. The accuracy where the iteration process should be stopped can be prescribed.

The process first mentioned can be improved by deleting the intervals where it is evident that no intersection is possible; since the spline element deviates at most max (abs {PLi), abs (PRi)) from the chord, no solution can be expected when the minimum distance between chord and straight line exceeds this value. Intersection points which coincide with nodal points of the spline should be handled carefully, to avoid double counting of these points.

Two procedures are presented for the determination of the intersection points of a genspline with a straight line.

The first, SOL, is based on the supposition that within one spline element only one intersection point can be found. This situation is quite normal in ship-building calculations. The case of 2 intersection points may occur, but the effect is then negligible. A practical situation is indicated in fig. 5.2.1.; the section just dips into the water, and both intersection points are within the same spline element. The sectional area is very small, and gives practically no contribution to the displacement calculation being performed.

(35)

FIG. 5.2.1. Example of a section where two intersection points with a waterline lie with-in an with-interval.

The second procedure, ACSOL, scans all spline elements, neglects those which cannot possibly contain an intersection point, and approximates those re-maining by an interpolating polygon within the required accuracy. Then the intersection points can be determined easily.

Both procedures use the same parameters; the first, of course, is the more efficient.

Remark 1. Contrary to the current trend to design computer software orthogonally, the general procedures presented here have been tailor-made to achieve an acceptable performance for most of the shipbuilding calculations treated in chapter 9. For example, a special version has been developed using the fact that the straight line to intersect a spHne is parallel to one of the axes of the system of axes in which the spline is defined.

Remark 2. Due to the software paging technique employed for the real numbers used in the programs, the sphne is not available as 4 arrays but as a traject in this paged array. To avoid complications, this effect has been kept out of all procedures given in this chapter.

In the hydrostatic calculations for the ship the genspline is intersected in general by the water level and further calculations only deal with the portions of the genspline below the water level. The curve below the water level should be described again as a genspline; this can be done in two ways:

1. by generating a genspline through the set of points describing the curve (the points below the water level and the intersection point).

2. by determination of the parameters PL and PR for the new spline element (from a nodal point to the intersection point) from continuity conditions for slope and curvature.

The first method is far too time-consuming, since the process would have to be performed several hundred times for one ship. For this reason, formulae are presented here for the second method.

(36)

Denoting the endpoints of the spline element by (XQ, JO) and (Xi, j i ) the chord length by L, the parameters by PL and PR, the intermediate point in the local coordinate system by ^j, f/^ the following set of formulae can be derived.

For the chord length of the first element Xj = (5,^ + n.y^ (5.2.5.) For the chord length of the second element X2 ={(X — ^J^ -|- r\s^)Y'^ (5.2.6.)

For the local slope of the spline element in the point (XQ, yo), TB = 4PL/L

holds, (5.2.7.) For the slope in the point (xi, y j holds TE = — 4PR/L (5.2.8.)

For the two new spline elements we find from the requirement that in the endpoints the slope should agree with the slope of the orginal splineelement:

PL, = LJ4 J^^J!^'- with TM, = ^,/|,

l + TB- TMj (5.2.10.)

PR. X2/4 TM. TE i + TE • TM,

with T M 2 = -r]J{L-l,) (5.2.11.)

From the condition that the curvature should agree with that of the orginal spline element follows

PR, =2PLi +LllL^-{l + {4PL JLy)^Y'^ {I + (4PLIL)^]~^'^ (5.2.12.) PL2 = 2PR2 + Llll} • (1 + (4PR2lL2fY'^ {1 + (4PR/X)^}~''^ (5.2.13.) It should be realised that the two spline elements described by these formulae have no continuity of slope or curvature at the contact point (though the dis-continuities will be small in practice). This fact is not serious, since only one of them is used in the calculation.

Cytaty

Powiązane dokumenty

Mówią, że się to zaczęło od wielkich wojen, co tam się niegdyś odbywały, a w których wiele narodu zgi- nęło i dotąd to krew ludzka, choć z ziemią pomieszana, uspokoić

Paradoksalnie zatem instytucje finansujące badania naukowe zdają się wciąż wspierać reprezentację autyzmu jako choroby, która daje się wyekstrahować od osoby –

Lewandowicz cytuje fragment listu Grzegorza RE I 50: „abyśmy posłali tam mnichów, ponieważ sama wyspa, która dotychczas nie miała klasztoru, także dzięki tej

The performed research with the use of a measuring arm together with an integrated laser scanner for the analysis of the filler wear, on the basis of the measurements of the

The problem of choosing orthogonal, curvilinear, coordinate systems for use in boundary-layer calculations on arbitrary three-dimensional bodies is considered in some detail. A

Obliczone współczynniki korelacji wskazują, że wzrost sumy opadów i liczby dni z opadem w okresie od strzelania w źdźbło do wyrzucania wiech obniżał MTZ, natomiast w czasie

We prove that the treewidth lower bound also holds for metric graphs (tropical curves) by constructing for any positive rank divisor on a metric graph a positive rank divisor of

Nie chodzi o ocenę moralną postępowania Jastruna w oma- wianym okresie, o ewentualne niedopowiedzenia w jego zapiskach, dotyczące wskazanych problemów, są to wszak rzeczy