SSC
SSC
SSC
This
dccument
hasbeenapproved
for
public
rele=e
andsal%
ih
distribution
is
unlimited
RADM J.D.Sipes,
USCG,(Chairman) Mr.H.T.Hailer
Chief,
Office
ofMarine
Safety, Associate
Administrator
forShip-
Security
andEnvironmental
Protection building
andShipOperations
U.S.CoastGuard Maritime
Administration
Mr.Alexander
Malakhoff Mr.ThomasW.Allen
Director,
Structural
Integrity Engineering
Ofhcer
(N7)
Subgroup(SEA55Y) Military
Sealifl
Command
NavalSeaSystems
Command
Dr.Donald
Liu CDR MichaelK.Parmelee,
USCG,
Senior
VicePresident Secretay,ShipStructure
Committee
American
BureauofShipping U.S.Coast Guard
CONTRACTINGOFFICERTECHNICALREPRESENTATIVES
Mr.William
J,Siekierka Mr.GregD,Woods
SEA55Y3 SEA55Y3
NavalSeaSystems
Command NavalSeaSystems
Command
SHIPSTRUCTURESUBCOMMITTEE
THE SHIPSTRUCTURESUBCOMMl~EE actsfortheShipstructure
Committee
ontechnical
matters
byproviding
technical
coordinating
for
thedetermination
ofgoals
andobjectives
oftheprogram,
andbyevaluating
andinterpreting
theresults
interms
ofstructural
design,
construction
andoperation.
U.S.COASTGUARD MILITARY
SEALIF7
COMMAND
Dr.
JohnS,Spencer(Chairman) Mr.Glenn
M,Ashe
CAPTT.E,Thompson Mr.Michael
W.Touma
Mr.David
L.Motherway Mr.Albert
J.Attermeyer
CDR MarkE.Nell Mr.Jeffery
E.Beach
NAVALSEASYSTEMSCOMMAND AMERICANBUREAUOF SHIPPING
Mr.Robeti
A,Sielski Mr. John F, Cordon
Mr.Charles
L.Null Mr.Stephen
G.Arntson
Mr.W.ThomasPackard Mr.William
M.Hanzalek
Mr.Allen
H.Engle Mr.Philip
G.Rynn
MARITIME
ADMINISTRATION
Mr.Frederick
Seibold
Mr.NormanO,Hammer
Mr.ChaoH.Lin
Dr.
Walter
M,Maclean
SHIPSTRUCTURESUBCOMMllTEELIAISON
MEMBERS
U.S.
Corres~ndence
Secretay,
Coast
to:
ShipStructure
Committee
Guard(G-MTH)
2100SecondStreet
S.W.
American Bureau of Sh@ping Washington,
D.C.20593-0001
Military SealH Command Structure PH: (202)
267-~03
FAX:(202)267-0025
Committee
An Interagency
AdvisoryCommittee
DedicatedtotheImprovementofMarineStructures
--:.”:
“‘Rear‘ Admiral,
U. S. Coast Guard
Chairman, Ship Structure Committee
,., ..,. _.\__
.-
3. R*ciPi-n~’l
CaIulD~
Ho.
SSC-333
———— I
4. TI~lo
om.d
s.ubl;II- 5. R.pert Dmv.
February 1985
A TIME DOMAIN SIMULATION METHOD FOR SHIP MOTION
6. Pcrformin Q Otgnnizgvion Cai~
AND LOAD PREDICTION
_SHIP STRUCTURE COMMITTEE
.- B. P.rformi”~ Or~ahizal;~n R.port tin.
7. Aw,kmt(L)
1
AgrrIC7 cod.
G-M
5. 5w?pl.mrfi!er~
t40!@t
6. Ab~tract
A numerical method for the simulation of ship motions, hull girder. loads and
transient three-dimensional hydrodynamic pressure, is developed. A time-
step integration of the equations of motion is performed with sectional hydro-
dynamic forces computed using strip theory and buoyancy forces evaluated over the
instantaneous immersed hu]]. In addition to hydrostatic and dynamic buoyancy
forces, ship motion induced and wave diffraction forces= the method can also
account for “flare” force and quadratic damping forces. The numerical model also
has sev~ral features which may provide fdr more realistic simulations. Linear
wave theory is assumed for the representation of the incident wave field, and
regular and irregular, unidirectional or multidirectional wave systems can be
generated.
A method for the prediction of transient three-dimensional hydrodynamic pressures
extending the technique developed by R.B. Chapman is presen?ed. Initial and
boundary values for the pressure simulation are simultaneously generated from the
solution of the equations of motion using sectional force computations. An op-
tion exists in the program to substitute the three-dimensional pressures for the
two-dimensional hydrodynamic forces.
Ship Motions
Hydrodynamics
Simulation
Computer
I
Paae
2.5.6 ~, .....................2-32
2.6 HULL GIRDER LOADS ................,........ . ● ● ● ....... ... ...,.2-33
● ●
REFERENCES
APPENDIX A - SIMULATOR TEST PROGRAM
-i -
LIST OF TABLES
Paae
Table 4 Representative Run Times .* .*...,. .** *..*.. ......*** .**..... ..3-21
●
-ii-
LIST OF FIGURES
Page
..
Figure la Axes for Solution of Equations of Motion .......................2-2
Figure lb Sign Convention for Translational and Rotational hbtions .......2-2
Figure 2 Diagram of Computational Scheme .*** ..** .*..*.* .....** ........2-6
● ●
-iii-
ABSTRACT
A numerical method for the simulation of ship motions, hull girder loads
and transient three-dimensional hydrodynamic pressures is developed. A time-
step integration of the equations of motion is performed with sectional hydro-
dynamic forces computed using strip theory and buoyancy forces evaluated over
the instantaneous immersed hull. In addition to hydrostatic and dynamic
buoyancy forces, ship motion induced and wave diffraction forces, the method
can alsO account for’ “flare” force and quadratic damping forces. The numeri-
cal model has several features which may provide for more realistic simula-
tions, including the ability to evaluate sectional hydrodynamic coefficients
at the instantaneous sectional draft, and a crude scheme for adjusting the
frequency at which sectional coefficients are evaluated for use in ship motion
induced force calculations. Linear wave theory is assumed for the representa-
tion of the incident wave field, and regular and irregular, unidirectional or
multidirectional wave systems can be generated.
.—.
-iv-
NOMENCLATURE
Fj external forces
K roll moment
M pitch moment
Ms ship’s mass
N yaw moment
-v-
NOMENCLATURE (Continued)
Tj = external moments
u = ship’s speed
= +(RG)
x = longitudinal force
Y = vertical force
z = lateral force
-vi-
NOMENCLATURE (Continued)
-vii-
NOMENCLATURE (Continued)
= total force -
E. = phase angle
1
da
= rotational velocities = Bkm &
-viii-
NOMENCLATURE (Continued)
.
Cl> Ej = average vertical water velocity, acceleration
.
Lj5 Cj = average lateral water velocity, acceleration
.
K.$K. = average roll water velocity, acceleration
1 1
.
Cl> Ej = average vertical water velocity, acceleration
.
= average roll water velocity, acceleration ‘
‘i’ ‘i
Three-dimensional Analysis
=
A*
nm, B*nm
complex conjugates
-ix-
NOMENCLATURE (Continued)
2 2
k = k = kxn2 + kym
nm nm
2
L!J
n
kxn, kym = wave numbers in x and y; e.g.,
T
-x-
NOMENCLATURE (Continued)
2 2 + ~ymz , 1/2
= = 9 [~x
u nm
n
-xi-
(THE PAGE INTENTIONALLY LEFT BLANK)
1.0 INTRODUCTION
While the established ship motion and loading methods currently used in
design practice remain indispensable, there is need for a more advanced tool
t“hat can carry the ship designer a step closer toward a fully rational ship
design procedure. Although the application of linear strip theory in the
frequency and probabilistic domains has met with remarkable success, there are
a number of practical seakeeping and structural loading problems not satisfac-
torily analyzed by such techniques. Green water, bow flare impact and bottom
slamming are particularly obvious examples. Reported large differences in
dynamic sagging and “hogging moments in some type of ships is a consequence of
nonlinear loading [1,2]. The accurate prediction of rolling amplitudes re-
quires the use of a nonlinear restoring moment at a large angle and nonlinear
viscous damping estimates. These examples tend to highlight the generally
nonlinear character of the ship motion and loads problem. An equally impor-
tant part of the problem is its three-dimensional ity. For example, the pre-
diction of hydrodynamic pressures on the ship’s hull below the mean waterline
using linear two- and three-dimensional methods is not at a consistent level
of accuracy. Clearly, there are a number of areas where improvements can be
made in ship motion and loading prediction.
1-1
Several optional features have been incorporated into the numerical
simulation procedures. Sectional added mass and damping coefficients may be
evaluated for the instantaneous average sectional draft at each time step.
Also the frequencies at which the added mass and damping coefficients are
evaluated (for ship motion-induced forces) can be selected to correspond to
either (a) the peak frequencies of motion response spectra, or (b) allowed to
vary based on the measured response of the vessel during the previous two
cycles of motion. Additionally, a vertical velocity-squared term is included
in the strip formulations to partially account for the effect of flare impact
loading. Finally, the simulation can incorporate the effects of veloci-
ty-squared damping using quadratic damping coefficients selected by the user.
It should be pointed out that because ’the majority of the testing and
validation efforts described in this report use regular waves, the reader may
tend to form the impression that the method is limited to regular waves. This
is not the case. The incident wave system may be irregular and multidirec-
tional. It is constructed from the superposition of regular waves, the ampli-
tudes, frequencies, directions and phases of which may be specified by the
user. They can thus be selected to represent the time history associated with
any given sea spectrum.
This document (Volume I) describes the method and presents some test and
validation results. Several computer programs were written to implement the
approach and a user’s manual (Volume II) is provided as a companion report.
1.1 BACKGROUND
1-2
.-
not use Green’s functions representing solutions of the free surface equations
for oscillating singularities moving with uniform speed as does Chang. Simple
sources and their image are used to represent the hull. Although the problem
is linearized, the method is theoretically capable of accounting for a time-
dependent hull shape. It thus provides the flexibility of arbitrary motions.
In the area of ship motion and loads prediction, the more advanced -
methods incorporate a time-simulation approach using some form of strip the-
ory. The primary motivation for the development of this class of simulation
programs is to account for nonlinearities from various sources. Paulling,
Oakley and Wood [3] were interested in the capsizing problem with emphasis on
accurate computation of buoyancy forces. Chang [25] developed a motion simu-
lator emphasizing non-rigid body structural response to regular head seas.
Wyerhoff and Schlacter [26] emphasized the dynamic whipping response due to
bottom and flare impact in unidirectional irregular head seas. Borresen and
1-3
Telsgard [27] emphasized the nonlinear effects of bow flare on motions and
rigid body hull girder loads. In the last three references, the relative
motion hypothesis is employed in each case, and the frequencies at which the
hydrodynamicc coefficients are evaluated are usually the frequency of
encounter (ue) or infinite frequency (m=) . Also, the methods in the last
three references treat only pitch and heave in unidirectional regular waves.
* Prescribed motion of a 120-panel body requires 7 CPU minutes per time step
(0.1 sec < t < 0.25 see) on a DEC VAX 11/750 or roughly 20-25 CPU sees on a
so-called supercomputer (e.g., CRAY or CDC STAR).
1-4
2.0 THEORETICAL l@DEL
The equations of motion for the ship can be derived from Newton’s
second law and formulated as four first-order ordinary differential equations,
the solution of which gives translational and rotational displacements and
velocities. Solution is accomplished in a time-step fashion using a fourth-
order Runge-Kutta integration scheme. The external forces and moments called
for in the equations of motion are calculated using an extension of basic
strip theory to derive ship motion-induced and diffraction forces. Froude-
Krylov forces are computed using a volume integral approach over the instanta-
neous immersed hull. The incident wave system is represented by one or more
linear waves of arbitrary amplitude, direction, frequency and phase relation-
ship.
The position
of the ship in space is completely characterized by the
position of the ship’s
mass center and the angular displacement of the ship.
Eulerian angles will be used to describe angular displacement. Figure lb
shows the convention for the Eulerian angles.
~ I (j = 1,2,3) (2)
dt jk ‘k = ‘j
in which
2-1 “
Y’
\
Y
I x’
z
i’”
Figure la Axes for .Solution of
Equations of Motion
Y’ [j=21
x’ (j=ll
F
.9 (j=41
z’ (j=3)
2-2
= translational velocities of center of mass in space fixed system
‘Gk
=&RG
= rotational velocities
‘“k
dam
= ‘km ~.
and
1
1 sin + 0
B 0 cos 0 cos$ sin 6
km =
0 -sin 6 cos q cos 0
[
a ={e, 1$,+}
m
Fj = external forces
T. = external moments
J
In the ship coordinate system, the left side of equation (2) takes the
following form:
(3)
2-3
This is the Eulerian equation of motion whose application makes possi-
ble the use of constant moments and products of inertia. In the inertial
frame of reference, these values are continuously changing.
Equdtions (l), (2) and (3) can be manipulated to yield the following
two sets of two first-order ordinary differential equations:
d -1
= (Bkm) ‘k (m = 1,2,3) (6)
2iTam
d
= (Ijk)-l{Tj ‘Ukx Ijk Uk} (k = 1,2,3) (7)
~ ‘k
Assuming that the ship has latera” symmetry, the mass matrix s given
by
MsOO
M. = O MsO + A (j = 1,2,3) (8)
Jk
jk
00Ms
[ 1
where A. represents added mass. The ship’s mass is shown as MS within the
Jk
brackets.
1
111 121 131 (9)
I I 122 132 -!- Amn (j = 1,2,3)
jk = 12
(m = 4,5,6)
113 123 133
[
where A represents added mass coefficients, and the values within the
mn
brackets represent ship moment and products of inertia.
2-4
If we can evaluate the external forces (Fj) and moments (Tj) required
by expressions (5) and (7), we can solve for the ship translational (vG) and
rotational (u) velocities. These, In turn, ape used in equations (4) and (6)
to yield the ship translational (XG) and rotational (a) displacements. The
integration of these four first-order ordinary differential equations is
performed numerically with the fourth-order Runge-Kutta scheme.
The basic method used to evaluate the external forces will be based on
strip theory. This approach is used to evaluate forces throughout the simula-
tion of ship motions and loads. An additional and important feature is the
prediction of pressures on the hull using a three-dimensional hull source
representation. The resultant force on the ship from these pressures can be
substituted for the hydrodynamic forces predicted from the strip approach into
the equations of motion for a selected interval of time. The interval of time
for which this force substitution may be made must be limited in order to
minimize the considerable computing effort associated with a three-dimensional
solution in the time domain. Figure 2 depicts this procedure. It should be
emphasized that the formulations for the two methods (strip and three-dimen-
sional) are separate and distinct and each can provide force information for
the solution of the equations of motion.
A brief outline of the force components that comprise the total force
used in the ship motion equations follows. We first examine ,the strip method
followed by a brief discussion of the three-dimensional method.
(a) Froude-Krylov Force - The resultant force from the pressure in the
waves which acts on the hull surface with the assumption that the
pressure field is not affected by the presence of the ship.
—.
2-5
AddedMassand
DampingCoefficients
{Sectional
) E.
lj’P ij’ X
ij
Frank-Close-Fit
1 <
N
I -----
c
%
Strip TheoryMethod 3-DMETHOD
for for
SectionalForce Pressureand
Computation ForceComputation
m
s
-0
c
rl-
QJ !
T t
+5=”
ri-
d.
AssembleForces Assemble Forces
0 Equations Equations
in
(lo)- (15)
I (17)- (2’2)
cl
m
3
m
-EEJ- F
Compute Printout
Loads Distribution
—
(c) Ship Pbtion- Induced Force - The force resulting from the motion of the
ship with the assumption that it undergoes this motion in calm water.
We propose two other approaches and briefly examine the effect of each
in Section 3.3. The first and simpler method is for a user-specified fixed
value associated with the highest peak of the response spectra obtained from a
frequency domain analysis or sea spectrum. The second approach is based on a
scheme that samples the previous two zero-crossing periods of moticin in sway,
heave and roll. The two values are averaged, and three characteristic fre-
quencies are derived for evaluation of the sectional hydrodynamic coeffi-
cients. The sway-roll or roll-sway coefficients are (arbitrarily) linked to
the sway characteristic frequency.
The total force equations are qiven usinq the notation shown below.
The force for each degree ‘of freedom is-indicated-by:
X = longitudinal force
Y = vertical force
Z = lateral force
K = roll moment
N = yaw moment
M = pitch moment
Subscripts to these force symbo” s spec’ fy the type of force accord”ng to:
b = Froude-Krylov
h = ship motion-induced
w = wave diffraction
f = “flare” force
q = quadratic damping force
t = total force
Two sets of equations will be given; the first showing the force compo-
nents normally used ‘during the simul-ation, and the second ‘showing the force
components when the three-dimensional method is invoked. The external forces
(F) and moments (M) used in the equations of motion (5) and (7) can be assem-
bled from various sectional force components according to:
.—
‘b
= ~Xdx (lo)
‘1
2-8
(11)
(12)
(13)
d Zw dNb
=~x>dx+~x —dx+~Fdx+Nq
dx (14)
‘2
(15)
All integrations are performed over the length of the ship. The strip theory
equations used to evaluate the sectional forces are given in Section 2.4. As
will be seen in that section, in the equations for the sectional ship motion-
induced forces there is a part related to acceleration. These acceleration-
related forces cannot be computed directly at any particular time s’tep$ since
the acceleration values at that time are not a priori known. Consequently,
the acceleration force terms in those equations are extracted and transferred
to the mass moment and product of inertia matrices as the second terms in the
right-hand side of expressions (8) and (9) given earlier. These matrices are
assembled according to the following expressions:
‘%2 = ,fa22 dx
A33 = /a33 dx
43 = Ja34 dx
k4 = ~akb dx (16)
45 = ~xa34 dx
2-9
k.5 = [x2a33 dx
k2 = !xa22 dx
k6 = ~x2 a22 dx
with the remaining values of Ajk = O. All integrations are over the length
of the ship.
XT +X;+x (17)
= ‘3D q
dYf
= (18)
‘T ‘3D + ‘i + ~ ~dx + ‘q
= +Z;+Y (19)
‘T ‘3D q
+K:+K (20)
‘T = ‘3D ‘7
(21)
‘T
h ‘“,D+$+~x$dx+Mq (22)
2-1o
where Xi ... ~ are the hydrostatic force components of the Froude-Krylov
forces, and X3D ... M3D are the force components calculated from the three-
dimensional pressure computations.
This completes the formulation of the equations of motion and the force
equations. The next several sections will present the computation of the
Froude-Krylov force, .the sectional diffraction and ship motion-induced forces,
the flare impact force, and the three-dimensional pressures and resultant
forces.
We will assume that the elevation of the sea surface n (~,t) can be
described as the superposition of a number of sinusoids of the form:
,.
N N
n(i,t) ‘ z ai COS (ki~-Uit~Ei) = ~TIi (23)
i=l j=l
The expression for hydrostatic and dynamic pressure can be derived from
Bernoulli’s equation and the definition of velocity potential for ttle incident
wave field. If we include only the linear terms, and consider only deep
water, the expression for pressure may be given as
N kiy
p(t,x,y,z) = -Pg [ y -x e ~i ] (24)
i=l
The Froude-Krylov force may be obtained by integrating the pressure over the
immersed surface of the ship. This surface integral may be replaced by a
volume integral,* so that the expressions for total Froude-Krylov forces -and
moments can be given by the integral of the pressure gradients. Sectional
forces can be evaluated according to:
d Xb
dx
* Gauss Theorem -
F = npdA= Vp dv
JJ m
2-11
(25)
dx
(a) Unmodified Formula - Use the same formulas (for pressure) above mean
sea level that apply below sea level. (Eq. 26 with no restrictions on
Y*)
(b)
. , Stretching Correction - Stretch the still water level in the formula to
the sea surface.
(c) Hydrostatic - Assume the pressure in the wave above the mean water
level is hydrostatic.
There is not sufficient experimental data to support the use of one scheme
over the next. The CAPSIZE proqram r29] uses the unmodified formula. There
are also some limited experimental da~a ~btained by Chakrabarti [30] to indi-
cate that a hydrostatic pressure assumption is accurate in regular waves. If
we select the hydrostatic assumption, the pressure equation may then be writ-
ten as
N kiy
p (t,x,y,z) = -pg [ y - z e ni 1 y<o (26)
j=l
2-12
N
p (t,x,y, z) = - pg (y - z I-Ii) y>o (27)
i=1
dYh .. .
dx ‘- a22 &G + XIJJ
- z~ )
.
-b22(;G+w-W) (28)
da22 .
+u-#YG+xb4)
dyw N . da22
r = ~
i=l [Eia22 +ri(b22 - U=) ]
2-13
Lateral Sectional Ship l%tion- Induced Force
da33
+(um ) (~ -x~+l.$)
- 1333
(30)
.,
+ (a43 + h~g a33 ) 0
dabz da~~
+[bq3+hcgb33-U(T +h
c,m)l~
dZw N
F= i~l { ‘iia33- Gi(”~- b33)l
(31)
dabb da31~
-[. bq,++hcg b3q-U(~+hcg~ )];
..
+ a34 (z -x; +zu~) (32)
da3~ d Zh
+ (b34 - U =)(; - x~+U $)-h
Cg T
2-14
Roll Sectional Diffraction Force
dKw N dabh
—= z {~iaqq - Kj(U~- b44 )1
dx j=l
.-
da3b dZ (33)
- [tihcga~q - Li(U~+ b~k)]} - hcg -# .
Following the procedure used in the program CAPSIZE [29], each ship
section is defined as a closed polygon made up of straight line segments
between offsets. The integrals of vertical, horizontal and “roll” wave veloc-
ities and accelerations, as well as pressure gradients over each section, are
evaluated exactly at each time step. Longitudinal integrations of sectional
diffraction forces and Froude-Krylov forces (excluding hydrostatic component)
are performed assuming the sectional forces are functions of the following
form:
where
Flare Force
2-15
Following the approach described by Pkyerhoff, the time derivative of
the relative wave elevation for any strip may be given as
-. ‘o”””
i-lr=:l-l-yG -xv+ *U (34)
e
.
where n denotes the time-derivative of the wave elevation relative to the
ship-fixed coordinate system, ma is wave frequency and u ~ is frequency of
encounter. The convective derivative of relative velocity is accounted for by
the factor u. /tie . In the derivation of the expression for hydrodynamic
inertia forces” in the strip method, it can be shown that a nonlinear term
.- results which represents an impact term. It contains the square of the rela-
tive velocity, and according to Pkyerhoff [26] appears as:
d Yf .
= lJ (nr)2
F
where
a%2 (m)
P = { } if ~r > 0
anr
Quadratic Damping
The expressions for total forces and moments (10) - (15) and (17) -
(22) each contain a term which represents a force or moment which is propor-
tional to velocity-squared. The user of the computer program may specify, as
input, his own values for quadratic damping coefficients. Accurate roll
prediction often requires some quadratic roll damping. The damping moment
associated with roll, for example, may be written in the form
. ‘
2-16
where Bh~ is the quadratic roll damping coefficient for the ship, and 6
is roll angle velocity.
2.5.1 Introduction
(b) It provides as output forces and moments on the hull, as well as addi-
tional information regarding distributed dynamic pressures.
In the formulation that follows, for the convenience of the reader who ‘
wishes to refer to Chapman’s work, we will use Chapman’s coordinate system
throughout Section 2.5.
2.5.2 Formulation
2-17
downward and y-axis positive to starboard. The still mean water level corre-
sponds to z=O. The free surface elevation is specified by (x,y,t) and the
ship’s hull is defined by S(x,y,z,t) = O for z > 0. If the fluid is assumed
to be inviscid, incompressible and homogeneous and the flow irrotational, then
the fluid velocity 3 (; , t)” can be represented by the gradient of the
velocity potential O(;,t). If we linearize the free surface equations, the
velocity potential must satisfy the following conditions:
(36)
z = o (37)
on $(x,y,z,t) = O (38)
where” Is is the velocity at any point on the hull surface S, and ; is the
unit normal to the boundary surface at the point, pointing outward. The
velocity potential can be decomposed into two parts:
where -Ux +$s is the steady part and U is the forward speed of the ship,
.—
and I$T (x,Y,.z,t) is the time-varying potential. In the present formulation,
we will neglect the steady part and consider only the time-varying potential.
(40)
2-18
where $B represents the instantaneous effect of the body, represents
OFS
the existing free surface disturbance due to previously radiated and dif-
fracted waves, and $A is the ambient wave potential.
(41)
By linearizing the problem, we can evaluate the total pressure at any time or
point as the sum of the individual pressure components,”as given by: -
(42)
a~Fs
PFS (Xd,z,t) = ‘P ~ (43)
a+A
PA (Xsysz,t) = ‘P ~ (44)
The convective derivative for the body pressure expression is included because
the Bernoulli equation given here is for fixed points in space, yet the body
potential is associated with the moving hull surface. We will assume, how-
ever, that products of the body velocity and potential gradients are negli-
a$B
gible with the exception of UK . Equation (42) then becomes:
2-19
(45)
—-
2.5.3 Solution Procedure
Step 1.
As we begin each time step, we will have already computed the veloci-
ties, accelerations and pressures induced by the free-surface disturbance and
ambient wave field at the center of each panel. (These will be known from
steps (5) and (6) of the previous time cycle.) The body velocity and acceler-
ation will have been obtained from the solution to the equations of motion.
2-20
First, for time t = tn, compute the resultant total normal veloci -
ty (;T ● ~) * at the center of each panel. * This resultant velocity repre -
sents the sum of the velocity from the body motion, the velocity induced by
the existing free surface disturbance, and the velocity induced by the ambient
wave field:
(The convective derivatives are required in this case for aFS and al because
we are in a hull-fixed system when computing the resultant normal acceleration
on the body.)
Step 2.
Knowing %T from step (1) and having precalculated Eij , determine the
time derivative of the source strengths ~. according to
J
‘B
z E..;. =tT=~ at t = tn. (48)
i=l lJ J
Ste~ 3.
2-21
(49)
or
‘B .
= ‘P Z Pij ~j (tn) + P“ ‘ij ‘j (t”)
(50)
j=l
step 5.
Update the source strengths for this time step (tn) according to
Y.E.P.&
As described in Section 2.5.5, update the free surface representa-
tions. t%dify the free surface to account for the effect of the hull source
strengths on the free surface. Calculate acceleration induced by the free
surface at the center of each panel ~FS (t n +At) and the pressure induced by
the free surface disturbance at the center of each Panel PFS (tn ‘At) -
Step 7.
and pressure pA (tn ‘At) ‘nduced by the ambient wave field at the center of
each panel.
2-22
Step 8.
panels. A simple source and its image is distributed over each panel. The
expression for the body potential can then be expressed as:
‘B
$B (x,Y,z) ‘~ Oi ~~’ G(X,y,Z,X’,y’,Z’) dS’ (53)
i=l Si
in which
Panel source strengths are evaluated at each time step using+a linear system
of equations relating resulting total normal velocities (VT: ‘) at each
panel center to the source strength o, at every other panel ‘center and by
the satisfaction of the hull boundary ~ondition at the center of each panel.
The exact method of Hess and %nith [32] is used here to determine the normal
velocity component at the center point of panel i induced by a plane quadri-
lateral source element with a unit value of source density at the center point
of panel j. A body coefficient scalar matrix Eij is thus computed which can
be’used to determine unknown source densities when given panel center normal
velocities, according to
‘B
+ +
v“n=z E..o. (55)
Ti IJ J
j=l
As was shown in equation (46), the panel center total normal velocity is the
sum of components from the hull motion and induced velocities from radiated
and diffracted free surface disturbances and ambient wave field.
2-23
-~TILL WATERLINE
2-24
Also, in Step 3 of the computational sequence, equations (49) and (50)
show that the calculation of body-induced pressure at panel centers requires
the use of two other arrays }.. and Xij. The Xij array gives the x-direction
lJ
velocity component at the center point of panel i induced by a uniform source
(of unit strength) distributed over panel j and its image. It is thus very
similar to the Eij array, relating the x-component instead of the normal
component of panel velocities. In practice, it is evaluated directly from the
information used to evaluate Eij.
The }ij array gives the potential at the center of panel i induced by a
uniform source (of unit strength) distributed over panel j and its image, or
(56)
,.
Looking back at equation (53) for a moment, it can be seen the pij can be
computed by relating each panel center to every other panel center using the
expression for G(x-,y,z,x’,y’,z’), or in the indexed notation,
)..=
lJ
~~ dsi{[(xj -X.
1
f + (y.
J1
-Y. f ● (Z.
J1
- Z. f]- 1/2
Si (57)
a
= $(x,y,o,t) = -gll(x,y,t) (58)
2-25
a+
E l-l(x,y,
t) = -~ (x,Y,o,t) (59)
Now assume that both the elevation and deep water potential can be represented
by the real part of a finite summation of harmonics in the following forms:
‘kx ‘ky
q (X,y,t) = z Akxn z A kym
n=l m=l
i(kxn=x-kym~y) “z
+ B;m (t) mnm k;; e ] e-knm (61)
where
2
‘n
kxn,ky wave numbers in x and y; e.g., —
m 9
2
k k = kxn2 + kym2
nm nm
2 1/2
u u = g [kxn2 + kymz]
nm nm
2-26
Substitution of equations (60) and (61) into the free surface equations (58)
and (59) would confirm that the above elevation and potential expressions do
indeed satisfy the linearized free surface conditions. We would also obtain,
from those substitutions, the following relationships between the complex
amplitude functions:
d
~ AnM(t) = Unm Bnm (t) (62)
d
~ Brim(t) = - Unm Anm(t) (63)
where anm and bnm are complex constants. Substitution of (64) into (62)
yields the expression for Brim(t).
Equations (62), (63), (64) and (65) allow us to develop the expressions
for the time evolution of AnM(t) and Brim(t). Consider AnM(t) first. If we ,
increment the time in equation (64) by At , we obtain
Anm(t +At) = FInm COSLOnm (t +At) + bnm sin Unm (t +At) (66)
2-27
Using the following trigonometric identities,
Anm (t + At) = anm cos ~nmt cos tinm(At) - anm sin mnmt sin tinm(At)
+b nm sinw nmt Cos wnm(At) + bnm Cos Unmt sin ~nm(At) (68)
It can be seen that the quantities in the brackets are equivalent to the
right-hand sides of equations (64) and (65), so that we can now obtain
2-28
Identical expressions are used for updating A*nm(t) and B*nm(t). Thus, ex-
pressions (70) and (71) provide the means to update the coefficients which
define the wave field. To these updated values must be added any contribution
to the wave field from the body motion between times t and t +At , as de-
scribed next.
Next we consid,er the effect of the body source distribution on the wave
elevation field over the time interval At . Assume that the change in Anm(t)
induced by the body between .tn and tn + At is expressed by the sum of the
effects of the individual sources and their images. For convenience, we will
first replace a uniform source density acting over a panel of area Ai by a
single point source with strength
At any given point on the mean water level plane (x,y,O), the vertical
velocity induced by the source points and their images is given by
a$B(t) ~ ‘B ikx(x-xi) m
= — z si(t) ~ dkx e ~ dky COS ky(y-yi )
az T i=l o a
-(kxz + ky2)zi
“e (74)
Substituting (74) into the linearized kinematic free surface condition (59),
and integrating over the time interval At , we can rewrite (74) to show how
the elevation changes over At due to the body,
2-29
N
ikx(x-xi )
An B(x,y) = ~ ~~n~tAt XB Si (t) ~mdkx e ~-dky COS ky(y-yi )
n i=l o a
—.
-(kxz + kyz)zi
“e (75)
We may also write ArIB(X,y) in a different form, following the same form of
the original expression (60) defining the free surface elevation. In that
form, we can write
The changes in Bnm induced by the body can be derived from (78) and (79) using
the relationship between AnM(t) and Brim(t) given in (63). t%ltiplying both
sides of (63) by’ At and then integrating both sides over time, we obtain
BODY BODY
ABnm = - 1/2 &A (t) unm(Atf (79)
2-30
or
BODY*
with a similar expression for ABnm .
t
The effect of the body on the free surface can now be easily included by
BODY BODY* BODY BODY*
adding AAnm , AAnm , ABnm , and ABnm to the time evolution equa-
tions given earlier as (70) and (71) and the corresponding (complex conjugate)
expressions.
-ikym ●y
[ Anm (t) eikym”y + A~m (t) e 1 (81)
the acceleration at any point (x,y,z) coincident with a unit normal vector
(nx, ny, nz) may be written as
2-31
ikym ● y
[ Anm(t) ● e (ikyn ● nx + ikym ● ny - knm . nz)
-ikym ● y
+ A~m (t) ● e ● (ikxn c nx - ikym ● ny - knm ● nz) 1 (82)
Ag
$A(x, z,t) = ‘Fe ‘kzsin(kx-t) (83)
“$A ~
Vx(t) = - ~ = ~ e-kz cos (kx-ut) (84)
(85)
a Vx
-kz
ax(t) = Agk e sin(ky-tit) (86)
= T
av
az(t) .= & = Agk e-kz cos(kx-t) (87)
a+A
PA(t) = -PT.
- Ae_kz cos(kx-wt) (88)
2-32
We can now evaluate the normal acceleration and pressure induced at the
center of each panel by the ambient wave field. These quantities are used in
Steps 1 and 4 of the simulation procedure. The pressure is given in (88) and
the normal acceleration is simply
+ + + + + +
aA*n = aX”nX+a7*n7
(89)
L L
where the velocity components are given in (84) and (85). We will assume that
in an irregular wave system; the total velocity, acceleration and pressure
components can be described as the superposition of individual single frequen-
cy components.
and
where
(92)
and 6m = local sectional mass. Integrations are performed from the location
X. forward to the bow.
2-33
.—
.—
—
The lateral shear force, bending moment and torsional moment are given
as
df
SFZ(XO) =~bow, ~zdx (93)
‘o
dfz
BMZ(XO)‘~;:(x.xo)=dx (94)
dm
TMX(XO) = ~:ow #dx (95)
o
where
.. .. — ..
=- dm(z -x$-ye)
(96)
d$ dZw dZb
+-z
+ dx + dx ‘r q
(97)
dKh dKw dKb
+ dx + F + dx + ‘q
2.7 NUMERICAL
ASPECTS
2-34
range specified by the user in the input data. Since the hydrodynamic coeffi-
cients are also frequency dependent, they are selected using linear interpola-
tion from an array of twelve values associated with a range of twelve frequen-
cies specified by the user. Thus, when the two-dimensional sectional coeffi-
cients are to be both draft and frequency dependent, two-dimensional linear
interpolation is performed.
1
x’ minimum half-wavelength related to the smallest scale of
‘Y -
disturbance or physical feature of the hull that needs to
be represented.
There are no set rules for the selection of these parameters, and their choice
must be based on an understanding of the problem. There are, however, some
2-35
guidelines which generally seem to work well. The values of Lx and ~ should
be 2 to 2.5 times the length and beam of the body, respectively. The values
of lx, lY should be on the order of the average dimensions of the hull pan-
els. The parameter T can be set to about 60% of the actual time for which a
transient analysis is desired.
The wave numbers and wave number spacing are then specified according
to the following relations:
kx -kxn<~
n+l
x
(98)
kxN > ~
kx X
(99)
al
(loo)
2-36
which must be placed sufficiently far away from the body so that the free
surface disturbances generated near the body do not reflect back over the time
interval. Associated with the faster propaqatinq, lonqer wavelen@hs are
vertical walls placed further away - the” sho~ter fiavelen~th walls a}e near-
er. The result is that the time interval for each wave to reflect is equal.
For further discussion of the reasoning behind this method of wave number
spacing and selection criteria, see [5].
2-37
3.0 NUMERICAL RESULTS
Because the debugging and testing of SSX or any time simulation pro-
gram, for that matter, is an extremely time-consuming process, the extent of
the validation effort has been limited to the minimum number of cases needed
to test the capabilities of the computer programs and verify the basic theory
and numerical..techniques when possible.
3.2 MOTION RESPONSE AND HULL GIRDER LOADS IN SMALL AMPLITUDE REGULAR WAVES
Figure 6 gives the theoretical and experimental pitch and heave values
for the SL-7 containership at 25 knots in a full load condition. The experi-
mental values shown are by Dalzell [35]; the solid line represents the present
3-1
6.0 2.0
I
I
HEAVE
——— —C ON FORMAL MAP
FRANK CLOSE-FIT
6.0 - 1.6
4,0 1.0 w
mN
/ \
I
3.0 -1 . .
0.6
I
I
I
w (R AD IS EC)”
3.0 I /— I r I 1.5
SWAY
\ ––– CO NFORMAL MAP
—FRANK CLOSE-FIT
– 1.0
m m
u“ \ mm
1.0 - – 0.6
\
\
-—
/
,/ ,
1 1 I
0.5 1.0 1.5 2.0 2.5
I
Figure 4 Added mass and damping coefficients. Comparison of
HYDREX2 (Frank close-fit) with CGSCORES (Conformal
Mapping). SL-7 Containerships, Midships section.
3-2
....’
.-
I I 1 I I 1 1
&
YN m
o I I 1 WI
w!
5 XN u
90 - Q
w
80 - -1 n
I
w
m
w -2
70 - -2
u) <
,!/ z
-3 Q
w
w
> 1, 6- 1.s- >
0- 1.0-
s- 0.6-
z
-—
0 I 1 0 $
1 1 1 1
k/L i/L
3-3
....--’
. . ...’
--
. . ..
1.0
---- —
0,6
o — Ssx
4
w
z
1 /
/
o ‘ I 1 I I I I
I
w 0.6 PITCH
a
>
k
t i
z. 0.4 -
&
z
<1-
w~ 0.3 - /
>0
I
::
s 0.2 -
v SL7 CO NT AI NE RSHIP 26
+ KNOTS-HEAD SEAs-
; 0.1 -
/
0.6 0.6 1.0 1.4 1.6 1.8 2.0
i/L
3-4
method, and the broken lines are strip th~ory results from the SCORES Program
[4]. Note that the experimental values for heave at longer wave lengths have
not been included because it has been suggested [35] that they were too large
and are in error. (The short wavelength experimental values are assumed to be
correct. ) It is seen that pitch values predicted by SSX agree well with the
other values. Heave response, like before, is too high around A/L = 1.0.
The routine to compute hull girder loads in the present version of SSX
is still in a premature stage. The computation of moment arms and sectional
inertial forces essentially assumes a lumped mass model. There is no attempt
to account for “trapezoidal” sections of the weight curve. Also, weight
segments must correspond to the segment between adjacent stations. However,
—.
the routine, as written, does provide the means to evaluate the effect of
including various forces or different techniques by which to evaluate such
forces.
A test case was run to check the program’s ability to predict motion
and loads response in an irregular sea. The SL-7 was subjected to an irregu-
lar head sea wave system approximately representing a Bretschneider spectral
formulation with Hs = 10.8 ft and To = 8 sees, where Hs is significant height
and To is the period associated with the peak of the sea spectrum. Forward
speed was 5 knots. The frequency at which hydrodynamic coefficients used for
ship motion-induced forces were to be calculated was set to .8217 - the en-
counter frequency associated with the peak of the sea spectrum. The sea
spectrum was decomposed into ten components. Randomly generated phase angles
were used to gen’crate the irregular sea, superimposing the ten regular wave
components. A real time simulation of 20 minutes was carried out. Statistics
were acquired for heave, pitch and midship’s vertical bending moment. Table 1
compares the statistical results of the simulation with predictions from the
strip theory frequency domain program developed at MIT and described by
Loukakis [36].
As can be seen, the SSX motion values are slightly higher than the MIT
program values. The vertical bending moments compare very well. The measured
significant RMS wave height from the SSX simulation was close to the desired
value of 5.33, providing some assurance that the irregular wave spectrum is
correctly being broken down into wave components.
3-5
–––SCORE (E XT) .+
Ssx
o EXP. (D AL ZELL)
.i
0’ I t I I 1 1 1 I
0.6 0.8 I.o 1.2 1.4 1.6 1.8 2.0
~/L
Figure 7 Midship Dynamic Vertical Bending Moment for SL-7 Containership.
25 knots, head seas, full load, regular waves, ampl. = 1 ft.
1 I I I 1 I
I I 1
MIDSHIP VERTICAL
60
}
WAVE BENDING MOMENT
o 0
“In
40 0 2100HEADING
30 0
0
0
20
0
10
/,
o 1 I I I 1 I I
30 - MIDSHIP LATERAL
WAVE BENDING MOMENT
20 0
t 0
210° HEADING
I PITCH
0.1 - 0 EXP.(DALZELL)
0
0 I 1 ! I I I
0.4 0.6 0.8 1,0 1=2 1.4 ,,~ lw&
AIL
Figure 8 Midship Vertical, Horizontal Wave Bending and Pitch. SL-7
Containership, 25 knots, 210° heading.
3-6
Table 1
Ssx MITA
I I
RMS Pitch (deg) .2644 .2606
RMS Heave (ft) .5560 .5308
RMS V.B. M. (ft-tons) 56844 56415
One feature of the SSX program is the scheme to average the two most
recent zero-crossing periods and derive a “characteristic” frequency at which
sectional hydrodynamic coefficients are calculated. This feature was applied
to the same test case as before. The results are shown in Table 2.
Table 2
Ssx
3-7
3.4 NONLINEAR RESPONSE IN LARGER WAVES
Note that in Figures 9 and 10, the heave and pitch response has been
divided by wave amplitude. In both of these figures, nonlinear behavior is
exhibited; that is, normalized response is reduced at higher amplitudes, with
the exception of the pitch “bow-down” response. It appears quite linear. In
Figure 11, the midship’s vertical wave bending moment is shown for various
wave lengths and wave heights. Note that in this plot, the response has not
been normalized by wave amplitude. In general, response is linear with re-
spect to wave amplitude, with the exception of slight nonlinearities shown for
hogging at 15 feet wave amplitude for A/L = 0.75, 1.0, 1.25.
The effect of including flare forces on the heave and pitch response is
rather minor except around A/L = 1, as shown i I Figures 12 and 13, respec-
tively. The heave and pitch response is shown for a ten-foot regular wave
over a range of wave lengths. As shown in Figu es 12 and 13, the effect of
flare force inclusion is to reduce the amplitudes in both directions (heave up
and down, pitch bow-up and bow-down) between A/L = 1.0 and 1.25. It can also
be seen in these figures that for this wave ampl tude, the SL-7 containership
pitches bow-down more than bow-up, and heave-down more than heave-up over the
range of wavelengths.
3-8
ul
n
a
+
.
II . “3
mL
u
.
0
.
m cd 0 C4 m
o 0 0 0 0 0 0
I I I o
dn MOfl NMOa M08
a
L
.1-
U
.U7
mm
a >
i.. .
0
.
aJ l%-
e
3-9
.—
0.76
0.s0
e [
z
G
w
<
m ~/~=1.26(FLARE INCL, )
0.26 -
6
0.0
‘lg WAVE AMPLITUDE (Ft.1
-0,25
‘0.76 -
-1.0 0-
-1.2 s-
.-
-1.60L
3-1o
4.
3.
2.
1.
/
/
2 , , 1 b
! 0. 1 1 1 i
0.76 1.00 1.26 1.60 I
1.76 0.7s 1.00 1.26 1.60 1.76
~/i
~/1
\
———FLARE FORCE INCLUDED
z
-6 —NOT INCLUDED
z \ -1. ———FLARE FORCE iNCLUOED
0
Yu=”
\ —NOT lt4CLUDED
n
\
\
\ \
&--
-2.
-15
-3.
-4.
Figure 12 tfeave Amplitude vs. Wavelength/Shipl ength. Figure 13 Pitch Amplitude vs. Wavelength/Shipl ength.
Comparison of Theoretical Prediction with Comparison of Theoretical Prediction with
and’ without flare force included and without flare force included.
BY
9a
ma
aae
--==n- se.0%0
85. am
‘(
90.000
91 0%
92000
93.000
9’LW4 93.000
%Wd
94.000
96. %00
%. 000
97, em
96.000
9e. O&3
97, 009
99. @a@
m. 000
Table 3
Numerical Parameters
The vertical displacement of the sphere from its mean position is given by
Y = A sintit.
(m+a)~+b~+cy=YT.
where
The total hydrodynamic force acting on the body in the vertical direc-
tion is
Yh(t) =a~-b~.
3-14
.-
and
The amplitude y and phase shift B are obtained by comparing plots of the
displacement and dynamic pressure force Yh acting on the sphere as functions
of time and measuring the shift in phase. A comparison of the results ob-
tained with Havelock ’s results is shown in Figure 16. The solid line is
Havelock ’s results. The numerical predictions are shown as circles. AS can
be seen from Figure 16, agreement is excellent.
Figure 19 shows the diffraction wave system that develops from regular
waves (h = 1.4) imposed on the sphere. The ambient wave amplitudes have been
subtracted out of the free surface plot to more clearly exhibit the diffracted
waves.
Other Tests
Attem~ts were also made to: (a) test a semisubmerged sphere in forced
vertical oscillations at a uniform forward speed; and (b) to conduct forced
oscillation tests for ellipsoids with L/B ratios of 8:1 and 4:1. In each of
these cases, forces quickly increase to unrealistic levels, clearly Indicating
3-15
0 CALCULATED SSX
—. — HA VE LOCK (36)
2.6
l.e
o
1.2
ADDED MASS
o
0
u
0.8 o
0.4
I I I I
0.0 0,4 0.6 1.2 1.6 2.0
;—RADiu5
W2 i 9—GRAVITATIONAL
ACCELERATION
9
[ w2— FREQUENCY
3-16
,.
3-17
—,
c1 = FI(maX)
\“ P9 =[:1
2.1
2.
“+-iH-
0
\
n
z
< 1.4
d’”
1.(
0.6
O CALCULATED $8X
—FROM GARRISON (S7)
I I I I
0. 0.4 0.8 1.2 1.6 2.0
3-18
Figure 19 Diffracted waves from semisubmerged sphere,
regular unidirectional waves, k=l.4.
T=ll-19 seconds.
3-19
that there is some problem associated with both forward speed and cases with
shapes more closely representing a slender ship. The reasons for these
“blow-ups” could not be readily identified.
(5) Flare force is computed using the relative free surface velocity
in contrast to using a component of average subsurface wave
velocity. Furthermore, free surface distortion effects are not
included (diffractions, “pile-up,” etc.).
(7) The P, E and X source influences matrices are computed only for
the mean hull position in the present formulation. Details of
the computation are presented in Volume II of this report.
(9) Pitch angle must not become large enough to cause the intersec-
tion of a station plane and the sea surface so that multiple
regions or a closed contour in the station plane is defined [3].
Run Times
Typical run times for several simulations with strip theory derived
forces and three-dimensionally derived forces are shown in Table 4 for a
VAX 11/750 without a floating point processor.
3-20
Table 4
I%tion and Hull Girder Response of 25-station ship 1200 CPU seconds
in one regular wave. Steady state evaluated after
2 minutes real time with At = 0.5 sec.
;om~utational Requirements
The computer programs were developed on a DEC VAX 11/750. The peak
working set size was 250. The memory requirement for the completely integrat-
ed program (2D plus 3D) is 650K bytes. When the 3D subroutines are not used
and only 2D simulations are used, the memory requirement is 250K bytes.
3-21
4.0 CONCLUSIONS AND RECOMMENDATIONS
Although the method presented here and the associated computer program
need additional attention to advance them from the investigative and develop-
mental stage at which they now are, some progress has been made toward a more
advanced method for ship motion and wave load prediction. There presently
exists no other program for the time domain simulation of ship motions and
loads in six degrees of freedom for a full range of headings. Nor is there
any other program capable of predicting three-dimensional distributed hydro-
dynamic pressures in the time domain for arbitrary ship motions in waves.
The CAPSIZE program [3,29] and the NSUP program [6] which were used as
starting points for the present method have been extended or modified in the
following principal ways:
The bulk of the effort in this project was committed to the concept
development of a suitable method and the development and testing of the com-
puter code. Because of the particularly time-consuming nature of debugging
and testing simulation programs, the extent of the validation effort has been
limited to the minimum number of runs needed to verify the capabilities of the
4-1
computer programs and evaluate the basic theory and numerical techniques when
possible. A full and extensive validation of the methods and codes would
require the type of test program typically associated with actual (physical)
model testing, with a level of effort representative of a major project in
itself. An outline of a simulator test program is provided in Appendix A as a
possible basis for the same type of studies reported in SSC-246* [40] and SSC-
271** [41] to validate and further investigate SCORES after its initial devel-
opment.
Recommendations
Near-Term
(a) Investigate the method used for computing the source panel veloci -
ty array and the source potential influence array. The so-called
exact method of %ith and Hess might be improved. M3re efficient
methods might also be incorporated. There may be reason to sus-
pect that the problems with the ellipsoid tests attempted are due
to numerical problems in this area.
4-2
(c) Examine the feasibility and necessity of applying a different
free-surface condition interior to the hull. As Chapman suggested
in [6], instead of using the linearized free-surface condition
over the entire free surface, the surface elevation interior to
the hull can be constrained to be uniformly zero by placing sur-
face panels over this region. This would suppress standing waves
which are excited in the hull interior as a by-product of the
potential flow method of simulation.
(h) Examine the feasibility and identify the numerical techniques that
would allow for the underwater hull form to change with time.
Mid-Term
4-3
Far-Term
9. Linear wave theory was assumed for the present model and is consistent
with the linearized free-surface formulations associated with strip
theory and the three-dimensional method. It may be worthwhile, how-
ever, to pursue the use of a nonlinear wave theory to generate large
amplitude deterministic unidirectional waves. Although the nonlinear
wave could not be applied, in a strict sense, within the hydrodynamic
formulations as they exist in the two- and three-dimensional formula-
tions, they could be accounted for in an approximate way. Hydrostatic
and dynamic buoyancy forces could be accounted for “exactly.” Ship
motion-induced hydrodynamic forces could be approximated as they ,are in
the present version. Diffraction forces could be possibly estimated by
using the same method as now exists but representing the nonlinear wave
in the ‘vicinity of the ship with a similarly proportioned linear
wave. For the transient pressure simulation, the exact nonlinear wave
kinematics could be used to prescribe part of the body boundary condi-
tion at the center of each panel.
10. The use of the impulse response function and convolution integral to
predict ship motion-induced damping forces should be investigated and
appropriate subroutine(s) included in the present version. This would
be a partial alternative for the “characteristic frequency” scheme now
in place.
The efforts listed under each of the above categories can be grouped
into the three separate projects with the following approximate level of
effort suggested:
4-4
REFERENCES
2. I@ek, M., et al, “The Structural &sign of the O.C.L. container Ships,”
Trans. RINA, Vol, 114, 1972.
3. Oakley, O.H., Paulling, J.R. and Wood, P.D., “S,hip I@tions and Capsizing
in Astern Seas;” Tenth Symposium on Naval Hydrodynamics, MIT, Cambridge,
pp. 297-350, ONR Report ACR-204, June 1974.
6. Chapman, R., “Time bmain Fkthod for Computing Forces and I@ments Acting
on Three-Dimensional Surface Piercing Ship Hulls with Forward Speed,” SAI
Report No. 461-80-560-CJ, September 1980.
10. MzCormick, S. and Thomas, J.W., “h%ltigrid ~thods Applied to Water Wave
Problems,” Third International Conference on Numerical Ship Hydrodynam-
ics, Paris, June 1981.
11. Bai, K.J., “A Localized Finite Element I@thod for Three-Dimensional Ship
I’@tion Problems,” Third International Conference on Numerical Ship Hydrod-
ynamics, Paris, June 1981.
.
12. Bai, K.J. and Yeung, R.W., “Numerical Solutions to Free Surface Flow
Problems,” The Tenth Symposium on Naval Hydrodynamics, Office of Naval
Research held at MIT, Cambridge, 1974’.
13. Chen, H.S. and Iki, C.C., “Oscillations and Wave Forces in a Fbn-htide
Harbor in the Open Sea,” The Tenth Symposium on Naval Hydrodynamics,
Office of Naval Research held at MIT, Cambridge, 1974.
REFERENCES (continued)
14. Seto, H. and Yamamoto, Y., “Finite Element Analysis of Surface Wave
Problems by a I@thod of Superposition,” The First International Confer-
ence on Numerical Ship Hydrodynamics, DTNSRDC, Bethesda, pp. 49-70,
(1975).
15. Yue, D.K.P., Chen, H.S. and hki, C.C., “Three Dimensional Calculations of
14ave Forces by a Hybrid Element Wthod,” The Eleventh Symposium on Naval
Hydrodynamics, Office of Naval Research, pp. 325-332, (1976).
20• Skjordal, S.0., “A Rational Strip Theory Approach for the Evaluation of
Springing,” Norwegian Institute of Technology, Trondheim, January 1978.
21. Troesch, A.W., “The Diffraction Potential for a Slender Ship Pbving
Through Oblique Waves,” lkpartment of Naval Architecture and mrine
Engineering, The University of Michigan, Report No. 17, 1976.
22. Bourianoff, G.I. and Penumalli, B.R., “Final Report on Computational Pre-
diction of Ship Motion in Confined Waters Using Inertial Marker Parti-
cles,” M4RAD Report M4-RD-940-77084A, November 1978.
24. Nichols, B.D. and Hirt, C.W., “Nonlinear Hydrodynamic Forces on Floating
Bodies,” Second International Conference on Numerical Ship Hydrodynamics,
Berkeley, September 1977.
25. Chuang, S., Schroeder, A.E. and Wybranice, S., “Structural Seaworthiness
Digital Computer Program (ROSAS),” DTNSRDC Report No. 77-0001, Pay 1977.
26. I@yerhoff, W.K. and Schlacter, G., “An Approach for Extermination of
Hull-Girder Loads in a Seaway Including Hydrodynamic Effects,” Ocean
Engineering, Volume 7, No. 2, 1980.
.—
REFERENCES (continued)
27. Borresen, R. and Tellsga, R., “Nonlinear Response of Vertical I%tions and
Loads in Regular Head Waves, Part I (Text) and Part II (Figures),” DNV
Report 79-1097, December 1979.
28. Oliver, J.C., “Development of an Advanced kthod for Ship Pbtion and Wave
Load Prediction - Phase I Report,” Giannotti & Associates, Inc. Report
No. 80-083-OOl,’ January 1982.
29. Fallen, W.J., Hwang, Y.L., Liquori, J.L., Paulling, J.R., Viseneau, G.
and Wood, P.D., “Fbdel Tests and Numerical Simulation of Ship Capsizing
in Following Seas,” USCG Report No. CG-D-08-81.
30. Chakrabarti , S. K., “Laboratory Generated Waves and Wave Theories,” Jour-
nal of Waterway, Port Coastal and Ocean Engineering, Volume 106, August
1980.
32. Hess, J.L. and %ith, A.M.O., “Calculation of Non-Lifting Potential Flow
About Arbitrary Three-Dimensional Bodies,” Douglas Aircraft Company,
Report No. E.S.. 40622, March 1962.
33. Zielinski, T.E., “User f%nual for Program SCORES, Second Part of the USCG
Ship Mtion Program,” HMC Report CG-M-8-80, July 1980.
34. Gerritsma, J. and Beukelman, W., “Analysis of the l%dified Strip Theory
for the Calculations of Ship hbtions and Wave Bending “f%ments,” Inter-
national Shipbuilding Progress, Volume 14, August 1967.
35. llalzell, T.F. and Chiocco, K.J., “Wave Loads in a Fbdel of the SL-7 Con-
tainership Running on Oblique Headings in Regular Waves,” SSC-239, 1973.
37. Havelock, T., “Waves Due to a Floating Sphere Making Heaving Oscilla-
tions,” Proceedings Royal Society of Architects, 231, 1955, pp. 1-7.
38. Kim, W.P., “On the Harmonic Oscillations of a Rigid Body on a Free Sur-
face,” Journal of Fluid t%chanics, 1964.
1.0 OBJECTIVE
Headings 180, 0
Test Series No. Runs CPU Hours Per Run Subtotal Hours
A 120 1 120
B 200 1 200
c 120 1 120
144 1 144
; 20 32 640
F 6 32 192
G 20 32 640
2056 CPU HOURS
VOLUME II
James C. Oliver
GIANNOTTI& ASSOCIATES, INC.
under
Department of Transportation
United States Coast Guard
Contract No. DTCG23-80-C-20032
h?ay 1984
703 G1l)I)lNGS AVENUE, SUITE U.3mANNAPOLIS, MARYLAND21401 ,(301) 268-0030. D.C. 261-1031
,— 1725Jefferson Sui~e912●Arlington,
DavisHighway, Viiginia22202.(703)892-2360
1847Berkeley
Way.Berkeley;California
94703.(415)841.5875
TABLE OF CONTENTS
Paqe
APPENDIX A
—.
.-
1. INTRODUCTION
This volume (Volume II) provides instructions to the user for performing
computations with SSX, HYDREX2 and HYDREX3. A technical description of the
model formulation and solution procedures are provided in Volume I.
1-1
2. GENERAL STRUCTURE AND COMPUTATIONAL OVERVIEW
pro9ram HYDREX2 uses the [BIF] file and [OFF] file to calculate two-
dimensional hydrodynamic added mass and damping coefficients using the Frank
Close-Fit method. HYDREx2 places the results of its computation in a two-
dimensional ——
coefficient file ICOF]. It also provides a printout of its
results.
Program HYDREX3 uses the [PAN] file to compute panel center coordinates,
areas, normals, source density matrix [E], panel pressure matrix [Pp] and ,
forward velocity pressure matrix [PX]. The results are placed in a data file
[MAT]. HYDREX3 need not be run if it is anticipated that distributed
pressures wi 1 not be required.
Program SSX uses the [BIF] data file, the [COF] data file, the [MAT] data
file (if a ressure distribution is desired), and the [OFF] data file. Ssx
output includes an input data summary, time domain results and response
statistics.
2-1
1 1
BASIC OFFSET
R
HULL
INFO DATA PANEL
FILE FILE FILE I
(.....BIF) (......OFF) ( .....PAN)
PROGRAM
HYDREX2
t
YPROGRAM
HYDREX3
1 2-D
HYDRO
3-D
MATRIX
COEF’S FILE
(.....COF) (.....MAT)
Y 1
I
I PROGRAM SSX
I
# *
-
OUTPUT
0 INPUT DATA SUMMARY
o TIME DOMAIN RESULTS
o MEAN, MIN/MAX, RMS
STATISTICS
A B
a“ Y
c
READ
DATA-=FILE . tn=o
NAMES
t =t
I
9
+At
n+l n
I
(3,
PRE;ARE HULL
F (7
EVALUATE
..
Pw?&@s... J ‘HOIJIITliQORDFR
,HULL
AND It$TTIAL%?E RUNGA-KUTTA
GIRDER
‘.-CERTAIN INTEGRATION
LOADS
‘E
I
/ COFFEE \ t ‘ I
GE)
frequencies/
I
I NO
v 6
. DERIV K
EVALUATES
DERIVATIVES IN FINI
EQUATIONS OF SUMMARY
MOTION STATISTICS AND
FINAL DISPLAY
OUTCOF
Qo
DISPLAY 2-D FIGURE 2
HYDRO COEFF’S
TO BE USED COMPUTATIONAL PROCESS ASSOCIATED
WITH THE SETUP AND SOLUTION OF
THE SHIP EQUATIONS OF MOTION
B
At this point all-data has been entered, and subroutine PREPARE is called
to initialize certain arrays and perform some computations in preparation for
the simulation. Next, subroutine COFFEE is called to load a set of arrays
that contain the initial set of two-dimensional hydrodynamic coefficients
associated with the mean still water draft, the frequencies of encounter of
the wave components and the predicted characteristic frequencies of ship
motion.
The program then calls FOLIO1 to display the basic input data and some
computed preparatory information. At the option of the user, subroutine
OUTCOF can be called to display the initial set of two-dimensional
hydrodynamic characteristics.
Now the actual simulation is ready to begin. At each time step, the
subroutine FOLI02 is called to display motion and loads response values for
that time. Thus FOLI02 is initially called at t=o. The program then
proceeds with the simulation. Within the time step loop in the main program,
three subroutines are called - RK4, HIJLLand pRESSURE. The subroutine RK4
sets up and solves the equations of motions, the subroutine HULL evaluates
hull girder loads, and the subroutine PRESSURE evaluates dynamic pressure at
the center of each hull surface panel. PRESSURE is only called for a user-
selected period of time within the simulation. Both the RK4 and PRESSURE
subroutines lead into the large number of subroutines which will be described
in the next two paragraphs. At the end of each time step, the time is
compared to the user specified stop time. The loop is updated if the stop
time has not been reached. If it has been, the simulation stops, and
“subroutine FINI is called to provide summary statistics.
2-2
subroutine AQUAZD calls a number of other supporting subroutines and
functions. MOCHA evaluates 2-D hydrodynamic coefficients when they are to be
a function of sectional draft and/or ship motion characteristic frequencies.
2-3
u RUNGA-KUTTA
INTEGRATION
OF E.O.M.
FORCES
v ETABAR
FNC ETP,F
EVALUATE
EXPONENTIAL WAVE SURFACE
ELEVATION
)7B~
FIGURE 3
o ACPTR
COMPU
PRESSURES AND
&%a
CCELERATIONS
FREE SURFAC
v
Q
POTB
GET...,.
BODY INDUCED
PRESSURE
0
CFSR
ADVANCE FREE
SURFACE
FIGURE 4
The th’ree codes conform to ANSI X3.9-1978 FORTRAN 77. They were
developed on a Digital Equipment Corporation VAX 11/750 computer with a
working set size of 250 pages. The only obvious machine depending coding are
OPEN statements to open and assign files.
Rather than completely developing new codes, two previously developed and
tested codes were used as a basis for the present three codes. The CAPSIZE
program written at the University of California, 8erkeley by Paul Wood was
used as a starting point. The basic variable assignments used in that program
were retained, as was the basic computational scheme for the equations of
motion. For the three dimensional pressure computations, a program developed
by R.B. Chapman entitled NW was used as a starting point. Some of the
subroutines contained in NSUP and CAPSIZE were adopted directly, while others
were completely rewritten. A number of new subroutines were written as well.
3-1
SSX Subroutines
...—
READIN Reads data from the basic information file [BIF], the ship
offset file [OFF], the sectional hydrodynamic coefficient
file ICOF] and the panel pressure matrices file [MAT].
Prints an echo of data read from [BIF]. Called from MAIN.
3-2
ROTATE Sets up coordinate system rotation matrices. Called from
PREPARE, FORTIS.
input errors.
3-3
frequencies associated with each wave component and at
“characteristic” frequencies of ship motion initially
assumed to be the modal frequency of the sea spectrum if
irregular waves are imposed.
FUNCTION ETAF Provides the coordinate of the water surface in yawed and
pitched coordinates given a section number, distance off
the centerline and relative displacement of the section.
GETFREQ Evaluates the average of the two most recent zero crossing
periods and calculates characteristic frequencies of ship
motion in heave, sway and roll. Called from RK4.
3-4
FOLIO1 Displays or prints a summary of basic input data. Called
from MAIN.
3-5
ACPTR In the pressure computations computes free-surface induced
accelerations ACNW(J) and pressures PRFS(T) at panel
centers. Called by PRESSURE.
HYDREx2 Subroutines
3-6
FLOAT “Floats” the ship at the specified draft. Creates a set
of “wet” offsets to be used for hydrostatic calculations
and for the computation of sectional hydrodynamic
coefficients.
3-7
HYDREX3 Subroutines
MAIN Reads input data and calls subroutines EBD and POTST.
3-8
under the assumption that their separations are large
relative to their dimensions.
3-9
4. RUN PROCEDURES
When HYDREx2 is run, the only required input is the following three files
names:
Descriptions of the [BIF] and [OFF] file are given in the next two
sections.
The basic information file is used for programs HYDREX3 and SSX as well
as HYDREX2. The full [BIF] file will contain more information than that which
is described below. However, to run HYDREX2, only the first part of the [BIF]
file need be created. The remainder can be created at some other time prior
to running SSX. Table,1 below summarizes the input data variables and the
associated format.
4-1
TABLE 1
1 TITLE (A)
2 TF, TA 6F1O.O
3 XCG, YCG 6F1O.O
4 (DRAFT (I), 1-1,6) 6F1O .0
(OM(Ih 1=1,12) 6F1O.O
: YMAX, ZPIAX,WMAX, NWL 3F1O.O, 115 .
7 NFklD 15
8 (YFwD(I), xFwD( I), I=l,NFwD) 2F1O.0
NAFT
1: (YAFT(I), XAFT(I) , 1=1, NAFT) ::10•o
●
4-2
YMAX, - Specifies the maximum desired vertical (YMAX) and horizontal
ZMAX separation between adjacent offset points for calculation of two-
dimensional hydrodynamic coefficients. If both YMAX and ZMAX are
positive values, interpolated offset points (straight line) will
be added bef r c reputing coefficients using the method developed
by W. Frank ?1$67?.
WMAX - A “deck” on the interior waterline h’as been added to the geometry
of each which is surface piercing to avoid “irregular”
station
frequencies. The default is to use only one segment for this,
but a positive WMAX will allow multiple segments each with a
maximum length of WMAX.
XAFT(I) - Distance of point I of the after profile measured aft of the last
(MSTA) stat-i
on. If NAFT=l, XAFT(l) is defined to be the after
most point of the submerged hull.
4-3
The offset file [OFF] contains the ship’s offsets in the SHCP* format.
Pm actual SHCP data can be used for the [OFF] file. HYDREX2 will read only
what it needs. Table 2 below summarizes the input data variables and
associated formats.
TABLE 2
“ SHCP CARD C - This can be the actual SHCP Card C or simply one variable
or SPACE SPACE, where SPACE is the station spacing. It is actually a
multiplier of the x-values of the stations given in the next
card set.
STATN The real distance from the station to the F.P. is the
product of STATN and SPACE. The STATN values must be the
same for all offsets on the same station.
4-4
Y1 The half breadth of the offset point. “Ine 07Tsets
‘“ “ Tor
“ each“
station should be ordered from the bottom toward the
uppermost parts of the station.
For HYIIREX2, the maximum number of offset points per station is 25.
However, for SSX, the maximum number of offset points is 12. It is
recommended that as many offset point (up to 25) as possible are used for
HYDREX2 to increase the accuracy of the close-fit calculations. However,
prior to running SSX, the [OFF] file must be edited to delete extra offset
points in order to reduce the total number per station down to 12. The number
of stations must be limited to 25.
When HYDREX3 is run, the only required input is the following two file
names;
4-5
Table 3 summarizes the input variables and formats for the data for the
panel description file [PAN].
TABLE 3
XPT N - The coordinates of the nodal points used as corner points for the
YPT
ZPT 11
N
N
panels.
downwards,
The coordinate system used here
X positive forward and Y positive
has Z
starboard.
origin is at midships at the mean design water line.
positive
The
KK(M,l) - These are four integers which identify which nodal points are
used to define the corners of the panels. The convention for the
sequencing of the aft panel corners is to go around the panel
clockwise when viewed from outside of the ship hull along the
panel normal.
4-6
4.3 PROGRAM SSX
The program initially asks for the names of these four files in the above
order. It then reads the data. If the [MA~ file name is ‘NONE’, then no
pressure computations will be performed, and data sets 21 and 22 in the IBIF]
file are skipped. The first eight data groups in the IBIF] file were given in
Table 1. The variable and format list for the remainder of the [BIF] file is
given in Table 4.
4-7
TABLE 4
9 DISPL 8F1O.O
11 SPEED 8F10.O
14 IXWAVE 12
IXWAVE = 1 + Include Set 14A
IXWAVE # 1 + Include Set 14B
4-8
TABLE 4 (Cont.)
J
6AsIc INFORMATIONFILE (PARTIAL)
18C JOBCO 11
19
I NWTSTA 12
4-9
The variables and their use are further described below.
I
Xy = lyx ‘Pxy ● If’xyl “m
where m is the mass of the ship
4-1o
IXWAVE Flag to indicate how the user wants to specify the wave
system. IXWAVE=l means the user will specify the amplitude,
frequency, direction and phase angle of NWAVE wave
components. IXWAVE ~ 1 means the user will specify the
significant height and modal frequency to be used for a two-
parameter (Bretschneider) unidirectional sea spectral
formulation from which 10 wave components will be calculated
with random phse angles.
WVAMP(I) Prnpl
itude of wave component I (ft)
4-11
VELOC(3) - Initial sway velocity
The position values are specified with respect to the wave coordinate
system fixed on the earth. The velocities are with respect to the ship
coordinate system. Positions are in feet: velocities in feet/see.
1 Fix Fix
F1oat Fix
: Fix F1oat
4 F1oat F1oat
4-12
Floatinq freauency means the comuuted “characteristic”
frequen~ies of m;tion as
progresses are
the simulation
used. Floating draft means the actual instantaneous mean
sectional draft is used at each time step.
4-13
i3GY - Maximum transverse length scale. Corresponds to Ly in eq.
(72) of Volume I. Try 5B
An example of actual input and output is shown in the next section with a
sample run.
4-14
5. SAMPLE CASE
--
This ,example is for the SL-7 containership. An example of the [BIF],
[OFF] and [PAN] data fiIes are given. The IBIFI file is in free format. An
The sample case shows the full load SL-7 containership at 25 knots in
head seas in a one-foot regular wave of m = 0.34. The basic information
file [BIF~ is shwon in Figure 5. The offset [OFF~ file is provided as Figure
6 and the panel file [PAN] is given as Figure 7. An example of the output of
-.
5-1
/-. ./. ,---., ,- ‘P., ,F.. .-. ,---- ,f- ,.—. ,-. ,/-.. -. .-., r-.. ,.-. .-. ,-. n ---- ,-,
I 1
! 1
t.i -- ~ -- -- - -
-n .
Q
6
u-l
.
-n
A
i
/-’ -. -. ,P.
f-.
,-., ,n: ,,.-
., .-. ,- ,..- ,.-.. ,-. n: n, 0. .,-% .-. ,-. .-.
,, ,
1 1, I
o
z
-1
D
H
m co
m m 8
ml m m
m m m
00< u
Ooc c
00< c
CJwrl
pylj g
I
..
..-. ,..-.. ,,-.. .,-.. ,-.. ---- ,— ,-. .-,
,A .-,
,P .- J’.- n, .-, ,-, ,<-. P. ,.-.
i’:” 1 I
---1 ‘
.
i&ll
101
1. .
0CJIUI(JIU?OOOOOOOOOOOOOOOCIOOOOOOOOOO13C300(
Oooooooc)oooooooooc)ooooooooooooooooc)r
0000000<
00UIUIUIOOOC300000000000UIOOOOOCJOC300QOOO(
Ooocloooooooooc)oooooooc)ooooooooocnooot
,,. ,
-. .,.... . . . . . . ..-...——- ---- . . ... ..- —----- .. ..—.
== -------------------- ----
-------- -------- ---------------
---- -------- ----------------------------
---- ---- ---- ---- ----=
--- =---- ----- -======
51-”7C~tdTAINERSl+IP ADDED MASS/DAMP IhlG CtlEFFIC IENTS PilOGFt~M HYI?REX
z=-== ===== ===== ===== ===== ===== ===== ===== ===== ===== ====== ===== ====== ====== ===== ==
Station 12
----------
Dist. from F.P. -3’76.23 Area 3031. 3b5
DRAFT (fwd ) 32. SO Roll CtT abv WL o.C)88
DRAFT (aft) 32.80
37.31 9.51
2::: 37.31 ?. 51
296. 37.31 9.51
49&. 37.31 9.51
1143. 37.31 9.51
1134. 935 37.31 9.51
I&al. 707 37.31 9.51
2040. 942 37.31 9.51
2508. 421 37.31 9.51
2S78. 811 37.31 9.51
3053. 338 37.31 9.51
3571. 325 37.31 9.51
3530. 823 37.31 9.51
3175. 774 37.31 ?. 51
3725. !574 37.31 9,51
pg. 428 37.31 9.51
390 37.31 9.52
3151: 427 37.31 9.51
2534. 043 37.31 9.51
1915. 4!59 37.31 9.51
1761: 739 37.31 9.51
715. 479 37.31 9.51
715. 479 37.31 9.51
747. o2b 37. 3i 9.51
747. 024 37.31 9.51
3757. 1; ,. moo .,
3778. 2671 “ 1. 1. 0000
37?’7.2751 1. 1. 0000
3820. 2847 . 0000
3841. 3008 !. 0000
3862. 3284 :. 0000
3883. :3$: . (22::
3904. Im
3923. 5173 0.0000
3946. 6223 5090 0.0000
39&7. 7488 -o. 7573 0.0000
3988. 8945 -o. ?&03 0.0000
4010. 056? -1. 1060 0.0000
4031. ::;; -1. 1858 0.0000
4052. -1. 1?49 0.0000
4073. 5?76 -1. 132? 0.0000
:$7. 7822 -1. 0034 0.0006
9570 -0. 8i41 0.0000
0000 6535 4137: 57&3 0.0000
5000 4158. % 3041 0.0000
::(2: 4179. -o. 0138 0.0000
y:. 0. ;;;; 0.0000
0000 . 0. 0.0000
...-
RIRlo-
rufuoul L
03mulQ
R)-QCJ-O
p .c!)p
m Q w
w o , ,.
m 0 . :
,
u 0
m 0
Ell r$ y
o o
m 0 .’
,..
..
------- .W.
PR 5URES
0.3s415915E 0.243143S1 0,23651377 0.22607508
0. 19244052 0. 17774074 1.146(31755 1.16095450
1.0575’14a5 1.25’1890H6 1.40547327 2.06866050
2. 15??0114 2.33324197 2.645’6288S 3.#~--
3.24160S3S 2.96588731 3.32186317
4.042835’53 3,7B925920 3.979--
4.746229&5 4. 53059387
5,024117?5 5.234Q=*”
5.02339220
5.=3894’-”
1--
-----------TOTAL PRESSURES------------------
-1.460344el -0.83654284 -0.7B719705 -1.71809840
0.230A3746 1.lsEm5934 -0.455S7230 -0. 17283418
i7.&44132&l 2.4880Vb95 1.18732224 0.37171781
1.17200%’83 1.B34911.?4 2.47403312 o.999a=p-
1.397259?5 1.88052142 2.80034971 .
1.43824S29 1.74238777 2.9354397’
2.7B2&i32S 2.71100593 3 ‘“”
54.71600723 3. 11=89052
8. 527?4073 7. 5n’~-
f - “.-- .--
-—-.+ —- . -
El 3Y INIYJCEDU-pREEiWi?IE~-
- --- . . . . .....
-1.S5250449 -1.07970467 -1. 023710S5 -1.94417346 -0.20395313
0.038”16893 1.#lC)30862 -1.6018S9H5 -1.33379249 -0.83561438
16.58621708 1.19620597 -0.2183509H -1.69694249 -1.50451446
-0.9B78?138 -0.49835002 -0. 175595H1 -2.0237112~ -1. 9503607?
–i.e4434843 -1.08536589 -O. 52151340 -0.05880385 -2.2414H512
-2.6044’7123 -2.04687142 -1.036s8288 0.02363856 1.00504485
-1.YA341649 -1.Gl?50807 -0.790B19B2 -1.89128637 2.57368040
51.691S9072 -2. 11A05954 -1.6540Emo3 -1.66934085 -1.67518842
3. 50454s55 1.9314B851 -1.42030024 -0.A0449553 1.H4978557
0.40260637 -Q.42282950 -0. 58973241 -0.03671409 2.83566427
–0.41253781 0.83&56~74 -0. 10891942 0. 357E%502 0.00000000
0..03906842 -2. 5%87184 -1.4207J5239 -0.77=43022 7.7?IB7298
-0.359=9502 -0. 11869927 -0.319516.56 -1.839898?4 -1.40328050
‘-O.7316A758 11.49159718 -0. 16707416 -0.29368&S7 -1.92022?55
-1.52942920 -1.04738855 -0.60?60990 –0.22b13873 -2.24740?11
-1. 750B9B48 -1.78046894 -0.91=61057 -0.41995418 0. 1242’7215
-2.62914S30 -2.34276557 -1.72142&?& -1.2234=630 1.35021770
30.93821144 -2.CIli624iQ -1.54072320 –0.79989606 –1. 55071521
10.H7392330 0.00000000 -2. E!S91344 -1.69489515 -1.51071918
-1.301588Q6 2. 1A3R3004 1.1H314898 –1. 51%30424 -0.68913701
1.78912711 0. 5&204?45 -0.96726221 -O.7186!59S2 -0.384B8629
0.34184885 -O.672S2838 -O.&7954263 -0.362576E4 0.79844165
0.00000000 -0.03861484
Program Listings
HYDREX2
HYDREX3
Ssx
A-1
APPENDIX A
Program Listings
HYDREX2
HYDREX3
Ssx
A-1
—.. .,. .. . . . .- ,w~..-..-. -------- . ,.. , . . . . . . .
R*
,.+
\.,
PRt3GRAM SSX
c
CHARACTER*25 OFFIL, BIFIL, C13FIL,MATFIL
CHARACT.ER*30 TITLE
(25J6)
cc
cc
CCIMMOhl / / NW~VES, ldVSUM,
WV~flP(20)J WVFRE{20)# id’#IlIR(2011 WVPH~( 20)J
: WN(20), WNX{20), WhlZ(20)J
3 CSK(201, CCK(20), CXK(201J
4 CYK(20), CZK(20), XW(20)
COMIW3N
— / / MSTA, NPRCIFJ
.. ..—. NFWDJ NAFT, LPTS(25)J
XgFF”(25)1 YOFF”(25;25)~ ZOFF(25J25)t
; XPROF(51)J YPR~F(51)
COMMaN /DAMP / 13AMPL(6), DAMPQ(6)
CnMMOhl /LHS Y(13)
CnMMOBl /PIASS j RHQ, GJ GAMMA
(-
‘..
COMMCIN /MASS / DISPL, SMASSJ XCG, YCC, ZC~J
1 AMXJ AMY, AMZ, RADII(6)
COMMON /M~SS / PMI(3,3)
COMMON /RESIST/ SPEEI)
camm~~ ITIME “> TIME, RAMP
CaMMDN /TIME / TO, TSTART, TSTOP, TOUTF’T# TSTEP/ ERR
CUMMW/PREX IN/TPSTARTJTPSTOPJ TPRAMP#BGXJSMXJ BGYJsMYJTSC~L .E
.. CnMMON/I)RFTl/ DR~FTl(&)
!
\ .. COMMON /SIGPIA / NK# SIGMA(24)# SIGMAOJ ERRQJ 0M(12)
COMMON /STATS i NRHS(4)1 DELTAJ HSUMr HMIN~ titlAX#TTO, TT1
DATA TO /0.0/
DATA NEQS /12/
LOGICAL WLIADJUSTI INTERACT
DATA RH~ /0.000S8861&07142/
DATA ERRO/1.OE-37/
,. DATA ZNPUT/5/,CIUTPUT/6/,BIF/l/J ~FF/2/,COF/9/ r
(, DATA MAT/3/
c
c *** 1.0 Get DATA file names and assignlopen files
:’“ c
TYPE 902
ACCEPT 901,BIFIL
TYPE 903
{’
\
ACCEPT 901JUFFIL
TYPE 904
ACCEPT 9G1/COFIL
TYPE 905
ACCEPT 5’OIIMATFIL
b
OPEN(UNIT=BIFI STATUS=’OLD’J FILE=BIFIL)
OPEN(UNIT=OFF, STATUS=’OLD ‘JFILE=DFFIL )
UPEN(UNIT=COF, STATUS=’OLD ‘JFORM=’UNFORMATTED ‘JFILE=COFIL)
IF{MATFIL. NE. ‘NDNE’) 0PEN(UblIT=M4TJ STATUS=’OLD ‘tFOFIM=’WNFuR
1 M~TTED’, FILE=MATFIL)
m
~ +*+ 2.0 Read in data from CBIFl, t13FF3 and [COFS files
CALL READIN
i *** 3.0 Perform p~ipa~atory computations
CALL PREPARE
c
CAl_L COFFEE
CALL FaLIOl
IF(JOBPO{l). EQ.1) CALL WTCOF
F
L
c *** 5.0 Simulation
c
WRITE (OUTPUT, 130)
TSTEP=-ABS(TSTEP )
T IME=TO
TTO=TO
TT1=TO
110 CALL FOLID2 !Shaw time zero candition
TNEXT=TIME+TOUTPT
c *** Fburth-urder Rungs-Kutta inte ratian
CALL RKF (TItlE, Y,ThlEXT,ERR,hlE 8 S,TSTEP)
c *** Get hull gir’der loads
CALL fi~i~
c ***
%~T!ME-TPB;S~?”res
IF(TP. GE. O. .AND. TP. LE. TPSTART) CALL PRESSURE
c - - - .-. - - - -, - . . - - . . - -. . - . . --- —-- ,.-.+- .
+IM-k=T~EXT ““-- -
IF (TXME. LT.TSTOP) GO Tll 110
120 CALL FDLI02
CALL FINI
STOP
c
130 FORMAT (1HI,27X,29HPOSITION OF CENTER 13F GRAVITY,
s 9X,20HRIJTATIONS IN DEGREES, 27X, 19HHURIZONTAL VELOCITY/
$ 4X, 4HTIME,SX,4H WAVE,8X, lHX, llX1lHY, llX11HZ,13xI
* 4HROLL,9X,3HYAW4 7X,5HPITCH, &x16fiRuDDER,
$ 7X, !5HSPEED,5X,9HSMAY RATE/)
c
c
901 FORMAT(A)
902 FORMAT(’ Name
903 FORMAT(’ Name
?04 FCIRlqAT(’Name
905 FORMAT( ‘ Name
c
END
t
.+ ---. ---— .- ”--- -------- -.+--,+. -+ ..-.+ ___, -_ ~. ---- ------- ----- . ____ -
SUERDUTINE READIN
c—
COMMON/ID/ INPUT, OUTPUT, B IF,OFF, COF, MAT
INTEGER OUTPUT, B IF,OFF, COF
INTEGER ECHCl
COMMON /S1 GMA / NK, SIGMA (24), SIGMAO, ERRO, DM(12)
CnMMON/DRFTl/DRAFTl (6)
COMMOhf/rUFILE<_~FFIL,
-—...— ..—.— BIFIL, COFILJ MATFIL
COMMON/l+EM2/TITLE
CHARACTER*3O TITLE
COMMCiN/c(3EFF4/COEFF4(6,12,8,25),AREAN(25,6)
CDMMON/OPTI~N/~OBCO, UOBF~(lO), JOBPO( 10)
CCIPIMOhl
/ NldAVES, WVSUM,
l#dAMP(20), WVFRE(20}, WVDIR(20), WVPI
A WN(20), WNX(20), MNZ(20)1
4 CYK(20); CZK(20); Xti”(20~””
COMMON / /
MSTA, NPROF, htFWDJ NAFT/ l_PTS(23)J
XC)FF(25), YOFF(25,25), ZOFF(25,25),
& XPROF(511, YPRUF(51)
COWION /134MP / DAMPL(6), DAMPQ(6)
COMMON /LHS / Y(13)
CUMMON /l%SS j RHO, ‘G, GAMMA
COMMON /MASS / DISPL, SMASS, XCG, YCG, ZCG,
i AMX, AMY, AMZ, RADII(6;
COMMON /13ASS / PMI(3,3)”
COMMON /RESIST/ SPEED
COMMON /TIME / TIME, RAMP
COMMON /TIME / TO, TSTART, TS’ ~TOP, TOUTPT, TSTEP, ERR
COMMON/SXPROP/ SEGMAS(26),SECMOX (26),STRMAS( 26),STRMOM(26) ,
* STRMClX(26),XBAR(26), YBAR(26), !
sEGwT(26)/hill ITSTA
REAL XAiFT(25), YAFT(25), XFWD(25 1)1 YFWD(25)
EQUIVALENCE (XFWD(l), XPROF(I)), (YFWD(l),YP ‘ROF{lI),
$ (XAFT(lI, XPROF(26) ),(Y~FT~lj; YPROF(26~ ~
COMMON/PREX IN/TPSTART,TPSTOP, TPRAMP,BQX,SMX, BGY,SMY,TSCALE
COMMON/BD/XPAN( 120),YPAN(120), ZPAN(1201,AREAP( 120),
* ST(120), ACN{120),ACNW( 120), AN(120,3),E(120), P(120,61,
* PRFS(120), STOLD(120), PX(120,6)
COtlMCM/A/NPAN,NPT, QEE,RHOP, NKX, NKY, EYE, DT,TIM,UFWD
COMMON/SIJURCE/ EE(1201120)
REAL POSIT(6),VELDC(6)
COMMON/DISPLAY/TARE(A)
EQUIVALENCE (PDSIT(l),Y(l)), (VELOC(l), Y(7))
DATA MAXSTA1251
DATA MAXPTS/25/
DATA MAXFWD/25/
DATA MAXAFT/25/
DATA M&XWVS/’2O/
DATA TPSTOP/O. /
DATAI ERRMIN/l.OE-lO/
1??43/
NAFT=Q
. -. .,..- -w --- .. ----- ___ ------ .. . ...+ -------- . ..+p -- +-- --, -.
AOLD=AKY(M)
IF(AOLD. LE.AMY) GO TO 22
NKY=M
. .. . . . .
AKY(M+I)=AKY(M)+l. O/BCY
AFF=O. 000
DO 17 N=l,NKX
AF=(AKX(N+l )+AKX(N) )*0.50
DKX(N)=AF-AFF
17 AFF=AF ““” ““”
13FF=0.00
DO i= N=l,NKY
BF=(AKY(N+l )+AKY(N))*O. 5Q
DKY(N)=BF-BFF
10 BFF=13F
DO 100 N=I,NKX
DO 100 Pl=l,NKY
A(NJM)=(O. O,Q.0)
B(N/M)=(O.0,0.0)
AS{N,MI=(O. 0,0.0)
13S(N,M)=(0.0,0.0)
AKZ(N,M)=SQRT(AKX (N)**21-AKY{M)**2)
SIG=SQRT(GEE*AKZ (N,M))
SS(N, M)=SIN(SIG*DT)
CC(NJM)=CDS(SIG*J3T)
CONTINUE
RETURN
END
. . . . . . . . . . ,. ,.
SUBROUTINE PRESSURE{TP)
c
COMMON/10/INPUT, OUTPUT, B IF,OFF, COF, MAT
INTEGER t3UTPUT,BIF,OFF, COF
INTEGER ECHO
COMMON /SIGMA / NK, SIGMA(24), SIGMAO, ERRO, 0M(12)
COMllON/DRFTl/DRAFTl(6)
C~MMON/IUFILE/ OFFIL, BIFIL, COFIL,MATFIL
COMION/HEAD/T ITLE
CHARACTER*3O TITLE
COMMQN/COEFF4/;OEFF4(6, 12,S,25),AREAN (25,6)
CC)MMON / NWAVES, WVSUM,
WVAPlP(20)J WVFRE(2Q), WVDIR(20}, WVPHA(20
; b4N(20)# !#dx(20)J wN2(20)J “
3 CSK{20), CCK(20), CXK(20),
4 CYK(20), CZK(20), XW(20)
COMMON / / MSTA, NPROF, NFWD, NAFT, LPTS(25).
XOFF(25), YQFF(25,251, ZOFF(25J251,
; XPR~F(51), YPROF(51)
COMMON /DAMP / DAMPL(6), DAMPQ(6)
COMMON /LHS Y(13)
COMMON /MASS ; RHO, G, GAMMA
COMMON /?lASS / DISPL, SMASS, XCG, YCG, ZCGJ
1 AHX, AMY, AMZ, RADII(6)
COMMON /MASS / PMI(3J3)
COMMON /RESIST/ SPEED
COMMON /TIME / TIME, RAMP
COMMON /TIME / TO, TSTART, TSTOP, TOUTPT, TSTEP, ERR
COMMON/SXPROP/ SEGMAS(26), SEGMOX(26), STRMAS(26), STRMOFI(26),
* STRMOX(26), XBAR (26),YBAR(26) ,SEGWT(26),NWTSTA
REAL XAFT(25), YAFT(25), XFWD(25), YFWD(25)
EQUIVALENCE (XFWD(l), XPROF(l)), (YFHD{I ),YPROF(l}),
* (XAFT(l), XPRDF{26)),(YAFT(1),YPROF(26) )
COMMON/PREXIhl/TPSTART, TPSTOP, TPRAMP, BCX,SMXIEGY) SMY,TSCALE
COMMDN/BDiXPAN( 120),YPAN(120), ZPAN(120),AREA( 120),
* ST(120), ACN(120), ACNW( 120), AN(120,3),E(1201, P(120,6),
* PRFS(120), STOLD(120), PX(120,6)
COMMON/FS/AKZ(100, IOO),SS(1OQ, 100),CC(1OO,1OO),
* DKX(lOO), DKY(1OO),AKX( 100),AKY(1OO)
COMMON/BD2/XPT( 150),YPT(150)1 ZPT(150), WRF(150”),
+ wRFR(15a), KK(i50,4)
COMMCIN/A/NPAhl,
NPT,CEE,RHOP, NKX,NKY,”EYE,DT,TIM,UFW13
REAL POSIT(6),VELOC(6) t
COMMON/SUURCE/EE( 120, 120),BPRES(120), PT(6)
COMMON/DISPLAY/TARE(&)
c
c“-------------- ------ _________ ______ ______ _________ _________ __
c
TIM=TP
UFWil=YY(7)
*** Get free surface induce component of normal acceleration
at panel centers ACNW(J) and pressure force array PF.
CALL ACPTR
c
*** Cet exciting normal acceleration at panel centers
CALL XNA(AXMT, AYMT,AZMT,ARLMT, APMT,AYWMT)
c
c *** compute panel source strengths
c
CALL ZBLACN(AXMT, AYMT,AZMT, ARLMT,APMT,AYWMT)
c
c +** Compute body induced forces and pressures
c
CALL PDTB
c
c ++* Advance f~ee surface $or single time step
c
CALL CFSR
*** Farces and moments
CALL PRFR(PT)
c
-, .-
-.. . ...—.. -.
SUBROUTINE .ACPTR”-”
c Csmputes wave inc$uced accelerations and pressures at
c - anel cen*er5
EOMMON/E13/XPAN( 120),YPAhl(120),ZPAN(120),AREA( 1201#ST(120
* ACN(120), ACNW(120),AN(120, 3), E(120), P(120,6), PRFS(120),
* STOLD(120), PX(120,6)
COMflON/FS/’AKZ(100,lQO),SS(lOo, lQO),CC(lOo, 1001,
(
* DKX(lOO), DKY(1OO),4KX(1OQ), AKY(1OO)
CCVIMON/FSl/A(100, 100),B(1OO, 10Q),AS(IOO, 100),BS(1OO, 100)
COMMON/A/NPAN, NPT,GEE,RHuP, NKX,NKY,EYE, DT,TIM,UFMD
COMPLEX EYE,SC, BX, CX,BY,CY,BYCDN, SCON,SK,SKON,
* B1,B2,C1,C2
(,” COMPLEX A,B,AS,BS
DIMENSION BX(lOO), CX(iOO),PF(6), DX(1OO)
Do 1500 d=l,NPAN
AX=AN(J, 1)
AY=AN(d,2)
AZ=AN{JJ3)
X=XPAN(J)
Y=YPAN(J)
Z=ZPAN{J)
ACT=O.00
PRT=O.00
DVDZ=O.00
DO 16 N=l,NKX
CCXX=AKX(N)*X
S=SIN(CCXX)
C=cos(ccxx)
EX(N}=CMPLX(C, S)*DKX(N)
DX(N)=-AKX(N)*AKX(N)*AX
CX(N)=AKX(N)*AX*EYE
DO 163 M=I,NKY
CCYY=AKY(M)*Y
*.*L& exwa #a,e,ae%.+.t
S=SIN(CCYYI
c=ct3s(ccYY)
BY=CMPLX(C, S)*DKY(M)
BYCON=CONJG( BY)
CY=AKY(M)*AY*EYE
Do 163 N=l,NKX
i ARCZ=AKZ(N,M)*Z
K)EP=EXP(+RGZ)
BI=DEP*BY*BX (N)
.,, E2=DEP+FBYCON*BX (N)
CZ=AKZCN,M)+AZ
SC=Bl*A(NJM)-
SCOff=B2*AS(N,M)
SK=Ei*B(N,M)
SKON=B2*BS( N,ll)
C1=CX(N)+CY-CZ
C2=CX(N)-CY-CZ
ACT=ACT-CI*SC-C; 2*SC ON
DVZ=DVZ+EYE*AKX (N)*(CI *sK+c2*sKON )/SQRT(AKZ (NtM))
PRT=PRT~SC+SCON
163 .- - - -.- --–– - - ---. . - - . . - - - ---- .——
c V4TIOhiINtiUCED BY FREE SURFACE
;QRT(GEE)
“+DVDZ
c :D BY FREE SURFACE
( CONTINUE
FORMAT{’ FREE SURFACE INDUCE PRESSURES’)
F13Rl
.—.-. MAT(1X,5F16. 8)
TYPE 60
TYPE i670, (FRFS(J), J=l,NPAN)
RETURN
SUBROUTINE CFSR ‘“
c *** Advance free surface wave s ectra in time
COM1’10N/BD/XPAN(120),YPAN(1 2&)J ZPAN(120)J AREA(120},ST ‘(120
* ACN(120)I ACNU(120),AN(120, 3), E(120), P(120,6),PRFS(12 !0),
* STOLD(120), PX(12(3,6)
COMMON/FS/AKZ (100, 100)jSS( 100J 100),CC(1OO, 100),
* DKX(iOO), DKY(lOO),AKX( 100) ,AKY(iOO)
COHMDN/’FSl/A(100, 1OO},B(10 0~ 100)tAS(iOO~ 100)JBS(100~ 100)
coMMoNjA7NPAN;NPT;GL_. . .. .. . JNKXJNKY,EYE,
., 13T,TIM,UFWD
DIMENSIOhl CX(1OO)
COMPLEX EYE, AT, ATS,CX,CY,CXY1, CXYSJAJ BJASJBSJDFWD
DO iOO N=l,NKX
CXX=AKX(N)*UFWD*DT
.
(
---- .. . . .
STT=SS(N,M)
(, iiT=A(N;rn~~CT+B(N,M)*STT
ATS+S(N, M)*CT+13S(N,II)*STT
i3(N,M)=B(N, M)*CT-A(N,M)~TT
13S(N,M)=BS(N,M)*CT-AS(N, M)*STT
(’: A(N,M)=AT
AS(N,M)=ATS
c MOVE FREE SURFACE RELATIVE TflBODY WITH FWD SPEED
A(N, M)=A(N,M)*DFWD
B(N, M)=B(N,M)*DFWD
AS(N,M)=AS(N,M)*DFMD
BS(hl,tl)=BS(N,M)*DFWD
100 CONTINUE
4
c *** Add effects of source panels actina — a–-—-—over one t ime St
DO 1500 J=i,NPAN
STAR=(ST(J)*O. 50*DT+STOLD(J})*DT
C ST IS TIME RATE OF CHANGE OF SOURCE STRENGTH
C STOLD IS SOURCE STRENGTH AT START OF TIME STEP
C STAR 1:S AVERAGE VALUE OF STRENGTH OVER THE TIME STEP
./
STAR2=STOLD( J)*DT
{ STAR=STAR*AREA
. ...- (U)*O. 63661 97724
S7A~2=ST~R2*/.$REA(J)*O.31831
X=XPANIU) –
,. IF(JTti6T.0) X=X-UFWD*DT*.5
Y=YPAN(J)
Z=ZPAN(J)
DO ?3 N=I,NKX
CXX=AKX(N)*X
S=SIN{CXX)
C=cos(cxx)
93 CX(NI=CMPLX{C, -S)
DO 94 M=l,NK~
CYY=AKY(M)*Y
S=SIN(CYY)
C=COS(CYY)
CY=CMPLX(C, -S)
DO 94 N=I,NKX”
ARGZ=AKZ(N,M)*Z
DEP=EXP(-ARGZ )
CXY1=CX(N}*CY*DEP
CXYS=CX(N)*DEP*CONJG(CY)
A(N, M}=A(N, PI)+STAR*CXY1
AS(N,”ti)=~S(ti; M;~STAR*CXYS
C B(N,M) AND ES(N,tl) INCREMENTED NEGLECTING CHANGES IN
C SOURCE STRENGTHS
C OVER TIME INTERVAL ARE SECCtND ORDER IN ET
B(N~tl)=B(N,M}-STAR2*CXYl*SS(N, M)
BS(N,M)=BS(N, M)-STAR2*CXYS*SS(N, M)
( 94 CONTINUE
i500 CDNTINUE
RETURN
END
-. .-
( SUBRUUTINE POTB
c *** Pressures induced by time rate of change O* saurce
c stren th Q+ panel J in space #ixed coordinates
COMHOfi/BD/XPAN( 120),YPAN(120)j ZPAN(120)1 AREA(120)# ST(120)t
,, ‘ * ACN(120), ACNW(120), AN(12,0J3), E(120), P(120,6), PRFS(120),
* STOLD(120), PX(120,6)
COMMtlN/A/NPAN,NPT,GEE,RHCIP,NKX,NKY,EYE, DT,TIM,WFWD
,,
COtlM~N/SOWRCE/EE( 120, 12Q}, BPRES( 120)
i., COMPLEX EYE
DIMENSION PP(6)
PP(l)=0,00
PP(2)=0.00
i
,.. PP(3)=0.00
PP(4)=O*O0
PP(5)=0.00
PPC6)=0.00
(:
DO 1500 d=l,NPAN
C ST(J) IS TIME RATE OF CHANGE IhlHULL FIXED SYSTEM OF SOURCE STRENGTH
C W PANEL d
C STAV IS AVERAGE SOURCE STRENGTH OVER TIME STEP AT CENTER OF PANEL d
(
STAV=STOLD(J)+O. 5*DT*ST(J)
C TIME DERIVATIVE IN SPACE FIXED SYSTEM
Do 1200 K=1,6
PP(K)=PP(K)+(ST(J)*P(J, K)-STAV*UFWD*PX(J, K))*RHOP
( CONTINUE
CONTINUE
DO 1S00 J=l,hlPAN
13PRES(J)=(ST(J)*P(J, 3)-STAV*UFWD*PX(J, 3))*RHOP
(: DENOM=AN(J,3 )*AREA(J)
IF(DEN#M. EQ.O. ) THEN
BPRES(J)=O.
ELSE
.’
.!,
BPRES(J)=BPRES(J)/DENOM r
END IF
1800 CONTINUE
,.
TYPE *, ‘ BODY INDUCED PRESSURES’
TYPE 1070, (BPRES(J), J=l,NPAN)
1070 ;~Cl~A;(lX15Fl&.8)
TYPE 1870
1870 FDRMAT(’ BODY INDUCED FORCES=’)
TYPE 2020, PP(l), PP(2),PP(3), PP(4),PP(5);PP(6)
-2020- - .~~~~~-(SX,.3E20.-6)-- ----..-------- - - --- - . -------- -. ---- .
END
c
SUBROUTINE PRFR{PT)
c +** Corn utes farces and maments
COM~ON/BD/XPAN( 120),YPAN(120), ZPAN(120), AREA(120), ST(120),
* ACN(120), ACNW(120),AN( 120,3}, E(120),P(120,6)? PRFS(120)1
* sToLD(120)# Px(i20,6)
COMMON/A/NPAN, NPT,GEE,RHOP, NKX,NKY,EYE, DT,TIJvI,UFUD
DIMENSION PF(6)
COMPION/SOURCE/EE( 120, 120),BPRES( 120)
( CUMMDN/MASS/RH~, GIGAMMA,DISPL, SMASS, XCC,YCG, ZCG
COMMON / MSTA, NPROF, NFWD, NAFT, LPTS(25),
XOFF(25), YOFF(25,25), ZOFF(25,25),
i xPR13F{51), YPROF(51)
(“
.. COMPLEX EYE
C;~H~N~DISPLAY/TARE (6)
X2% o
X3=0. o
X4=0. o
X5=0. o
X6=0. o
XCGAtl=XCG-(.S*(XOFF( I)-XOFF(MSTA) 1)
DO 725 J=l,NPAN
TPRES=BPRES(JI+PRFS(J)
PRS=TPRES(J )*AREA(d)
FRX=-Ah((U,i )*PRS
FRY=-AN(d#2)*PRs
FRZ=-AN(J,3)*PRS
XF=XPAN(J+XCGAM
YF=YPAN(J)
ZF=ZPAN(J)+TARE(2 )
X1=X1+FRX
X2=X2+FRY
X3=X3+FRZ
X4=X4+YF*FRZ-ZF*FRY I
X5=X5+ZF*FRX-XF*FRZ
X6=X6+XF*FRY-YF*FRX
72S CONTINUE
TYPE 80
80 FORMAT(’ PRESSURE INDUCED FORCES---’)
TYPE 40J X1,X2,X3,X4,X5,X6
PT(I)=X1
PT(2)=X2
PT(3)=X3
PT(4)=X4
PT(5)=X5
PT(6)=X&
40 ~~~U?#~(5X,3F15.7)
END
,.. . . . ... . . . . . . .-. . . . .
SUBROUTINE FIN1
c
COMMDN/ID/INPUT, CIUTPUT,BIF,OFF,COF
INTEGER DUTPUT, BIF,DFF, COF
COMMCIN /STATS / NRHS(4), DELTA, HSUM, I-IMIN,HMAX, TTO, TTi
COMMON /TIME I TIME, RAMP
CtlMMDN /TIME / TO, TSTART, TSTOP, TCIUTPT, TSTEP, ERR
CQMMON/SUMMARY/ NT, YYEAR(IO), YYRMS(lQ), YYMAX(lO), YYMIN(1O)
IF (TTI.LE,TTO) GCl TO 100
DELTA=TTI-TTO 8
NRHS(I)=NRHS(I)+l
1 HMIN=AMINI(DELTA, HMIN)
HMAX=AMAX1(DELTA, HMAX)
100 l-fSUtl=liSUM/FlmAT
(NRHS(I))
c *** Print execution statistics
WRITE (OUTPUT, 110) NRHS, DELTA, HMIN,HSUM, HMAX,TSTEPtERR
c *** Cum ute response statistics
Da ~00 I=l,tO
YYBAR(I)=YYBAR (1)/FLQAT(NT)
ARGI=(YYRMS( 1)/FLDAT(NT)-YYBAR( I)+*2)
IF(ARGI. LT.0) YYRMS(I)=O.
IF(ARGI. GE.O. ) YYRMS{I )=SGRT(ARGI)
c YYRMS(I)=SQRT (YYRMS(I)/NT-YY13AR (1)**2)
200 CONTINUE
c *** Print res onse statistics
wRxTEmuTlbT,201) ‘ RMS ‘,YYRMS
WRITE(CIUTPUT,201) 0 MEAN ‘,YYBAR
WRITE(OUTPUT, 201) ; MAX ‘,YYMAX
WRITE(OUTPUT, 201) MIN ‘tYYMIN
c
RETURN
c
11O$~ORMAT ~~([0*** ——— . TIME INCREMENT : FWD Ml STE
$ 36H ***~ tiU~~%~F COMPUTATIONS OF RHS :,4110/36H +XX FINAL V
lALUE OF TIME INCREMENT lPG13.4/381i +~x MINIMUM VALUE OF TIPIE INC
2REMENT :/G13. 4/38H *** AC ‘E VAL(JJ OF TIME INCREMENT :,G13.4/3
—--
3 +** MAxIMuM VALUE OF T INCREMEI :,G13.4/42H *+* F“L~@-VALUE,’8~
41, (PLUS 1.0 EXPECTED) 3. 4/33H *** FINAL VALUE : OF ERRQR LIMIT.
5:IG13.4)
IF (Nt4&VES.EQ.0) GO TO 260
DO 250 K=l,NWAVES
WVPHA(K)=RAD*WVPHA(K )
MN(K)=WVFRE (K)**2/G
ARG=WVDIR(K)*RAD
WNX(K)=UN(K)*CUS(ARG)
WNZ(K)=Whl(K)*SIN(ARG)
WVSUM=WVSUM+ABS (WVAF’IP(K))
250 CONTINUE
260 CONTINUE
c
c -E**COnvert degrees to radians
Da 270 1=4/4
Y(I)=Y(I)*RAD
Y(I+4)=Y(1+61*RAD
270 CONTINUE
c
c *** Convert initial linear velocities from ship cac)rdinates
c fixed coordinates.
CALL RUTATE (Y)
VX=Y(71
VY=Y (8 )
VZ=Y(9)
‘f(7)=c(11i)*vx+~(=J 1)*vy+C(3~ i)*VZ
Y(81=C{ l#2)*VX+C(2J 2)*VY+C(3J 2)*VZ
Y{9)=C( 1J3)*VX+C(213)*VY+C(3J 3)*VZ
c
15 *** Divide all 2-I) hydra. coeffs by RHO
DO 110 L= I,MSTA
Do 110 K= I,&
Do 110 J=1,12
Da 110 1=1,8
CDEFF4(K, J, I,L)=COEFF4(K, d, I,L)/RHO
~llo CDNTZNUE
k +** Initialize the free sur$ace for special pressure
c computations
c
IF(TPSTOP. GT.5. ) CALL AFSR
E
IWL:RN
.
.
SUBROUTINE COFFEE
ccc
. COMMOhl/MASS/RHO,G,GAMI’IA
COMMON/MASS/DISPL, SMASS, XCG,YCGt ZCG~
* AMX,AMY,AMZ, RADII(6)
COt’lMON/LHS/Y
(13)
C5 WAVE PROPERTIES. .
COMMON / / NWAVES, WVSUM,
WVAMP(20), UVFRE(20), tdVDIR(20)J WVPHA(20),
: . WN(2Q), whlx(20)l WNZ(20)J
3 CSK(2Q), CCK(2Q)J CXK(20),
4 CYK(20), CZK(20), XW(20)
C5
C5
C5 TABLE OF OFFSE~S. .
COMMON / MSTA, NPROFI NFWD, NAFT, LPTS(25)~
XOFF{25), YOFF(25,25), ZOFF(25,25),
: XPROF(51), YPROF(51)
CUMMON/RESIST/SPEED
CUMMDhl/SIGt%4/ NK, SIGMA(24),SIGMAD,
-. . .— . . —- - . .. .- . ERRO,
—... . - . 13M(12)
—.. . -— .
:
COMMDN/CDEFF4/COEFF4(6, 12,8,25),AREAN(25, 6)
COMMON/Ct3EFFX/THAH(25, 21),TSAS(25, 21),TRAR(25, 21),TCCA(2S, 2:~,
. .. .- . . . --- -- . . . . . . -,. .--, -- , . .-..-,..-”, --., .-.”-,=s, =* ),
‘RACX(25,21),TCACX(2S, 21},THVCY(25, 21),
.—-.. .-XP(25),IFP(21),FXP(21)
COMMUN/OPTION~JOBCO, JOBFO(10)
CIJMM~N/SXOHEG/01’lEGAX
(3)
COflM~N/DRFTl/ DRAFTI(6)
c
DIMENSION LIX(21),FMUX(21)
DATA DEGREE/O.0174!5 32925/
:Cc
ccc (Future revisien here... nu trim naw, but in
ccc next revision, the G tians should include
ccc specifyin trim [Y(6 ! 2 in addition to dra$t
ccc as an zni % ial cendition)
ccc
TAV(2=YCG-Y(2 ) !Dra+t
TYPE *, ‘ TAVG=’,TAVG
DO 20 USTA=I,MSTA !Laopraver statians
ccc
CALL TXIT(TAVG, IT,TX) !Get index & mult.
ITP(JSTA)=IT
TXP(USTA)=TX
TYPE *1 ‘IT~TX’~IT,TX
ccc
ccc
DO 10 K=l,NWAVES
ccc
FREX=ABS({l. O-COS(WVDIR (K)*DEGREE)*SPEED
* +wVFRE(K)/G)*WVFRE(K) ) !Encaunter fr~q.
TYPE *, ‘Encounter f-req=’,FREX
c
c ------------- ----___-w- ------ _--” ______
______ _----- ------------
c
NOTE: We are usin the wave frequencq here-- nat the
E frequency 0$ encaunter.
c I
c FREX=WVFRE(K )
c
c------------------------------------------------------------
CALL FXIF(FREX, IF,FX) !Get index & mult. I
ccc
IFP{K)=IF
FXP(K)=FX
THAH(JSTAI K)=COX(IT, TXJ IFJFXi l,JSTA) I
TSAS(JSTA,KI=COX( IT,TX, IF,FX,2,JSTA) !
TRAR(JSTA,K)=COX( ITJTXJ IFJFX,3,JSTA)
TCCA(JSTA,K)=COX (IT,TX, IFJFX,4,JSTA)
c
THVH(JSTA,K)=COX( IT,TX, IF,FX,5,JSTAI I
TSVS(JSTA,K)=COX( IT,TX, IF,FX,&,JSTA)
TRVR(JSTA)K)=COX( IT,TX, IF,FX,7,JSTA) I
‘fCCV(JSTA,K)=COX (IT,TX, IF,FX,8,JSTA)
:
. I
I
c
THACX(JSTA, K)=COXDXP( IT,TX, IF,FX, l,JSTA)
TSACX(JSTA, K)=COXDXP (IT,TX, IF,FX,2,JSTA)
TRACX(JSTA, K)=COXDXP (IT,TX, IF,FX,3,dSTA)
TCACX(JSTA, K)=COXDXP (IT,TX, IF,FX,4,JSTA)
c
THVCX(JSTA, K)=COXDXP (IT,TX, IF,FX,5,JSTA)
TSVCX(JSTA, K)=COXDXP( IT,TX, IF,FX,6,JSTA)
c TRVCX(JSTA, K)=CUXDXP (IT,TX, IF,FX,7,JSTA)
TCVCX(JSTA, K)=COXDXP( IT,TX, IF,FX,8,JSTA)
E CONTINUE
c
% CONTINUE
ccc
ccc Fur ship motion related hydre c~ef’s, we will
ccc us, as a default fre uencg the frequencd associated
ccc with tihe+irst wave ?wvfre(i)l.
ccc
ccc Future revision: the de+ault frequencies should
ccc be the natural peri~d in heave, swag, and roll.
ccc
c
FRSI=ABS((l. O-CCIS(WVDIR(l)*DEGREE)*SPEED
* *WVFRE(l)/G)*WVFRE( 1)) !Encaunter +req.
DMEGAX(l)=FRSI
UMEGAX(2)=FRSI
0MEGAX(3)=FRSI
c
CALL FXIF(FRSIJIF,FX)
c
DO 3Q JSTA=l,MSTA
c
FXP(21)=FX
IFP(21)=IF
TXP(21)=TX
ITP{21)=IT
d
THAH(JSTA, 2i)=COX(IT, TX, IF,FX, l,JSTA)
TSAS(JSTA,21 )=Ci3X(IT,TX, IF,FX,2,JSTA)
TRAR(JSTA,21 )=COX(IT,TX, IF,FX,3,JSTA)
TCCA(JSTAJ 21 )=CtlX(IT,TX, IF,FX, 4,JSTA)
c
THVH(JSTA, 21 )=COX( IT,TX, IF,FX, 5,JSTA}
,<, TSVS(JSTA,21 )=COX(IT,TX, IF,FX,6,JSTA)
TRVR(JSTA,21 )=C13X(IT,TX,IF,FX,7,JSTA)
TCCV(JSTA,21)=COX( IT,TX, IF,FX,8,JSTA)
c
,<; .. . THACX(dSTA,21 )=COXDXP(IT, TX, IF,FX, i,JSTA)
TSACX(JSTA,21 )=COXDXP(IT, TX, IF,FX,2,JSTA)
-THVCX(JSTA,21 )=cOXDXP(IT, TX, IF,FX,5,JSTA)
TSVCX(dSTA,21 )=COXDXP(IT, TX, IF,FX,6,JSTA)
c
30 CUNTINUE
RETURN
END
FUNCTION COX(IT, TX, IF,FX, ITYPE, JSTA)
ccc
ccc This function subpro ram returns the 2-D hydrodynamic
ccc coef-$icient of a par ~ icular TYPE (1 thru 8 where 1 is
ccc H~H, 2 is SAS, and se on) ke ed on XTYPE; for a par-
ccc tlcular station~ ke ed an ISYA. Provided to the #unction
ccc ismttte draft index YIT) and draft interpolation multi-
ccc plier, the frequencq index (IF) and the freqenc~ inter-
ccc polation multiplier (FX).
ccc
ccc Tf-I~sfunction perf~rms a twe-dim linear inter alation
ccc feur values from the big 2-D ccjefficien% array
c.” ccc tikFF4( t 8 I I )...
ccc
COMMON /COEFF4/ CDEFF4(6, 12,8, 25),AREAN(25, 6)
ccc .
(! A1=COEFF4(IT ,IF ,ITYPE,JSTA)
A2=CCIEFF4(IT+1,1F ,ITYPE,JSTA]
A3=COEFF4(IT ,IF+l, ITYPE,JSTA)
A4=CDEFF4(IT+1J IF+l, ITYPE,JSTA)
ccc
B12=AI+(TX*(A2-A1 ))
B34=A3+(TX*( A4-A3))
ccc
(.: ccc
COX=E12+(FX*(B34-B12) )
RETURN
END
c ccc
SUBROUTINE TXIT(TAVGJITJTX)
ccc This routine determines the draft index (IT)
ccc and dra+t interpolation multiplier {TX) given
ccc a value for draft (TAVG).
ccc
CQMMDN/DRFTl”/ DRAFTI(6}
ccc
IF ~~A~G. GT.DRAFTl(6)) THEN !Section immersed
TX:l. O
ELS;TI~ (TAVG.LT. DRAFT1{l)) THEN !Emerged section
=
7X=6. o
ELSE
Da 10 JJ=2,6
IF(TAVG-DRAFTI (JJ)) 12,11/10
11 CONTINUE
~..
,,.
i,
,
c ;+=? j#
GU=TO 13
c i= CONTINUE
~+=$JA~G-DRAFTl (JJ-1)1/(DRAFTi (JJ)-DRA=T1(JJ-1 ))
Gu=Ta-13
~ ... CONTINUE
;: CONTINUE
END IF
RETURN
G -- END
SU3R~UTINE FXIF(FREX, IF,FXj
ccc
ccc This rautine determines the #req. index (IF)
c’. ccc
ccc
and freq. inte~p~lati~n multiplier (FX) given.
a value for frequency (FREX).
ccc
COMMON /SIGMA/ MK, SIGMA(24), SIGMA0,ERR0, 0M(12)
c ccc
IF ;;R~~. GT.OM(ll)} THEN
~ FX% O
ELSE
Dct 10 JJ=2,i2
IF(FREX+3M(JJ}) 12,11,10
11 CONTINUE
c. ~:=~Jo
GO=Ttl 13
~. 12 CDNTINUE
~}=j$R:X-DM(JJ-l ))/{OM(dd)-DM(JJ-l ))
w=To-13
10 CCINTINUE
c 13 CONTINUE
END IF
RETURN
END
c c
FUNCTION COXDX(IT,TX, IF,FX,L,d)
Cm’lmtd / / NWAVES, WVSUM,
~, ;
WVAMP(20), WVFRE(202, WVDIR(20), WVPHA (20),
WN(2Q), WNX(20)1 WNZ(20),
3 CSK(20), CCK(20), CXK(20),
4 CYK(20), CZK(20), XW(20)
COMMON / / MSTA, NPRtlF, NFWD, NAFT, LPTS(25)I
<, ;
XOFF(25), YOFF(25,25), ZOFF(25,2S),
XPROF(51), YPRDF(5i)
COMMON/OPTION/JOBCO, JOBFO(10)
COMMUN/ETA/YC, XK(20)
{. COMMON/TEMPSTA/DXFWD, DXAFT,TSTA( 25)
k---------------------
..
I
~...
c
c
----------- -. ------ -
IF(~FE~.
= l) THEN
ELSE “
(. CF=COX(IT,TX, IF,FX,L,J-1)
AF=ARX(IT, TX,J-1)
c
~.
L.
e..
~.
<
L.
,.. .
L.
.,
CF=CF*AF
END IF
c
CM=COX(IT, TX, IF,FX, L,J)
AM=ARx( IT,TX, J)
CM=CMWW
c
IF(:&$MSTA) THEN
=.
ELSE
cA=cOX(IT, TX, IF,FX, L,J+l)
AA=ARX(IT,TX, J+ll
CA=CA+AA
END IF
c
Cl=(CM-CF)/DXFWD I
C2=(CA-CM)/DXAFT
c
COXDX=(.5/AM)*(Cl+C2)
c
RETURN
END
FUhlCTIUN COXDXP(ITJTX, IFJFX,L,J)
c
COMMON / NWAVES, WVSUM,
WVAMP(2Q)J WVFRE(20)1 WVDIR(20), WVPHAC20),
WN(2Q), WNX(201, WNZ(20),
CSK(20), CCK(20), CXK(20)4
CYK(2Q), CZK(20), XW{20}
MSTA, NPROF, NFb413,NAFT, LPTS(25),
XOFF(25), YOFF(25J25)~ ZCIFF(25~25)J
XPR13F{51), YPRCIF(511
c
; ----------------------- --------------------- -----------
IF(:FE$. 11 THEN
DXFWb=XOFF(J+l )-XOFF(J)
ELSE
CF=CDX(IT, TX, IF,FX,L,J-1)
AF=ARX(IT,TX, J-l]
CF=CF*AF
DXFWD=XOFF(J) -XOFF(J-1)
END IF
c
CM=CQX(IT,TX, IF,FX,L,J)
AM=ARX(IT,TX, J)
CM=CM*AH
c
IF(~kE~. MSTA) THEN
DX~FT=XOFF{J )-XOFF(J-1)
ELSE
CA=CUX(IT,TX, IF,FX,L,d+
AA=ARX(IT,TX, J+l)
CA=CA*AA
DXAFT=XOFF(J+i )-XOFF(J)
END IF
c
C1=(CM-CF)7DXFWD
c2=(cA-cM)/DxAFT
c
c COXDXP=(. 5/AM)*(Cl+C2) 1
~:]=:~F:#DXAFT )
CDX~XP=(DCX/TDX )/AM
c
RETURN
END 1
FUNCTION ARX(IT,TX,J)
ccc
COMMON /COEFF4/ CDEFF4(&J 12i8~25)~AREAN(251 6) 1
ccc
ccc
ccc
32=AREAN(JIIT+1 )
B1=AREAN(J, IT)
ARX=B1+(TX*(B2-B1)) .
ccc
RETURN
END
r-.
L.
[:
c.
,-
L,
r-
\.
..
L.
L..
FUNCTION ETABAR(I)
C
c1 ETAEAR RETURNS THE MAVE ELEVATION (ABSOLUTE COORDINATES) ABttVE
c1 A POINT IN THE SHIP COORDINATE SYSTEM.
c1
C2 POINT IS ON THE SHIP CENTERPLANE.
C2 THE COORDINATES OF THE POINT ON THE SHIP ARE..
C2 ( XPROF(I), YPRi3F(I)~ -ZCG )
%
C5 PHYSICAL CONSTANTS. .
COMMON /MASS / RHO, GJ GAMMA
C5
C5 SHIP MASS PARAMETERS. .
cnMMON /MASS / DISPLI SMASSJ XCG, YCG~ ZCG#
1 AMX, AMY, AMZ# RADII(6)
C5
C5 ROTATIONAL INERTIA MATRIX FOR FIXED MASS..
COMMON /MASS / PMI(313)
C5
COMMON /TRIG / CTHET% STHETA# CPHIJ SPHII CPSIt SPSI
C5
C5 WAVE PROPERTIE~. .
COMMON / NWAVESJ WVSUM#
WVAMP(20)~ WVFRE(20)J WVDIR(20)J WVPHA(20)#
; WN(20), WNX(20), WNZ(20)#
3 CSK(20)~ CCK(20)J CXK(20)1
4 CYK(20), CZK(20), XW{20)
C5
C5
C5 ~~~i4~NO~ OFFSEJS. .
PISTA) NPROF# NFWD~ NAFTJ LPTS(25)J
XOFF(251J YOFF(25,25)t ZOFF(25J25)#
; xPRoF(51)/ YPROF(51)
C5
C3
ETABAR=O. O
IF {NWJVES.EQ.0) RETURN
X1=XPROF(I)
Y1=YPROF(I) *CTHETA+ZCG*STHETA
Z1=YPROF( I)*STHETA-ZCG*CTHETA
DD 110 K=lJNWAVES
ARG=(Xi-XW(K) )*CXK(K)+Y1*CYK (K)+IZi*CZK(K)
ETABAR=COS( ARG)*WVAMP(K )+ETA BAR ;
110 CONTINUE
——.
RETtJRhl
c
END
FUNCTION ETAF (ZT)
c
cl FIND COORDINATE OF WAVE SURFACE.
cl
C5
C5 :#fio~R~PERTIE~. .
NWAVESJ WVSUMJ
WVAMP(20), WVFRE(20), WVDIR(20)4 WVPHA(20)#
; 14N(201J WNX(20)J WhfZ{20)J
3 CSK(20), CCK(20)t CXK(20)#
4 CYK(20), CZK(20), XW(20)
C5 DATA FCIR THE C~MPUTATIDN OF THE WAVE SURFACE ELEVATION. .
CCIMMON /ETA YC, XK(20)
C5
COMMON /CT / CT(3,3)
C3
A=-Ye
B=CT(2,2)
IF (NWAVES.EQ.0) GCl TO 120
I)D 110 K=l,hlWAVES
ARG=ZT*CZK(K)+XK(K)
A=CCtS(ARG)*WVAMP (K}+A
B=SIN(ARG)*WVAMP(K)*CYK(K)+E
110 CtlNTINUE
120 ETAF=A/B
RETURN
c
END
f=UNCTItiNETAY( j,K)
Ct3MMUN /TRIG CTHETA, STHETA, CPHI, SPl+I, CPSII SPSI
COMMON / / NWAVES, WVSUM,
1 WVAMP(20)J UVFRE(20), WVDIR(20), MVPHA(20),
WN(20), UNX(20)1 MNZ(20),
; CSK(20), CCK(20), CXK(20),
CYK(20), CZK(20), XW(20)
COMMON / / MSTA, NPROFt NFWD, NAFT, LPTS(25)t
XOFF(25), YOFF(25,25)~ ZOFF(2!5,25),
: XPROF(511, YPROF(51)
ETAY=O.
IF (NWAVES. EQ. 0) RETURN
Xl=XOFF(J)
Yl=o.
21=0.
ARG=(XI-XW(K) I*CXK(K)+YI*CYK(K)+Z1*CZK{K)
ETAY=COS{ARG )*WVAMP(K)
RETURN
c
END
SUBROUTINE FOLIt31
c
COf’?MUN/Ii3/INPUT,OUTPUT, BIF,OFF,COF
INTEGEI
‘-”––-–R DUTPUT, BIF,OFF,COF
COMMON .zsw?&L--- NK,SIGMA(24), SIWIAO, ERRO, ~M(12)
C9flMON/DRFTl/DRAFTl (6)
COMMON/IOFILE/ OFFIL,BIFIL,COFIL
COMMON/HEAD/TZTLE
CHARACTER*3O TITLE
coMMoN/coEFF4/5QEF ‘F4(6,12,8,25), AREAN(25,6)
COMMON / NWAVE!3, WVSUM,
1 WVAMP(20), WVFRE( 20), WVPHA{2Q
Whl(20), WNX(20),
; CSK(20), CCK(20),
CYK(20), CZK(20),
cot’
Wlml / / MSTA, NPROFi””NFW~, N~FTi LPTS(25),
1 XOF‘F(25), YOFF(25,25), ZDFF(25,25),
2 XPf?OF(51), YPROF(51)
COMMON /DAMP W~(61, DAMPQ(6)
COffMUN /LHS
COMMON /MASS RHO, G, GAMMA
COMMON /PIASS IIISPL, SMASS, XCG, YCG, ZCG,
1 AMX, AMY, AMZ, RADII(6)
COMMON /flASS PMI(3,3)
CCiMMON /RESIST> SPEED--”
COMMON/i3PTION/JOBCO, dOBFO(lOl
COMMON /TIME / TIME, RAMP
COMMON /TIME / TO, TSTART, TSTOP, TOUTPT, TSTEP, ERR
CDMMON/SXPRCIP/ SEGMAS(261, SEGMOX(26), STRMAS{26), STRMOM(2&),
* STRMOX(2&), XEAR (26},YBAR(26 ),SEGWT(26), NWTSTA
REAL POSIT(6),V~LOC(6) \
EQUIVALENCE (P13SIT(1),Y(1)), (VEL13C(1),Y(7))
c
WEIGHT=SMAS-G
WRITE(OUTPUT, 100) TITLE
WRITE(OUTPUT, 110) tiZiGHTJRADII(l),RADII (2),xcG,RADII(3),
* YCG, RADII (4),ZCG,RAD11(5), RADII(6)
WRITE(OUTPUT, 120) DAMPL(l),DAMPQ( 1),SPEED,.
* (DAtlPL(I),DAtlPQ(I~,1=2,6)
(PUSIT( I),VELOC(I), 1=1,6)
TSTART,TST~P ,TOUTPT,TSTEP
RH~, G
JOBCO, (JOBFD(I), I=1L,3)
TITLE
I,WVAPIP(I),WVFRE(I),WVDIR( I),WVPHA(I)
10
I,SEGWT(I ),SEWIOX(I),YBAR( 1)
20
TITLE
c
100 FORMAT(lHl,80(lH=)/, 1X,A,T55, ‘PROGRAM SSX (Version 1.0)’/,
*sl(lH=)//)
110 F13RMAT(2H(iH-), ‘Inertial Characteristics’,29(lH-l/J.
* T4HJ9(IH-)J ‘GYRADII’J8(lH-)/,
*T5, ‘WEIGHT~,F15. 2, 2X, ‘L.TONS~, T48, ‘KxX’14X, F1O. 315X1 ‘+t’/J
* T48, ‘Kyy ’,4X,F10.3J5Xt ‘ft’/,
*T5~ ‘XCG’t iOX,FIO.3~4X) ‘$t~l T4S~ ‘Kzz ’~4XJF10.3,5X~ ‘+t’/,
+T5~ ‘YCG’i iOX#Fi O.31 4X1 ‘ft’~ T4S, ‘Kxy ‘, 4x1F1O. 3, 5xJ ‘f*’/i
+T5, ‘zcG8, 10X,FIO, 3, 4x, 8$t/, T48, ‘~XZ ‘, 4x1F1O. 3, 5x,,‘9t$/l
+ T4S, ‘K z ‘,4X,F1O. 3, 5X, +t’/i4 .0(2!+-‘)/)
120 FORMAT(T5, S(lH:), ‘DAMPING Coefficients’, S(lH-), T48,
* ----(JPS DATA----‘/,
*13X, ~(u~@r s e~i#ied)’/,
+T5, ‘MQTI~N’, $ x, ‘LINEAR ‘,7X1 ‘GUADRATIC ‘/~
*T5, ‘------ t,4X, *---------- *$5X, r---------- 8/,
*T5, ‘SURGE’,2(5x, E1O. 4), T48, ‘SPEED’/ 5X1F&.2/1
*T5t ‘HEAVE’~2(5X1 E1O. 4) /’1
*T54 ‘SMAY ‘12(5X4 EIO. 4)/1
*T5, ‘ROLL ‘t2(5X~E10. 4)/1
*T5~ ‘YAW ‘~2(5X~E1O. 4)/~
*T5, ‘PITCH’, 2(5x, E10. 4)//)
130 FORMAT (32(1H-), ‘Initial C~nditions’, 31(lH-)//,
*T5, ll(IH-), ‘POSITION’, ll(iH-), T48, 1O(1H-), ‘VELnCITY’, 10(1 H-l/,
*T5, ‘x(cG) ‘~llx,F10. 3,2X, ‘ft’lT4S~ ‘SPEED’j 5XIF1O. 3j2X, ‘ft/~sec’/4
*T5, ‘Y(CG} ‘,IIX,F1O.
---- .. . 3,2X, ‘#t’,T48, ‘HEAVE’, SX,F1O. 3,2X, ‘#t/sec’lf
*T5; ‘z(cGj ‘1llx~F~1(3. ---3,2X, ‘+t’,T48, ‘SWAY ‘,5X,Fi0. 3,2X, ‘ft/‘SEC‘/r
*T5, ‘ROLL ‘,11X, 1=10. .3, IX,’deg’IT48, ‘ROLL’,6X, F1O. 312X1 ‘de /see ‘iI
*T5, ‘YAW– ‘i11X,F1O. 3, 1X, ‘deg ‘,T48, ‘YAM’,7X1F1O. 3,2X, ‘deg7‘See‘/$
*T5, ‘PITCH’, llx,FIO. 3, 1X, ‘deg ‘,T48, ‘PITCH’, 5x,F1O. 3,2X,
*’de /see’//)
140 FORhT(34( lH-), ‘Run Paramete rs’,33(l H-;//,
*T5, ‘SIMIJLATI~N PARAMETERS t,T’48, ‘JOB OPTIONS ‘/,
*T5~ 21(1 F1-)tT48t 11(1H-)/I
*T5, 8TIME(START) ‘t3X~ F8. 2/1
*T~; ‘?IilE(E_.
END)._.. ‘,5X~F8.
.. _._.
2/~
*T5, ‘OUTPUT DT ‘t5X,F8. 2/t
++T5,‘INTE~. ~T’, 5)(, F~. 2/, 81(1+)//)
150 FORMAT (33( lH-) , ‘WAVE COMPONENTS ‘,33( lH-) //,
*T5, ‘WAVE’, 5x, ‘AMPLITUDE’, 5xl ‘FREQIJENCY’15X~ ‘DIRECTION’~
*!5X~‘PHASE ‘//
+T5, ‘---- ‘,5x, t--------- t,Sx, t--------- ‘,5x, ‘--------- ‘,
*5X, t—--- ‘)
255 FORMAT (T7, 12,T16, F&. 2, T30, F6. 2, T44, F7. 2,T55, F7. 2)
160 FORMAT( //31{ lH-) , ‘MISCELLA~EOUS VALUES ‘,30( lH-) //,
*T5, ‘RHO’I5X1FiO. 6/1 T5, ‘G ,5X,F1O. 6)
165 FORMAT (T% ‘JOBCO ‘,12/,T5, ‘JOBFO ‘,414// )
170 FORMAT (27( 1H-), ‘SECTIONAL WE~GH~X~RO~ERTI ES’, 27(1 H-)//,
*T5, ‘SECTION’, 5XJ ‘WEIGHT’j 5%~ ,5X, ‘Centruid ‘/,
*T5, ‘------- ‘,5x, ~------ ‘,5XJ ‘------- t,5x, ‘-------- ‘//)
17s FORMAT(T5, 3X, 12,T13, F1O. 3,T26, F8. 2, T39, F8.2)
RETURN
END
,,
.
L SUBRWTINE RKF (TIME,Y, TNEXT, ERR, NEQS, STEP)
c
c RUfWE-KUTTA INTEGRATION FOR CAPSIZE.
(, ... . c
REAL Y(l)
REAL YY(13), YA(13), YB(13)
c ----.----— ----- --__--*.---------
(-”, REAL YC(13)
DATA YC(13)/O:W
c
DATA YY(13)/a.o/
( DATA YA(13)f0.01
DATA YB(13)/O.O/
c
STEP=ABS(STEP )
c. NSTEP=(TNEXT-TIME )/STEP+O.5
IF (NSTEP. LT.1) NSTEP=I
TSTEP=(TNEXT-TIME )/FLOAT(NSTEP )
~: HALF=TSTEP/2. O
FACT=TSTEP/6. O
110 CALL DERIV (TIME,YJYA)
Do 120 I=I,NEQS
~,. YY(I)=HALF*YA( I)+Y(I)
120 CONTINUE
TIME=HALF+TI ME
CALL DERIV (TIME,YY,YB}
DO 130 I=l,NEQS
c“ YACI)=2. Q*YB(I)+YA(I)
YY(I)=HALF*YB( I)+Y(I)
130 CDNTINUE
.-. CALL DERIV (TIME,YY,YB)
(,..
, DO 140 I=l,NEQS
YA{I)=2. O*YB(I)+YA(I)
YY(I)=TSTEP*Y13( I)+Y(I)
~:”” 140 CONTINUE
TIME=HALF+T XME
CALL DERIV (TIME,YY,Y13)
DO 150 I=l,NEQS
Y(I)=(YA(I )+YB(I))*FACT+Y( I)
c CONTINUE
c ----------- --------- ______ --------- _________ ------ __________
This call t~ DERIV is to get actual acceleration for the
E new TItlE. By Callin RHS this time we are loading the
c c
c
acceleration arra A#C( ) in COMMON ACCEL with correct
accelsrations~ ra ! her than accel. computed as dictated
: by the fburth-~rder RUNW-KUTTA scheme.
k
c c
CALL DERIV(TIME,Y, YC)
CALL GETFREG
c—----------------------- ---------------------------------------
IF (TIME+HALF. LT. TNEXT) GO TO 110
T~ME=TNExT
(. RETURN
ENI)
.<
--
1.,
/.
(
*..
~<
$.
,.,.
‘..
,.
$.
..
.-
SUBROUTINE DERIV (TT, YY, YYDOT)
c Evaluates derivatives in squations 6F mation
c .---------------------------------------------------------
TT -- TIME, THE INDEPENDENT VARIABLE
W -- DEPENDENT VARIABLE ARRAY.
YY(l) = X-COORDINATE OF MASS CENTER
YY(2) = Y-CO~RDINATE OF MASS CENTER
YY[3) = Z-CO~RDINATE OF MASS CENTER
YY(4) = THETA RCITATION (ROLL ANGLE)
YY(5) = PHI ROTATION (YAW ANGLE)
YY(6) = PSI ROTATION (P‘ITCH ANGLE)
YY(7) = X-COMPONENT OF LI NEAR VELOCITY
YY(8) = Y-COMPONENT OF LI NEAR VELOCITY
YY(9) = Z-COMPONENT OF LI NEAR VELOCITY
YY(10) = ANGULAR VELUCITY ABWT X-AXIS (RULL RATE)
YY(ll) = ANGULAR VELOCITY ABOUT Y-AXIS (YAW RATE)
YY(12) = ANGULAR VELOCITY ABOUT Z-AXIS (PITCH RATE)
YY(13) = TIME INTEGRAL ~F YAM ANGLE (EVALUATED ONLY
WHEN REQUIRED BY THE AUTQPILOT)
YYDDT — DERIVATIVES OF YY.
TT AND YY ARE SUPPLIEti TO THIS SUBROUTINE WHENEVER THE EQUATION
SOLVING RUUTINE REQUIRES THE VALUES OF THE DERIVATIVE OF YY--
YYDDT. YYDOT IS COMPUTED BY EVALUATING THE RIGHT HAND SIDE OF
THE EQUATIONS DF MOTION FOR THE GIVEN TT AND YY AND THE PRE-
DEFINE GEOMETRY OF THE SHIP AND EQUATIONS OF THE WAVES.
REAL YY(13), Y~DOT(13)
COMMON /A A(6, 6>
COMMON /C ) ci3i 3j
COMMON /CT CT(3,3)
COMMON /FDRCE j XFt YF, ZF, XM, YM,
REAL FORCE(6)
EQUIVALENCE (F~RCE~~~;XF)
CCIMMON /H
COMMON /MASS / RHQ, (3, GAMMA
COMMON /MASS / DISPL, SMASS, XCG,
1 AMY,
....... A~~,
.. AMZ, RADI
‘COMMON /MASS / PMI(3, _.
CUMMON /STATS / NRHS(4), DELTA, HSUM, HMIN, HMAX, TTO, TT1
COMMON /TRIG / CTHETA, S 5THETAJ CPHI, SPHI, CPSI, SPSI
COMMON /2 1 SCR(6) r
COMtlON/ACCEL/ACC (6)
NRHS(4)=NRHS(4)+1
IF (TT.GT.TT1) GO TO 90
IF (TT.EQ,TT1) GO TO 80
c *** Previous time step reJected
NRHS(3)=NRHS(3)+1
TTO=AMINi(TT, TTO)
TT1=TTO
GO TO 100
c *** Previous time step vepeated
80 NRHS(2)=NRHS(2)+1
GO TO 100
c
c Previaus time step accepted
DELTA=TT1-TTO
TTO=TT1
TT1=TT
IF (DELTA.LE. O.0) GO TO 100
NRHS(l)=NRHS(l)+l
HSUM=HSUrn+DELT~ -
HMIN=AMIN1(HMIN, DELTA)
HMAX=AMAX1(HMAX, DELTA)
100 CONTINUE
c *** Cam ute forces dn ship
CALL FORTIS (TT,YY)
c *** Set the values of the de rivatives
c *** the Iivect ular momentum)
%!)%I1(l, I)*YY( (1,2)*YY(11)+PMI (143)*YY(12)
H(2)=PMI(2,1)*YY( (2#2)*YY(ll)+PMI (213)*yy(12)
H(3)=PMI(3, l)*YY( (3,2)*YY(11)+PMI (3,3)*YY(12~
c *** Set derivatives o ion and rotation
Do 110 1=1,3
YYDOT(I)=YY( 1+6)
110 CONTINUE
YYDQT(5)=(YY( ll)*CTHETA-YY( 12)*STHETA}iCPSI
YYDOT(4)=YY( 1O)-YYDOT(5)*SPSI
YYDOT(6)=YY( ll)*STHETA+YY (12)*CTHETA
c *** Solve for derivatives of linear and angular velocity
YYDoT(7)=xF/sMAss
YYDOT(8)=YF
yVDoT(5}=zF
YYDllT(lO)=XM-YY(li )*H(3)+YY( 12)*H(2)
YYDOT(ll )=YM-YY(12)*H(1 )+YY(IO)*H(3)
YYDOT(I2)=ZM-YY(1O)*H(2)+YY(11)*H( 1)
DET=O. O
L=LNEGF(615, 1,A(2,2), YYDCIT(8),DET,SCR)
IF (L.NE.1) STOP 1
c *** Load the acceleration array ACC [ship c~ardinatesl ‘
ACC(1)=YYDOT(7 )
ACC(2)=YYDOT(8)
ACC(3}=YYDOT(9)
Acc(4)=YYDoT(ib)
ACC(5)=YYDOT(11)
ACC(6)=YYDOT(12)
c
c *** ResQlve linear accelerate ons into fixed coordinate s.
SCR(l)=YYDOT( 7)
scR(2)=YYrmT( 8)
SCR(3)=YYDOT(9)
YYDOT(7)=C(1, l)*SCR(I)+C( 2, 1)*SCR(2)+C(3, I)+SCR(3)
YYDOT(S)=C( I,21*SCR(1 )+C(2, 2)*SCR(2)+C (3,2)*SCR(3)
YYDCIT(9)*( 1,3)*SCR(1)+C( 2,3)*SCR(2)+C(3, 3)*SCR(3)
YYDOT(13)=YY(5)
RETURN
END
SUBROUTINE Ri3TATE {YY)
:1 SET UP C(30RDINATE ROTATI13N MATRICES CT AND C .
cl RESOLVE VELOCITY INTO SHIP COORDINATES.
cl
.
C{3J3)
CT(3,3)
CTHETA, STHETA , CPHI , SPHI, CPSI, SPSX
Vxl VYI Vz
CTI-IETA=COS(YY
(4))
STHETA=SIN(YY(4) )
CPHI=COS(YY(5} )
SPHI=SIN(YY(5) )
CPSI=COS(YY(61 )
SPSI=SIN(YY(6) )
SET UP THE CT MATRIX. .
CT(l, l)=CPHI*CPSI
CT(1,2)=SPSI
CT(1,3) =-SPHI*CPSI
CT(2,1)=-CPHI*SPSI
c CT(2,2)=CPSI
CT(2,3)=SPHI*SPSI
CT(3, l)=SPHI
CT(3,2)=0
CT(3,3)=CPHI
SET UP THE C MATRIX. .
C(lJ1)=CT(l, l)’
C(1J2)=CT(1J2)
C(1J3)=CT(1,3)
C(2J 1)=CTHETA*CT(2J l)+STHETA*CT(3j 1)
C(2J2)=CTHETA*CT(2J 2)
C(2,3)=CTHETA*CT(2, 3)+STHETA*CT(3, 3)
C(3, 1)=CTHETA*CT(3J 1)-sTHETA*c-r(2,1)
C(3J2) =-STHETA*CT (2,2)
C(3,3)=CTHETA*CT(3J 3)-sTHETA*cT(a 3)
RESIXVE THE LINEAR VELOCITY INTO SHIP COORDINATES. .
vx=c(iJ 1)*YY(7)+C( 1,2)*YY(E)+C (1,3)*YY(91 I
VY=C(2J 1)*YY(7)+C(2, 2)*YY(8)+C (2,3)*YY(9)
VZ=C(3, 1)*YY(7)+C(3, 2)*YY(8)+C (3,3)*YY(9)
, C3
RETURN
c
END
,.
L
(:
c SUEROIJTINE GETFREG
:*******************************************************
‘( c
c Evaluates $requency af acceleratiensr~~e~~ch
c strLp in heavel swag and roll usin
history. The routine finds the las? several
: eaKs Hr troughs in the response histor . Evaluates
c !h= time difference and calculates the !requency
c (rad/see) and luads the OMEGAX( , ) array.
E**********************************************************
c
C5 .
c.
NWAVES, WVSUM,
WVAMP(20), !dVFRE(20), WVDIR(2(I), WVPHA(20),
WN(20), UNX(20), WNZ(20),
CSK(20), CCK(20), CXK(2Q),
CYK(20), CZK(20), XW(20)
L
~~~~~NO~”CtFFSE~S. .
MSTA, NPRDF, NFWD, NAFTI LPTS(25),
XOFF(2!5), YOFF(25/25)J ZnFF(25J25)i
: XPROF(51), YPRDF(51)
COMMON/ACCEL/ ACC(6)
COMMDN/SXGEOM/AREAS(25)J DXS(25),DX1S(25}, DX2S(25),
c * YMOMS(25), ZHOMS (~5]J
COMMON/SXDMEG/~MECAX (3)
ISTA,LSTA
CUMMON/HIST/AHIST(31 30),TIMTK(301 \
COMMDhl/TIME/TIME,RAMP
CDMMDN/TIME/TO, TSTART,TSTDP ,TOUTPT,TSTEP ,ERR
REAL TPK(10) .
5 -----------------, ------ .----., -----------------------------
c SECTION 1.Q - Move values up one index in the AHIST
array
E
DO iOO ~=30J2,-1
JM1=J-1
AHIST(l, J)=AHIST(l, JMi)
AHIST(2, J)=GdiIST(2,JM1)
AHIST(3, J)=AHIST(3, Will
c c
100 CONTINUE i
~~ *1; 1=30,21-1
TI~T~(I)=TIMTK(IM)
110 CUNTINUE
g -------- ---------- ------- --.------- _______________ ------- -
c E SECTION 2.0 - Calculate a~celeration 0+ a stri J in
c heave, swag and roll using the AC E (1)
arra givang ship accele~ations in ship
: coor Y inate system.
c
L
XDUM=1O. !Arbitrar moment arm to get better
c defined # ist~rg
AH=ACC(2)+ACC {6)*XDUM
AS=ACC(3)-ACC (5)*XDUM
,..
..
,-,
..
,’
.,
AR=ACC(4)
c
AHIST(l, l)=AH
AH1ST(2, l)=AS
AHIST(3,1)=AR
c
200 CONTINUE
c
TIMTK(lI=TIME
c
IF(TIME.LE.RAMP) GO TO 400
c
.--— --------- --------------------------- ------------------
:
c SECTION 3.0 - Pi;~epeaKs and troughs, evaluate freq.
c : Here we are evaluating +re~uency”
c using onl the last quarter of a ‘cijcle”.
If we wan ! ed to use a hal+ cycle, we
E wauld get out e+ the GOTO31O loop when
c ;~~=~T;nste?dl;;eK;;=2 and change
c
c TQ=TPK{%%PK(l) +~llewed bg
c 0MEGAX{I)=2. *PI/(2.*TQ)
c
----------------------- ----------------------- .----— ------
E DO 300 1=1,3
!@=o
TSIGN=l.
310 CONTINUE
L=(-+~
IF(L. EQ.30) GD TO 325
TsIm12=TsIGN
DIF=AHIST(I, L)-AHIST(I,L+l)
TSIGN=SIGN(l. ,121F)
IF(L.EQ.1) GO TO 310
IF(TSIGN2.EQ.TSIGN) GD TO 310
KNT=KNT+l
TPK(KNT)=TIMTK(L)
IF(KNT.EQ.2) GO TO 320
Go -m 310
c
320 CONTINUE
TQ=TPK(l)-TPK(2)
~~E~~X~&:=6. 2831853/(4.*TQ )
P325 UMEGAX(I)=O.
:300 CONTINUE
’400 CONTINUE
RETURN
END
(.
SUBROUTINE WTCCF
ccc
CDMtlON/1~/INPUT,OUTPUT,BIF,OFF, CDF
<. INTEGER OWPUT,BIF,OFF,CCIF
COMMON/MASS/RHO, G/GAMMA
COMMON/MASS/DISPL, SMASSI XCGJYCG, ZCG,
* ~aMMDN/LH~/y:i}3j..
AMX,AMY,AMZ,
... . ... . RADII(6)
..... . . .. .
c C~MMON / NWAVES, WVSUM,
WVAMP(20), WVFRE(20), WVDIR( 20), WVPHA
; WN(20), idNx(20)J WNZ(201,
c. : CSK(20), CCK(20), CXK(201,
CVK(SO),
- . . . --- czf4(2~), )(W(20)
‘COMMON / / tlSTA, IhlPROF, NFWD, NAFT, LPT‘S(25),
XOFF(2!5), YOFF(2!5,25), ZOFF( 2!5,25 II
c ; XPRCIF(!
COMMON/RESIST/SPEED
!51),YPROF(51)
CCIMMCIN/SI@lA/ NK, SIGtiA(24),SIGMA0, ERRQ, 0M(12)
c
c. c
CDMMON/COEFF4/COEFF4(6, 12,8,25),AREAN(25, 6)
CWMMON/COEFFX/TllAH(25, 21), TSAS(25, 21),TRAR(25, 21)#TCCA(25, 21)
* THVH(25J21), TSVS(25,21), TRVR(25,21), TCCV(25,21),
c *
*
THACX(25J21), TiiVCX(25,21)JTSACX(25#21), TSVCX(25,
TRACX(25,2i)J TCACX(2S,21 )#THVCY{25~ 21),
* ITP(25),TXP(25), IFP(21),FXP(21)
COMMCIN/OPTION/JOBCO, JOBFO(10)
c C~MMON/SXOMEG/UMEGAX (3)
COMMON/DRFTl/ DRAFTI(6)
b
DATA DEGREE/O.0i745 32925/
c. cc-------- ------------ --------------- - ..-__-,-__--.”
______
WRITE(OUTPUT, 2)
./.,
L.
c
WRITE(OUTPUT, 3)
DO 10 J=l,MSTA
WRITE(OUTPUT, l) Jj THAH(J, 21),TSAS(J,21)1 TRAR(J, 21),TCCA(JJ21)
10 CONTINUE
c. c
WRITE(UUTPUT, 4)
DQ 20 J=lJffSTA
WRITE(OUTPUT, l) J, THVH(J, 21),TSVS(J121), TRVR(J, 21)ITCCV(J,21)
c 20
c
CONTINUE c
WRITE(OUTPUT, 5)
DO 30 J=l,MSTA
< *
WRITE(OUTPUT, 1) J, THACX(J, 21),TSACX(J, 21),THVCX(J,21),
TSVCX(J,21)
30 CONTINUE
c
< DO 40 K=l,NWAVES
WRITE(OUTPUT,6) K
WRITE(OUTPUT, 3)
DO 110 J=lJMSTA
c 110
WRITE(OUTPUT, l) J, THAH(J, K), TSAS(J,K),TRAR(J, K),TCCA(J,K)
CONTINUE
c
WRITE(OUTPUT, 4)
( DO 120 J=IJMSTA
WRITE(OUTPUT, l) J, THVH(J, K), TSVS(J,K),TRVR(J, K),TCCV(J,K)
c
c
1---
L.
,.
<,
,..
k,
.
120 CC)NTINUE
c
WRITE(OUTPUT, 5)
DO 130 J=l,MSTA
WRITE (OUTPUT, l) J, THACX(J, K}, TSACX(J, K),THVCX(J, K), TSVCX(J, K)
130 CONTINUE
y CONTINUE
FORMAT(lX, 12,5X,4E13.5)
2 FORMAT(/’*****TEMPORARY HYDRtlDYNAMIC COEFFICIEh!TS****’//)
3 FORMAT(lX, ‘STA’,4X, ‘HAH’,12X, ‘SAS8,12X, ‘RAR’,12X, ‘CCA’\}
4 FORHAT(lX, ‘STA’,4X, ‘HVH’112X1 ‘SVS’,12X1 ‘RVR’J12X, ‘CCV’/)
FORMAT(lX, ‘STA’14XJ ‘HACJ;i$;fJ ‘SACX’, llX, ‘HVCX’, llX, ‘svcX’J/)
::~fl~J(/lX,‘WAVE NO. -
END
.,.
,
k.
SUBROUTINE FC)L1U2
COHMON/10/INPUT~OUTP~j BIF,OFF,COF ‘
-, INTEGER OUTPUT;BIFv~A~}COF
-. COMl13N /LHS
COMMON /TIME / TIME, RAMP
COMMON /TIME / TO, TSTART, TSTOP, TDUTPTt TSTEP ERR
I
c-
COMMON / / NMAVES, WVSUM,
L
WVAMP(20), MVFRE(20), wvnIR(2010 &JVPHA(20 )#
:’ MN(20)J WNX(20), WNZ(20)~
3 CSK(2Q), CCK(20), CXK(20)1
F.
4 CYK(20), CZK(20), xW(20)
c.
C13MMOWSUMMARY/ NT, YYBAR(lO), YYRMS(1O), YYMAX(lO), YYMIN(1O)
CCIflMON/LOAD5/SIN2(2S), SIN3(25), SIN4(25)i SIN5(25)#SIN6{25)I
1 V2(25), V3(25), V4(25),V5(25)8 V6(25)#
2 RED(6J25)
b.,.
COMMON/DISPLAY/TARE( 10)
REAL YS(ZO)
EQUIVALENCE (ETA,YS(I))
DATA RAD /0.01745 32925 19943/
#-
k.”- ETA=O. O
IF (NUAVES.EQ.0) GO TO 120
c *** Wave am litude @ e.g.
,= DCI iio &=t,NwAvEs
k: ARG=YCil*WNX (K)-Y(3)*WNZ (K)-TIME*WVFRE(K)+WVPHA (K)
ETA=COS(ARG )*WVAMP(K)+ETA
110 CONTINUE
c *** Position vector
r-.
L “ 120 DO 130 1=1,3
YS(I+l)=Y(I)
130 coN~~~~4)=y( 1+3)/RAD
r c *** Displa relative heave --’subtract c.g. height
L
c above #aseline *O bring mean value to zero.
YS(3)=YS(3)–TARE(2)
c ***
?-
~.
!NO RUDDER
!BENDING MOMENT AT STATION J=14
r’
L.
Y(9)*SPHI
+ Y(7)*SPHI
c *** Lnad mean and rms information ..
/..
TINIT=.75*TsTclP
L
IF(TIME. LE.TIh!IT) GO TO 199 c
NT=NT+ i
I~(NT.NE. 1) GO TO 1%
..
DO 184 1=1,10
YYMAX(I)=O. O
YYMIN(I)=O. O
YYBAR(I)=O.
..
YYRt’ls(I)=o.
84 CONTINUE
?8 CONTINUE
,,
L
Do 18s 1=1,10
IF(YS(I ).GT.YYMAX(I)) YYMAX(I)=YS(I)
IF(YS(I }.LT.YYMIN(I)) YYMIN(I)=YS(I)
c—
YYBAR(I)=YYBAR( I)+YS(I)
YYRMS(I)=YYRIIS (I)+YS(I)**2
-185 CONT1hWE
%9 CONTINUE
c *** Write t~ history file
WRITE(10} YS(l), YS(3)1YS(7)~YS(5)~ YS(6)IYS(4)
C *** Print YS vectar
. .
WRITE (OUTPUT, 190) TIME/ (YS(I)#I=lt9)
c
RETURN
c
.,
190 ~~~MAT(5(lX,F11.4)/3F12. 4#2X,E15.5/2X#F12.4)
.-
.
SUB~~UTINE FORTIS (TT, YY)
c -- TIME, THE INDEPENDENT VARIABLE
c
c YY .- DEPENDEhlT“ VARIABLE ARRAY..
c YY(l) = X-COORDINATE DF MASS CENTER
YY(2) = Y-COORDINATE OF MASS CENTER
YY(3) = Z-CQCIRDINATE OF MASS CENTER
YY(4) = THETA ROTATION (ROLL ANGLE)
YY(5) = PHI ROTATION (YAW ANGLE)
YY(&) = PSI ROTATION (PITCH ANGLE)
YY(7) = X-COMPONENT OF LINEAR VELOCITY
YY(81 = Y-COMPONENT OF LINEAR VELOCITY
YY(9) = Z-COMPONENT OF LINEAR VELOCITY
YY(10) = ANGULAR VELOCITY A130WT X-AXIS (ROLL RATE)
YY(il) = ANGULAR VEL~CITY ABOUT Y-AXIS (YAW RATE}
YY(12) = ANGULAR VELCtCITY ABOUT Z-AXIS (PITCH RATE)
REAL YY(12)
COMMON /c C[3,3)
COMMON /13AMP ~ DAMPL{6), DAMPG(6)
COMMON /FORCE / XF, YF, ZF, XM, YM, ZM
REAL FORCE(6)
EQUIVALENCE (FORCE(l), XF)
COMMON /MASS / RHO, G, GAMMA
COMMON itiiiS~ ~ DISPL; SMASSi XCG,
1 AtIX, AMY, MIZ, RADI
CCtMMON /PIASS / PMI(3,3)
COMMON /5TATS / NRHS(4), DELTA, HSUM, HMIN, HflAXt TTO# TT1
COMMON /TIME / TIME, RAMP
C9MMON /TIME / TO, TSTARTt TSTOPJ TCWTPT# TSTEPJ ERR
COMMON /TRIG / CTHETA, STHETA, CPHI, SPHI# CPSIl SPSI
COMMON /V Vx, VY, Vz
c *** Load rotationa{ trans?o~m matrices - transform velacity
c inta ship coordinates
CALL ROTATE (YY)
c *** Initialize +orce vectar
Do 110 1=1,6
FORCE(I)=O. O
110 CONTINUE
c
c *** Ensure constant speed for version SSX
vX=SPEED
c *** Corn ute h drod namic and inertial forces on ship
CALL AQUAb (T%YY)
c *** Add dam-in fbrkes/moments in ship coord inate sgstem
XF=XF-(gAM#L( l)+ABS(VX)*DAMPQ(l ))*VX
YF=YF-<DAMPL(2)+A13S{VY)*DAMPQ{2) )*VY
zF=zF-(DAMPL(3)+Ai3s(vz )*DAMPQ(3))*VZ
XM=XM-(DAMPL(4)+AES(YY( 1O))*DAIMPQ(4))*YY (10)
YM=YM-(DAMPL(5)+ABS(YY( 11))*DAMPQ(!5))*YY (11)
ZM=ZM-(DAMPL(6)+ABS(YY( 12))*DAMPQ(6) )*YY (12)
c *** Fixed added m~~s coeficients”- “not norm IIY used except
c erhaps for surge.
! F=XF/AMX
YF=YF/AMY
ZF=ZF/AMZ
c
c *** Ramp function a lied to force
IF (TT.GT, TSTARf! GO TO 130
IF (RAMP. EQ.O.Q) GO TO 13(3
R=(TT-TO}/RAMP
DO 120 -I=lt6
FORCE(I)=FORCE( I)*R
:$: CQNTINUE
CONTINUE
c
:F#RN
SUBROUTINE SPECTRA (PFRQ,TRWHi3, 0M(2BEG,OMGEND, WAMP, PER)
DIMENSION WAMP(lO), PER(lO), OMEGA (1O)
~~3~N~ION 0MG2(IOI ),SPEC(1O1)
Ie2=o-
IC3=-7
IC4=-I
IC5=-9 .
IC6=1
IW=O
0MG2(1)=OMGEEG
UI’IG2(101)=OMGEND
1 DELFRQ=(OMG2(1O1 )-DflG2(l))/lal.
DO 5 1=2,101
J=I-l
5 0MG2(I)=CJMG2{l)+J*DELFRQ
Do 6 I=i,loi
6 0MG2(I)=OMG2(I)/(2.*3. 14159)
7 DO 10 1=1,102
10 SPEC{I)=5.*(. 25*TRWH13)**2*PFRQ*(OMG2( I)*PFRQ)**C-5)*EXP ‘(,
1 (-5./4. )*(UMG2( I)*PFRQ)**(-4))
onD=o.
EVEN=O.
DO 20 1=2,50,2
20 EVEN=EVEN+SPEC {1)
DO 30 1=3,99,2
30 OI)D=OIID+SPEC (1)
TAREA=(OMG2 (2)-0MG2(1)) /3.*(SPEC(l) +4. *EVEN+2.*ODD+SPEC (101 ))
40 Ic2=Icl+io
IC2=IC2+1O
IC3=IC3+20
IC4=IC4+I0
IC5=IC5+I0
IC6=IC6+1O
ODD=O.
EVEhl=O.
IW=IW+I
Da 50 I=IC1, IC2,2
50 EVEN=EVEN+SPEC (1)
DO 60 I=IC31 IC4,2
&o ODD=ODI)+SPEC(1)
WAMP(IW)=(OMG2(2)-0MG2(1 1)/3.*(SPEC( IC5)+4. *EVEN+2. *
1 UDD+SPEC(IC6 ))
14AMP(IW)=1.414*SQRT(WAMP( IW))
PER(IW)=(ClMG2(IC6)+~MQ2( IC5))/2.
of’lEGA(Iw)=2, *3. 141S9*PER(IW)
PER(IW)=i./PER(IW)
IF(IW. LT.1O) GO TO 40
PRINT SOO, TRWH13, PFRQ,f)MEGA,PER,WAMP
RMS=4. *SQRT( TAREA)
PRINT 10IO,TAREA,RMS
500 ‘ORMAT(15X, ‘Hi/3=’ IF1O. 2J2X1 ‘PEAK FREQ=’IFiO. 41 /f12X1
‘OMG’,3X,10F6.3//,2X, ‘PER’,3X,10F6.2#/#2Xt ‘WAMP’J2X,
10F6. 2)
1010 ~~~~#~(2X, ‘TOTAL AREA=’,FIQ. 2,5X, ‘RPIS=’,F1O.2)
END
SUBROUTINE LINEAR(X, Y,TRWPER,Y2)
DIMENSIOhl X(50), Y(50),Y2(IQ)
DIMENSION TRWPER(10)
J=O
,.
I?A=SQRT((X-XFI**2+ (Y-YF)**2+( Z-ZF)**2)
FRA=ARM/RA
R13=SQRT((X-XF}**2+(Y-YF)**2+ (Z+ZF)**2)
FRA=FRA-ARM/RB
FRX=-AN(f’IJ,
l I*FRA
FRY=-AN(MJ,2 )*FRA
FRZ=-AN(MJ,3 )*FRA
P1=PI+FRX
P2*2+FRY
P3=P3+FRZ
P4=P4+YF*FRZ-ZF*FRY
.
P5=P5+ZF*FRX-XF*FRZ
P6=P6+XF*FRY-YF*FRX
PBB{NJ,MJ)=PJ3H (NJ,MJ)+FRA*ARN
138 CDNTINUE
$(NJ~l)=P(hlJtl)+P1*ARN
P(MJ,2)=P(NU, 2)+P2*ARN
~(NJ/3)=P(Nil;3)+P3*ARN
., --
P(NJ,4)=P(NJ, 4)-W4*ARN
!
\ ..
P(NJJ5)=P(NJ, 5)+P5*ARhl
P(NJ,6)=P(NJ, 6)+P6*ARN
128 CONTINUE
~.. 127 CONTINUE
DO 554 KG=1,6
554 WRITE(3) (P(NJ#KQ), NJ=l#NPAN)
RETURN
.—
TOP 1=2.*3. 14i59
DO 2Q 11=1,10
IF(II. GT.1) GO TO 69
50 U=J+ 1
69 IF(TnPr/TRwPER (II)-x(ul)l12, iii, 110
110 GOTO 50
111 Y2(II)=V(J)
GOTCI 20
112 Y2(II)=Y(J-l )+(Y(J)-Y(J-I ))/(X(J)-X(J-l))*
1 ‘ (TOPI/TRWPER(II)-X(J-1))
20 CONTINUE
RETURN
END
C’
c
c’
c.
c
c
/..
,...,
,..
...
L. .
..,
.-
SUERDUTINE TBAR(TT,YY)
ccc
EXTERNAL ETAF
ccc .
COMMOhl/MASS/RHO,G,GAMMA
COMtlON/MASS/DISPL#SMASS#XCG#YCGt ZCGJ
* AMX#AMYIAMZO RADII(6)
Carltlm / ./ NWAVES, WVSUII,
i wvAMP(20)# WVFRE(20), WVDIR{20) , WVPHA ,(20),
wN{20)J WNX(20), !#42(20)#
: CSK(20), CCK(20), CXK(20)1 .
4 CYK(20), CZK(20), XW(20)
COMMON / / MSTA, NPROF, NFWD, NAFT~ LPTS(25)J
XOFF(25), YOFF(25,25)t ZQFF‘(25,25)#
: XPRDF(51)1 YPRUF(51)
COMMOhl/ETA/YC,XK{20)
c!3MMohl/cT/cT(3,
3)
CQMMON/TEMPSTA/DXFWDt DXAFT#TSTA(25 )
COMMON/I)ISPLAY/TARE(6)
REAL YY(l)
c
DATA DEGREE/O.01745 32925/
SECTIUN 1.0 ;:~;:~: average draft at each station
: .
c
c
DO 2 K=l,NWAVES
CXK(K)=CT{l, I)*WNX(K)-CT(l, 3)*WN(K)
XW(K)=(TT*WVFRE{K)-QVPHA(K)+YY(31*WNZ(K)-YYC1 )*MNX(K})/CXK(K)
2 C13NTIhlUE
c
DO 5 d=l,MST4
XXSTA=XOFF(d)
IF(NWAVES.EQ.0) GO TO 11
DO 10 K=I,NWAVES
XK(K)=(XXSTA-XW{K) )*CXK(K)
10 CONTINUE
11 YC=CT(l, 2)*XXSTA+YY(2)
YKEEL=YCG-TARE (2)-YC
ETA1=ETAF(O. }
TSTA(J)=ETA1 -YKEEL
5 CONTINUE
c
c t
:
ccc
RETURN
END
SUBROUTINE MOCHA
Ccc
ccc
ccc f#~ ass: Far JOBCO=2,3 or 4 ... this subroutine
ccc ! load the COMMON/CUEFFX/ arrays for use in
ccc subroutine FRtlUDE.
ccc
CDMM!3N/MASS/RHO,G,GAMMA
COMMON/MASS/DISPL, SMASS, XCGIYCGIZCGt
* AMXIAMY,AMZJ RADII(6)
cbMMnN/LHslY(13)
C5 :::;O~R;PERTI E~..
NWAVES, bdVSUM,
WVAMP(20), WVFRE(20), WVDIR(20), WVPHA(20),
; WN[20), WNX(20), WNZ(20),
CSK(20), CCK(20), CXK(20), .
4 CYK(20), CZK(20), XW(20)
:~~M3:NO~ UFFSE~S. .
tlSTA, NPRCIF, NFWD, NAFT, LPTS(25),
XOFF(25)j Yi3FF(25,25)t ZOFF(25,25),
$ XPROF(51), YPROF(51)
COMl”iQN/RESIST/SPEED
C~MMON/SIGMA / NK, SIGMA(24),SIGMA0, ERRO, DM(12)
DO 10 J=l,MSTA
D3 10 K=l,NWAVES
c
IF (JO)3C0.EQ.2.0R. d3BC0. EQ. 4) THEN
IF=IFP(K)
FX=FXP(K)
CALL TXIT(TSTA(J), IT,TX)
ELSE IF (JOBCO.EQ.3) THEN
IT=ITP(J)
[
.—
c
/
<.
TX=TXP(J)
IF=IFP(K)
FX=FXP(K)
(.. END IF
c
THAH(J,K)=COX(IT, TX, IF,FX, l~J)
TSAS(J, K)=COX(IT, TX, IF,FX,21J)
c TRAR(J, K)=COX(IT,
TCCA(J/ K)=COX(IT,
TX, IF,FX,3, J)
TX) IFtFXJ 4/J)
c
~. THVH(J, K)=CDX( IT,TX, IF,FXJ 51J}
TSVS(J, K)=COX( IT,TX, IF,FXJ 6J J)
TRVR(J, K)-< OX(IT; TX, IF,FX~ 7~J)
TCCV(JJ K)=COX(ITJ TXJ IF~FX# 8, J)
c
c- c
c Spatial derivatives in x-dive ckion
c
THACX(J, K)=COXDX( IT,TX, IF,FXJ 1,J)
[. TSACX (J,K)=COXDX (IT,TX~ IFJFX, 2J J)
TRACX(J, K)=COXDX( IT,TX, IF,FX, 3,J)
TCACX(J, KI=COXDX( ITJTXJ IFJFX, 4,J)
~. c
10 CONTINUE
:Cc
ccc SECTION 3.0 - ~~~s5~fCti0n cOmputes coefficients
(. ccc motion relat~d +ar~e
ccc cemputa ! ions~ usin
Egg at w ich camputati~ns
:::;::%::H OH!G::::X::E::E,
c ccc
ccc
OMEGAX(2) - Si&$Y, IJMEGAX(3) - ROLL. ‘
These are computed in Subroutine
ccc (2ETFREQ.
ccc
~i ccc
DO 20 J=l, MSTA
c
IF(JOBCO. EQ. 2) THEN
c’ IF= IFP(21)
~~:F~~ (21)
~ IFS%F
IFR=IF
FXH=FX
FXS=FX
FXR=FX
(“” CALL TXIT(TSTA(J), ITJTX)
ELSE IF(JOBCO. EQ.3) THEN
IT=ITP(J)
,.- TX=TXP(J)
‘!.
CALL FXIF(OMEGAX( l), IFH,FXH)
CALL FXIF(OMEGAX(2), IFS,FXS)
CALL FXIF(OMEGAX(3), IFR1FXR)
,...
ELSE IF(JOBCO. EQ.4) THEN
. ..
CALL TXIT(TSTA(J), ITJTX)
CALL FXIF(DMECAX( l), IFH,FXH)
CALL FXIF(OMEGAX(2)I IFSJFXS)
., .
CALL FXIF(OPIEGAX(3), IFR,FXR)
c
END IF
(:
c
(“
c:”
f
,.
THAH(J, 21)=COX(IT, TX, IFH,FXH, 1,d)
TSAS(J, 21 )=COX( IT,TX, IFS,FXS, 2,J)
TRAR(J, 21 )=COX(IT, TX, IFR,FXR, 3,J)
TCCA(J, 21 )=COX( IT,TX, IFS,FXS, 4,J)
c
THVH(J, 21 )=COX( IT,TX, IFH,FXH, 51J)
TSVS(J, 21 )=COX( IT,TX, IFS,FXS, 6,J)
TRVR(J, 21)=CUX( IT,TX, IFR,FXR, 7,J)
TCCV(J, 21)=COX( IT,TX, IFS,FXS, 8,J)
c
c
c Spatial Derivatives in x-dir ectin
c
THACX(J, 21)=COXDX(IT, TX, IFH,FXH, l,J)
TSACX(J, 21)=CUXDX(IT, TX, IFSIFXS,2, J)
THvcx(J, 21)=coxr)x(IT#l-x,IFH,FXH151J)
TSVCX(d, 21)=COXDX(IT, TX, IFS,FXS,6, J)
c
20 CONTINUE
c
c
c CN~te: Vertical derivative of added mass camputed
in SUBROUTINE FROUDE or COFFEE. 1
:
RETURN
END
,,.
k.
<
.
~.
SUBROUTINE AQUA2D (TT~’YY)
c
c
c CALCULATES SHIP-MOTION INDUCED FORCES, WAVE INDUCED FORCESJ
: AND OTHER HYDRC)DYNAMIC FORCES ON THE SHIP.
k SECTION
-------
DESCRIPTION
-----------
c
c 1.0 INITIALIZATION
c 2.0 FIND WET OFFSET POINTS/ENDS OF HULL
c 3,0 INITIALIZATION
c 4.0 CALCULATE VARIOUS 2-D INTEGRALS/GEOMETRIC INFO. FOR
c CALCULATE FORCES THAT ARE SHIP-MOTION RELATED
c 2:: CALCULATE DORCES THAT ARE WAVE-INDUCED
c 7*o CALCULATE UTHER FORCES
c 8,0 INTEQRATE FORCES OVER LENGTH
c AIM) UP FQRCES AND LOAD Ft)RCE ARRAY
1% : LOAD MASS/INERTIA MATRIX A(I#J)
:---”
c
,------------------- --------------------------- ------------
c NOTE: The hgdradynamic cae~ficients were divided b sectiendl area in
COEFS art of this pra ram. They W=l’@ alsa i ivided by RHO in th
subrou t inc. Thus, quan % ities are multiplied by DVOL
when theg would narmally be multiplied by DXO and *here
are several places where a coefficient is divided by G operat=d
t~ make ~;rgnthat all the units are consistent from force to
c force. oint in the force calculations~ one must
c multiply by G iiM A ta obtain force in lbs.
:----
c1
REAL YY(I)
COMMON /A / A(6,6)
COMMON /AM / YFYA, ZFZA, XMZA, XMXR# XMYRt
1 YMZA, YMYR, ZMYA# ZMZR
COMMON/RESIST/SW~D
(l}&(/Yy;:)
CT(3, 3)
YC, XK(201
XF, YFJ ZF, XM, YM,” Ztl
REAL FORCE(6I r
EQUIVALENCE (FORCE(l), XF)
COMMON /MASS / RHO, G, GAMMA
CCIMMON /MASS / DISPL, SMASS, XCG, YCG, ZCGJ
1 AMX, AMY, AMZ, RADII(6)
CCiMMON /MASS / PrlI(3#3)
COMMON /TRIG / CTHETA, STHETA, CPHI, SPHI, CPSI# SPSI
COMMON /V f Vx, vY# Vz
CUMMDN / NWAVES, WVSUM,
WVAMP(20), WVFRE(20)J WVDIf?(201J WVPHA(20 ),
; WN(20}, WNX(20)J WNZ(20)J
3 CSK(20), CCK(20), CXK(20)J
4 CYK(20), CZK(20), XW(20)
4‘COMMON / MSTA, NPROF, NFWD, NAFT, LPTS(25),
XOFF(’25), YDFF{25,25), ZOFF(25#25),
2 xFi?oF(51jl“YPRUF(51)
COMMON / INPTS(25)J IPOINT(25)~ YMET(25125)# ETA(2 5,25),
1 ZLAST(25,25), ZWET(2S,25), ZNEXT(25#25)
{:
COMMON / / ZCO(20), ZSO(20), ZCY(20), ZSY(20),
1 ZCZ(20), ZSZ(20)
COMMDN / / DZK(20)
c! *
COMMON / i ~S~VE(20), COSJ(20), SINJ(20)J
COSJJ(20)1 SINJJ(20),
.——. .
{
DO i30 I=i#9
AM(I)=O. Q
130 CONTINUE
c*
DO 131 1=1,1200
ZERDF(I)=O. Q ! EquivaIenced with COMMOhl/SXFOR/
131 CONTINUE
C*
—
DO 800 I = Z,32
ZEROC(I)=O. !ZEROC is EQWIVALENCEdwith COMMON/FCt3MP/
800 CONTINUE
c
C*
c--------------------- ----------------------- -----------------
i 1.2 Load COt’iMON/COEFFX/if dOBCO=2j3 or 4
c
----------------------- --------------------- -----------------
E
CALL TBAR(TT,YY) !Get average draft at everg sta.
TYPE 1000, (TSTA(J),J=l/tlSTA)
1000 FORMAT(1X,25F5. 1)
c DO 1000 U=ltMSTA
TSTA(J)=32.8
:1000 CONTINUE
c
IF(JOBCO. NE. 1.AND. TT.GT. O. ) CALL MOCHA
c
ISTA=O
c----------------------- --------------------- ------------------
~ SECTION 2.0 - FIND WET OFFSET POINTS AND HULL ENDS
L
c----------------------- -------------------- -------------------
c
C3
C3 FIND WET OFFSET POINTS.
Ld
C3 ETA(L) = Y-COORDINATE OF WAVE SURFACE,
C3 y:+ [~] = Y-COORDINATE OF WET OFFSET POINT.
C3 = Z-COORDINATE OF WET OFFSET POINT.
C3 ZLAST(L) = Z-CttORDINATE OF EITHER THE PREVIOUS WET OFFSET
C3 POINT OR THE Z-COORDINATE OF THE MATER SURFACE#
C3 ZNEXT(L) = Z-CCH3RD1NATE OF EITHER THE NEXT WET OFFSET P~INT
C3 OR THE Z-COORDINATE OF THE WATER SURFACE.
C3
C4
C4 KEY INDICATES THE STATUS OF THE SEARCH:
C4
C4 KEY = i -- THE FIRST IJFFSET POINT IS BEING “TESTED~
C4 KEY =2-- THE LAST OFFSET POINT UAS WETJ
C4 KEY = 3 -- THE LAST OFFSET POINT WAS DRY (ETA COMPUTED)J
KEY = 4 -- THE LAST OFFSET POINT WAS DRY AND ETAMAX WAS
:: USED (ETA WAS NOT COMPUTED).
C4
c
c’”
DO 260 d=l,tlSTA
KEY= 1
—..—.
N=LPTS(U)
XXSTA=XOFF{J )
IF (NWAVES. EQ.0) GO TO 150
DO 140 K=l,NWAVES
XK(K)=(XXSTA-XW(K) )*CXK(K)
140 CONTINUE
150 YC=CT(l, 2)*XXSTA+YY(2)
ETAtlAX=(MVSWM-YC )/CT(2,2)
160 Y1=YOFF(I,J )*CTHETA-ZOFF (I#Jl*STHETA
Z1=ZOFF(I,J )*CTHETA+YOFF (I,J)*STfiETA
IF (KEY.LT.3) GO TO 170
C5 1
THE PREVIOUS OFFSET POINT WAS DRY. AN ESTIMATE OF ETA WILL BE
:: USED TO SEE IF THIS POINT CAN BE WET. !
C5
IF (Y1.LT. ETAMAX) GO TO 170
KEY=4
GO TO 230
C4
COMPUTE THE Y-CCIORDINATE OF THE WATER SURFACE. .
::
170 ETAI=ETAF(Z1 )
IF (KEY.GT.1) GO TO 180
C5
C5 SAVE INITIAL CALCULATICINS FOR USE WITH FINAL OFFSET POINT.
C5 THE INITIAL AND FINAL DFFSETS REFER TO THE SAf’lEPOINT.
C5
EFIRST=ETA1’
YFIRST=Y1
YO=Y 1
C4
C4 TEST THE PUSITIO~H~F THE CURRENT OFFSET POINT RELATIVE TO THE
C4 WATER SURFACE. TEST IS SATISFIED IF THE P~INT IS
C4 BELOW THE WATER SURFAC#:
C4
180 IF (YI.LT. ETAI) GO TO (212,21O,2OO,19O),KEY
C5
C5 THE CURRENT OFFSET POINT IS DRY, ‘IF KEY=2, THE PREVIOUS POINT
C5 WAS WET, AND THE Z-COORDINATE OF THE INTERSECTION OF THE HULL
C5 AND THE WATER SURFACE MUST BE FOUND BY INTERPOLATION.
C5
IF (KEY.NE.2) GO TO 181
ZNEXT(L,d)=(Z1-ZO)/(Yl-ETAl+EY)*EY+ZO
LWET=L
101 KEY=3
G~ TO 220
:Z IF KEY = 4, THE ETA VALUE FOR THE LAST OFFSET POINT UAS— NCIT
—
C5 COMPUTED. COMPUTE ETA..
C5
190 EY=ETAF(ZO)-YO
% THE CURRENT OFFSET POINT IS WET, AND THE PREVIOUS POINT IS DRY.
C5 INTERPOLATE TO FIND THE INTERSECTION OF THE HULL AND THE WATER
C5 SURFACE. .
C5
200 ZO=ZO+(ZI-ZO) /(Y1-ETAl+EY)*EY
GO To 211
E: A WET CIFFSET POINT HAS BEEN LOCATED. STORE THE REQURED
COORDINATE VALUES. .
i:
210
211 ~=~+~ ‘--
TO 240
212
ETA(L,J)=ETA1
YWET(LJd)=Yl
ZWET(L,J)=Z1
ZLAST(L,J)=ZO
KEY=2
C5
SAVE THE COMPUTED CO~RDINATE OF THE WATER SURFACE. .
%
220 EY=ETA1-Y1
C5
C5 SAVE THE COORDINATES OF THE OFFSET POINT..
C5
230 YO=Y1
Zo=zl
C4
INCREMENT THE INDEX OF THE OFFSET POINT FOR THIS STATION. IF
E: THE INDEX DOES NOT REFER V3 THE LAST POINT, REPEAT THE LCtOP.
C4
1=1+1
IF (1.LT.N) GO TO 160
IF (1.GT.N) GO TO 250
C5
C5 FOR THE LAST OFFSET POINT, THE VALUES OF ETA1/ Xii AND YI ARE
C5 THE SAME AS FOR THE FIRST OFFSET POINT. REPEAT THE LOOP USING
C5 THESE VALUES. .
C5
ETA1=EFIRST
Y1=YFIRST
Z1=ZFIRST
GO TO 180
:: A COMPLETE SEARCH OVER ALL THE OFFSET POINTS FOR THE CURRENT
STATION HAS OBTAINED WET OFFSET POINTS. RESET ZLAST(I)
:2 IF THE LAST (AND ALSO TbE FIRST) OFFSET POINT IS WET..
C4 t
240 ZLAST(l,J)=ZO
.250 lNPTS(U)=L
IF (L.EQ.0) GO TO 2&0
IF (LWET.EQ. L) LWET=9
IPQINT(J)=LWET+l
LSTA=J
IF (ISTA.EQ.0) ISTA=J
C3
260 CONTINUE
IF (ISTA.EQ.0) GO TO 520
C3
C3 FIND ENDS OF WETTED HULL..
C3
XXF = X-COORDINATE FORWARD
E: XXA = X-CIJORDINATE AFT
C3
XXF=XOFF(ISTA )
XXA=XOFF(LSTA )
IF (NPROF. EQ.0) GCt TO 410
C4
C4 SEARCH FOR ENDS USING THE PROFILE DATA..
C4
C4 XLAST -- X-cac 91NATE OF PREVIOUS PROFILE PtlINT
C4 XXSTA -- X-coc 31NATE OF PRESENT PROFILE POINT
~##BAR -- WAVE .EVATION IN ABSOLUTE COORDINATES
H -- SUBME :ENCE CIF PREVIOUS PROFILE POINT (LAST.EQ. i)
C4 - Yi SUBME SENCE OF PRESENT PROFILE POINT
IEND=O ~~ FORWfi 3 END OF SHIP
:: IEND=l -- AFT E 3 OF SHIP
C4 KEY=-1 -- SUEME 2ENCE OF PRESENT PROFILE POINT UNKNOWN
KEY=O -- m:: .EVATION NOT COMPUTED
H KEY=l -- -EVATIOhl COMPUTED
C4 LAST -- KEY #LUE FOR PREVIOUS PROFILE POINT
LWET=O -- PREVI JS PROFILE POINT WAS DRY (LAST.GE.01
H LWET=l -- PREVI JS PROFILE PCtINT WAS SUBMERGED (LAST.GE.0)
C4
XLAST=XPRUF( 1)
LAST=-1
Do- .. . .—.
KEY=: 1
IEND=O
XXSTA=XPROF( 1)
IF (XXSTA. GT.XXF) GO TO 270
IEND=l
IF (XXSTA. LT.XXA) GO To 270
IF (XLAST. GE.XXA) Gf3 TO 390 ~
270 KEY=Q
Y1=YPROF(I)?FC(2,2)+XXSTA*C(1, 2)-YY(2)
IF (Y1.LT.-MVSUM} GO TO 310
IF (YI.GT.WVSUM) GO TO 280
Y1=ETABAR(I)-Y1
KEY=l
IF (Y1. ~E.0.0) GO TO 310
POINT IS DRY.
IF (IEND.NE.0) GO TO 300
IF (LAST.LT.0) GO TO 290
IF (LWET.EQ.0) GO TO 300
IF (LAST.NE.0) GO TO 340
290 YO=YPROF(I-1 )*C(2,2)+-XLAST*C(l/2)-YY(2)
IF (YO.GT. WVSUM) G(3 TO 300
YO=ETABAR(I- 1)-%
IF (YO.GE.O.0) GO TO 340
300 LWET=O
Ga TO 380
POINT IS WET.
GO TO 320
320 Go TO 330
Go TU 360
Go TO 340
330 YO=YPROF{I-1 )*C(2
IF (YO.LE.-WVSUM)
YO=ETABAR(I- 1)-%
IF (YO.GE.O.0) GO Til 3&O
:g
c -= INTERPOLATE FOR WATERLINE.
‘“340 IF (KEY.NE.0) GO TO 350
Y1=ETABAR(I)-Y1
KEY=l {
3s0 XXSTA=(XPRtlF(I-i)-XXSTA}/(Yl -Yo }+XXSTA I
IF (IEND.hlE.0) Gtl TiJ 360
IF (XXSTA. GT.XXF) XXF=XXSTA
GO TO 370
360 IF (XXSTA.LT.XXA) XXA=XXSTA
370 LWET=IEND
380 YO=Y1
390 LiiSt=KEY
XLAST=XXSTA
400 CONTINUE
410 IF (NFWD.NE.1) 00 TO 420
IF (XXF.LT. FWD) XXF=FWD
420 IF (NAFT.NE.1) Go TO 430
IF (XXA.GT.AFT) XXA=AFT
ba
c ----------------------- ------------------------ —---- -.--- --
c. k
c
Resolve velocity vector into gawed and itched coord’s.
NOTE: ~;;~~~ are calculated in local (sRip) coordinate
: .
~ ----------------------- ------------------------- --------------
430 VT(I)=VX
VT{2)=VY*CTHETA-VZ*STHETA
vT(3)=vz*cTliETA+vY*sTHETA
VT(4)=YY(1O)
VT(5)=YY(11 )+CTHETA-YY( 121+STHETA
VT{6)=YY(12 )*CTHETA+YY( li)*STHETA
c —
E
~
Luop over wet stations ISTA to LSTA.
AZSO check to see i$ ship is Gut ef water (SMALLI
t
i -------------------- ---------------------- ------ —--- --
m LSAVE=O
b
<-:
..
SMALL=(XXF-XXA )*1. OE-06
IF (SMALL.LE.O.0) GO TO 520
XXSTA=XXF
DO 510 J=ISTA,LSTA
?-.
k.,,
~ ----------------------- --------------------------------------
L#
$ Section 4.1 - Get geometric station data, e.g. DX.
L.
J.:
XXFWD=XXSTA
XXStTA=XOFF(J)
.,.. IF (INPTS(U). EQ.0) G~ TO 510
i YC=YY(2)+CT( 1,2)*XXSTA
IF (J.NE.LSTA) GO TO 331
(:-
XXAl=r=XXA
GO To 332
331 XXAFT=XOFF(J+l )
332 CONTINUE
DXFWD=XXFWD-XXSTA
DXAFT=XXSTA-XXAFT
I)X=(DXFWD+DXAFT )/2.0
c- xA=xxsTA-DxAFT/3. o
xB=xxsTA+DxFwD1’3.o
Dxi=(DxFwD*xB+ilxAFT*xA)/2. o
DX2=(DXFWD*XB**2+DXAFT*XA**2) /2.0+(DXFWD*+3+DXAFT**3 )/36.0
!~, c -------------- --------- --- ------- ------ ______ - --
Section 4.2 - CaIl KRYLi3V by sectien (J) and get 2-D
integrals fer that station.
‘c- L
t -------.---------------------------______.-__-_-__-_-..__--..-_-,
CALL KRYLOV (J)
(: c
Sectian 4.3 - Compute the se~tional volumes and moments
E about center af mass.
:
----------------------- -------— ------------ _____________
~
L
DVOL=AREA*DX
ADXI=AREA*DX 1
ADX2=AREA*DX2
YDX=YMOM*DX
ZDX=ZHOM*DX
E ----------------------------- _______ ________ ____________ ------
c
c Load CCWIMOhl/SXGEUM/
<. AREAS(J)=AREA
DXS(J)=DX
DXIS(J)=DXI
DX2S(J)=DX2
YMOMS(J)=YMDM
ZMOMS(J)=ZMOtl
c-------------- -------- --------- __________ ___________ __________
c
~ SECTION 5.0 - SHIP MClTI13NRELATED FORCES
L
c FBUOY(I,J) - Buoy +orce
c FDAIIP(I,J) Damp in +orce
c FADMA(I,J) - A#ed d ass Farce for purposes of analysis
c since the added mass actuall
c
m on !he left hand side 0$ the Equa $ i~;~?
~ ------ ---------------- _______ ________ ------- ______ ------------
L
c Section 5. 1 - Buoyancy Force
c -------------------- ------------- -------- ______ ______ _________
FBUDY(l,J)=CT(1,2)*DVOL
FBUOY(2, J)=CT (2,2)*DVOL
FEUDY(3,J)=0.
,. c ???? ~ p???
~.. FBUOY(4,J)=-CT(2, 2)*ZDX
FBUOY(5, J)=CT(1,2)*ZDX
,..
FBUOY(6, J)= CT(2/2)*ADXl-CT (l,2}*YDX
c
VS=VT(5)*ADX i-VT(3)*DV13L
VR=VT(4)*DVQL
FDAMP(l,J)=O.
FDAIIP(2,J
)=(VT(4)*ZDX-VT(2)*DVOL-VT(6)*ADX1 )*HVH ,
FIIAMP(3,J)=VS*SVS-VR*CCV
FDAMP(4,J)=VS*CCV-VR*RVR
FDAMP(5, J)=(VT(3)*ADX1-VT( 5)*ADX2)*SVS+VT(4)*ADX1*CCV
FDAMP(6, J)=(VT(4)*ZMOM+DXl-VT(2)*ADXl-VT(6)*ADX2)*HVH
c
c ~e~t:an 5.3 - Speed terms
g . . - Speed terms associated with damping
b
UDAMP(l,J)=O.
c
UDAMP(2,J)={2. *SPEED*YY(6 ))*HVH*DVOL I
uDAMP(3,J)=- (2.*SPEED*YY (5))*SVS*DVOL
UDAMP(4JJ)=0.
UDAMP(5; J)=(~. *SPEED*YY(5 ))*SVS*ADX1
UDAMP(6,J)={2. *SPEED*YY(6) )*HVH*ADX1
:
L
C *** Extra s eed terms from extended stri (X SCORES)
U2TEI%=(YY(2)*DVOL+YY(6)*ADX1+SPE ED*DVCIL*
t * {~JW~~/OMEGAX( 1)**2))*(THVCX(J, 21)/G)*
c *
c UDAMP(2,J)=UDAMP (2,J)+U2TEMP
~ UDAMP[6,J)=UDAMP (6,J)+U2TEMP+ {ADXi/DVOL)
k 5.3.2 Speed terms associated with added mass
c
UADMA(l,J)=O.
UA21=(2. *SPEED*VT(6} )+(HAH/G)*DVOL
UA22= (VT(4)*ZDX-VT(2)*DVOL-VT(6) *ADX1+SPEED*YY (6)
1 *DVOL)*SPEED* (THACX(d,21 )/G)
UADMA 2,d)=UA21-UA22
UA31 = -2.*SPEED*VT (S))+(SAS/G) *DVOL
UA32= VS-SPEED*YY( 5))*(TSACX(J, 21}/G)*SPEED
UADMA 3,J)=UA31+UA32
;~~~A 41 Jj- -~URiiSFGED*TRACX (J121)/G
2.*SPEED*VT(5) )*(SAS/G)*ADXl
UA52: (SPEED*YY(5)*ADX1 )+(VT(3)*ADX1-VT(5)*ADX2) )
1 *SPEED*TSAC X(J,21)/G
UADMA 5,J)=UA51+UA52
uA&l= 2,*SPEED*VT (6))*(HAHiG)*ADXl
UA62= (SPEED*YY(6)+ADX1 )+(VT(4)*ZMC)M*DX1-VT(2)*
1 ADX1-VT(6)*ADX2) )*SPEED*THACX (J,21)/G
UADIIA{ 6,J)=UA61-UA62
c
c
YFYA=HAH*DVUL+YFYA
ZFZA=SAS*DVDL+ZFZA
XMZA=CCA*DVOL+XMZA
XMXR=RAR*DVDL+XMXR
XMYR=XMYR-CCA*ADXi
YMZA=YMZ+SAS*ADX1
YMYR=SAS*ADX2+YMYR
ZMYA=HAH*ADX l+ZMYA
ZMZR=HAH*ADX2+ZMZR
c
-------------- --------- _______________ - _
~
c ------- ---------------- -------- -------------- ----------
c
Section 5.4 - Force due to weight of ship
: -------------------------- --------- _________ _________ ________
XFW=-CT(1,2)*DISPL
YFW=-CT(2,2)*DISPL
E ------------ ----------- ____________ -------- -,___________
c
c Section 7.2 - So called “flare” force
c
c
IF{TT. EQ. TTULD(J) ) Go TO 721
TNEW(J)=TSTA (J)
TAVG=TSTA(J)
CALL TXIT(TAVG, IT,TX)
CNEW(J)=COX(IT, TX, 11,1 1l#J)*ARX(IT~TX, J)/G
TTNEM(J)=TT
DC=CNEW(J)-COLD(J)
DT=TNEW(J)-TDLD (J)
DTT=TTNEW(J )-TT~L~t(J)
T13LD(J)=TNEW(~~
TTOLD(J)=TTNEW (J)
COLD(J)=CNEW(J)
c
IF (DT.GT. Q,. AND. DTT.NE. 0. ) THEN !Relative Velecity indicates immersio
FFLAR(2, J)=(DT\DTT)**2*{Dcl’DT)*Dx
FFLAR(6,J)=(DT/DTT)**2*(DC/DT)*DXl
ELSE ! Relative velocitg indicates emergence
FFLAR(2#d)=o.
FFLAR(6,J)=0.
c END IF
c
721 CONTINUE !Skip to here when TT=TTOLD 1
(--- c
-------------------------------------------- —--- 1
,
; 1$ there are no hfdv~sJ skip over the wave loep -
[Da 5001 and g~ to 510 (the other side o+ the section
c“ c loop).
IF (N&JAVES:EQ.0) GO TO 510 I
472. CONTINUE-
ARCSTA=WCOSE*XWSTA
C~SSTA=COS[ ARGSTA)
SINSTA=SIN(ARGSTA )
473 CONTINUE
(.
(:‘
c
IF (ABS(WCQSB*DX).GT.O.01) GO TO 480
c
DXCOS=DX*COSSTA
DXSIN=DX*SINSTA
DX1C!3S=DX1*COSSTA
DXISIN=DX1*SINSTA
JSAVE(K)=O
GO TCl490
c
480 WCOSB2=2.O/WCCISH
XCSTA=COSSTA*XWSTA
XSSTA=SINSTA*XWSTA
c
IF (JSAVE{K). EQ.0) GCl TO 4S1
COSFWD=CCISJJ(K)
SINFWD=SINJd (K)
DWCFWD=DWC(K )
DWSFWD=DWS(K)
XCIFWD=XCI(K)
XSIFMD=XSI(K )
GO TO 482
c
481 ARGFMD=WCOSB*XWFWD
COSFWD=COS(ARGFWD }
SINFMD=SIN(ARGFWD}
DWCFWQ=(COSFW)-CQSSTA )/WCOSB
DWSFWD=(SINFWD-S INSTA)/WCOSB
XCIFMD=(SINFWD*XWFWD-XSSTA+DWCFWD )*DDXFWD
XSIFWD=(XCSTA-COSFWD*XWFWD+DWSFWD)*DDXFWD \
c
482 ARGAFT=WCOSB*XWAFT
COSAFT=CUS(ARGAFT )
SINAFT=SIN(ARGAFT )
DWCAFT=(COSSTA-COSAFT )/WCOSB
DWSAFT=(SINSTA-S I?4AFT)/W::::
XCIAFT=(XSSTA-S INAFT*XWAFT+I)WCAFT )*DDXAFT
XSIAFT=(COSAFT*XWAFT- XCSTA+DldSAFT)*DDXAFT
c
DXCOS=(XCIAFT-XC IFWD)/WC13SB-DXWAFT*DWSAFT+D XWFWD*DWSFWD
DXSIN=(XSIAFT-XSIFWD )/WCCISB+DXWAFT*DWCAFT-DXWFWD*DUCFUD
DXICDS=XWC*I)XCQS+ ((SQSTA*SINSTA-SMFT*SINAFT )*DDXAFT+<SQSTA*
SINSTA-SGFWD*S INFWDI*DDXFMH (XSIFWD-XSIAFT )*WCOS132+XWFUD*XCI
Fb4D-XWAFT*XCIAFT)/WCOSB
DXISIN=XWC*DXS IN+((SQFWD*CDSFWD-SQSTA*COSSTA )*DDXFWD+(SQAH*
COSAFT-SQSTA*CUSSTA )*DDXAFT+(XC IAFT-XCIFWD) *WCOH32+XWFUD*XSI
FWD-XWAFT*XS IAFT)/WC~SB
JSAVE(K)=LSAVE
IF (LSAVE. EQ.0) GO TO 490
COSJ(K)=COSAFT
SINJ(K)=SINAFT
COSJJ(K)=COSSTA
SINAJ(K)=SINSTA
DWC(K)=DMCAFT
Dws(Kj=BusAFT
XCI(K)=XCIAFT
XSI(K)=XSIAFT
c—
490 CONTINUE
EXPSTA=EXP(WN (K)*YC)*WVAMP (K)
DXCDS=DXCOS*EXPSTA
DXSIN=DXSIN*EXPSTA
DXICDS=IIXICaS*EXPSTA
DXISIN=DXISIN*EXPSTA
C3
c
-------------------------------------------------------------
:
Section 6.2 - Compute exciting forces (wave d namic
E pressure plu% diffraction force Y
c
c------------------------------------------------------------
g HVH=COEFF(l, 2,J)/UVFRE(K )
svEi=cciEFF(2,
2,J)/wvFRE(K )
c RVR=COEFF(3, 2/J)/hlvFRE(K)
c ccv=cclEFF(4,2#d)/ldvFRE(K)
c
c
HAJH=THAH{J,K)
HAH=HAH+I.
SAS=TSAS(J,K )
SAS=SAS+I.
RAR=TRAR(J,K )
CCA=TCCA(J,K )
c
c
c
HVH=THVH(J, K)/WVFRE(K)
SVS=TSVS[J, K)/ldVFRE(K)
RVR=TRVR(J, K)/WVFRE(K)
CCV=TCCV(J, K)/WVFRE(K)
:
AH1=CYK(K)*ZSO(K)-CCK(K)*ZCO(K)
AH2=CCK(K)*ZSO(K)+CYK(K)*ZCOCK)
AS1=CZK(K)*ZSO(K)
AS2=CZK(K)*ZCO(KI
ARI=CZK(K)*ZSY(K)+CCK(K)*ZCZ(K)-CYK(K)*ZSZ(K)
AR2=CZK(K)*ZCY{K}-CCK(K)*ZSZ(K)-CYK(K)*ZCZ(K)
FWVEX{l, J)={CXK(K)*ZSO(K)-CSK(K)*ZCO(K} )*DXCOS
+(cXK(K)*zCo(K)+CSK(K)*ZSO(K) )*DXSIN+FUVEX(l, d)
YF1=AH1*HAH+AH2*HVH
YF2=AH2*HAH-AHI*HVH
FbYJEX(2,J)=YFl*DXCOS+YF2*DXSIN+FtiVEX (21J)
ZFI=AS1*SAS+AS2*SVS+ (ASi*CCA+AS2*CCV )*WN(K)
ZF2=AS2*SAS-AS 1*svs(AS2*CCA-AS I*CCV)*WN(K )
FWVEX(3, J)=ZFl*DXCOS+ZF2*DXSIN+FWVEX(3J J)
FWVEX(4, J)={ARI+(AS1*RAR+AS2*RVR )*WN(K)+AS1*CCA+
AS2*CCV)*DXCOS+ (AR2+(As2+RAR-AS1*RVR )*WN(K)+AS2*CCA
-AS1*CCV)*DXSIN+FWVEX (4,J)
FWVEX(5, J)=(CXK(K)*ZSZ(K)-CSK(K)*ZCZ(KI )*DXCOS+
(CXK(K)*ZCZ(K)+CSK(K)*ZSZ(K) )*DXSIN-ZF1*DXICOS-ZF2
+DXISIN+FWVEX (5,J)
FWVEX(6, J)=(CSK(K)*ZCY(K)-CXK(K)*ZSY(K) )*DXCOS-
(CSK(K)*ZSY(K)+CXK(’K)
*zcY(K) )xDxsIN+yFI*DxlcDs+YF2+DXiSIN+FWVEX{6, J)
C3
c
c
c ti-------------------------------------------------
C--------------
6.3 Speed dependent wave-exciting terms
ti-------------------------------------------
c
DADX=SPEEII*THACX (J,K)/WVFRE( K) !Turns acc. ‘s into Ve 1 ‘s
UWVEX(2, J)=AHI*DADX*DXSIN-AH2*DADX*DXCOS+UWVEX (2,J)
c Another s eed term - spatiaI derivative ef damping in x
c DCDX=SPEEkTHVCX (J,K)/G)*DVCIL*WVFRE(K) /OtlEGAX(l)
c U14VEX(2,d)=UWVEX (2,J)+DCDX*ETAY(J, K)
UZF1=AS1*TSACX (JtK)+AS2*TSVCX (J~K)
UZF2=AS2*TSACX (J,K)-AS1*TSVCX (J,K}
UWVEX(3,J)=(-WZFl*DXSIN+UZF2*DXCOS)*(SPE~/WVFRE(K) )
1 +uwvEx(3/J)
UWVEX(41J)=0. ! Mndif this
UWVEX(5,J)=(-UZF1*DXISIN+U YF2*Dxlcos)*(sPEED/MvFRE(K) )
1 + UWVEX(S,J)
U!WEX(6,J)=AHI*DADX*DX lSIN-AH2*MDX*DXiCOS
c DCDX1=SPEED+$(Tf-fVCX(J,K)/G)*ADXl*WVFRE(K)/OMEGAX(l)
c UWVEX{6, J)=DCDXI*ETAY (J,K)+UWVEX(6, J)
c
—
500 CCINTINUE
510 CONTINUE
~ ------------------------------------------------------------
J“
YIW=FBUOY( 51J)+YPIB
ZMB=FEUOY(6t J)+ZMB
801 CONTINUE
c
c------------------------------------------------------------
c Sectian 8.2 - Integrate damping force
g----"--"---------------------------------------------------
DIJ 802 d= LSTA
XFD=FDAMP Hmg
YFD=F~AMP
ZFD=FI)AMP +ZFD
XMD=FDAMP I-XMD
Yr’fll=F13AMP +YMD
ZMD=FDAFIP +ZMD i
{ CUNTItWJE
E-.-------—--- -—------ ---------------------------------- ---
c SeCti9n E.3 - Integrate exciting $orce
g------------------------------------------------------------
L
LSTA
+XFX
+YFX
+ZFX
+XMX
+YMX
+Zrlx
803
:
-------------------------------------------------------------
(.:, Section 8.4 - Integrate Speed Related forces
:--------------------------------------------------------------
E
1F(JOBFO(2). NE.1) GQ TCI 814
Da 804 d=ISTA,LSTA
XFU=U )AMPil;J~+U4DMA(l, J)+UWVEX( liJ)+XFU
YFU=U 3AMP(2,J)+UADMA(2, J)+UWVEX(2,J)+YFU
c ZFU=U 3AMP(3,J)+UADMA(3, J)+UWVEX(3,J)+ZFU
XMU=U 2AMP(4,J)+UADMA(4, J)+uwvEx(4, J)+xPlu
Yf7u=u 2AMP(5,J)+UADMA( 5,J)+UWVEX{5, J)+YMU
ZMU=U )AMP(&,J)+UAS)MA(&,J)+UWVEX(6, J)+ZMU
804 CIJNTI WE
~14 !Go di~ectly here to ski”p over
L
-------------- ------ ------ _______ ________ ______ ______ ________
: Section 8.5 - Integrate flare force
~--------------------------------------------------------------
L
IF(JOBFO(3).NE.1) GO TO 815
DO S05 J=ISTA,LSTA
YFF=FFLAR(2, J)+YFF
ZMF=FFLAR(6, J)+ZMF
80S CONTINUE
815 CtlNTINUE !Directly to here to skip aver
c
c
(: “ c
C4 SET UP MATRIX OF FORCE COEFFICIENTS FOR FORCES AND ACCELERATIONS
,.-
L’
r
c IN SHIP COORDINATE DIRECTIONS..
E:
520 CDNTINUE
c C4
E -------------------------- ----------------- --------------------
c
(-’
...
c SECTION ?.0 - TOTAL FORCES
E Add up f~rces. Then reselve +orces and moments into the
c ship o+fset coordinate system.
‘c’ c
c -------------------_----.-.-----,------------------------------
c
c
c XFT=XFB+XFD+XFX+XFN+XFW+XFU
YFT=YFi3+YFD+YFX+YFN+YFld+YFU+YFF
ZFT=ZFB+ZFD+ZFX+ZFN+ZFU
XMT=XMB+XMD+XMX+XMN+XMU
YMT=YMB+YMD+YMX+YMN+YMU
ZMT=ZMB+ZMD+ZMX+ZMN+ZMU+ZMF
L
XF=XFT*GAMMA
YF=YFT*GAMMA
TEMP=YF
ZF=ZFT*GAMMA
YF=YF*CTHETA+ZF*STHETA
ZF=ZF*CTHETA-TEMP*STHETA
XM=XMT*GAMMA
TEMP=YMT
YM=(YMT*CTHETA+ZMT*STHETA )*GAMMA
<-. ZM=(ZMT*CTHETA-TEMP *STHETA)*GAPIMA
c
c --------------------- -------- --------------------- ------------
c
c SECTI13N 10.0 - LOAD MASS/IhlERTIA MATRIX A(I,J)
c
g---------------------------------"--------------------"-----
L
A(2,4)=0. O
DO 530 1=1,9
AM(I)=RHD*AM( 1)
530 CONTINUE
CC=CTHETA**2
CS=CTHETA*STHETA
SS=STHETA**2
A(2,2)=YFYA*CC+ZFZA*SS+SMASS
A(2,3)=(ZFZA-YFYA)*CS
A(3,2)=A(2,3)
A(2, S)=ZMYA*CS
,.. A(2,6)=ZMYA*CC
Y,
A:3,3)=ZFZA*CC+YFYA*SS+SMASS
A(3J4)=XMZA*CTHETA
A(413)=A(3,4)
A(4,2)=XMZA*STHETA
A(4,4)=XMXR+PMI (1,1)
A(4, 5)=XMYR*CTHETA+PMI (1,2)
A(s14)=A(4#5)
A(416)=PMI( 1,3)-XMYR*STHETA
( A(6,4)=At4,4)
A(5J2)=(ZMY~YMZA )*CS
A(3,6)=-A(5,2)
A(6,3)=A(3,6)
A (5,3 )=YMZA*CC-ZMYA*SS
A(315)=A{5,3)
A( s/5)=YMYR*CC+ZMZR* SS+PMI (2)2)
A(5,6)=(ZMZR-YPIYR )*CS+PMI(2,3)
A(6#5)=A(5,6)
c-- A(6,2)=ZHYA*CC-YMZA*SS
A(6J6)=ZIIZR*CC+YMYR*SS+PMI (3,3)
RETURN
c
c END
f’-
\.
c.
‘c.
-.
<:,
(.
.(-
..
,,,
..
SUBROUTINE HULL
This subroutine calculates hull girder Ioads’
E —------------ ------------------ ------------------ _________
c ;
COMMON Ic .:
COMMON/ 10/INPU~,OU%&% IF,OFF,COF
INTEGER OUTPUT,BIF, OFF,COF
COMMON / / NMAVESj WVSUM,
WVAMP(20), UVFRE(20), WVDIR(20), WVPHA(20), I
: . Wh!(20), MNX(20), WNZ(20),
CSK{2C)), CCK(20), CXK(20),
<:; 4 CYK(20), CZK(2Q), XW(201
COMMON / / MSTA, NPROF, NFWD, NAFT, LPTS(25),
~ XOFF(25), YUFF(25,25)J ZOFF(25,25),
& mttur- t
‘“----”51), YPROF(51)
c? *
COMMON/COEFFX/THAH (25,Z!ll~TSAS(25~21)~TRAR(25~21 )~TCCAI(25~21
THVH(25,2i ),TSVS(25, 21),TRVR(25, 21),TCCV(25,21)
* THACX(25,2
..-...--- -‘ll,TliVCX(25,
21),TSACX[25, 21),TSVCX(25
+ ACX(25,21), TCACX(25,21), THVCY(25,21),
TRI.-..
<“.. * ITP(2~5),TXP(25), IFP(21),FXP(21)
COMMON /FORCE ~-” ‘X.~F, YF,
... ZF, XM, YM, ZM
REAL FORCE(6)
EQUIVALENCE ~F~RCE$~~afF)
COMMON /LfiS
COMMON /MASS / RHO, G, GAMMA
COMMON /MASS / DISPL, SI%4SS, XCC, YCG, ZCG,
1 AMX, AMY, AMZ, RADII(6)
c COMMON /flASS /
CWION/RESIST/~PEED
PMI(3,3)
COMMON /V Vx, VY, Vz
C13MMON/SXPRDP/ SEGMAS(26), SEGPIOX(261,STRMAS(261, STRIIOM(26),
* STRMOX(26), XBAR (26),YBAR(26) ,SEGWT(26),NWTSTA
COMMON/SXFOR/ FBUOY(6, 25),FDAMP(6J25), FADMA(6, 25),FWVEX(6,25)
* iJDAf’lP(6,25) ;UADM~(&25) ;UWVEX(6,25) ,FFLAR(&,25)
COMMON/SXGEOM/ AREAS(25), DXS(25),DXIS(25), DX2S(25),
* YMUMS(25), ZMOMS (25), ISTA,LSTA
COMMON/ACCEL/ACC (6)
COMMON/LOADS/ SIN2(25), SIN3(25), SIN4(25), SIN5(25), SIN6(25},
V2(25), V3(25), V4(25),V5(25), V6(25)~
; RED(6#25)
COMMON/DPTION/JOBCD, JOBFO(10)
zc SECTION 1.0 GET SECTIONAL INERTIA/MOMENT OF INERTIAS
c’ c --------------------- --------------- _____ ----- --------------- ----—--
DO 90 J=l,MSTA
XBAR(J)=XOFF(d)
STRMAS(J)=SEGMAS (J)
SIN2(J)=0.
SIN3(J)=0.
SIN4(J~=6:
SINS(J)=O.
SIN6(J)=0.
IYJ 91 1=1,6
RED(I,JI=O.
91 CONTINUE
90 CONTINUE
c
(..,
DU 100 J=l,MSTA
DSTRPI=XOFF( J)
DO 10i JJ=i,J
b
TVACCL=ACC(2)+XBAR (dJ)*ACC(6)
THACCL=ACC(3) -XBAR(JJ)*ACC (5)+YBAR(JJ)*ACC (4)
------NOTE!!! We are addin in weight af the sectian
t bg includin vavita ? isnal accele~atian. This
c is di$feren ! 8rom standard strip thea~y load
c Computations. (They compute wave induce dynamic
loads) We are cemputin total loads at each time
E step. .. We have the TOT iL HYDROSTATIC RESTORING
c force not ust the than e due to unit wave/matibn
c
P Esee eq. 7A STF METH9D~TRANS SMAME ’703
GVACCL=-G*COS (Y(4))
GHACCL=G*SIN( Y(4))
c
HACCL=-THACCL+GHACCL
VACCL=-TVACCL+GVACCL
SIN2(J)=STRMAS(JJ)*VACCL+SIN2(J)
SIN3(J)=STRMAS(JJ)*HACCL+SIN3(J)
SIN4(J)=STRMOX(JJ)*ACC(4)-( (STRMAS(dJ)*YEAR(JJ) )*
1 (ACC(3)+XEAR(JJ)*ACC(5) ))+SIN4(J)
c DSTRPI=XOFF(J)-(. 5*DxS(J))
ZETMX=XBAR(JJ)-DSTRPI
SIN5CJ)=ZETMX*STRMAS(JJ)*HACCL+SIN5(J)
SIN6CJ)=ZETMX*STRMAS(Jd)*VACCL+SIN6(U)
c
101 CONTINUE
c
c ----- -----------------------------------------------------
c
c --------------------------------- --------------------------
c
100 CONTINUE
c
c ----------------------- -------------------------------------- ---
c
c SECTION 2.0 GET ADDED MASS FORCES FADtlAi # )
c
----------------------- ----------- ---------------------- -------
z
DO 200 J=l,HSTA
Do 200 1=1/6 !
FADl%4(I/J)=O.
:00 CONTINUE
. DO 201 J=ISTA,LSTA
b
AREA=AREAS(J )
Dx=Dxs(d)
DX1=DXIS(J)
DX2=DX2S(J)
YMCWl=YMQMS(J)
ZMOPI=ZMDMS(J)
c
DVOL=AREA*DX
ADX1=AREA*DX 1
ADX2=AREA*DX2
YDX=YPH3M*DX
ZDX=ZMOPl*DX
L
HAH=THAH(J,21 )/G
SAS=TSAS(J,21 }/0
RAR=TRAR(d,21 ?/G
CCA=TCCA(J,21 )/G
c
c
AS=ACC(5)*ADX1-ACC (3)*DVClL
AR=ACC(4)*IM3L
FADMA(l,J)=O.
FADMA(2~J)=(ACC (4)*ZDX-ACC(2)*DVOL-ACC (&)*ADXl)*HAI-l
FADMA(3, J)=AS*SAS-AR*CCA
FAINlA(4~d
)=AS*CCA-AR*RAR
FADMA(5,J)=(ACC (3)*AI)X1-ACC(5)*ADX2)*SAS+ACC (4)
1 *&DXl*CCA
FADMA(61J)=(ACC(4)*ZMUI’I*DX1-ACC(2)*ADX1-
1 ACC(6)*ADX2)*HAH
c
c
-201 CONTINUE
E SECTION 3.0 GET HYDRO FORCES (CALL THEM RED) AND THEN
c GET f-OADS
c ----------------------- --------------------- --------------------
c
Ml 900 J=l,MSTA
:00 CCINTINUE
DO 300 I=2J3
~~Dl~~ ~=lJMSTA
Da 3(12=J~=l,J
REDSIJM=-F~~~:~~kJJ )-FDAMP(I,JJ )-FADMA(I,JJ )-FWVEX(I~JJ )
*
UTERMS=-UDAMP (I,JJ)-UADMA (I,JJ)-UWVEX (I,JJ)
FTERMS=-FFLAR (I,~J)
IF(JOBFO(2). EG. 1) REDSUM=REDSUt’i+UTERMS
IF(JOBF~(3). EQ. 1} REDSUM=REDSUM+FTERMS
302 CONTINUE
RED(lJJ)=REDSUM*GAMMA
301 CCINTINUE
300 CGNTINUE
c
~-------------------------------------------------
g NOW do moments
L
m 3io rx=5)6
IF(IX. EQ.5) 1=3
IF(IX. EQ.6) 1=2
~~ 3il ‘J=iIMSTA
D5TRPI=X!3FF(J )
c DSTRPI=XOFF(J)-(. 5*DXS(J))
REDSUM=O.
L
ARMJJ=X13AR(JJ)
ARMX=ARMJJ-DSTRP I
FDARM=FDAMP (I,JJ)*ARMX
FldARf’l=FWVEX
(I,JJ)*ARMX
,,
FBARM=F13UOY(I,JJ)*ARMX
FAARM=FA13MA(I,JJ)*ARMX
FUARM=(UADMA (I,JJ}+UDAMP (I,,JJ)+UWVEX(1,JJ))*ARMX
FFARt’i=FFLAR(
IJJJ)*ARMX
c
REDSUM=-FBARM-FDARM-FAARM-FWARM+REDSUM
IF(J~BFD(2). EG.1) REDSUM=REDSUM-FUARM
IF(JDBFD(3).EG. 1) REDSUM=REDSUM-FFARM
312 Ci3NTIhlUE
c
RED(IX, J)=REDSUM*GAMMA
c
311 CtJNTINUE
310 CUNTINUE
c
-------------------------- ----------------------
;
CY=CCIS(ARG)
SY=SIN(ARG)
D=CK**2+YK**2
CK=CK/D
YK=YK/D
COSE=(CK*CE+YK*SE )*EE
SINE=(CK*SE-YK*CE )+FEE
c C(JSY=(CK*CY+YK*SY )*EY
SINY=(CK*SY-YK*CY 1*EY
t
YCO=CGSE-COSY
YSO=SZNE-SINY
YCY=ETA~*COSE-Yl*COSY-CK*YCO-YK*YSO
YSY=ETA1*SINE-Y1*S INY-CK*YSO+YK*YCO
IF (ISAVE(K). EQ.01 GO TO 152
COS1=CSI(K)
~#U;S~;;K)
152 ARG1=ZK=21
f’: CCtSl=Cf2S(ARGl
1
SIN1=SIN(ARQ1 )
153 CONTINUE
.... IF (ABS(ZK*DZ). GT. O.01) GO TO 160
.. c
DZCOS=DZ*COS1
,,.
4.
.
DZSIN=DZ*SIN1
DZICOS=DZ1*CCIS1
DZISIN=DZ1*SIN1
ISAVE(K)=O
GO Ta 170
c
140 ZK2=DZK(K)
ZCUS1=COS1*Z1
ZSIN1=SIN1*Z1
c
IF (ISAVE(K).EQ.0) GO TO 161
CBSO=CSII(K)
SINO=SNII(K)
DKCO=DKC(K)
DKSO=DKS(K)
ZCIO=ZCI(K)
ZSIO=ZSI(K)
GO TO 162
c
161 ARGO=ZK*ZO
COSO=COS(ARGO )
SINO=SIN(ARGO)
DKCO=(COS1-CDSO) /ZK
DKSO=(SIN1-SINO)/ZK
ZCIO=(ZSIN1-SINO*ZO+DKCO)*DDZO
ZSIO=(COSO*ZO-ZCOS1+DKSO}*DDZO
c
142 ARG2=ZK*Z2
COS2=C!3S(ARG2)
SIN2=SIN(ARG2)
DKC2=(COS2-COSI )/ZK
DKs2=(sIN2-sINl)/zK
ZC12=(SIN2*Z2-ZSIN1+DKC2)*DDZ2
ZS12=(ZCOS1-COS2*Z2+DKS2 )*DD22
c
DZCUS=(ZCIO-ZC 12)/ZK-DZZO*DKSO+DZZ2*DKS2
DzsIhl=(zsIo-zs12)/zK+Dzzo*DKco-Dzz2*DKc2
DzlcDs=( (sQl*sINl-sQo*sINo)*DDzo+(sQl*sINl-sQ2*sIN2)*DDz2+( z
1 s12-zsIo)*zK2+z2*zcI.2-zo*zcIo)/zK
c. 1
DZISIN=( (SQ2*CUS2-SQ1*CDS1 )*DDZ2+(SQO*CCfS0-SQl*COSl )*DDZG+(Z
cIo-i!c12)*zK2+z2*zs12-z@zsIo)/zK
c
ISAVE(K)=KSAVE
<“ IF (KSAVE. EQ.01 GO TU 170
csI(K)=ccls2
SNI(K)=SIN2
~ CSII(K)=COS1
SNII(K)=SIN1
DKC(K)=DKC2
DKS(K)=DKS2
ZCI(K)=ZC12
ZSI(K)=ZS12
c
170 CONTINUE
c
ZCO(K)=ZCO(K)+DZCOS*YCO-DZSIN*YSO
ZSO(KI=ZSO(K)+I)ZCDS*YSO+DZSIN*YCO
ZCY(K)=ZCY(K)+DZCCIS*YCY-DZSIN*YSY
ZSY(KI=ZSY(K)+DZCUS*YSY+DZSIN*YCY
ZCZ(K)=ZCZ(K)+DZICDS*YCO-DZISIN*YSO
ZSZ(K)=ZSZ(K)+DZICOS*YSO+DZISIN*YCO
;,-.
k“
,.
i80 CONTINUE
190 CONTINUE
IF (LI.EQ.LAST) RETURN
\:=~AST
GO=TO 111
c
END
FUNCTION LNEQ#(tl,N,Ni,A,E,DTRMNT, Z)
c.. SOLVES .SIMULTANEOUS LINEAR EQUATIONS BY GAUSSIAN REDUCTION.
c.. FORTRAN IV EQUIVALENT OF LNEQS.
REAL A(M,M),B{M,M) ,Z(M), DTRMNT, RHAX,RNEXT, W,DOV
NM1=N-1
DO ~#d~~lJNMl
c.. FIND ~~fiE~T CiF COL J, ROWS J-N, WHICH HAS MAX ABSOLUTE VALUE.
=
RMAX=ABS(A(J, J))
DO 110 K=J1,N
RNEXT=ABS(A(K, J))
IF (RMAX.GE. RNEXT) GO T~ 110
RMAX=RNEXT
LMAX=K
110 CONTINUE
IF (LMAX.NE.J) GO TO 120
c. MAX ELEMENT IN COLUMN IS ON DIAGONAL
IF (A(J,J)) 150,290,150
c. MAX ELEMENT IS NtIT ON DIAGONAL. EXCHANGE ROWS J AND
i20 Do J3:(5::;hl
=
A(J,Lj=A(LMAX,L)
130 A(LMAX,L)=W
DO 140 L=l,N1
W=B(J,L)
B(J,L)=B{LMAX,L)
140 E(LMAX,L)=W
DTRMNT=-DTRMNT
c. ZERO COLUMN J BELOW THE DIAGONAL.
i50 Z(JI=l. /A(J,J)
DO 190 K=J1,N
IF-(A(K,J”j) 160,190,160
I&o W=-Z(J)*A(K,J)
DO 170 L=J1,N
170 A(K, L)=W*A(J, L)+A(K,L)
DO 180 L=l,hll
180 B(K, L)=W*B(J)L)+B(K, L)
190 CONTINUE
200 CONTINUE
IF (A(N,-N)) 210,2?0,210
210 Z(t4)=l./A(N,N)
c. . OBTAIN SOLUTIDN BY BACK SUBSTITUTION.
DO 220 L=l,N1
220 B(N, L)=Z(N)*B(N,L)
Do 250 K=l~NMl
J=N-K
J1=J+l
DO 240 L=l,NI
kf=n
tiO-230 I=J1,N
230 W=A(J, I)*B(I,L)+W
240 B(J, L)=(B(J, L)-W}*Z(J)
250 CONTIMJE
c . . EVALWATE DETERMINANT.
IF (DTRMNT) 260,280,260
260 Dtl 270 J=l,hl
270 DTRMNT=DTRMNT*A(J, J)
280 ~g;w~;l
c SINGULAR MATRIX, SET ERROR FLAG.
“290 LNEQF=2
DTRMNT=O.
RETURN -
c
END
(..
c
c.
c..
.,
PROGRAM HYDREX2
c
CHARACTER*25 ~FFIL,EIFIL,COFIL
CHARACTER*3O TITLE
COMMON/HEAD/T ITLE
COMMON/I~FILE/ OFFIL,BIFIL,COFIL
CUMMON/10/IIUPUT,OUTPUT,BIF,OFF, CUF
INTEGER QUTPUT, BIF,OFF,COF
COMMON /COEFF4 / COEFF4(6, 12,8,25),AREAN(2S, 6)
COMMDN/SHIP/ISTA, LSTA, ISWL,LSWL,TF, TA, XCG,YCG,DISPL
COMMON /DRFT12/ DRAFT(6,2), IDRAFT
COMMON /SIGMA j“ NK, SIGMA(24), SIGMAQ, ERRO, UM{12)
COMMON /U RHO, G
COMMDN/GEOMETRY/MSTA,, LPTS(25),YOFF [25,25),NAFT, XAFT(23),
* YAFT(25)/.hlFWD/XFWD(251,YFWD(25) /XOFF(25)~
* ZOFF(25,25) ,XFPERP, XAPERP,SHIPL, SHIPB,SHIPT,
* YI(21,25), ZWL(25),WL(25), INPTS(25), XWLF, XHLA,XXF,
* XXA,TAN,N~N, hlOE,NWL,CR,XXFWD, XXSTA, XXAFT,I)X,DX1,
* DX2, Z2(21), Y2(21)DZZ(20), YY(20), SNE(20),CSE(20)J
* DEL(20),RClL(20),ADJUST, WMAX,YMAX, ZMAX, AREA,VERT
LOGICAL ML,ADJUST
DATA RHO “/0.00088861607’142/
DATA ERRO/1.OE-37/
D~T~ ~tij-O:OOO, 0.200, 0.400, 0,600/ 0.8004 1.000,
E 1 1.200, 1.600, 2.000, 2.400, 2.800) ?.999/
DATA UMIO.O,O. W721. 1718,.243,.3137,.3842, .4S4&?,
E * 525,.59534,.49611,.7358, 9.999/
DATA OM/b.0,0. 0~9,~.2,0.30 0.4,0.5,0.610.7,0.94
* 1.3,1.6,2.2/
DATA INPllT/5/,DUTPUT/6/, BIF/1/,OFF/2/, COF/3/
c ----------------------- --------- ----------------—--.--. ------
c
c *** 1.0 Get DATA file names and assignfopen files
c
TYPE 902
ACCEPT 901,31FIL
TYPE 903
ACCEPT 901,0FFIL
TYPE 904
ACCEPT 901,COFIL
c
QPEN(UNIT=BIF, STATUS=’OLD’, FILE=BIFIL)
OPEN(UNIT=OFF, STATUS=’OLD’, FILE=OFFIL)
OPEN(UNIT=COF, STATUS=’NEW ‘,FORM=’UNFORMATTED ‘,FZLE=COFIL )
c
c *** 2.0 Read in data from twe files
CALL INDATA
CLOSE(BIF)
CLOSE(OFF)
DO 10 J=I,6
DRAFT(J, 2)=DRAFT(J, 1) !Aft draft = fwd dra+t
10 CONTINUE
c
c *** 3.0 Float ship at indexed draft then Campu’te added mass
c and dam ing coef~icients using Frank Close Fit.
DO 20 IDRAF}=1,6
CALL FLOAT
CALL HYDRO
20 CONTINUE
c
c *** 4.0 Write tb unformatted coefficient file containing
c added mass and dam in c~ef-ficients fav each station
at six drafts and iwe fve frequencies.
2 WRITE (C9F) MSTA !Number of Stati~ns
WRITE (COF) (OM(I)/1=1,12) !Fre uency (rad/see)
WRITE (CCIF) (DRAFT(I,l), I=1,6) !Dra8 ts”
DO 30 L=l,MSTA !Station index
DO 30 K=i,6 !Draft index
DO 30 J=l#12 !Frequency index
WRITE(CDF) (COEFF4(K, J, I,L), I=i,8)
30 CONTINUE
WRITE (C~F) ((AREAN(L, KI,K=I,6),L=1, PISTA) !SectiOn areas
STOP
c
901 FORMAT(A)
902 FORMAT(’ Name o+ Basic INPUT File ~BIFl ? > ‘$)
903 FORMAT(’ Name of 0$-fset FiIe COFFl ‘?> ‘$)
904 FORMAT(’ Name of Caefficent File [COFI ? > ‘$)
c
END
SUEROUTINE HYDRO
c
c CALCULATION OF HYDRODYNAMIC FORCE COEFFICIENTS FOR THE SHIP.
c
C~MMOhl/10/INPUT,OUTPUT,BIF,OFF, COF
INTEGER OUTPUT, BIF,OFF,COF
COMMON/HEAD/T ITLE
cHARAcTER*30 TITLE
COMMON \COEFF4/ COEFF4(6, 12,8,25), AREAN(25, 6)
COMMON/DRFT12/DRAFT (6,2),’IDRAFT
CCtMMON/SHIP/ISTA,LSTA, ISWL,LSWL, TF,TA, XCG,YCG, DISPL ~
~~;[~ ;~IGMA / NK, SIGMA(24), SIGMAO, ERRO, QM(12) I
,,
...
1
,..
WP1=C).o
MP2=0. o
WPT=O. o
c CR IS THE CENTER OF RCfLL. ROLL IS ASSUMED TO BE ABtlUT THE
c HORIZONTAL AXIS THROUGH THE GIVEN CENTER OF GRAVITY.
CR=YCG-DRAFT( IDRAFT, l)-(XFPERP-XCG )*TAN
c STRIP CALCULATION PROCEDURE FOR EACH WET STATION. .
c
c
DO 240 J=rSTA,LSTA
XXFWD=XXSTA
XXSTA=XfZFF(U)
IF (J.EQ.LSTA) GO TO 122
XXAFT=XOFF(d+l
XM2=XXAFT
IF (J.EQ.LSWL) XW2=XWLA
GO TO 124
122 XXAFT=XXA
XW2=XWLA
124 X1=XOFF(J)-XCG
c
c INTEGRATE OVER WATERPLANE OF THE SHIP..
c
<:. IF (J.LT. ISWL) Go TQ 130
DXFWD=XWO-XXSTA
XWO=XXSTA
IF (.NOT.UL(J)) GO TO 130
DXAFT=XWO-XW2
DX=DXFWD+DXAFT
A=X1-DXAFT/3. O
B=xl+DxFwD/3. o
XW2=DXFWD*E*B+DXAFT*A* ‘A+(DXFWD**3+DXAFT**3 )/18.O
Xldl=DXFWD*B+DXAFT*A
ZW=ZUL(J)
DZW=Zi&I)X
WPO=WPC)+DZW
wPl=wPL+zw*xwi
. wP2=wP2+m*xw2
UPT=WPT+DZW*ZW**2
c’ SET UP STATION GEOMETRY. .
NDN=IhlPTS(J)
~.: IF (NON.EQ.0) GO TO 140 I
NWL=O
IF (WL(J)) NWL=NODES
CALL STATN (ZOFF(l, J), Y1(l,J), ZWL(J), INPTS(J))
{: IF (NON.LE.0) GO TO 140
c
c INTEGRATE llVER SUBMERGED V~LUME OF THE SHIP..
c
DXFWD=XXFWD-XXSTA
DXAFT=XXSTA-XXAIFT
DX=(DXFWD+DXAFT )/2.0
VOLO=VOLO+AREA*DX
A=X1-DXAFT/3. O
B=Xl+DXFWD/3. O
DX2=(DXFUD*B*B+DXAFT*A*A )/2.Oi-(DXFWD**3+DXAFT**3 )/36.0
DXI=(DXFWD*B+DXAFT*A )/2.0
VOL1=VOL1+AREA*DX 1
VOLV=V9LV+VERT*DX
?-
<,
<:
- 140 CDNTINUE
DO 150 1=1,8
COEFFQ(I)=O. O
CONTINUE
CALL GIRL
.180 CONTINUE
L
c’
DO 190 1=1,8
COEFF4(IDRAFT, K,l,J)=CtlEFFl(1)/AREA
190 CONTINUE \
c
AREAN(J, IDRAFT )=AREA
HAO(K)=HA1
SAO(KI=SA1
RAO(K)=RA1
CAO(K)=CAI
HVO(K)=HV1
SVO(K)=SV1
RVO(K)=RV1
CVO(K)=CV1
210 CONTINUE
c -------- ------------ ________________________________________
c
c PRINTOUT Offset and Hydrodynamic Coefficient Info.
c
WRITE (OUTPUT,300) TITLE
WRITE(OUTPUT,3Q1) J, XUFF(J), AREA,DRAFT( IDRAFTJ1),CRJ
* DRAFT(IDRAFT, 2)
WRITE (OUTPUT,302)
ldRITE (OUTPUT,3iO) (QM(K), HAO(K), HVO(K),SAO(K), SVO(K)JRAO(K),
RVO(K), CAO(K),CVO(K), K=1,12)
C ***iOffset Information
WRITE{OUTPUT, 705)
WRITE(OUTPWT, 706)
N=LPTS(J)
H=d “----
IF (J.LT. ISTA) GO TO 670
IF (J.GT.LSTA) GO TO 670
M=INPTS(J)
IF{M.NE. O)WRITE(OUTPUT, 710) (YOFF(I, J), ZOFF(I,J), Y1 (I,J’),ZOFF
1 (I,J)J I=I,M)
...
i
IF (ML(J)) WRITE (OUTPUT~7201 ZWL(J)
670 M=M+ 1
IF (M.LE.N) WRITE (9UTPUT,730) (Y~FF(I~ J), ZOF“F(IJJ),I=PIJN)
c
220 CONTINUE
240 CffNTINUE
GAMMA=RHO*G
DISPL=VOLO*GAMMA
c
WPT=WPT/3.O
YFYTO=MPO*GAMMA
YFZRO=WPI*CAMMA
Xw14=0.O
: (WPO.NE. O.0) XWA=WP1/WPO
;FB=voLi/vt3L0
YCB=VOLV/VOLO
XBfl=WPT/VOLO
ZBM=(WP2-WPl*XblA)/VllLO
XGM=XBM+YCB
ZGM=ZBM+YCB
XWA=XWA+XCG
XCE=XCB+XCG
YCB=YCB+YCG
XMXRO=XGM*DISPL
ZMZRO=ZGM*DISPL
WRITE ((3UTPUT,270 TITLE
WRITE (OUTPUT,2S1 DRAFT(IDRAFT, l),DRAFT {1DRAFT, i
WRITE(OUTPUT, 2?0) WPO,XWA,WP1 ,WP2,WPT
WRITE(OUTPUT, 291) ~~3PL,VOL0, XCB, YCBIVOL 1,VOLV
WRITE(OUTPUTJ 292) ., XBM, ZGMIXGM” - ““
wfiITEiouTFuT;Z93~ XrnXRO,2MZR0,YFYT0jYF2R0
WRITE(U IUTPUT,294) XXF,XXA
0UTFUT,280) XCG,YCG
c ***
. .---- —.— lxJTPuT,430)
—..— .--— —.— ZMAX,YMAX
UST) WRITE (OUTPUT,440)
~WL.,GT.0) GO TO 110
--A- — —
GO Tt; ldw
110 WRITE (CWTPUT,460) NWL
IF ($~MAX.GT.O.0) WRITE (OUTPUT#470) WMAX
120 CONTINUE
c
RETURN
270 FORMAT (lH1/181(lH=)/J 1X1A301 ‘HYDROSTATIC CDEFF’ICIENTS’
*,T64, ‘PRGGRAM HYDREX’j/J81(lH=)/)
280 FORMAT (//Sl(lH-)/, ‘ NOTE: All moments are about’,
*’center 5+ gr~vitg’ /J7X# ‘XCG=’JF1l.31,’ YCG=’JFll.31/)
2S1 FORMAT(TSJ ‘ DRAFT (fwd) =’JFS.21/JT51 DRAFT (a#t) =’,F8.2/)
290 F13RMAT(TI0,‘--------------- WATERPLA~E ---------------’#/
* TIO,’Area ,T40,F13.2,T60, ‘ units ‘,/
* TIO, ‘LCF ‘17401F13. 21T6QJ ‘ units ‘t/
* TIO, ‘lst Long. Moment ‘IT40~ E13. 7iT60J ‘ units ‘I/
* TIOJ ‘2nd Lang. Moment ‘~T40JE13. 7JT60~ ‘ units ‘J /
TIO, ‘2nd Transv. Moment ‘JT401E13. 7#T60J ‘ units ‘I/)
291 *FDRM~T(TIO, ‘--------------- WLUME ‘----------------’J/
* TIO, ‘Displacement :IT401F13.2#T601 ‘ units ‘II
* T30J ‘Volume of I)isplacemenk ,T40,E13.7JT60J : units ‘1/
* TIO, ‘LCB ‘,T40,F13.2, T&O, units ‘J/
* T161 ‘VCB ‘;T40~F13. 2#T60J ‘ units ‘~/
* TIO, ‘Lon~. Moment ‘,T401E13.7JT60J ‘ units ‘1/
,-
* TIC)~‘Vert. Moment ‘,T40, E13. 7,T60, ‘
292 FORMAT (TIO, ‘--------- METACENTRIC H~IGHTS ---------- “*I
* TIO, ‘BM (langibudinal) ,T40,F13.2,T&0, ‘ units ‘j/
* TIO, ‘BM (transverse) ‘)T401F13. 2~T6Q~ ‘ units ‘./
c’ * TIOJ ‘GM (longitudinal) ‘,T401F13.2,T60J ‘ units ‘./
* TlO, ‘QM (transv~~~e) ‘,T40,F13.2,T&O~ ‘ units ‘1/}
293 ‘“FORMjhT(TIO, ‘----------HYDROSTATIC FORCES ----------- t$/
G * TIO, ‘Rail Restoring “Moment “-- “-”;~T40, E13.7,T&0, : units ‘,/
+“ TIO, ‘Pitch Restarino Moment ‘IT40~EZ3.71T601 units ‘4/ I
* TIO, ‘HeavFe Restorin” Force ‘1-I-401E13.7,T60J * units ‘,/
* TIO, ‘Pitt:h Induced 8 cave Force ‘~T401E13. 74T60F # units ‘~/)
294 FoRMAT(/+?5, I‘ LWL begins at ‘JFIO.2,/ I
* 5, ‘ LML
—. .— ends
- .. at ‘,FIO.2,/) I
300-FORMAT(i~i>,82(lH=)/ ,/,lX,A30, ‘ADDED MASS/DAMPING COEF‘FICIENTS’
*,T66, ‘PRgGRAtl HYDREX’/,Sl(lH=))
c 301 FORMAT (T36J ‘Station ‘12/,T3&, ‘----------’/,
* T51 ‘ Dist. from F.P. ‘,F~~2;T50, ‘Area ‘,Fi 1.3,/
i
CHAR~CTER++30 T;TLE
COMMON /U RHO, G
COMMON/SHIP/ISTA,LSTA, ISWL, LSWL, TF,TA, XCG,YCG, DISPL
COMMON/GE(3METRY/MSTAj LPTS(25),YOFF (25,25)iNAFT# XAFT(25)J
* YAFT{25),NFMD, XFWD(25},YFWD(25) ,XOFF(25),
* ZQFF(25,25} /XFPERP, XAPERP,S1-lIPL,
SHIPB,SHIPT,
<,. * Y1(21,25), ZWL(25),UL(25), INPTS(25), XWLF, XWLA, XXF,
-...
* XXA,TAN,NON, NOE,NWL,CR, XXFWD, XXSTA, XXAFT,DX, DX1 ,
c.
,,..
* DX21 Z2(2i)1Y2{21)~ ZZ(20), YY(201, SNE(201, CSE(20),
* DEL(2O 1, ROL (20),ADJUST, WMAX, YMAX, ZMAX~ AREAt VERT
LOGICAL ADJUST,WL
c
CHARACTER*81 CARDID
DATA DEGRE74~.~$J45 32923 19943/
DATA G
DATA NWL/1/ . ●
c
WRITE(OUTPUT,
----- 197)
c *** lllLk
READ (BIFJ1?9) TITLE
WRITE(OUTPUT, l%) TITLE
c *** DRAFT (fwd),DRAFT (aft), len 10C’S a DRAF‘T marks
READ (BIFJ200) TF/TA,XFPERP. f~PERP
WRITE(DUTPUT,200) TF,TA, XFPERP, XAPERP
c *** Center o+ Gr.avit (XCG aft of FP, YCG hove 3L )
READ (BIF,200) XE G,YCC, ZCG
WRITE(OUTPUT,200) XCG,YCG, ZCG
c *** Six DRAFTs at which h dro. coeffs are omputed
READ(BIF,200} (DRAFT{!, 1), I=1,6)
WRITE(OUTPUT,200) (DRAFT(I, i), I=l,6)
c *** Minimum.se ment lengths for Frank Clos Fit
READ (BIF, 2 01) YMAX, ZMAX,WMAX,NWL
WRITE(OUTPUT,201) YMAX, ZMAX,WHAX,NWL
ADMJST=ZMAX. GT. O.O. AND. YMAX. GT.O.O
c *** Number of Foruare refile points
READ (BIF,190) NFW B
WRITE(OUTPUT,190) NFWD
IF (NFWD. GT.25} CALL ERR;~W~AIDiM~UM)
c *** Coordinates of forward
IF (NFWD. GT.0) READ (BI~,430) (?FWD(I),XFHD(
WRITE(OUTPUT,430) (YFMD(I ),XFWDIII, I=l,NFWD)
c *** Number of aft pro?ile p~ints
READ (BIF,190) NAFT
WRITE(OUTPUT,190) NAFT
IF (NAFT. GT.25) CALL ERROR(l&~~~M, RDUM)
c *** Coordinates of aft profile
IF (NAFT. GT.0) READ (BIF,43 g ) (YAFT(I), XAFT( 11, I=IINAFT}
WRITE(OUTPUT,430) (YAFT(I ),XAFT(I), I=l,NAFT)
E
: ----------------------------------------------------------
<
k Section 2.0 - READ OFFSET file
c Th@ effset +ile can be an actual SHCP DATA File
c
WRITE{OUTPUT, 198)
c
C *+* CARD TYPE A
READ (OFF,41O) CARDID
WRITE(OUTPUT,410) CARDID
C *++ CARD TYPE B
READ (C)FF,410)
C *+* CARD TYPE C
READ (OFF,412) SPACE, ZSCAL, YSCAL,SHIPL, NAPN,KINDO
WRITE(OUTPUT, 422)SPACE, ZSCAL, YSCAL,SHIPL, NAPN,KINDO
IF (SPACE. EQ.O.0) SPACE=I. O
ZSCAL=l.O
YSCAL=l. O
MSTA=O
NFWD=O
NAFT=O
c
c *** CARD TYPE D
30 Al=1
rnS?A=MSTA+i
IF (MSTA.GT.25) CALL ERRCiR(lO,IDUM,RDUM)
READ (OFF,416) STATNO, Y1l, Z1,JTEST
WRITE(OUTPUT,417) STATNO, Yll, Zl,dTEST
XOFF(MSTA)=STATNO*SPACE
GO TCl 50
40 CONTINUE !Zaop within each stat on
N=N+l
IFJN.G~z25) CAL ERROR(ll, MSTA,RDUM)
l,Z1,JTEST
Y1l, Z1,JTEST
.L ERROR(12, MSTA,RDUM)
50 bzsc~L
,*YSCAL
OR. dTEST. EQ.77777~N~0 TO 40
TA )=hl o+ points ~ MSTA
lF-~N:LT.2) CALL ERROR(13, MSTA,RDL...urn}-
IF (JTEST. EQ.S8888) GO TO 30 !Go onto next s tation
IF (JTEST. NE. 99999) CALL ERROR(14, JTEST,RDUM}
g
DO 220 J=l,MSTA
XOFF(J)=-XOFF(J)
220 CONTINUE
IF (NFWD. EQ.0) GO TO 240
X=XOFF(l)
DO 230 Z=lINFWD
XFWD(I)=XFWD( 1)+X
230 CONTINUE
240 CONTINUE
X=XCtFF(MSTA)
DO 250 I=i,NAFT
XAFT(I)=X-XAFT( 1)
250 ~~~~~~UE
180 F~RtiAT (5X,15)
190 FURHAT (15)
197 FORMAT(lHii,81(iH*)/, ‘ INPUT DATA ECHO ‘,T641
*’PROGRAM HYDREX’/~Sl(lH*)//J 33(1H-)1
*’[BIFI DATA FILE’,32(lH-)/)
lRMAT(li-11/,81{lH*)/,‘ INPUT DATA ECHO
198””F~ ‘JT64,
+F’PRnGRAM
. . -—- . .. .. . I+YDREx~/,81(lH++)//,
.. 33(1H-),
*’[OFF] MT.. “A .
FILEf,32(iH-)/)
196 FORblAT(lX,A)
i?q F~RMATi~) ‘--
200 FORMAT (6F1O.2)
201 FORMAT (3F10.2, I5)
2i0 FORMAT (F10.2, I5,5X,F1O.2)
c
410 FORMAT (A)
412 FORMAT (4F1C).3,13X,12,4X,11)
414 FORMAT (5X, 15,5X, ‘INPUT OF SHCP TYPE D OFFSET DATA’)
416 FORMAT (F6.3,2F7.0, 16)
417 FORMAT (F7.3,2F10.2, I6)
420 FORMAT (2I5,F1O.2) \
430 FORMAT (2FI0.2)
c’ c
END
SUBROUTINE INSERT (A1,A2, J1, L1, L2)
{. c Pur ose: Inserts array A2 inta arrag Al at lacation J1.
REAL Al(l), A2(1)
IF (Li.LT.Ji) GO TO 120
M=L1+L2
1+1 .
K=L1-UZ+I
DO 110 J=l,K
Al(M)=Al(I)
M=EM-i
1=1-1
110
120
Do”~~+~=l, u
A7(M)=A2(K)
130 CONTINUE
~~E#RN
SUBROUTINE STATN (Z,Y,ZU,NPTS)
c
c c
c
CALCULATION OF DATA CONCERNING STATION GEOMETRY.
REVISION OF OFFSETS FOR GOOD RESULTS MAY BE PERFORMED.
E
c
NON = NUMBER OF CALCULATED MIDPOINTS.
~WL = NUMBER OF WATERLINE t“iIDPOINTS.
c = HORIZONTAL COORDINATE OF SEGMENT ENDPOINT.
c Y = VERTICAL COORDINATE OF SEGMENT ENDPOINT.
c 22 = HORIZONTAL COORDINATE OF SEGMENT MIDPOINT. ‘
<..
c Yv = VERTICAL COORDINATE OF SEGMENT MIDPi31NT.
c SNE = HORIZ~TAL COMPONENT OF UNIT NORMAL T~ SEGMENT.
c CSE = VERTICAL COMPONENT OF UNIT NORMAL.
~-.,.
~ DEL = LENGTH OF SEGMENT.
.-
ROL = MOMENT OF UNIT NORMAL ABOUT CENTER OF RCiLL {CG).
c
REAL Y(l), Z(I)
COPWION/10/INPUT,OUTPUT,BIF, DFF,COF
INTEGER OUTPUT, BIF,OFF,COF
COMMON/GEOMETRY/flSTA, LPTS{25),YOFF( 25,25),NAFT, XAFT(25),
iFT(25),NFWD1 XFWD(25)) YFWD(25), XOFF(25)J
*
* zti.. .__.–-. XFPERP, XAPERP, SHIPL,SHIPB, SHIPT,
IFF(25,25),
c *
Y1(21,25), ZI
XXA, TAN, NI
-WL(291JWL(25), INPTS(25),XWLF, XWLA, XXF,
.__. XXFWD, XXSTA,XXAFT, DX,DXIJ
ION,NOE,NWLJCR,
* DX2, Z2(21), Y2(21”),ZZ{20), YY(20),-SNE(20),CSE(20),
* DEL(20)iEnl ~~fi~.4n.J[J~7.~MAX~vMA~~ 7~Ax.A~~A*uFERT
. . . . . . . . . .
c..
f,- , Zc)=o.o” -
k. ,
(1 )
Y(3=Y
c’
.
i,
f
‘i
MTOT=O
K=i
I1=K
IF (Z(l).EQ. O.0) 11=2
IF (11.GT. hlPTS) Go TO 130
c
~ CALCULATION LOOP FOR SUBMERGED OFFSET POINTS. .
b
DO 120 I= 11,NPTS .
ZINT=Z(I)-ZO
YIhtT=Y(I)-YO
D=SQRT(ZINT*Z INT+YINT*YINT )
IF CD.EQ.O.0) GO TO 120
m IF (.NOT.ADdJST) GO TO 110
~ CDDE INSTRUCTIONS FOR THE ADDITION OF POINTS. .
NUMBER=MAXO( IABS(IFIX(ZINT/ZMAX )),IABS(lFIX(YtNT/YMAX) ))
MORE(K)=NUMEER
PITDT=MTOT+NUMBER
C13hlTINUESTANDARD PROCEDURE. .
110
Zs
(zo*(Yo-cR+YINT/3. 0)+2 (Il*(YO-CR+YIMT/l. 5))
))*S-ZZ(K)*C
c
120
c
c END OF CALCULATI~N LOOP FOR SUBMERGED- PO INTS.
c c
130 Z2(K}=Z0
r
Y2(K)=Y0
NON=K-1
ADD UPPERMOST SEGMENT. .
L
IF (NWL.NE.0) GO TO 150
(, c SECTION IS SUBMERGED.
IF (ZO.EG.O.0) GO TO 200
IF (.NDT.AIMJST) (20 TO 140
..
/
c CONTINUE STANDARD PRCtCEDURE..
c
140 DEL(K)=ABS(ZO)
CSE(K)=-l. O
SNE(K)=O. O
ZZ(K)=O.5*Z0
YY(K)=YO
ROL(KI=ZZ(KI
Nahf=K
K=K+i
Z2(K)=0.O
Y2(KI=Y0
Ga TC) 200
:
ADD SEGMENT UP To WATERLINE. .
c
1!50 ZINT=ZW-ZO
YINT=-YO
IF (NWL.LT.0) NWL=O
IF (ZW.LE.O.0) NWL=O
D=SQRT(ZINT*Z INT+YINT*YINT 1
IF (D.EQ.O.0) GO TO 170
IF (.N~T. ADJUST) GQ TO 160
E CO13E INSTRUCTI13NS FOR THE ADDITION OF POINTS. .
c
NUMEER=MAXO(IABS( IFIX(ZINT/ZMAX) ),IABS(IFIX(YINT/YMAX) ))
MORE(K)=NUMBER
MTOT=PITOT+NUM3ER
c
c CONTINUE STANDARD PROCEDURE. . \
c
160 ZS=ZO+ZM
YS=YO
AREA=AREA+YINT*ZS
~E~V=T~~T-YINT+( ZQ*(CR+YINT/1 .5}+ZW*(CR+YINT/3. 0))
S~YINT/D
CSE(K)=C
SNE(K)=S
DEL(K)=D
ZZ(K)=O.5*ZS
YY(K)=O. 5*YS
~~~(~)=(CR-YY(K) )*S-ZZ(K)*C
K=K;l
Z2(K)=ZW
Y2(K)=0.O
c
ADD DECK AT WATERLINE. .
!
170 CCWJTINUE
IF (NWL.EQ.0) GO TO 200
ZINT=ZW/FLOAT(hlWL )
IF (WMAX. EQ.O.0) G~ TO 180
IF (ZINT.LT.WMAX) GO TO 180
NWL=IFIX(ZW/WMAX)+l
ZINT=ZW/FLOAT (NWL)
180 D=ZINT*O. 5
DO 190 I=l,NWL
DEL(K)=ZINT
.
.
1’
\ c
SUBROUTINE POTST ‘
COMMON/BD\XPAN( 120)~YPAN(120)) ZPAN{120)J AREA(120), ST(120)/
* ACN(120), ACNW(120),AN(120, 3), E(120), P(120,6), PRFS(120),
( * STQLD(12(3),PX(120,6)
COtlMON/BD2/XPT(150),YPT(150)J ZPT(150), MRF(Z50),WRFR(150),
* KK(i50,4)
CDMMOh!/A/NPAN,NPT,GEE,RHO, NKX,NKY,EYE, DT,TIM,UFWD
(’ COMPLEX A,B,EYE
DIMENSION XPSL(3, 4), XPSLR(3, 4),PHB(120, i20)
CUMMON/’PTST/ARE4(2OO, 4),X4(200,4) ,Y4(200,4), Z4(200, 4)
* ,SEL(200,4)
[; DO 1500 d=l,NPAN
3~E$(J14)=-1.0
IF?KK(J,4). EQ.0) JT=3
(,, ~~ ~500 JJ=l,JT
IF~JJ. LT.JT) J2=JJ+I
KF=KK(J, JJ)
(, KG=KK(J,J2)
X4(J, JJ)=(XPT(KF)+XPT(K(2)+XPAN(J) )/3.0
Y4(J, JJ)=<YPT(KF)+YPT(KG)+YPAN(J) )/3.0
Z4(J, W)=(ZPT(KF)+ZPT(KG)+ZPAN(J) )/3.0
(. AF=XPT(KF)-XPAN(J)
BF=YPT(KF)-YPAN(J)
CF=ZPT{KF)-ZPAN(J)
AG=XPT(KG)-XPAN{J)
BG=YPT(KG)-YPAN(J)
CG=ZPT(KG)-ZPAN(J)
CALL SELF(AF, BF,CF,AG,BG,CG, FEE)
SEL(J,JJI=FEE
\. CR=AF*BG-BF+AG
AR=BF*CG-CF+BG
BR=CF+AG-AF+CG
ARE4(J,JJ)=0. 5*SQR+(AR*AR+BR*BR+CR*CR’ )
i... 15QQ CnNTINUE
DO 127 NJ=l,NPAN
DO 1277 MJ=l,NPAN t
1277 P13E(NJ,MJ)=0.00
(“ P(NJ, l)=O.00
P(NJ,2)=0.00
PfNJ,3)=o. oo
P(NJ,4)=0.00
*.. P(NU,5)=0.00
P(NJ,6)=0.00
DO 128 NK=1,4
ARN=ARE4(NJ, NKI
i IF(ARN. LT.O.0) GO TO 128
Pl=o. o
P2=0. o
P3=a. o
P4=0. o
P5=0. o
P6=Q. O
X=X4(NJ,NK)
Y=Y4(NJJNK)
Z=Z4(NJ,NK)
DO 138 MJ=l,NPAN
DO 138 MK=1,4
,,, xF=x4{MJ#MK)
YF=Y4(MJ,MK)
ZF=Z4(MJ,MK)
ARM=ARE4(MJ, MK)
1’ IF(ARM. LT. Q.00) GO TO 138
IF(NJ. NE.PIJ) GO TO 140
IF(MK. NE.NK) GO TO 140
FRA=SEL(MJ,MK )/ARM
GO TO 1380
CSE(K)=-2. o
~~~~f)~ooo
ZZ(K)~Z2(K)-D
ROL{K)=ZZ(K)
NOhl=K
K=K+ 1
Y2(K)=0. O .
z2(K)=z2(K-l)- ZINT
CONTINUE
Z2(K)=0.O
NON=K-1
END OF FIRST PASS. ADD ADDITIONAL SEGMENTS IF REQUIRED. .
IF (NON.GT. LIMIT) 00 TO 290
IF (.NOT.A)MJST) GO TO 280
IF (NON.GT. MAXPTS) GO TO 280
IF (MTOT.EQ.0) CO TO 280
MTOT=MTCIT+NCthl
M1=NON-NWL
IF (MTOT.LE.MAXPTS) GO TO 230
DECREASE MORE UNTIL MTOT IS EQUAL MAXPTS ..
210 DO 220 K=lIMI
IF (MORE(K).LE.0) GO TO 220
MORE(K)=MORE(K)-1
MTOT=MTOT-1
IF (MTC)T.LE. tlAXPTS) GO TO 230
220 CONTINUE
GO TO 210
INSERT ADDITIONAL SEGMENTS AS INDICATED BY MORE ..
230
i%=
GO TO 260
~. -
ZIh!T=Z2(Il)-ZO
YINT=Y2(11)-YO
ZINT=ZINT/FLCIAT (2*N1)
---- YINT=YIhlT/FLOAT {2*N1)
L. ~=~~~[;;/FLOAT (Nl)
S%NE(I)
Q=P+l .0
ZMEW(K)=ZO+P*ZINT
YNEW(K)=YO+P*Y INT
[, ZZNEW(K)=ZO+Q*ZINT
YYNEW(K)=YO+Q*YI NT
RNEW(K)=(CR-YYNEW(K ) )*s- ZZNEW(K)*C
24”0 CONTINUE
DO 250 K=l,NUMBER
DNEW(K)=D
,.
k.
,,.
.,
CNEW(K)=C
250 SNEW{K)=S
ZZ(I)=ZZNEW(N1)
YY(I)=YYNEW(N1)
ROL(I)=RNEW(N1)
DEL(I)=D
NUt=NtIN+l
CALL INSERT (Z2,ZNEW(2 I1,NUT,NUMBER 1
CALL INSERT (Y2,YNEW(2 I1,NUT,NUMBER )
CALL INSERT (ZZ,ZZNEW, N13N,NUMBER)
CALL INSERT (YY,YYNEWJ NON,NUMBERI
CALL INSERT (I)EL,DNEW, NON,NUM13ER)
CALL INSERT (RUL,RNEW, NON,NUM)3ER)
CALL INSERT (CSE,CNEU, NON,NUMBER)
CALL INSERT (SNEJSNEWJ NON,NUMBER)
260 I=11+NUM3ER
NCiN=NCIN+NUMBER
270 CONTINUE
280 NCIE=NON+NDN
c
RETURN
ERROR DIAGNOSTICS. .
TO~ MANY WET SEGMENTS. .
290 WRITE (OUTPUT,300) XXSTA
STOP 7
c
300 FORMAT(’ More than 20 wet segments for station at X=’,F13.5)
c
END
SUBROUTINE FLOAT
THIS SUBROUTINE APPLIES THE GIVEN DRAFT TO THE ORIGINAL TABLE
OF OFFSETS.
COMMON/IU/INPUT, 13UTPUT,BIF,0FF,COF
INTEGER OUTPUT, BIF,OFF,COF
c
COMMON/SHIP/ISTA,tSTA, ISWL,LSML, TF,TA, XCG,YCQJ DISPL
COMffON/DRFT12/ DRAFT(&,2), IDRAFT
CDP!!?ON/GEOMETRY/MSTA,LPTS(25),YDFF( 25,25),NAFT, XAFT(25),
* VAFT(25),NFWD,
. . .. XFWD(25j,yFW~(25-j,XOFF~25),
* 20[. FF[P5,25),
----- XFPERP, XAPERP,SHIPL, SHIPB,S~IPT,
* YZ(21,25}JJZWL(25),WL(25), INPTS(25)1 XWLFJXWLAJ XXFJ
* ~fi:N~N,
XXA, TA... ......NOEINWL, CRj XXFWDI XXSTA, XXAFT,DX, DXII
+ DX21Z2(21),Y
-—.——-.. 2(21 )JZZ(20)JYY(20)I SNE(20)/CSE(20)J
* i% {7n}.=nl (9n}.An.lll=T.
---.-W, # ,.--.-”,
I.IMAY.
,
VMAY. 7MAY.
.,.-n,
&
,.”w”-
AP=A.
,t,Tn# L}I==T
m,.-,-,
, , T-,.,
-,.-n,
c—
TF=DRAFT(IDRAFTJ 1)
TA=DRAFT(IDRAFT, 2)
c
c --------------- ----- ----- _____ _____ _____ ______ ____
c
c—
IF (XFPERP. NE,XAPERP) GO TO 130
XFPERP=XOFF(l )
XAPERP=XOFF(MSTA)
IF (XFPERP. NE, XAPERP) GO TO 130
TAN=O. O
IF (TF.EQ.TA) GCl TO 140
WRITE(OUTPUT,570) XFPERP,TF#TA
STOP 5
130 ~~~:(&A-TF)/ (XFPERP-XAPERP )
140
ISWL%
(:,
LSWL=O
XX=XOFF(l)
DO 190 J=1,MS7A
IF ”(XX;GE;XOFF(J)) GQ TO 142
WRITE (OUTPUT, 575) J, XOFF(J), XX
c. c
STOP 6
c TJ IS DRAFT OF STATION U.
c
G 142 XX=XDFF(J)
TJ=(XFPERP-XX )*TAN+TF
YNEXT=YOFF(l ~J)-Td
,, h!=o
\
IF-(YNEXT. GT.O.O) co TO 152
LSTA=J
IF (ISTA.EQ.0) ISTA=J
Y1(l,J)=YNEXT
N=LPTS(U) ““
DO 150 I=2,h!
YNEXT=YOFF(I ,J)-TJ
IF (YNEXT.GT.O.0) GO TO 160
Y1(I,J)=YNEXT
150 :OfitJ;NUE
=
iF””(VtdEx7.
EQ.0.0) m TcI 170
J-;,
k: c
c SECTION ISh!OT SURFACE PIERCING. .
c
152 INPTS(J)=N
‘c WL(J)=.FALSE.
GO TO 190
c
c SECTION IS SURFACE PIERCING. FIND MATERLINE COORDINATES. .
c c
160 YO=YOFF(I-i, J)-TJ
IF (YO.EQ.O.0) GO TO 170
INPTS(J)=I-I
{“ ZO=ZOFF(I-1, J}
.
ZWL(J)=ZO-YO*(ZOFF{ I,J)-ZO)/(YNEXT-YO)
GO TO 180
/-.
c
170 INPTS(J)=I-2
ZWL(d)=ZOFF(I-l, Jl
c
180 W~)~.TRUE.
IF (;SWL.EQ.0) ISUL=J
190 CONTINUE
IF (ISTA.NE.0) GO TO 200
WRITE (OUTPUT, 580)
STOP 77
[..
c
c FIND FORWARD AND AFTER ENDS 13F WETTED HULL..
c
200 XWLA=l.0E32
XhtLF=-XWLA
IF (ISWL.EQ.0) Go To 210
XWLF=XOFF(ISWL )
XWLA=Xi3FF(LSWL)
210 XXF=XOFF(ISTA )
IF- (NFWD.EQ.0) GO To 250
IF ([email protected]) Gt) TO 220
c
c XFWD(l) DEFINED AS FORWARD END OF WATERLINE. .
c
XWLF=AMAX1( XFWD(l), XWLF )
XXF=AMAX1(XWLF, XXF) .
GO TO 250
c
c FIND FORWARD END OF WATERLINE AND FORWARD END OF WETTED HULL..
c
220 YO=(XFWD(l)-XFPERP )*TAN+YFWD(l )-TF
Da 230 d=2)NFWD
XX=XFWD(J)
YNEXT=(XX-XFPERP )*TAN+YFWD( J)-TF
I-F (YNEXT.LT.O.0) GO TO 228
IF (YO.GT.O.0) GO TO 229
IF (YNEXT.EQ.O.0) GO TO 227
INTERPOLATE FOR WATERLINE. .
XO=XFUD(J-1)
XX=(XX-XO)/ (YO-YNEXT)*YO+XO
227 IF (XX.LE. XWLF) GO TO 22?
XWLF=XX
c
228 XXF=AMAX1(XX, XXF)
229 YO=YNEXT
230 CONTINUE
c
c FIND AFTER END OF WATERLINE AND AFTER END OF WETTED HULL..
c
250 XXA=XUFF(LSTA )
IF (NAFT.EQ.0) @3 TO 290
IF (NAFT.GT. 1) GO TO 260
c
c XAFT(l) DEFINED AS AFTER ENI) OF WATER LINE..
c
XWLA=AMIN1(XAFT( l), XWLA)
XXA=AMIN1(XWLA, XXA)
GO TO 290
FIND AFTER END OF WATERLINE AND &FTER END OF WETTED HULL..
260 YO=(XAFT{l)-XFPERP )*TAN+YAFT(l )-TF
Dtl270 J=2,NAFT
XX=XAFT(J)
YNEXT=(XX-XFPERP )*TAN+YAFT(J )-TF
IF (YNEXT.LT.O.0) GO TO 26=
IF (YO.GT.O.0) GO TO 268
IF (YNEXT. EQ.O.0) G~ TO 267
c
.,
:
INTERPOLATE FOR WATERLINE. .
XO=XAFT(J-1)
XX=(XX-XO)/ (YO-YNEXT)*YO+XO
267 IF (XX.GE. XWLA} GCl TO 269
XWLA=XX
c
268 XXA=AMIN1(XX, XXA)
2&9 YO=YNEXT
270 CONTINUE
290 IF (ISWL. EQ,O) ISWL=26
c
420 FORMAT (321iOST A T I Cl N GEOMETRY)
4S0 FORMAT (22H0 DRAFT FWD (AT X =,F1O.3,3H) =,FIO.3/5X,171-IDRAFTAF
lT (AT X =,F1O.3,3I-I)=,FIO.3)
570 FCIRMAT (&iIiO*** TWO DRAFTS SPECIFIED, AND LENGTH BETWEEN PERPS. IS
i ZERO./3lH *** BOTH PERPENDICULARS AT X =,F12.4/i6H *** DRAFT FUD
2=,F12.4/16H *** DRAFT AFT =,F12.4)
575 FORMAT (12HO*** STATION, 13,5H (X =,F12.4,18H) 1S OUT OF ORDER./29H
1 *** PREVIOUS STATION HAS X =,F12.4)
~ 580 FORMAT (25HO*** SHIP IS ABOVE WATER. )
b
END
SUBROUTINE ERROR(NO, IDUM,RDUM)
COMMON/10/INPUT, OUTPUT,BIF,OI=F,COF
INTEGER 13UTPUT,BIF,0FF,COF
WRITE(OUTPUT,1O) NO
WRITE(OUTPUT, ll) IDUM,RDUM
10 FORMAT(’ STOPPED DUE TO ERROR NO. ‘,12,//1
11 FORMAT(IX,I3,5X,F1O.3)
STOP
END
SUBROUTINE BEER (K)
c
cl TWO-DIMENSI~NAL HYDRODYNAMIC CALCULATION FOR THE SPECIAL CASE
c1 OF ZERO OR INFINITE FREQUENCY,
Ci
C5
COMMON/GEOMETRY/MSTA, LPTS(25),YOFF(25, 25),NAFT, XAFT(25),
* YAFT(25),NFWD, XFWD(25),YFWD(25) ,XOFF(25),
* ZOFF(25,25) ,XFPERP, XAPERP,SHIPL, SHIPE,SHIPT,
* YI(21,25), ZWL(25),WL(25), INPTS(25), XWLF, XWLA, XXF,
* XXA,TAN,NON, NDE,NUL,CR, XXFWD, XXSTA, XXAFT,DX,DXI,
* DX2, Z2(2i), Y2(21), ZZ(20), YY(20), SNE(20),CSE(20),
+ DEL(20),ROL(20) ,ADJUST,WMAX, YMAX, ZMAX,AREA, VERT
COMMON I // HAH,SAS,RAR,CCA,HVH,SVS/ RVR, CCV,RH02,RSIG,WN, WI,W2,ERR, —Z
l~~h:~~,~JT
HAO(24,8), BLOGP (20J20),YLOGP (20,20),BLUGM(20
l,20), YLOGM(20, ~0), CONH(40), CONR(40, 2),CROLL(40,4,0),CHEAV(40,40),HE
2AVI(20,20), HEAVT(20,20), ROLLI(20,20), ROLLT(20,20), EJI,CZRI,CZLI, SZ
3R11SZLI, RARI,RALI,RBRI, RBLI, CLI,CRI,SLI,SRI, I,IPESUIJ,NJ
C5
C5 INPUT AND OUTPUT LOGICAL UNITS..
COMMON/ID/INPUT, OUTPUT,BIF, OFF,COF
INTEGER DUTPUT, BIF,OFF,COF
:: OUTPUT LISTING PAGE HEADING DATA..
C5
HAH=O. O
SAS=O. O
RAR=O. O
CCA=O. o
HVH=O. O
Svs=o. o
RVR=Q. O
Ccv=o. o
hlN=N(Nd-NblL
C3
c----------------------- -----------------------
v
IF (UN.NE. O. ) CO TO 130
ZERO FREQUENCY CASE. .
%!
——
DO 120 1=1JNN
XM1=ZZ(I)-Z2(1)
XP1=ZZ(I)+Z2(1)
YP1=YY(I)+Y2(1)
FCR1=.5*ALOG (XM1**2+YP1**2 )
FCL1=. 5*ALOG(XPI**2+YP 1*+2)
ACRI=ATAN2(YPI ,XM1)
ACL1=ATAN2(YP1, XP1)
Da 110 J=l,NN
xt’12=zz(I)-z2(J+l)
XP2=ZZ(I)+Z2(d+l)
YP2=YY(I)+Y2 (J+i)
FCR2=.5*ALOG (XM2**2+YP2**2 )
FCL2=.5*ALOG (XP2**2+YP2**2 )
ACR2=ATAN2(YP2, XM2)
ACL2=ATAN2(YP2, XP2)
SIMJ=SNE(I)*CSE(J)-SNE(J)*CSE(I )
CIMJ=CSE( I)*CSE(J)+SNE( I)*SNE(J}
SIPJ=SNE( I)*CSE(J)+SNE(J)*CSE( 1)
CIPJ=CSE( I)*CSE(J)-SNE( I)*SNE(J)
DChlR=SIP~=(FCR1-~tR2)+C IPJ*(AcR1-ACR2)
PCR=CSE”(J)*”(XMl*FCR1-YPl*iiCRl-XMl-XM2&FCR2+YP2*ACR2+ XM2) +SNE
(J}*(YP2*FCR2+XM2*ACR2+YP 1-YP1*FCR1-XM1*ACR1-YP2)
DCNL=SIMJ*(FCL2-FCL1 )+CIMJ*(ACL2-ACLI )
PCL=CSE(J)*{ XP2*FCL2-YP2*ACL2-XP2-XP1*FCL1+YP1*ACLI+ ‘XP1)+SNE
(J)*(YP2*FCL2+XP2*ACL2-YP2-YP1*FCL1-XP1*ACL1+YPI )
CROLL{I,J)=BLOGM(J, 1)+2. O*(DCNR-DCNL)
CHEAV(I, J)=BLDGP (J,1}+2. O*(DCNR+DCNL)
RCtLLT(I,d}=-YLOGM(J, 1}-2. O*(PCR-PCL)
HEAVT(I;~) =-YL~GP(J; 1)-2. ~*(PCR+PGL)
GoT12ilo ”””
ACL1=ACL2
110 CONTINUE
120 CONTINUE
GO TO 160
C3
C3 INFINITE FREQUENCY CASE..
C3
130 CONTINUE
DO 150 Z=l,NN
DO 140 J=l,NN
CROLL(I, d)=BLOGM(J, 1)
CHEAV(I, J)=BLOGP(J, 1)
(-
ROLLT(I, J)=-YLOGM (J,I )
HEAVT(I, dl =-YLOGP(J, I)
140 CONTINUE
150 CONTINUE
C3
C3 SOLUTION FOR EITHER THE ZERO ~R INFINITE FREQUENCY CASE. .
C3
160 CONTINUE
DO 170 I=lINN
CGNH(I)=CSE(I)
CQNR(I, l)=-SNE(I)
(. CONR(I,2)=ROL(I)
170 CONTINUE
IT=LNEQT(40, NN, l,CliEAV,CONH,ERR,HEAVI)
IF (IT.EQ.0) GO TO 180
c IF (WN.EQ.O.0) WRITE (iJUTPUT,230)
IF (WN.NE.O.0) WRITE (OUTPUTJ240)
WRITE (OUTPUT,270) XXSTA
IF (IT.NE.0) GO TCI 190
180 CONTINUE
IT=LNEQT(401 NN,2,CROLLJ CONRJERR,R
IF (IT.EQ, O) Go TO 200
IF (WN.EQ.O.0) WRITE (OUTPUT,2501
IF (WN.h!EsO.0) WRITE (OUTPUT,260)
WRITE (OUTPUTJ270) XXSTA
IF (IT.EQ.1) 00 TO 200
190 WRITE (DUTPLIT,2SO)
STOP 10
EVALUATE VELOCITY POTENTIALS AND FCIRCE COEFFICIENTS. .
~
DO ~~~ ~=~JNN
PAS=O: O
PAR=O. Q
c DO 210 J=l,Nhl
PAH=PAH+CCINH(J)*HEAVT(J, I)
PAS=PAS+CONR(J, I)*ROLLT(J, I) ~
PAR=PAR+CONR (J,2)*ROLLT(J, 1)
CCtNTINUE
THE PRESSURES IN PHASE WITH THE SINUSOIDAL DISPLACEMENT ARE. .
HEAVE -- PAH = PAH*RHO*ESIG*ESIQ
SWAY -- PAS = PAS*RHO*ESIG*ESIG
ROLL -- PAR = PAR*RHO*ESIG*ESI G
THE ACCELERATICtN COMPONENTS OF THE FORCE ARE EQUAL
IN MAGNITUDE TQ THE ABOVE, BUT HAVE THE OPPOS,ITE SIGN.
DDD=DEL(I)
DCI=CSE(I)*DDD
DSI=-SNE(I) *DDD
DFR=ROL(I)*DDD
C6
C6 INTEGRATION TO OBTAIN FORCE ACCELERATION COEFFICIENTS. .
c&
HAH=HAH+PAH*DC I
“+.,
SAS=SAS+PAS*DS I
(. RAR=RAR+PAR*DFR
CCA=PAR*DSI+PAS*DFR+CCA
‘c
...
~-
C6
220 CONTINUE
HAH=HAH*RH02
‘E- SAS=SAS*RHiJ2
RAR=RAR*RHU2
ccA=ccA*RHa2/2. o
IF(WN.EQ.O. ) HAH=99. ! INFINITE AT ZERO FREQ
‘(. c
RETURN
230 FORMAT (43H ++* HEAVE MATRIX, ZERO ENCOUNTER FREQUENCY)
~. 240
250
FCJRMAT
FORMAT
(37H
(47H
***
***
HEAVE MATRIX, INFINITE FREQUENCY)
SWAY-ROLL MATRIX, ZERO ENCWNTER FREQUENCY)
260 FORMAT (41H *** SWAY-R~LL MATRIX, INFINITE FREQUENCY)
270 FORMAT (31H *** C9EFFS. FOR STATION AT X =/F13.5)
280 FORMAT (26H *** EXECUTION TERMINATED. )
f(h c
END
SUBROUTINE GIRL
c
(’ c1 CALCULATION OF FREQUENCY INDEPENDENT TERMS TO BE USED IN THE
c1 TWO-DIMENSIONAL HYDRODYNAMIC CALCULATIONS.
c1
“/
THIS SUBROUTINE IS CALLED ONCE FOR EACH STATION OF THE SHIP
4. . :2 WHEN THE HYDRODYNAMIC COEFFICIENTS ARE BEING GENERATED.
C6
C5
COMMON/GEOMETRY/MSTA, LPTS(25),YOFF (25,2S),NAFT, XAFT(25),
(: * YAFT(25),NFWD, XFWD(25), YFWD(25), XUFF(25),
* ZOFF(25,25) tXFPERP, XAIPERP,SHIPL,SHIPB, SHIPT,
* Y1(21,25), ZWL(25), WL(25), INPTS(25), XWLF, XWLA# XXF~
* XXA,TAN,NON, NOE,NWL,CR, XXFWD, XXSTA, XXAFT, DX,DX1,
.(, * DX2, Z2(21), Y2(21), ZZ(20), YY(20),SNE(20), CSE(20),
* DEL{201,RC)L(20),ADJUST, WMAX,YMAX, ZMAX, AREA,VERY
COMMON -// - HAl,SAl,RAl,CAl,HV1/SVl, RV1, CV11RHU2,RSIG,WN, WI,W2,ERR, Z
●
l::k;;~lydl
(. HAO(24,8),BLOGP (20,20)IYLOGP (20120)1BLOGM(20,
120),YLOGM(20,2~), I,J,ACLI, ACLT,ACRI,ACRT, APLI, APLT, APRI,APRT,CIMJ,
2CIPJ,DCNL, DCNR,DPNL,DPNR, FCLI,FCLT,FCRI, FCRT,FPLI,FPLT, FPRI,FPRT,P
3CL,PCR,PPL, PPR,SIMJ,SIPJ, ZMI, ZMT,ZPI, ZPT, YMI,YMT,YPI, YPT
c DATA PIN/-3. 14159265358977/
DATA TPI/6.28318530717758/
DO 160 I=l,NON
c YMI=YY(I)-Y2(I)
YPI=YY(I)+Y2(1)
FPRI=ALOG(ZMI*ZMI+YMI*YMI )/2.0
c FPLI=FPRI
FCRI=AL~G(ZMI*ZMI+YPI*YPI )/2.0
FCLI=FCRI
APRI=~TAfi2(YMI, ZMI)
(. APLI=APRI
ACRI=ATAN2( YPI, ZMI)
ACLI=ACRI
00 ~:OJ~~l,NON
[“
YM~=YY(I1-Y2(J2 )
YPT=YY(I)+Y2(JI )
,,
ZMT=ZZ(I)-Z2(JI )
<
ZPT=ZZ(I)+Z2(J1)
c CALCULATE ANGLES (MEASURED OUTSIDE SECTION). .
/..
(...
<~
!..
1’
\..
,.
...
.. .
,-
APRT=ATAN2(YMT, ZMT)
IF (ZMT.GE.O.0) GD TO 130
IF (JI.GT.1) GO TO 110
IF (YMT.LT.U.0) APRT=APRT+TPI
GO TO 120
110 IF (YMT.GE.O.0) APRT=APRT-TPI
120 IF (YPT.LT. O.0) GO la 130
ACRT=PIN
GO TO 140
130 ACRT=ATAN2( YPT, ZMT)
140 AcLT=ATAN2(YPT# zPT)
APLT=ATAN2( YMT, ZPT)
FPRT=ALOG(ZMT*ZMT+YMT*YMT )/2.0
FPLT=ALOG(ZPT*ZPT+YMT*YMT )/2.0
FCRT=ALOG(ZMT*ZMT+YPT*YPT )/2.0
FCLT=ALDG(ZPT*ZPT+YPT*YPT 1/2.0
SIIW=SNE( I)*CSE(J)-ShlE(J)*CSE( I)
CIMJ=CSE( I)*CSE(J)+SNE( I)*SNE(J)
SIPJ=SNE( I)*CSE(J)+SNE(J)+CSE( 1}
CIPJ=CSE( I)*CSE(J)-StiE(I)*SNE(Jj
DPNR=SIMJ*(FPRI-FPRT)+CIMJ*(APRI-APRT)
PPR=CSE(d)*( ZMI*FPRI-YMI*APR I-ZMI-ZMT*FPRT+YMT*APR T+ZMT ‘}+SNE
(J)*(YMI+FPRI+ZMI*APRI-YMI-YMT*FPRT-ZMT*APRT+YMT)
DPNL=SIPJ*(FPLT-FPLI )+CIPJ*(APLT-APLI )
PPL=CSE(J)*( ZPT*FPLT-YMT*APLT-ZPT-ZPI*FPLI+YMI*APL ,I+ZPI)+SNE
(J)*(YMI*FPLI+ZP I*APLI+YMT-YMT*FPLT-ZPT*APLT-YMI )
DCNR=SIPJ*(FCRI-FCRT)+CIPJ*(ACRI-ACRT)
PCR=CSE(U)*(ZMI*FCRI-YPI+ACRI-ZMl-ZMT*PC~T+YpT*ACR T+ZMT ‘)+SNE
(J)*(YPT*FCRT+ZMT*ACRT+YP I-YP1*F(
DCNL=SIMJ*(FCLT-FCLI I+C..._ -..__. nuL& #
PCL=CSE(J)*(ZPT*FCLT-YPT*ACLT-ZP”. T-ZPI*FCLI+YP
_._ ___ .. I*ACL
_ I+ZPI .)+SNE
(J)*(YPT*FCLT+ZPT*ACLT-YPT-YP I*FCLI-ZPI*ACLI+YP 1}
BL13GP(J,I)=DPNR+DPNL-DCNR-DCNL
YLC@P(J, I)=PPR+PPL-PCR-PCL
BLOGM(J, I)=DPNR-DPNL-DCNR+DCNL
YLUGM(J, I)=PPR-PPL-PCR+PCL
IF (J.EQ.NON) CO TO 150
FPRI=FPRT” ‘- ‘- ‘- ‘--
FPLI=FPLT
FCRI=FCRT
FCLI=FCLT
APRI=APRT
APLI=APLT
ACRI=ACRT
~4~Ijfi~LT
YMI:YMT
ZPI=ZPT
YPI=YPT
150 COhlTINUE
160 ;~~~~~UE
c
END
SUBROUTINE WINE (K)
c
TWO-DIMENSIONAL t-lYDRCIDYNAMIC
CALCULATION FOR NON-ZERO FREQUENCIES.
2:,
C6
, THIS SUBROUTINE IS CALLED FOR EACH STATI~hl AND ALL NON-ZERO
C&! FREQUENCIES WHEN THE HYDRODYNAMIC COEFFICIENTS ARE BEING
C6 GENERATED.
CA
C5
C5 INPUT AND OUTPUT LOGICAL UNITS..
COMMON/10/INPUT, OUTPUT,BIF, OFF,CCIF
INTEGER OUTPUT, BIF,OFF,COF
C5
C5
—-
CgMMON/GEOMETRY/MSTA, LPTS(25),YOFF (25,25),NAFT1 XAFT(25),
* YAFT(25}JNFWD, XFMD(25),YFWD(25) 1XOFF(25),
* “ ZOFF(25,25) ,XFPERP, XAPERP,SHIPL, SHIPB,SHIPT,
* YI(21,2S), ZWL(25),UL(25), INPTS(25)JXWLF, XWLA, XXF,
* XXAITAN,NCIN,NOEJNWL,CRI XXFWD, XXSTA, XXAFT, DX~DXl,
* DX2, Z2(21), Y2(21)1ZZ(20), YY(20), SNE(20),CSE(2Q)J
* DEL(20),ROL (20),ADJUST, WMAX, YtlAX,ZMAXI AREA#VERT
COMMON // HAH, SAS, RAR,CCA,HVH,SVS, RVR, CCV,RH021RSIGIWN, W1,W21ERR, Z
l~~~;~~,~JT
HAC)(24,8),BLOGP (20,20),YLCIGP(20,20),BLOGM(20
l,20),YLOGM(20,gO), CONH(40),CONR(40, 2), CROLL(40, 40)ICHEAV(40, 40),HE
2AVI(20120), HEAVT(20,20)1 ROLLI(20,20), RULLT(20120)1 EJIICZRI,CZLI, S2
3RI, SZLI, RARZ,RALI,RBRI, RBLI, CLI,CRI,SLI,SRI, IIIPESO#NI
DO 110 I=l,NDN
(1)
CONR(NI,2)=ROL(I)
ZRI=Wh!*ZZ(I)
YRI=-WN*(YY( I)+Y2(
EdT=EXP(-YRI )
EJ I=EJT
CALL ROMEO (CZRI,S RARI,RERI,CR 1:SRI)
CZLI=CZRI
SZLI=SZRI
RALI=RARI
RBLI=RBRI
CLI=CRI
SLI=SRI
CALL WOMEN CI,BLUGP(I, I),YLOGP(l, I BLIIGM(l,I),YLOGM(l, II,
1 (1,I),CROLL(l, I),HEAVI (1,I),HEAVT( ;: I),RULLI (1,I),ROLLT(l,
llQ- COMTINUE
IF-”(liWL;EQ.Q) GO TO 130
I=NOE-NWL+l 1
Da 120 I=I,NOE
CONH(I)=O. O
CONR(I, 1)=0.0
CONR(I,2)=0. Q
120 CONTINUE
130 IT=JULIET(l ,CHEAV, CONH )
IF (IT.EQ.0) (XI Tn 140
WRITE (OUTPUTji8dj liiWN,X XSTA
IF (IT. NE.1} GB TCl 150
140 IT=JULIET(2, CROLL, CONR)
IF (IT.EQ.0) GO TO 160
WRITE (OUTPUT, 190) K,WN, XXSTA
IF (IT.EQ.1) GO TO IAO
i50 WRITE
--mm d (OUTPUT,200)
●
c
160 HAH=O. O
I
SAS=O* o
RAR=O. O 1I
CCA=O. o
HVH=O. O
Svs=o. o
RVR=O. O
Ccv=o. o
SLIGHT INCREASE IN SPEED IF THE FINAL INTEGRATION AVOIDS THE
INTERIOR SURFACE SEGMENTS.. I
NI = NON - NWL
DO *+* I=l,NI I
1
DO 170 I=ltNON
CALL SQNG (HEAVI( l,I),HEAVT(l, I),ROLLI(l, I),R~LLT(l)I )/1)
CONTINUE
FORCE COEFFICIENTS.
FORCE IS THAT WHICH MUST BE APPLIED TO THE CYLINDER (PER UNIT
LENGTH) TO CAUSE SINUSOIDAL OSCILLATIONS AT THE GIVEN FREQUENCY
AND UNIT AMPLITUDE.
COEFFICIENTS ARE THE PARTIAL DERIVATIVES OF THE FORCE BY THE
ACCELERATION OR VELOCITY COMPONENT OF THE GIVEN MOTION.
ACCELERATION TERMS..
HAH=HAH*RH02
SAS=SAS*RH02
RAR=RAR*RH02
ccA=ccA*RHo2/2. o
VELOCITY TERMS..
HVH=HVH*RSIG
SVS=SVS*RSIG
RVR=RVR*RSIG
ccv=ccv*RsIG/2. o
*- RETURN
—
’180 FORHAT (36H *** HEAVE MATRIX, FREQUENCY INDEX =,13, i5H, WAVE NWMBE
lR =,iPE13.5/31H *** COEFFS. F13R STATION AT X =,0PF13.5)
190 FORtlAT (40H *** SWAY-ROLL MATRIX, FREQUENCY INDEX =, 13,15H, WAVE N
lUMi3Ef?=,iPE13.5/31Fl *** COEFFS. FOR STATIUN AT X =,0PF13.5)
200 FORMAT (26H *** EXECUTIQN TERMINATED. )
c
END
SUBROUTINE WOMEN
1 (1/BLaGP,YLOGP, BLOGM,YLOGM, CHI,CRI,HII, HT1,RII,RTI)
c
REAL BL~GP(l ),BLOGM(l),YLOGP( l),YLOGM(I ),CHI(l),HII (I},RII(l),CRI(
I1),HTI(l), RTI(l)
C5
COMMON ‘GEOMETRY/MSTA,LPTS(25), Y13FF(25,25),NAFT, XAFT(25),
* YAFT(25), NFWD, XFUD(25), YFWD(25), XOFF(25),
* ZOFF(25,25), XFPERP, XAPERP, SHIPL, SHIPB, SHIPT,
* Y1(21,25), ZWL(25),WL(2S) I INPTS(251, XWLF, XWLA, XXFI
* XXA,TAN,NON, NQE,NWL,CR, XXFWD, XXSTA, XXAFT, DX,DX1,
* DX2, Z2(21), Y2(21), ZZ(20), YY(20), SNE(20)ICSE<20)J
* DEL(20),ROL (20),ADJUST, WPIAX,YMAX,ZMAX, AREA, VERT
COMMON // HA1,SA1,RAIJCA1,HV1,SV1, RVI, CV1,RH021RSIG)WN, W ERR ,x
i;;~~~;, ~JT (
HAO(24, 8}, BP(20,20), YP(20, 20), BM(20,20), YM(2
10#20)AONH(40):CONR(40, 2), CRDLL(40, 40),CHEAV(40, 40)~HEAVI(20,20), H ‘;
2EAVT(20, 20),ROLLI(20, 20), RClLLT(20,20),EJI,CZRI, CZLI, SZRI,SZLI,RARI
31RALI,RBRI, RBLI,CLI,CRQ, SLI#SRI :;
DATA TPIf6.283185307i7?S01
YYI=YY(I)
zzi=zziij
SI=SNE(I)
Cl=CSE(I)
Da 110 J=l,NON
[ XRT=WN*(ZZI-Z2(J+1 ))
YRT=-MN*{YYI+Y2 (J+l))
EJT=EXP(-YRT )
CALL ROMEO (CZRT,SZRT, RART, RBRT, CRT, SRT)
c XRT=WN*(ZZI+Z2(J+1 ))
CALL ROMEO (CZLT,SZLT, RALT, R13LT,CLT, SLT )
CJ--SE(J)
SJ=SNE(J}
(. SSS=SI*Cd
TTT=SJ*CI
UUU=CI*Cd
VVV=SI*SJ
CIPJ=UUU-VVV
SIPJ=SSSTTT
SII’’IJ=SSS-TTT
CZMJ=UUU+VVV
SSS=SIMJ*(CLI-CLT)-CIMJ* (SLI-SLT)
TTT=SIPJ*(CRQ-CRT)-CLPJ*(SRI-SRT)
UUU=SJ*(RALI-RALT)+CJ*(RBLT-RBLI )
VVV=SJ*(RARI-RART)+CJ* (RBRI-RBRT)
WWW=EJT*(SZRT*CIPJ-CZRT*SIPJ)-EJI*(SZRI*CIPJ-CZRI*SIPJ)
RRR=EJT*(SZLT*C IMJ-CZLT*SIMJ )-EJI*(SZLI*C IMJ-CZLI*SIMJ)
QQQ=EUI*(SZRI*CJ-CZR I*SU)-EJT*(SZRT*CJ-CZRT*SJ)
PPP=EJI*(SZLI *CJ+CZLI*SJ )-EJT*(SZLT*CJ+C ZLT*SJ)
CHI(J)=BLOGP (d)+2. O*(TTT-SSS)
CRI(J)=BLOGM(J)+2. 9*(TTT+SSS)
HII(J}=YLOGP (J)+UU*(VVV+UUU )
RII(J)=YLOGM (J)+UU*(VVV-UUU )
c CHN(NJ) = Cl-lI(J)
c CRN(NJ) = CRI(J)
NJ=N~N+J
cRI”(NJ)=TPI+(www-RRR)
CRI(NJ)=TPI*(WWW+RRR )
HTI(J)=W1*(QQQ-PPP)
RTI(J)=WI*(QQG+PPP )
CHM(J) = -CHI(NJ)
CRN(J) = -CRI(NJ)
IF (J.EQ.NON) GO Ttl 110
EJ I=EJT
CRQ=CRT
SRI=SRT
CLI=CLT
SLI=SLT <
RAR I=RART
RBR I=RBRT
RAL I=RALT
RBL,:=:;~;
,... CZR
SZR I%ZRT
CZL I=CZLT
,---
/
L.
,.
SZLI=SZLT
110 CCINTINUE ..
RETURN
c ~
END i
SUBROUTINE SaNG (HAI,HOT,RAI,ROT, I) I
c
DIMENSION HAI(1), HOT(1), RAI(l), R~T(l), PP(6) I
C5 1
COMMON/GEOMETRY/MSTA, LPTS(25),YOFF (25,25),NAFT, XAFT(25), 1
* YAFT{25),NFWD, XFWD(25),YFWD(25) ,XOFF(25),
* ZQFF(25,25), XFPERP, XAPERP,SHIPL, SHIPB,SHIPT,
* Yi(21J25), ZWL(25),WL(25), INPTS(25), XWLF, XWLA#XXFI
* XXA,TAN,NON, NCIE,NWL,CR,XXFWD, XXSTA, XXAFT,DX,DXIJ
* DX2, Z2(21), Y2(21), ZZ(20), YY(20)I SNE(20),CSE(20),
+ DEL(20),ROL (20),ADJUST, WPIAX,YMAX,ZMAX, AREA,VERT
COMMON // HAH, SAS, RAR,CCA,HVH,SVS, RVR, CCV, Rti02,RSIG,WN,WlJW2,ERR,Z
l~~k~:~I~4T
HAO(24,S),BL~GP (20,20),YLOGP (20,20),BL13GM(20
lbd?~)6Y~OQM(20,~O),CONH(40) ,CONR(40,2)
= .
PAS=O* o
PAR=O. O
PVH=O. O
Pvs=o. o
PVR=9. O
DO ~~ON~~~LNON
PA~=PAH+CONH (J}*HOT(J)-CONH(NJ)*HAI (J)
PAS=PAS+CONR (J, l)*ROT(J)-CUNR(NJ, lI*RAI(J)
PAR=PAR+CONR (J,2)*ROT(J)-CONR(NJ, 2)*RAI(J)
PVH=PVH+CONH (J)*iiAI(J)+CONH(NJ)*HOT(J)
PVS=PVS+CONR (J, l)*RAI(J)+CONR(NJ, l)*ROT(J)
PVF?=PVR+CUNR(J,2)*RAI(J)+CDNR(NJ, 2}*ROT(J}
110 CONTINUE
DDD=DEL(I)
DCI=CSE(I)*DDD
DSI=-SNE(I)*DDD
DFR=ROL(I)*DDD
C&
C6 THE PRESSURES ON THIS SEGMENT OF THE CYLINDER MAY BE CALCULATED.
FL
Ez
C&
THE PRESSURES IN PHASE WITH THE SINUSOIDAL DISPLACEMENT ARE. .
HEAVE :: ~~~ = PAH*RH~*ESIG*ES IG
;! SWAY = PAS*RHO*ESIG*ESIG
ROLL -- PAR = PAR*RHO*ESIG*ESIG
C6
C6 OF COURSE THE ACCELERATION COMPONENTS OF THE FORCE ARE EQUAL
C6
— IN MAGNITUDE TO THE ABOVE, BUT HAVE THE OPPOSITE SIGN.
C6
C6 THE PRESSURES IN PHASE WITI+ THE SINUSOI13AL VELOCITY ARE..
C6
CA HEAVE ~: ~~~ = PVH*RHO*ESIG*ESIG
C6 SWAY = PVS*RHO*ESIG*ESIG
C6 ROLL -- PVR = PVR*RHO*ESIG*ESIG
C&
C&
C6 INTEGRATION T9 ~ETAIN FORCE ACCELERATI~N COEFFICIENTS. .
C6
HAH=HAH+PAH*DC I
SAS=SAS+PAS*DSI
RAR=RAR+PAR*Df=R
CCA=PAR*DSI+PAS*DFR+CCA
INTEGRATION TO ~BTAIN F~RCE VELOCITY COEFFICIENTS. .
HVH=HVH+PVH*DC I
SVS=SVS+PVS*DS I
RVR=RVR+PVR*DFR
CCV=PVR*DSI+PVS*DFR +CCV
AT THIS POINT THE PRESSURES REQUIRE THE MODIFICATIONS NOTED
ABOVE TO GIVE THE DIMENSIONAL VALUES.
THE INTEGRATIONS OF THE PRESSURES ARE COMPLETED ELSEWHERE
IhlTHE PROGRAM TO GIVE DIMENSIONAL FORCE COEFFICIENTS.
RETURN
END
SUBROUTINE ROMEO (C,S,RA,RB,CIN,SON)
EXPONENTIAL INTEGRAL WITH COMPLEX ARGUMENT.
~HE N?~UME~T IS-SUPPLIED THROUGH BLANK COMMON AS THE VARIABLES
.
PAR~METERS AND VARIABLES. .
‘- REAL PART DF ARGUMENT
Y ‘- IMAGINARY PART OF ARGUMENT
E — EXP( -Y )
c -- Cos( x )
s -- SIN( X >
CIN -- F?E&L RESULT
SCIN -- IMAGINARY RESULT
RA ‘- ALOG( X**2 + Y**2 )/2.0 - CIN
RB -- ATAN( X/Y ) - PI/2.O + SON
.
IF (R.LT.1. ) GO TO 130
TEST=. l*TEST
IF (R.LT.2. ) GO TO 130
TEST=. l*TEST
IF (R.LT.4. ) GO TO 130
TEST=. l*TEST
130 SUMC=GAMMA+AL+Y
SUMS=AT+X
TC=Y
Ts=x
Cox=l.
DO ~~OT~=2,501
FAET=cox/FLoAT(K}**2
CUX=K
-—... .
TC=FACT*(Y*TC-X*TS )
TS=FACT*{Y*TS+ X*TO)
SUMC=SUMC+TC
SUMS=SUMS+TS
IF ((ABS(TC)+ABS(TS) }.LE. TEST) GO TO 150
140 CONTINUE
WRITE (OUTPUT, 190) XXSTA, X,Y,WN
STOP 12
150 CIhl=E*(C*SUMC+S*SUMS )
S~N=E*(S*SUMC-C*SUMS )
c
190 FORMAT {55’HO+*+ NUN-CONVERGENT EXPONENTIAL INTEGRAL FOR STATION AT
1 X =,F13.5/22H *** PARAMETERS -- X =, 1PE13. 5,51-1,Y =,E13.3,15H, WA
2VE NUMBER =1Ei3.5)
c
END
FUNCTION JULIET (NI,A,B)
c
c.. SOLVES SIMULTANEOUS LINEAR EGUATIOhlSBY GAUSSIAN REDUCTION.
FOR THE SPECIALIZED MATRICES IN THE SUBROUTINE WINE.
:““ REAL A(40,1),B(40,1)
C2
C2 THE A MATRIX MUST BE DIMENSIONED WITH EXACTLY 40 ROWS AND
C2 AT LEAST 40 COLUMNS. THE B MATRIX MUST ALSO BE DIMENSIONED
C2 WITH EXACTLY 40 ROWS AND AT LEAST N1 COLUMNS.
C2
C5
C5 INPUT AND OUTPUT LOGICAL UNITS..
COMMON/IQ/INPUT, 0UTPUT,31F, OFF,COF
INTEGER OUTPUT, BIF,OFF,COF
::
COMMON/ ‘GEOMETRY/MSTA, LPTS(25),YOFF(25J 2!5)1NAFT,XAFT(25)J
* YAFT(25), NFWD, XFWD(25),YFWD(25) ,XOFF(25),
* ZOFF(25,25), XFPERP, XAPERP,SHIPL, SHIPB,SHIPT,
* Y1(21,25), ZWL(25),WL(25), INPTS(25), XMLF, XWLA, XXF,
* XXAITAN,NDN) NOE, NWL,CR, XXFWD/ XXSTA, XXAFT/DXJDXIJ
* DX2, Z2(211, Y2(21), ZZ(20) ,YY(20), SNE(20),CSE(20),
* DEL(20),RDL(20) ,ADJUST,WMAX, YMAX, ZMAX,AREA, VERT
COMMON // HAl, SAl, RAl,CAl,HVi, SV1, RV1, CV1,RI-I02,RSIG,WN,WI,W2,ERR, Z
IRI,YRI, EJT
c
c
CCtMMON / \ HAO(24, H), BLOGP (20,20, 4),CUNH(401 3) ICROLL(40
1,40,2), HEAVI(20, 20,4), EJIj CZRI, CZLI, SZRI, SZLI, RARI, RALI, RBRI, RBLI,
m 2CLI, CRQ, SLI, SRI, 2(40)
b
N2=NaE/2
D=l. o
c
CnMPLETE THE MATRIX A.
:“ “
Da- :2:20J:1,N2
D; ~lfi201;l,N2
A~I,Ll =-A(K, J)
A(K,L)=A(I,J)
110 CONTINUE
* 120 CONTINUE
.-
c .. ZERO ROW J TO RIGHT OF DIAGONAL.’
c
170
~0-20b K=Jl,NtlE
IF (A(J,K). EQ.O.0) G~ TO 200
W=-V*A(J,K) i
DO 180 L=JI,NOE
A{L, K)=W*A(L, J)+A(L,K)
180 CONTINUE
DO 190 L=l,N1
13(K,L)=W*B(J, L)+B(K,L)
1‘?0 CONTINUE
200 CONTINUE
210 CONTINUE
D=A(NCIE,NOE)*D
IF (A(NOE) NOE). EQ.O.0) GO TO 260
F Z(NDE)=l.O/A(N(lE,NOE)
~. . OBTAIN SOLUTION BY BACK SUBSTITUTION.
L
DO 220 L=l,N1
B(NOE,L)=Z(NOE)*B(NOE, L]
220 CONTINUE
Do 55fi#=~,NMl
= -
dl=J+l
DO fi4~ ~=l,Nl
D= 230 I=dl,NOE
W=A(I,J)*B(I,LI+W
230 CONTINUE
B(di L)=(B(J, L)-W)+Z(J)
240 CONTINUE
250 CONTINUE
* IF (ABS(0).LT. ERR) GO TO 270
L
JULIET=O
c
NO PROBLEMS DURRING THIS EXECUTION.
$“ “
RETURN
;. b SINGULAR MATRIX--MAXIMUM ELEMENT IN R~W Is
L 260 JULIET=3
WRITE (OUTPUT,280)
RETURN
c
:.. ABSOLUTE DETERMINANT VALUE LESS THAN ERROR VALUE..
L
270 JULIET=l
bJ~;4~N(OUTPUT,290) D,ERR
c
2S0 FORMAT (20HO*** SINGULAR MATRIX)
290F~~M~~ (18HO*** DETERMINANT =, 1PE13.5,24H, ERROR SPECIFICATION =,
c
END
FUNCTION LNEQT(M, N,N1, A,B,ERROR ,Z)
c
c .. SCILVES SI~t4~T#NED~WRLINEAR EQUATICINS BY GAUS~IAN REDUCTION.
SOLVES = X , AND STORES THE VECTOR(S) IN B ,
:“ ‘
REAL A(M,M),13(M,M) ,Z(M),ERRDR ,RMAX,RNEXT,W
:5
C5 INPUT AND DUTPUT LOGICAL UNITS..
COtlPIOIWIIJ/INPUT,OUTPUT,EIF,Ol=F, COF
INTEGER CIUTPUT, 131F,0FF,COF
C5
c
D=l. o
hlMl=N- 1
IF (NNI.EQ.0) CO TO 210
DO ~~OJ$~l,NMl
=
c
c.. FIND ELEMENT OF CQL J, ROWS J-N, WHICH HAS MAX ABSOLUTE VALUE.
c
LMAX=J
RMAX=ABS(A(J, J))
DO 110 K41,N
RNEXT=AHS(A (K,J))
IF (RMAX.GE. RNEXT) GO TO 110
RMAX=RNEXT
LMAX=K
110 CONTINUE
IF (LMAX.NE. J) GO TO 120
c
c.. MAX ELEMENT IN COLUMN IS Ghl DIAGONAL
c
IF (A(J,J)) 150,270,150
c
:.. MAX ELEMENT IS NOT ON DIAGONAL. EXCHANGE ROWS J ANI) LI’IAX.
L 120
A(LMAX,L)=W
130 CONTINUE
Do ~4:(oL:~\Nl
B~J,L)=B(LMA X,L)
B(LMAX, L)=W
140 COFITI1’4UE ““
D=-D
c
c.. ZERO COLUMN J 13ELOW THE DIAGONAL.
c
150 D=A(J,J)*D
Z(J)=l.O/A(J,J)
DO 190 K=JI,N
IF (A(K,J)) 1A0,190,160
160 W=-Z(J)*A(K,J)
DO 170 L=J1,N
A(K, L)=W*A(J, L)+A(K,L)
170 CONTINUE
DO 180 L=l,hll
B(K, L)=W*B(J, L)+B(K, L)
180 CONTINUE
190 CDNTINUE
200 CONTINUE
210 D=A(N/N)+D
IF (A(N,N). EQ.O.0) GO TO 270
Z(hl)=l./A(N,N1
c
:.. OBTAIN SOLUTION BY BACK SUBSTITUTION.
DO 220 L=l,N1
B(N, L)=Z(N)*13(N,L)
CONTINUE
IF (NMI.EQ.0) GO TO 260
DO 250 K=l,NM1
J=N-K
Ul=d+l
DO ~4~ L=l,NI
D= 230 I=J1,N
W=A(J, I)*B(I,L)+W
230 CONTINUE
13(J,L)=(B(J, L)-W)*Z(J)
240 CONTINUE
250 CONTINUE
260 LNEQT=O
IF (ABS(D). CE. ERROR) RETURN
LNEQT=l
WRITE (OUTPUT,280) D,ERROR
RETURN
;. . SINGULAR MATRIX--MAXIMUM ELEMENT IN COLUMN IS ZERO. ~
b 270 LNEQT=3
WRITE (OUTPUT,2901
RETURN
c
2801F~~M~~ (18HO*** DETERMINANT =,1PE13. 5,24H, ERR~R SPECIFICATION =/
290 FORMAT (20HO*** SINGULAR MATRIX)
c
END
PROGRAM HYDREX3
. . . . .. . . --------- ,., ,,.
-.
PROGRAM HYDREX3
c
CHARACTER*25 PANFIL, MATFIL
COMMON/BD/XPAN( 120), YPAN( 120), ZPAN( 120) t AREA( 120)~
* ST(120), ACN(120), ACNW(120), AN(120, 3),E(120),P(120, 6),
* PRFS(120), STOLD(120), PX(120,6)
COMMON/FS/AKZ(100, 100),SS(100, 100),CC(100j 100),
* DKX(lOO), DKY(lOO), AKX(IOO), AKY(1OO)
COMffON/BD2/xPT(i50), YPT(150), zPT(150)JWRF(150),
* WRFR(130),KK(150,4)
COMMON/A/NPAN, NPT,GEE,RHO, NKX,NKY,EYE, DT,TIfl,UFWD
DIMENSION PF(6),PB(6),PT(6)
COMMCIN/WAVEX/CIMEGA
COMHON/BP/BPRE5 (120),TPRES (120)
COMPLEX EYE
EYE=(O.0, 1.0)
c------- -.-----.------------.--___*_-____-_,.-____,______________
TYPE -
ACCE:P+ 4,PANFIL
TVDC -
#lIL=
ACCEPT 4JMATFIL
0PEN(UNIT=2, t=ILE=PANFIL,TYPE=’CILD’)
0PEN(UNIT=3, FILE=MATFIL, FDRPI=’UNFORMATTED “,TYPE=’NEW’ )
0PEN(UNIT=99, FILE=’X. DAT’, FURPl=’UNFORMATTED’, TYPE =8NEH
CALL EED \
CALL POTST
WRITE(6,6)
WRITE(6,7) J,AN(J, i),AN(J,2),AN(J; 3),
XPAN{J);”YP~N(~);”~P~N~J~,AREA(J)
CONTINUE
STOP
FC3RHAT(’ Input name of IPANZ file >’$)
FORMAT(’ Input name, of [MATI file >’$)
F~RMAT(A)
FORMAT( ‘J’,7X, ‘NX’,9X, ‘NY’,9XI ‘NZ’,9X, ‘XP’,9X,
‘YP’,9X, ‘ZP’,9X, ‘AREA’)
FC)RKAT(lX,15,7Fil. 4)
END ,. r
-
SUBROUTINE PREP(J)
(.”
_ *
C~MHDhl/BD/XPAN(120),YPAN(120), ZPAhl(120)#AREA(120)1 ST(120)~
ACN(120)I ACNW(120)1AN( 120J3), E(120),P(120,6), PRFS(120),
* STOLD(120), PX(120,6)
CQMMON/BD2/XPT{150), YPT(150), ZPT(150), WRF(150)I WRFR(150)~
* KK(150/4)
;Cl~M~N:ARE/RR(SOO)/XZJ(200 ),YXJ(20(I),ZYJ(20Q)
,.
YXT%:OO
XZT=O.00
J4=J*4
JT=4
IF(KK(J,4). EG.0) JT=3
(: Di3 20 JJ=I,JT
J4=J4+ 1
J2=I
IF(UJ.LT. JT) J2=JJ+1
{.. KF=KK(~,dU)
KG=KK(J,J2)
AG=XPT(KG)
BG=YPT(KG}
CG=ZPT(KG)
AF=XPT(KF}
Ei==YPT(KF)
CF=ZPT(KF)
R=SQRT( (AF-AG)**2+(BF-BG )**2+( CF–CG
XT=AF-XPAN(J)
YT=BF-YPAN(J 1
ZT=CF-ZPAN(J)
ANX=(AF-AQ)/R
ANY=(BF-BG)/R
ANZ=(CF-CG) /R
DOT=ANX*XT+ANY*YT+ANZ*ZT
XT=XT-IN3T*ANX
YT=YT-DOT*ANY
ZT=ZT-DCIT*ANZ
ZYT=ZYT+ZT*ANY-ANZ*YT
YXT=YXT+YT*ANX-ANY*XT
XZT=XZT+XT*ANZ-ANX*ZT
RR(J4)=R
20 CONTINUE
XZJ(J)=SIGN(AN(J, 2), XZT)
YXJ(J)=SIGN(AN(J13), YXT)
ZYJ(J)=SIGN(AN(J, l),ZYT)
RETURN
FN13
DO 500 1=113
WRITE(3) (Ahl(J/I)~J=l, NPAN}
500 CONTINUE
WRITE(3) (XPAN(J), d=i, NPAN)
WRITE(3I (YPAN(U), J=l, NPAN)
wR1TE(3) (ZP4N(J)td=Il NPAN)
WRITE(3I (AREA(J), J=I,NPAN)
DO 309 dL=l,NPAN ~
JLJ=JL
CALL GE(XF,YF,ZF,JLU,VX,VYJ VZJVXR !,VYR,VZR,JJJ )
VX=VX+VXR
VY=VY+VYR
VZ=VZ+VZR
c COMPUTE NORMAL VELOCITY AT PANEL J DUE TO PANEL JL
E(JL)=AX*VX+AY*VY+AZ*VZ
C INC REMENT PX MATIRX
“FRl=-iiREki(J
)*vx*AN(dJ i)
FR2=-AREA(J )*VX*AN(d,2 )
FR3=-AREA(J)*VX*AN(J, 3)
PX(JL, I)=PX(UL, l)+FR1
Px(dL,2)=Px(JL# 2)+FR2
Px(JL#3)=Px(JL, 3)+FR3
PX(JL,4)=PX (JL,4)+YF*FR3-ZF*FR2
PX(JL,5)=PX(JL, 51+ZF*FR1-XF*FR3
PX(JL,&)=PX (JL,6)+XF*FR2-YF*FR1
309 CONTINUE
WRITE(99) (E(JL),JL=l,NPAN)
308 CONTINUE
DO 2424 K=I,&
2424 WRITE(3) (PX(UL, K),JL=l,NPAN)
CL13SE (UNIT=99)
c INVERT E MATRIX
CALL MATIN(NPAN)
RETURhl
ENb-”-”-
b
SUBROUTINE MAITIN(NPAN)
C INVERST MATRIX
DIMENSION E(i20,120)~ BB(120)1EST( 120)
~PEN(UMIT=991 FILE=’SCR’J FORff=’UNFORMATTED ‘~TYPE = ‘OLD
DO 120 U=l,N?AN
i 120 READ(W) (E(J#I), I=i,NPAN)
DO 130 J=I, NPAN
DO 11 MM=IJNPAN
EST{MM)=O.00
11
- - BE(MM)=O.00
BB(J}=l. O
EST(J}=l.O/E(J,J)
DO 17 NIT=1,6
DO 17 K=lJNPAN
13=BB(K)
DO 15 I=lJNPAN
15 IF(I. NE.K) B=B-E(K# T(I)
EST(K)=B/E(K, K)
L
SUBROUTINE GE{ XF, YF, ZF,J, Vl, V2, V3, VIR, V2R#V3R, NBT)
COMHON/13D/XPAN( 120)1 YPAN( 120), ZPAN{ 120)#AREA( 120)JST(Z20)1
~ ACN(i20)t ACNW(120)JAN( 120J3)j E(120)tP(120~6) IFRFS(120)J
STOLD(120), PX(12016)
COMMON/BD2/XPT{150)# YPT(150), ZPT(150)~WRF(150)J MRFR(150)
* JKK(150J4)
“COMMON/ARE/RR (500)j XZJ{200) ,YXJ(200)1ZYJ(200)
DIMENSION XSA(3~4)J XFA(3)~XSAR(3J 4)
J4=J*4
Vl=o. 00
V2=0. 00
V3=0. 00
VIR=O.00
V2R=0.00
V3R=0.00
XNd=AN(JJl)
YNJ=AN(JJ2)
ZNJ=AN{JJ3)
NS 1DE=4
IF(KKCJ,4). EQ.0) NSIDE=3
J32 ?O UJ=I,NSIDE
lF?JJ. LT.NSIDE) J2=JJ+1
J4=d4+ 1
KF=KK(J#JJ~ .
AF=XPT{KF)
13F=YPT(KF)
CF=ZPTCKF)
R=RR(J4)
KGsKK(JJJ2>
ANX=(AF-XPT(KG) }/R
AI’JY=(HF-YPT(KGJ l/R
~N~;(;&-ZPT(KG )1/R
E~BF=YF
C=CF-ZF
TX=XZJ{J)*ANZ-YXJ(J)*ANY
TY=YXJ{J)*ANX-ZYJ (U)*ANZ
TZ=ZYJ(J)*ANY-XZJ(J)*ANX
Exi=A*ANx+B*ANY+c*4Nz F
CALL @J(EXl, R, FF#MRF(KF)JWRF(KG) )
Vl=Vi-I-FF*TX
V2=V2+FF*TY
V3=V3+FF*TZ
XSA(l,JJ) =-A/WRF(KF)
XSA(2, JJ) =-E/MRF(KF)
XSA(3,JJ) =-c/WRF(KF)
EXIR=EXI+2. O*ZF*ANZ
CR=-CF-ZF
CALL GCl(EXiR,R,FR#URFR(KF), WRFR{KG) )
VIR=VIR-FR*TX
V2R=V2R-FR*TY
V3R=V3R+FR*TZ
XSAR(l,JJ) =-A/WRFR(KF)
XSAR(2, JJ) =-3/WRFR(KF)
XSAR(3JJJ)=CR/WRFR (KF)
20 CONTINUE.
G=6. 283185307
IF(J. EQ.NBT) CO TO 84
CALL SOLII)(XSA,G,NSIDEI
AGG=A*XNJ+B*YhlJ+C* ZNJ
Q=-SIGN(GJAGG)
84 CONTINUE
CALL SOLID(XSARJ GR#NSIDE)
AGGR=A*XNJ+B*YNJ-CR*ZNJ
GR=SIGN(GR, AGGR)
85 CONTINUE
7371 FORMAT{’ G,GR=’J 2F15.5)
V1=V1+XNJ*G
V2=V2+YNJ*G
V3=V3+ZNJ*G
VIR=VIR+XNJ*GR
V2R=V2R+YNJ*GR
V3R=V3R-ZNJ*GR
5590 FORMAT(’ V1JV2JV3=’13F15.5)
5571 FORMAT(’ VlR#V2R# V3R=’13F15.5)
~~~URN
( c
SUBROUTINE POTST
COMMON/BD/XPAN( i20), YPAN(i20) ,ZPAN(1201,AREA( 120)1ST(
ACN(120), ACNW(120},AN(120, 3), E(120), P(120,6),PRFS(120
( STOLD(120), PX(120,6)
COMMON/BD2/XPT(15Q), YPT(150), ZPT(150), WRF(150),WRFR(I
KK(150,4}
COMMOhl/A!NPAhl,NPT,GEE,RHO, hlKX,hlKY,EYE, 13T,TIM,UFWD
(. CCttlPLEXA,B,EYE
DIMENSION XPSL(3, 4), XPSLR{3, 4),PEB{120, i20)
COMMQhl/PTST/ARE4 (200,4),X4(200, 4),Y4(200,4 1,24(200,4)
.. * ,SEL(200,4)
.——- .-.
(, DO 1500 d=l,NPAhl
ARE4(J,4)=-I. O
JT=4
IF(KK(J,4). EQ.0) JT=3
/“
I DO 1500 Jd=l,JT
u2=i
IF(JJ.LT. JT) J2=JJ+1
,,
KF=KK(J,JJ)
(... KG=KK(J/J2j
x4(J, dd)=(xPT(KF)+xPT(KG)+xPAN (J))/3.O
Y4(J, JJ)=(YPT(KF)+YPT(KG)+YPAN (J))/3.O
~ Z4(J, JU)=(ZPT(KF)+ZPT(KG)+ZPAN (J))/3.O
AF=XPT(KFI-XPAN(J)
EF=YPT(KF)-YPAN(J)
CF=ZPT{KF)-ZPAN(J)
AG=XPT(KG)-XPAN(J)
BG=YPT(KG)-YPAN(J)
CG=ZPT{KG)-ZPAN(J)
cALL sGLF(AF, BP;cF,AG,BG,cG, FEE)
SEL(J, JJ)=FEE
(. CR=AF*EG-BF*AG
AR=BF*CG-CF+BG
BR=CF*AG-AF*CG
;,,,: ARE4(J,JJ)=0. 5*SQRT(AR*AR+BR*BR+CR*CR )
1300 CUNTINUE
DO 127 NJ=l,NPAN
DO 1277 MJ=I,NPAN I
1277 PBB(NJ,MJ)=O. 00
i’ P(NJ, 1)=0.00
P(NJ,2)=0.00
P(NJ,3)=0.00
P(NJ,4)=0.00
,“ P(Nd,5)=0.00
P(NJ,6}=0.00
Do 128 NK=1,4
ARN=ARE4(NJ, NK)
1- IF(ARN. LT.O.0) GO TO 128
Pl=o. o
P2=0. o
P3=0. o
P4=0. o
P 5=0. o
P6=0. o
x=x4(NJtNK)
Y=Y4(NJ,NK)
Z=Z4(NJ,NK)
DO 138 MJ=l,NPAN
Do 13s MK=1,4
XF=X4(HJ,MK)
YF=Y4(MJ,MK )
ZF=Z4(MJ,MK)
ARM=ARE4(MJ, MK)
1’ IF(ARM. LT. O.00) GO TO 136
IF(NJ. NE.MJ) CO TO 140
IF(MK. NE.NK) GO TC) 140
FRA=SEL(MJ,MK )/ARM
GO TO 1380
COMMITTEE ON MARINE STRUCTURES
Commission on Engineering and Technical Systems
National Academy of Sciences - National Research Council
SSC-333 Advance Methods For Ship Motion And Wave Load Prediction
by William J. Walsh, Brian N. Leis, and J.Y. Yung, 1989