50
A Scatter Diagram Approach to the Selection of Design Currents for Prediction of Marine Riser Vortex-Induced Vibration by Jessica Mary Donnelly B.S., Ocean Engineering Massachusetts Institute of Technology, 2002 SUBMITTED TO THE DEPARTMENT OF OCEAN ENGINEERING IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF MASTER OF SCIENCE IN OCEAN ENGINEERING AT THE MASSACHUSETTS INSTITUTE OF TECHNOLOGY FEBRUARY 2004 2004 Massachusetts Institute of Technology All rights reserved Signature of Author Certified By Accepted By f Department ofi9ean Engineering January 16 th 2004 J. Kim Vandiver Professor of Ocean Engineering Thesis Supervisor Michael Triantafyllou Professor of Ocean Engineering Chair, Departmental Committee on Graduate Studies MASSACHUSETTS INSTITLUTE1 OF TECHNOLOGY SEP 0 1 2005 LIBRARIES

A Scatter Diagram Approach to the Selection of Design

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Scatter Diagram Approach to the Selection of Design

A Scatter Diagram Approach to the Selection of Design Currents forPrediction of Marine Riser Vortex-Induced Vibration

by

Jessica Mary Donnelly

B.S., Ocean EngineeringMassachusetts Institute of Technology, 2002

SUBMITTED TO THE DEPARTMENT OF OCEAN ENGINEERING IN PARTIALFULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF

MASTER OF SCIENCE IN OCEAN ENGINEERINGAT THE

MASSACHUSETTS INSTITUTE OF TECHNOLOGY

FEBRUARY 2004

2004 Massachusetts Institute of TechnologyAll rights reserved

Signature of Author

Certified By

Accepted By

f Department ofi9ean EngineeringJanuary 16 th 2004

J. Kim VandiverProfessor of Ocean Engineering

Thesis Supervisor

Michael TriantafyllouProfessor of Ocean Engineering

Chair, Departmental Committee on Graduate Studies

MASSACHUSETTS INSTITLUTE1OF TECHNOLOGY

SEP 0 1 2005

LIBRARIES

Page 2: A Scatter Diagram Approach to the Selection of Design

MITLibrariesDocument Services

Room 14-055177 Massachusetts AvenueCambridge, MA 02139Ph: 617.253.2800Email: [email protected]://Iibraries.mit.edu/docs

DISCLAIMER OF QUALITY

Due to the condition of the original material, there are unavoidableflaws in this reproduction. We have made every effort possible toprovide you with the best copy available. If you are dissatisfied withthis product and find it unusable, please contact Document Services assoon as possible.

Thank you.

The images contained in this document are ofthe best quality available.

Page 3: A Scatter Diagram Approach to the Selection of Design

A Scatter Diagram Approach to the Selection of Design Currents forPrediction of Marine Riser Vortex-Induced Vibration

by

Jessica Mary Donnelly

B.S., Ocean EngineeringMassachusetts Institute of Technology, 2002

Submitted to the Department of Ocean Engineeringon January 16th, 2004 in Partial Fulfillment of the Requirements

for the Degree of Master of Science in Ocean Engineering

ABSTRACT

This paper describes a scatter diagram approach for the classification of large numbers ofcurrent profiles for use in the prediction of riser fatigue damage due to vortex-inducedvibration. Scatter diagrams have long been used to characterize the probability of variouscombinations of wave height and period, which are then used to assess wave forces. Topredict VIV fatigue damage the designer needs to know which current profiles have thecombined property of long regions of relatively constant velocity and relatively highspeed. A sorting algorithm is proposed which searches every current profile for longregions of relatively constant flow speed. The probability of each length and speedcombination is assessed and the data is used to populate the bins of the scatter diagram.The designer need only select relatively few representative profiles for detailed VIVanalysis from those bins that would account for the most damage. The method is testedby making comparison to a brute force approach in which each of many thousands ofprofiles is evaluated for fatigue damage by running it in the SHEAR7 VIV responseprediction program.

This scatter diagram method could reduce the cost of risers by reducing the over-conservatism that is introduced by the common practice of using an envelope designcurrent profile. It also reduces the analysis time required for the brute force approach byallowing the designer to focus on only the most relevant profiles.

Thesis Supervisor: J. Kim VandiverTitle: Professor of Ocean Engineering

2

Page 4: A Scatter Diagram Approach to the Selection of Design

Biographical Note

Jessica Mary Donnelly received her B.S. from the MIT Department of OceanEngineering in 2002. She is the recipient of undergraduate scholarship awards fromNiagara Mohawk Power Corporation and the Society of Naval and Marine Engineers,and the winner of the 2002 Course 13 Student Engineering Association (13SEAs) Spiritof Ocean Engineering Undergraduate Award. She was named an MIT PresidentialFellow in 2003. Her first publication, "The Use of Velocity Profile Scatter Diagrams inthe Prediction of Vortex-Induced Vibration," co-authored by J. Kim Vandiver, wasincluded in the Proceedings of the 2003 Offshore Technology Conference, Houston, TX.

3

Page 5: A Scatter Diagram Approach to the Selection of Design

Acknowledgements

First, I would like to thank my advisor, J. Kim Vandiver, whose wonderful teaching inthe Ocean Engineering undergraduate program inspired me to study dynamics andvibration. I am grateful for his support and guidance, and for the opportunity to be thefirst person to develop an idea.

I would like to thank the Trinidad and Tobago Ministry of Energy and Energy Industries,ExxonMobil, BP and Shell for providing the data used in this report.

I also like to thank Alex Vandiver for the use of his Shear7-related perl scripts.

I am indebted to the MIT Presidential Fellowship program, whose financial supportallowed me to focus on my research during the first year of my graduate studies.

I would like to thank the faculty and staff of the MIT Department of Ocean Engineeringfor a fine and personal education.

I owe much of my success to the Bennett Park Montessori Center and the BuffaloSeminary of Buffalo, NY. The nurturing, freedom and opportunities they gave meallowed my education to be a wild adventure.

I am grateful to Jonathan Reed for his support and patience during the most stressfultimes.

I would like to thank my father and stepmother, Michael and Charmaine Donnelly, fortheir love and pride.

Above all, I am indebted to my mother, Christina Donnelly who encouraged withoutpushing, helped me find the Divine Order in any situation, and always believed that Icould achieve the impossible.

4

Page 6: A Scatter Diagram Approach to the Selection of Design

Table of Contents

ABSTRACT ................................................................................................................................................... 2

BIOGRAPH ICAL NO TE ............................................................................................................................. 3

ACKNO W LEDGEM ENTS .......................................................................................................................... 4

TABLE OF CONTEN TS .............................................................................................................................. 5

NOM ENCLATURE ...................................................................................................................................... 7

1 INTRODUCTIO N ...................................................................................................................................... 8

M O T IV A T IO N ............................................................................................................................................... 8PROPOSED SOLUTION ................................................................................................................................... 9

S c a tte r p lo t ............................................................................................................................................. 9P a ra m e te rs ............................................................................................................................................. 9

U T IL IT Y ..................................................................................................................................................... 10

11THEO RY ................................................................................................................................................. 11

OVERVIEW OF VIV THEORY AND TERMINOLOGY ...................................................................................... I I

Strouhal Relationship .......................................................................................................................... I IL o c k -in ................................................................................................................................................. 1 2Lock-in criterion: reduced velocity bandwidth .................................................................................... 12

IDENTIFYING THE POWER-IN REGION ......................................................................................................... 13

111PRO CEDURE ........................................................................................................................................ 16

A L G O R IT H M .............................................................................................................................................. 16V A L ID A T IO N .............................................................................................................................................. 18

P ro c ed u re ............................................................................................................................................ 1 8

R ise r M o d el .......................................................................................................................................... 1 9

D a ta S e t ............................................................................................................................................... 1 9

IV RESULTS AND ANALYSIS ................................................................................................................ 20

VALIDATION RESULTS .............................................................................................................................. 20

L en g th R a tio ........................................................................................................................................ 2 0

F re q u e n cy ............................................................................................................................................ 2 1

DAMAGE RATE DISTRIBUTION ................................................................................................................... 22CONSERVATISM ......................................................................................................................................... 22SCATTER DIAGRAM USE IN DESIGN ............................................................................................................ 23

V RECO M M ENDATIO NS ........................................................................................................................ 23

EXPLORE BIN SIZING .................................................................................................................................. 23

Absolute vs. scaleable bin boundaries ................................................................................................. 23

N u m b e r of b in s ..................................................................................................................................... 2 3

OUTLIER PATTERNS ................................................................................................................................... 24

M ULTI-MODE SITUATIONS ......................................................................................................................... 24

REFERENCES ............................................................................................................................................ 25

Page 7: A Scatter Diagram Approach to the Selection of Design

APPENDICES ............................................................................................................................................. 26

APPENDix A: USER GUIDE ....................................................................................................................... 26Installing the sifterfiles ....................................................................................................................... 26Preparing input matrices ..................................................................................................................... 26Running the program ........................................................................................................................... 28

APPENDix B: SOURCE CODE ..................................................................................................................... 32N ew ru np r( fi les .................................................................................................................................... 3 2N ew id w in n e r ........................................................................................................................................ 3 3T rim ra n g e 6 .......................................................................................................................................... 3 5T rim in .................................................................................................................................................. 3 6T rim lo w 2 .............................................................................................................................................. 3 7T rim h ig h 2 ............................................................................................................................................ 3 9S trc a lc .................................................................................................................................................. 4 1Id w in o u ts ............................................................................................................................................. 4 2S ca tte rp rep 2 ......................................................................................................................................... 4 3C o lo rc o d e 3 .......................................................................................................................................... 4 6

Page 8: A Scatter Diagram Approach to the Selection of Design

Nomenclature

AID = amplitude to diameter ratio [-ICL= Lift Coefficient [-]CRH= high reduced velocity damping coefficient [-ICRL= low reduced velocity damping coefficient [-1D = hydrodynamic diameter [in]dVR = reduced velocity bandwidth [-IfN= natural frequency [Hz]fs= vortex shedding frequency [Hz]fv= vibration frequency [Hz]HighVR= the region in which the reduced velocity is higher than the greatest found in the

power-in regionLowVR= the region in which the reduced velocity is lower than the lowest found in the

power-in region<Pi> = the average mechanical power dissipated over a vibration cycle [ft-lb/siQN= the modal force estimate [lb/miRHigI= high reduced velocity damping force per unit length per unit speed [lb s/im2

RLoW= low reduced velocity damping force per unit length per unit speed [lb -s/im2

RN= the modal damping estimate [lb s/m2Rsw= still water damping force per unit length per unit speed [lb s/im2

St = Strouhal number [-]V(x)= local flow velocity [ft/s]Vc= the center velocity of a power-in region[ft/s]VIV = Vortex-Induced VibrationVMAX= the greatest flow speed included in a power-in region [ft/siVMJN = the lowest flow speed included in a power-in region [ft/si

VR,center= the reduced velocity associated with the center velocity of a power-in region [-iVR= reduced velocity [-]x=relative position of measurement point on the riser[-]$(x) = local mode shape [-]w= angular frequency of vibration [radians/s]p- fluid density [slugs/ft3 ]v= fluid kinematic viscosity [ft2/sec]

7

Page 9: A Scatter Diagram Approach to the Selection of Design

I Introduction

Motivation

Before a riser can be designed for deployment in a new location, information on thelocal currents must be obtained. Because this data often consists of tens of thousands ofmeasured current profiles, it is difficult to know which ones are important for riserdesign. To overcome this difficulty, common industry practice is to prescribe aconservative design profile based on the data set. One type of design profile is theenvelope of maximum values. This profile is found by plotting the maximum velocityfound in the data set at each measured depth, and incorporating these points into a single"envelope profile". Therefore, at any point along the riser, the greatest velocity to befound at that depth in the entire data set will be used. Sometimes a "slab" of constantvelocity is drawn in the region of the peak of the envelope profile, the area of highestvelocities. An example of each method is shown in Figure 1. In this case, the slab'smagnitude is equal to the highest velocity found in the data set. These conservative,artificial design profiles don't occur in nature, and usually result in much higher damagerates due to vortex-induced vibration (VIV) than any of the measured profiles. The slabprofile is particularly inaccurate, as demonstrated by the damage rate comparisons shownin Figure 5. Any riser designed to this specification will be built far more conservativelyand, therefore, more expensively than the actual currents in the region require.

Another option is the"brute force" approach,which requires computingthe riser response to eachprofile using a numerical

Slab analysis tool. However, thistakes too long due to thelarge effort required toprepare and process the tens

Envelope of thousands of individualprogram runs. This studypresents an alternativemethod, which sorts theentire set of profiles in orderto identify those that arelikely to cause significantfatigue damage. This

Velocity information can be used tocreate more meaningfuldesign criteria.

Figure 1: envelope and slab design profiles

8

Page 10: A Scatter Diagram Approach to the Selection of Design

Proposed solution

Scatter plot

The solution proposed here is to sort all the profiles into a scatter diagram, whichidentifies those profiles likely to cause the greatest fatigue damage. The scatter diagramis based on two parameters known to be indicators of significant VIV response: thelength of the VIV power-in region and its velocity. The scatter diagram has rows andcolumns representing ranges of the two parameters. In each bin space is recorded thenumber of profiles in the data set with that particular combination of length and velocity.A sample scatter diagram, including a color-coded overlay of fatigue life data found bySHEAR7, can be found in Figure 2. Once the profiles have been sorted into bins, thedesigner can select those bins most likely to be associated with significant damage ratesdue to VIV and use only their profiles to perform a more detailed analysis.

Length Ratio0.01- 0.09- 0.17- 0.25- 0.33- 0.41- 0.50- 0.58- 0.66- 0.74-0.08 0.16 0.24 0.32 0.40 0.49 0.58 0.65 0.73 0.82

0.54- 0.91 173 634 604 594 574 443 20g. 61 130.92- 1.28 27 10 8 42 26 97 36 2 0 0

Center 2.04- 2.41 641 0 0 0 0Velocity 2.42- 2.79 3

(ftlsec) 2.80-3 .16 ______0 __ _

4.30-4 467230 114.68-5.04 0 *0 0 0 0 0 10-1005.05-5 .42 0 0 0 0 100-10005.43-5.91 0 0 0 0 1000+

Figure 2: Scatter diagram for 15,000+ data setColor-coded using Shear7 fatigue life predictions

Parameters

Successful VIV prediction depends on identifying the power-in region of the dominantmode. A power-in region includes those portions of the riser in which the vortexshedding excites a particular mode at its resonant frequency. For this study, the twoparameters chosen to characterize this region were the length of the power-in regiondeemed most likely to drive VIV and the flow speed that excites the dominant mode inthat region. The length is expressed in terms of the non-dimensional length ratio, LR,which is the percentage of the riser length occupied by the power-in region. The flowvelocity that excites the dominant mode is commonly called the center velocity, Vc.These parameters are shown in Figure 3 and defined in more detail in section II.

9

Page 11: A Scatter Diagram Approach to the Selection of Design

LPower-in Region

Vc

Figure 3: Length ratio and center velocity. Power-in region indicated by theheavier line

Utility

The scatter diagram is a familiar concept to ocean engineers because it has been used topresent the probability of occurrence of wave height and period combinations, which arethen used in wave force computations. Similarly, center velocity and length ratio can beused to define a two-parameter scatter diagram. If the current profile measurements areequally spaced in time, the scatter diagram presents the probability of occurrence ofprofiles that cause significant fatigue damage due to VIV. Furthermore, a relativedamage rate ranking of the current profiles can be inferred from the scatter diagramwithout doing any further calculations, because profiles with larger center velocity andlength ratio values tend to cause the greatest damage rates, when applied to a riser.

10

Page 12: A Scatter Diagram Approach to the Selection of Design

11 Theory

Overview of VIV theory and terminology

Strouhal Relationship

Vortex-induced vibration is vibration of a body caused by the shedding of vortices by apassing fluid flow. When the body is cylindrical, as in the case of a typical oil riser, theStrouhal number relates the flow velocity and the vortex-shedding frequency, sometimescalled the Strouhal frequency:

fS (X) = StV(x)D .'.'.'..'.''.'''.''....'.''.'..(1 )

Where x is the location of a measurement point on the riser, V(x) is the local flowvelocity, D is the riser's hydrodynamic diameter, fs(x) is the local shedding frequency,and St is the Strouhal number, which is a function of the Reynolds number. Thisrelationship is also shown in Figure 4.

Strouhal Frequency

Figure 4: Strouhal relationship

The Strouhal number is approximately 0.2 for most riser-scale Reynolds numbers.

11

fsV

PP_

Page 13: A Scatter Diagram Approach to the Selection of Design

Lock-inWhen a riser is in a sheared (non-uniform) flow, V varies continuously along its length,and so the riser could be excited at an infinite number of frequencies. In randomvibration at a large number of frequencies, the motions due to different modes tend tocancel each other out. However, risers in vortex-induced vibration often do not vibraterandomly.

When the vortex shedding frequency coincides with one of the riser's naturalfrequencies, the resulting resonant motion may cause the vortex shedding in a section ofthe wake to synchronize; the shedding in that region will no longer occur with randomphase. Portions of the riser with similar (but not identical) flow velocities may be"locked in" to this shedding regime. They will be forced to shed vortices at thisdominant frequency, rather than at the Strouhal frequency that corresponds to their localflow velocity, and they do so in phase with the rest of the synchronized wake. Thissynchronized shedding causes the lift forces to act in concert, encouraging the riser tovibrate at resonance, which, in turn, keeps the wake locked in to its shedding regime.The shedding and vibration form a self-exciting system, and the sustained resonantresponse can produce a large accumulation of fatigue damage.

This wake synchronization, or "lock-in" may only occur over a region in which theflow velocity varies slightly about the velocity whose Strouhal frequency corresponds tothe excited natural frequency. This "ideal" velocity shall be called the center velocity,Vc. The center velocity is shown in Figure 3. The wake synchronization region isdefined as the "power-in region" in this paper, because only in this region is the flowvelocity sufficiently close to the center velocity that the vortex shedding acts as excitationto the mode.

Lock-in criterion: the reduced velocity bandwidth

A velocity may contribute to the power-in region if its corresponding reduced velocity,VR, falls within an acceptable tolerance. The reduced velocity can be calculated usingequation 2:

R(X)V (x)VR (x = f D ................................ (2)

Here, fv is the vibration frequency, not the shedding frequency. However, in thisanalysis, it is assumed that they are the same, and both will be referred to as f. Thegreatest response will occur when the shedding and vibration frequencies are identical,and so this assumption builds conservatism into the scatter diagram method.

12

Page 14: A Scatter Diagram Approach to the Selection of Design

The allowable tolerance is often expressed in terms of a user-defined reduced velocitybandwidth, dVR, given by Equations 3 and 4:

dV- AVR AU (3)VRcenter C

VR~etr......... ..................... (4)R,center St

dVR is a double-sided bandwidth, so a value of 0.4 means that a velocity can contributeto the power-in region if its reduced velocity is within +/- 20% of the center velocity's.The power-in region does not need to be a continuous segment of the riser length; it caninclude several separate regions. The percentage of the riser's length occupied by allsegments of the power-in region is known as the length ratio, LR. It is shown in Figure 3.

The center velocity and length ratio were chosen as the scatter diagram parametersbecause they are correlated to the damage rate, as demonstrated in Figure 5. The centervelocity's correlation is particularly strong.

The damage rate's correlation to the damage rate is less strong than the centervelocity's for length ratios less than 0.3, but it is still good. The correlation betweendamage rate and length ratio is very weak for length ratios greater 0.3. This is because ofthe distribution of damage rate and length ratio in the data set: most of the cases withlong length ratios in this data set had slow center velocities. This can be confirmed byexamining the scatter diagram in Figure 2. There are very few high-velocity cases in theright-hand side of the scatter diagram, which corresponds to long length ratios. Slowcurrents excite lower modes with less curvature in their mode shapes and less frequentloading cycles, and so it makes sense that these cases should have lower damage rates.

Identifying the power-in region

The center velocity and length ratio parameters allow us to describe a given power-inregion. However, the sifter method requires describing the dominant power-in region ofeach current profile. Identifying this is a complicated task; there are several differentselection criteria in use. In this paper, it is assumed that the dominant power-in regionwill be the one with that dissipates the most mechanical power (averaged over a fullcycle). The algorithm used for estimating this quantity is presented in section III. Criteriarelated to the maximum available lift force and maximum amplitude were also explored.However, the power criterion showed the best agreement with Shear7's length ratio andcenter velocity predictions, and so it was chosen to predict the dominant power-in region.

13

Page 15: A Scatter Diagram Approach to the Selection of Design

- ,ur. - I.. I I I I I - -~

correlation between damage rate and length ratio

* 15,000+ data setU slab profile9

8

7

6

5

4

3

2

1

00

00.1 0 6 0.7 0.8 0.9

length ratio

correlation between damage rate and center velocity

U

* 15,000+ data setN slab profile

0*

ok 0-0.0

Vb * -.4I-

.0.S0

6 7

center velocity (ft/sec)

Figure 5: Correlation between sifter parameters and damage rate. 15,000+ realprofiles and artificial slab design profile shown.

14

-0

E

9

8

7

6

5

4

E

10

3 -

2-

L0

Page 16: A Scatter Diagram Approach to the Selection of Design

Find maximum and minimum Vc andLength Ratio values in the entire data set.

Divide evenly into bin boundaries.

FOR EACH BIN:

Find all profiles whose parameter valuesfall within this bin. Count them. Recordthe count in the corresponding element in

scatter diagram matrix.

FOR EACH POINT IN PROFILE:

Calculate VmAx, VMIN values for the activepoint's Vc

Find all points with velocities betweenVmAx and VMIN, inclusive.

(Points in the power-in region)

Add up the incremental lengths associatedwith each point in the power-in region.

Calculate the contribution of each point inthe power-in region to the modal force

estimate, and their sum, QN-

Compute vibration frequency from St , D,and V,

Find all points in the profile less than VMIN(low-VR power-out region)

Find the incremental contribution of eachpoint in the low-VR region to the dampingcoefficient, dRNLOW. Sum to find RNLOW

Find all points in the profile > VmAx

(high-VR power-out region)

Find the incremental contribution of eachpoint in the high-VR region to the dampingcoefficient, dRNHIGH. Sum to find RNHIGH-

-A

Figure 6: Sifter algorithm conceptual flowchart

15

Calculate QN, RN and <Pi> for this centervelocity

OUPUT:POPULATED SCATTER

DIAGRAM

Page 17: A Scatter Diagram Approach to the Selection of Design

III Procedure

A Matlab routine was developed to "sift" the velocity profiles into their respective bins inthe scatter diagram. The general algorithm is described below and shown in the flowchart in Figure 6. The complete Matlab routines are included in Appendix B. The sifteralgorithm's results were compared to those of the VIV prediction program Shear7 inorder to validate the method.

Algorithm

The sifter attempts to identify the dominant power-in region of each velocity profile.It is assumed that the mode that dissipates the most mechanical power (averaged over afull cycle) will dominate. The sifter then finds the center velocity and length ratio forthat power-in region and assigns the profile to a bin. Finally, the total number of profilesthat fall within each bin is counted, populating the scatter diagram. In order to do this,each profile is subjected to the following procedure.

In each profile, the sifter temporarily treats the velocity at each depth point as if itwere the center velocity that corresponds to the dominant mode. Then it uses the reducedvelocity bandwidth, dVR, specified by the user to find the bounding velocity values of thepower-in region, VMAx and VMIN, given by equations 5 and 6:

V i =V (1 - dVR) ........................... (5)

VMa, =VC (1+ dVR) .......................... (6)

The sifter then identifies all points in the velocity profile whose velocities are greaterthan VMIN and less than VMAx. The length ratio is found by calculating the percentage ofthe riser length occupied by these points. It is important that the velocity measurementpoints be relatively evenly spaced, because sparsely spaced sections may occupy toolarge a portion of the riser, and so may bias the length ratio calculation. To prevent this,the sifter interpolates the velocity profiles into closely spaced points.

In order to identify the region most likely to excite the dominant mode, the averagedissipated power, <Pi>, must be calculated for each center velocity and associated pointsin the power-in region. This is done using equation 7, and requires estimating theequivalent modal force and modal damping associated with the power in region.

2

< Pi >= N (7)2RN

Where QN is the modal force estimate and RN is the modal damping estimate. Theseare given by equations 8 and 9, respectively:

QN f pCLDV 2 (X)(X)dX ........ (8)Lin2

16

Page 18: A Scatter Diagram Approach to the Selection of Design

Where Li, is the power-in region, p is the fluid density, CL is the average liftcoefficient over the power-in region, and # is the local mode shape. The average liftcoefficient, the diameter and the density of water are all assumed to be constant for thepurpose of comparing potential power-in regions, and are moved outside of the integral.The QN integral is then evaluated numerically by adding up the incremental contributionsfrom each point in the power-in region. Turning next to the estimation of modaldamping:

RN = J & (x)dx+ Rg(x)dA .... (9)LowVr HighVr

LowVR is the portion of the power-out region over which the reduced velocity is lowerthan the minimum power-in reduced velocity, and HighVR is the portion of the power-outregion in which the reduced velocity is higher than the maximum power-in reducedvelocity. RLOw and RHIGH are the damping coefficients for the LowVR and HighVRregions, respectively. They are given by equations 10 and 11, respectively, [2,3]:

RL. =r , + CRLpDU(x) ................ (10)

R =igh CRH pU 2(X). ...............0)

Where CRL and CRH are the low and high reduced velocity damping coefficients, and areassumed to be 0.18 and 0.2, respectively [2,3]. o is the vibration frequency in radians persecond. Because it is assumed that the vibration and vortex-shedding frequencies areidentical, o is a function of the center velocity, as given in equation 12:

_ 2RStVcD .............................. (12)

Where r, is the stillwater damping coefficient, and is given by equation 13 [2,3]:

opTD 2 2)A2r =K +0.2 0 .(13)

S 2 Dlo) D

Where v is the kinematic viscosity of the fluid.

Because no information about actual riser modes is known, a rigid cylinder modeshape is assumed for the power dissipation calculations. Therefore # is assumed to be 1.0

17

Page 19: A Scatter Diagram Approach to the Selection of Design

at all points on the riser. AID is the ratio of the vibration amplitude to the diameter, andis assumed to be 0.5 in all cases.

The RN integrals are evaluated numerically by adding up the incremental modaldamping contributions of each point in the high and low reduced velocity regions.

Once QN and RN are known for each potential center velocity, the average dissipatedpower, <Pi> is calculated, using equation 7.

The velocity producing the largest <Pi> value in each profile is assumed to drive thedominant power-in region, and is dubbed the center velocity, Vc, for that profile. It isassumed that if a real riser with many modes were exposed to the same velocity profile,the dominant VIV mode would correspond to approximately this center velocity.

Once the "winning" power-in region has been identified for each profile, the profilesare sorted into bins according to their center velocities and length ratios. The bins aredivided into ranges of each parameter. These ranges are divided evenly among a user-specified number of bins, with boundaries ranging between the minimum and maximumparameter values found in the data set. For each bin, the number of profiles that fall intothat combination of parameter ranges is found, and that number is put into the scatterdiagram. For each bin the number of occurrences divided by the total number ofvelocity profiles is the probability of occurrence of profiles that belong in that bin.

Validation

Procedure

An objective of this paper is to show that a simple sifting algorithm requiring only theinformation contained in a current profile is able to identify that portion of the profilemost likely to incur fatigue damage when applied to a real riser of a given diameter. Totest the validity of this assertion, the response of a riser model to a large set of currentprofiles was computed using the VIV response prediction program SHEAR7, which waswritten at MIT [1]. The SHEAR7 program uses a more complex set of criteria andalgorithms to find the mode with the greatest response to VIV and its correspondingpower-in region. For every profile, SHEAR7 version 4.2d was used to determine thelength ratio, center velocity and damage rate for the dominant mode. In all cases, Shear7was forced to assume single-mode behavior, and was run using a double-sided reducedvelocity bandwidth of 0.4.

18

Page 20: A Scatter Diagram Approach to the Selection of Design

Shear7's Vc and LR predictions were compared to the sifter's prediction in order toestablish their validity. SHEAR7 does not directly report center velocity, but it doesreport a closely related quantity, the natural frequency of the dominant mode. Knowingthe Strouhal number and the natural frequency, the center velocity corresponding to thecenter of the power-in region may be found by rearranging equation 1 as follows:

V= Df . .................. (14)St

SHEAR7 does report the length ratio for each power-in region. Also, Shear7'sdamage rate predictions were overlaid onto a populated scatter diagram in order todemonstrate that it truly sifts the most damaging profiles into the lower-right-hand cornerof the diagram.

Riser ModelTo run SHEAR7 requires that a real riser model be specified. For the purposes of this

comparison, it was desirable to select a small-diameter riser. Such a riser would haveclosely-spaced natural frequencies and, therefore, a large number of modes that could beexcited by the velocities found in typical current data. With a large number of potentiallyexcited modes, the center velocity found by the sifter would be more likely to correspondto a natural frequency found by SHEAR7.

A slender pinned-pinned riser model was used to meet these criteria. The riser had anouter diameter of 13.375 inches and inner diameter of 12.375 inches. It had a length of3350 feet and a bottom tension of 300,000 lb.-f.

Data SetThis model was subjected to a set of current profiles associated with the Northern Brazilcurrent rings. Over 15,000 Acoustic Doppler Current Profiles were obtained at one siteover a period of more than one year. The site was near Trinidad. A consortium made upof Shell, ExxonMobil, and BP funded the measurement program, which is referred to bythe acronym TACOS. The data included the passage of current rings on severaloccasions. More information on the rings of the North Brazil Current may be found onthe web site of The Atlantic Oceanographic and Meteorological Laboratory (AOML) athttp://www.aoml.noaa.gov/phod/nbc/index.html.

Each profile consisted of measurements at 41 different depths up to 3350 feet. Thecurrent data were sparsely spaced near the bottom and more regularly spaced in the upperpart of the profile. An acoustic Doppler Current Profiler was used to gather the data inthe upper part of the water column. Moored current meters were used near the bottom.The profile was interpolated in regions with spatially sparse current measurements, inorder to avoid bias in the sifter's length ratio predictions.

19

Page 21: A Scatter Diagram Approach to the Selection of Design

I. III - -~-~-i--r~~---- -- -

IV Results and Analysis

Validation Results

Length RatioFigure 7 shows a comparison between the SHEAR7 and sifter length ratio predictions.Each point corresponds to one of the 15,000+ current profiles. The value of the lengthratio as obtained by the sifter program is plotted against SHEAR7's length ratioprediction. Perfect agreement would cause all points to fall on a 45-degree line. Theright-hand graph shows only those cases with fatigue lives under 100 years, and aregrouped by symbols, which indicate the order of magnitude of the fatigue life, aspredicted by SHEAR7. From these graphs, it is clear that while there are many cases thatshow large scatter, most of these correspond to profiles with very long predicted fatiguelives. Most of the points with very long fatigue lives correspond to current profiles withvery low maximum velocities, which do not produce significant responses or fatiguedamage, and so are not important in establishing design profiles for VIV.

It is important to note that when the sifter program disagrees with Shear7's length ratiopredictions in high-damage cases, it tends to over-estimate the length ratio compared toSHEAR7. This indicates that when the sifter program predicts a different power-inregion, its prediction is more conservative than SHEAR7's. The predictions for profileswhose fatigue lives are short enough to be of concern agree very well.

Length Ratio Comparision Length Ratio Comparison:Significant Damage Rate Cases Only

0.9-

SFull Set 0.90.8 -- deal0.8

0.7- 0.7

C 0 0 0 00 00~o 00

O + 1-10 yr

0.3 ~~~0.3 eu o1y -0.2 0 0 0.2 - g- ideal

.0.

0*0~0.1-0 , , , , , ,0 04

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0 0.1 0.2 0.3 0.4 0. 0.6 0.7 0.8 0.9Sifter Prediction Sifter

Figure 7: Length ratio prediction comparison. The left graph showsall cases, while the right shows cases with fatigue lives under 100 years.

20

Page 22: A Scatter Diagram Approach to the Selection of Design

Frequency

Figure 8 shows a comparison between the dominant response frequency predictions. Asin the length ratio comparison chart, each of the individual points corresponds to one ofthe 15,000+ profiles. The right-hand graph shows only cases with fatigue lives greaterthan 100 years, grouped by the order of magnitude of the predicted fatigue life accordingto SHEAR7. Again, the greatest scatter occurs in those cases with extremely long fatiguelives.

A bias is apparent; the sifter seems to be consistently choosing higher frequencies thanSHEAR7. This is acceptable because higher frequencies tend to produce higher damagerates, due to their mode shapes' greater curvature and their more frequent cycles. Thisbias ensures that any error in the sifter's prediction makes the prediction moreconservative, which is desirable. Innocuous profiles are more likely to be sorted into abin for which we predict higher damage rates, rather than dangerous profiles mistakenlybeing classified as harmless. For cases with very short fatigue lives, there is very goodagreement.

Frequency Comparision

1.21

1 -

- -.

0 Full SetIdeal ZCO

0.8

0.6

0.4

00 0.2 0.4 0.6 0.8 1 1.2 1.4

Sifter Prediction (Hz)

Frequency Comparison:Significant Damage Rate Cases Only

o 10-100yr* 1-10 yr .* up to 1 yr

-- Ideal -I

0 0.2 0.4 0.6 0.8 1 1.2 1.4

sifter (Hz)

Figure 8: Frequency Prediction comparison. The left graph shows allcases, while the right shows cases with fatigue lives under 100 years.

21

1.4

1.2

N 1I

00.8

U

t. 0.6

0.4

0.2

Mia

03ED Q Q

C3

-

.

0,

Y.2

Page 23: A Scatter Diagram Approach to the Selection of Design

Damage rate distribution

As expected, the highest damage rate cases fall in the high velocity, higher length ratioportions of the scatter diagram, as shown in Figure 2. Sample velocity profiles are shownfrom one of the higher damage rate bins in Figure 9. The dominant power-in region ofone profile is indicated by the heavy line, showing that higher damage rates docorrespond to high center velocities. The profiles in this bin are examples of TACOSprofiles that would contribute to high fatigue damage rate predictions. However, theprofiles shown are not the worst profiles to be found in the data set. These profiles areonly examples and should not be assumed to be valid as conservative design profiles forNorthern Brazil current rings.

0.01- 0.09- 0.17-0.08 0.16 0.24

0.16-0.53 . . ...0.54-0.91 ... .0.92- 1.28 1309 91.29- 1.66 10941.67- 2.03 102!- '2.04- 2.41 642.42-2.79 3 32.80 3.6 12 4

31.65- 3.9213.93- 4.294.30- 4.674.68-5.04 05.06- 5.42 0 .5.43- 6.91 0 .

Velocity profile with power-in region

0.9r08L Profile 1

Profile 20 Profile 2's Power-In Region

Profile 30r6 Z

0.5

034

0.2 Power-in Region Zoom

0 12 3Velocity (ft/sec)

4 5

Figure 9: Three profiles that fall within a high damage-rate bin.These profiles have high center velocities.

ConservatismAs mentioned earlier, the scatter diagram method incorporates conservatism in severalways. When it disagrees with Shear7, it tends to select higher winning frequencies andlonger length ratios. This implies that the sifter errs in such a way that the profiles areput into bins that will produce higher damage rates than would be found by running theprofile in a response prediction program. The method also assumes that the riser willalways have a mode that could be excited by the center velocity found by the sifterprogram. This may not always be the case, and so, in reality, most profiles would resultin lower fatigue damage. Making this assumption ensures that the profiles are classifiedby the worst damage rate they could inflict on a riser of a given diameter.

22

CenterVelocity(ftlsec)

Page 24: A Scatter Diagram Approach to the Selection of Design

Scatter diagram use in designIt is up to the designer to determine how to incorporate the scatter diagram into the designprocess. One method would be to use it to identify potentially dangerous profiles to beanalyzed with a numerical analysis program such as Shear7. Based on the sample dataset, the profiles that would result in the shortest fatigue lives are expected to have highcenter velocities and larger length ratios. These bins fall in the lower region of the scatterdiagram (the high-velocity bins), especially those that fall on the right-hand side of thatregion (the longer length-ratio bins). Therefore, the designer could analyze these profilesfirst, and then move to bins with lower length ratios and center velocities until thedamage rates found by running the profiles in the response prediction programs areacceptable. In the particular example shown in Figure 2, it would only be necessary toanalyze at one quarter of the data set in order to capture all cases with fatigue lives of lessthan 10 years. The remaining profiles contribute a negligible amount to the total fatiguedamage. For larger-diameter risers, which are far more common, the damage ratespredicted for the same current profiles would be lower, due to their lower frequencies,and so even fewer bins and fewer cases would need to be examined in order to reach anacceptable damage rate.

V Recommendations

Several avenues remain open for further exploration. The choice of bin sizing, thepattern of the frequency outliers, and the behavior of the riser in multi-mode situationswould all benefit from further inquiry.

Explore bin sizingThere are many options for bin sizing. For this study, evenly spaced bins were chosen,with scalable bounds ranging from the lowest parameter value found in the data set to thehighest. This method was chosen purely for simplicity; other schemes may give moremeaningful results.

Absolute vs. scaleable bin boundariesIn this study, scalable bounds were used when creating the scatter plot. However, if thismethod is to be used widely, it may be desirable to establish industry- or organization-standard, absolute bin sizes. This would facilitate communication between differentgroups.

Number of binsIn this study, ten length ratio and fifteen center velocity bin divisions were used. Thiswas selected for simplicity, but in the Matlab routine, the user specifies the number ofbins. This leaves open the question of how many bins are needed to provide the mostmeaningful information in the scatter plot.

When fewer bins are used, less resolution is provided, and more profiles will fall within aparticular bin. Similarly, when more bins are used, there is greater resolution, causingfewer profiles to fall within a given bin. However, the natural frequencies of the riserplace an absolute limit on the meaningfulness of the Vc parameter. A false precision

23

Page 25: A Scatter Diagram Approach to the Selection of Design

would be produced if center velocities that fall within the double-sided reduced velocitybandwidth were allowed to straddle more than one Vc bin. Also, including more bins ismore time-consuming; it may require analyzing more profiles. Therefore, it is worthinvestigating alternate bin distributions, particularly when the riser's natural frequenciesare known and can be used to specify the resolution of the center velocity bins.

Outlier patternsIn section IV, it was pointed out that for several profiles, Shear7 and the sifter chosedifferent winning center velocities (corresponding to different modes). This does notcreate vulnerability in the method, because the sifter tends to give the more conservativeresults. However, because the sifter tends to choose a higher mode than Shear7, it isclear that this is not a random variation, and the source of the discrepancy should beexplored in greater detail. It would be useful, for example, to find common properties ofvelocity profiles that are classified differently by Shear7 and the sifter. Some potentialindicators in each profile include the Reynolds number, maximum profile velocity, centervelocity, slope, length ratio, and competition between potential power-in regions.

Once suitable indicators were determined, a check could be incorporated into the sifterroutine, warning the user when a profile is likely to be classified differently. Thedesigner could then choose to examine the profile in greater detail by running it throughShear7, or to simply accept the conservative results given by the sifter.

Multi-mode situationsThis study was limited to single-mode response, assuming in each case that only onemode was excited, or that the response due to the other modes was negligible. It wouldbe wise to explore the accuracy of this method in cases where there are two are morecompeting modes. If it proves insufficient and cannot be adapted to a multi-modesituation, a method should be developed for identifying profiles that are likely to have amulti-mode response, and warn the user, so that those cases can be examined moreclosely.

24

Page 26: A Scatter Diagram Approach to the Selection of Design

References1. Vandiver, J.K., Lee, L., "Shear7 User Guide: 2002", MIT Department of Ocean Engineering,

Cambridge. MA.

2. Venugopal, M.: "Damping and Response of a Flexible Cylinder in a Current", Ph.D. thesis,Dept. of Ocean Eng., MIT, USA, 1996.

3. Vikestad, K., Larsen, C.M., Vandiver, J.K., "Norwegian Deepwater Riser and Mooring:Damping of Vortex-Induced Vibrations", Proceedings of the 2000 Offshore TechnologyConference, Paper No. 11998, Houston, TX, May 1-4, 2000.

25

Page 27: A Scatter Diagram Approach to the Selection of Design

Appendices

Appendix A: User Guide

Installing the sifter filesThe sifter algorithm is executed by a series of Matlab functions, stored as m-files. Thefollowing m-files are needed:

* colorcode3.m* idwinouts.m* newidwinner.m* newrunprofiles.m* plotprofiles.m* scatterprep2.m* strcalc.m* trimhigh2.m* trimin.m* trimlow2.m* trimrange6.m

These files are included in Appendix B, and may also be requested in m-file form fromthe author by sending email to [email protected].

In order for these functions to be accessible to Matlab, their location must be added toMatlab's list of search paths. In Matlab Release 13, this can be accomplished using thefollowing command:

>>addpath path

Where path is the path to the directory that contains the sifter's m-files. For example, inWindows, this may look like:

>>addpath D:\matlab_sv13\toobox\viv

The command may differ for other versions and platforms. For further assistance, see theMathworks' web site at:http://www.mathworks.com/

Preparing input matricesThe sifter algorithm takes as its inputs two scalar values, the riser diameter, D, and thedouble-sided reduced velocity bandwidth, dVr, and one matrix containing the currentprofile data, profilesall. The riser diameter should be given in inches.

26

Page 28: A Scatter Diagram Approach to the Selection of Design

The first column of the current profile matrix should contain the non-dimensionallocation (x/L) of the current measurements. Its values should vary from zero (the bottomof the riser) to 1 (the top of the riser). Each subsequent column should contain a currentprofile, giving the velocity in ft/second at each measurement point. So a matrixrepresenting 100 profiles measured at 40 locations would contain 40 rows and 101columns. An example for three profiles is shown below:

x/L Profile 1 Profile 2 Profile 3(ft/sec) (ft/sec) (ft/sec)

0 0 0 00.25 0.25 0.3 0.10.5 0.75 1 0.50.75 1 1.75 0.751 1 1.5 1.5

(This table contains dummy data created to show the form of the input matrix. It does notcorrespond to any real profiles.)

The optional fatigue-life color-coding function, colorcode3.m, requires a two-columninput matrix. The first column should contain the profile number, and the second shouldcontain that profile's damage rate (expressed in failures per year), as predicted by Shear7or another VIV prediction program. An example for three profiles is shown below:

Profile Damage Rate(failures/yr.)

1 1.5e-052 9.0e-013 1.5e+00

(This table contains dummy data created to show the form of the input matrix. It does notcorrespond to any real values.)

27

Page 29: A Scatter Diagram Approach to the Selection of Design

Running the program

Producing a populated scatter diagram requires entering two of the sifter algorithm'sMatlab commands, newrunprofiles, and scatterprep2. If a damage rate prediction isavailable for each profile, an optional color-coded fatigue life overlay may be appliedusing the function colorcode3.

>> done = newrunprofiles(profilesall, D, dVr)>> [ScatMat, VcBounds, LrBounds, wheresit, check] = scatterprep2(numVcBins, numLrBins)>> [colors, rangedivs]= colorcode3(wheresit, damage, numrows, numcols)

STEP 1 - IDENTIFY THE POWER-IN REGION:

>> done = newrunprofiles(profilesall, D, dVr)

Which identifies the dominant power-in region in each current profile given in the matrixprofilesall, given a riser diameter, D, and double-sided reduced velocity bandwidth, dVr.The following data for each profile is appended to a tab-delimited text file calledwinnersinfo. txt:

* The profile number* The first location (given non-dimensionally as x/L) at which the center velocity is

found* The center velocity in ft/sec* The length ratio of the dominant power-in region* The <Pi> value* The Strouhal frequency (given in Hz) associated with the center velocity.

Sample contents of winnersinfo.txt for a three-profile case are found below:

Profile Location Vc LR <Pi> fs

1 0.922145 1.532 0.2 0.023673 1.52 0.872564 1.957 0.18 0.065874 2.33 0.95 1.625 0.09 0.015478 1.7

(This table contains dummy data created to show the form of the winnersinfo.txt file. Itdoes not correspond to any real results.)

The variable done will be assigned the value 1 if the sifter worked properly.

28

Page 30: A Scatter Diagram Approach to the Selection of Design

STEP 2 - POPULATE THE SCATTER DIAGRAM:

>> [ScatMat, VcBounds, LrBounds, wheresit, check] = scatterprep2(numVcBins, numLrBins)

This command requires the user to input the number of center velocity bins, numVcBins,and the number of length ratio bins, numLrBins.

The scatter diagram bin values are given in the matrix ScatMat, and also output to thetab-delimited text file scatterinfo.txt. The contents of ScatMat for a scatter diagram withthree rows and two columns would look like:

1 11 21 3

(This table contains dummy data created to show the form of the scatterinfo.txt file. Itdoes not correspond to any real results.)

The boundary values of the center velocity and length ratio bins are given in the vectorsVcBounds and LrBounds, respectively. This data is also output to the tab-delimited textfiles VcBounds.txt and LrBounds.txt, respectively.

The wheresit matrix contains the bin locations of each profile. Its first column is a vectorcontaining the numbers of the profiles that were sifted into that bin. The vector is paddedwith zeros to ensure that each vector is of the same length. The contents of each bin inthe first row are given, followed by the contents of each bin in the second row, and so on.The wheresit matrix produced for the same scatter diagram with three rows and twocolumns would be made up of the following columns:

Bin Bin Bin Bin Bin Bin1,1 1,2 2,1 2,2 3,1 3,2

29

Page 31: A Scatter Diagram Approach to the Selection of Design

And it could look like:

3 2 4 1 6 70 0 0 5 0 80 0 0 0 0 90 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 00 0 0 0 0 0

(This table contains dummy data created tonot correspond to any real results.)

show the form of the wheresit matrix. It does

So Bin 1,1 would contain profile #3, and Bin 3,2 would contain profiles #7, 8 and 9.

This data is also output to a tab-delimited text file, wheresit.txt.

Check is a scalar variable. Its value should equal the number of current profiles, if thesifting was performed successfully.

STEP 3- ADDING OPTIONAL COLOR-CODED FATIGUE LIFE OVERLAY

Adding a color-coded fatigue life overlay requires the use of the following command:

>> [colors, rangedivs]= colorcode3(wheresit, damage, numrows, numcols)

Where wheresit is the matrix output by scatterprep2, damage is the damage rate matrix,and numrows and numcols are the number of rows and columns in the scatter diagram,respectively.

The outputs of colorcode3 are the colors matrix (also output as a tab-delimited text file,colorcodes.txt), and the rangedivs vector. Rangedivs gives the boundary values for eachcolor code. Colorcode3 is set to give the following 5 ranges:

Fatigue Life Range Color CodeLess than 1 yr. 11-10 yrs 210-100 yrs 3100-1000 yrs 4More than 1000 yrs 5

(The number of ranges and their boundary values can be changed by editing the filecolorcode3.m.)

30

Page 32: A Scatter Diagram Approach to the Selection of Design

Corresponding to rangedivs values of:

0110100100010A256

10A256 is chosen as an upper bound, rather than infinity for practical programmingpurposes.

Colors is a matrix of the same dimensions as ScatMat, and contains the color codeassigned to each bin. The contents of Colors for a scatter diagram with three rows andtwo columns would look like:

1 32 43 5

(This table contains dummy data created to show the form of the colorcodes.txt file. Itdoes not correspond to any real results.)

31

Page 33: A Scatter Diagram Approach to the Selection of Design

Appendix B: Source Code

Newrunprofiles

function [done] = newrunprofiles(profilesall, D, dVr)%NEWRUNPROFILES takes a user-inputed velocity matrix, and runs each profile%through idwinner.

% inputs are:

% user-inputed velocity matrix, profilesall,% with 1st column x/L of each node, and one column for each profile velocity.% Profiles must have top line (probability info for S7) removed when% input into matlab.

% D should be the diameter in inches.

% dVr is the double-sided reduced% velocity bandwidth

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 11/18/02

% set "did I work?" valuedone=0;

% set density and kinematic viscosity for seawater at 50 degreesrho= 1.9924; %lbsecA2/ftA4nu=1.4572* 10A(-5);

% set index vectorIndex = profilesall(:,1);

ProfileNum = 1;

for n=2:(size(profilesall, 2))P(:, 1)=Index;P(:,2)=profilesall(:,n);%find winner, selecting for dissipated powernewidwinner(P, ProfileNum, D, dVr, rho, nu);ProfileNum = ProfileNum + 1;

end

done=1;

32

Page 34: A Scatter Diagram Approach to the Selection of Design

Newidwinner

function [Voutmat, WinnerInfo, Powerin] = newidwinner(Vall, ProfileNum, D, dVr, rho, nu)%NEWIDWINNER identifies the center velocity candidate with% the greatest <Pi> value (dissipated power)% It estimates the length ratio of this region and its center velocity% Plots full velocity profile in *s, highlighting the power-in region in red% Also estimates the vortex-shedding frequency that corresponds to Vcwinner,% so that it can be compared to the output of Shear7

% D should be in inches

% Includes the option to interpolate linearly, so that regions where% data-collection is sparse don't falsely dominate

% outputs WinnerInfo to tab-delimited file 'winnersinfo.txt'

% Vall should be a matrix with 1st column = position along riser% and 2nd column = velocity profile

% Motivation: to estimate the power-in region of a riser experiencing% vortex-induced vibration.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 11/18/02% updated 11/25/02

% Set plotting mode flagplotflag = 0; % 0=plot nothing

% 1=plot profile with power-in region highlighted,% 2=plot profile w/ power-in region, without asking for profile name

% Set interpolation flagintflag = 1; % 0=no interpolation 1=linear interpolationinterpinterv = 0.05; % set interval for interpolation in terms of x/L

% Interpolate profileif intflag==l

Dpth=Vall(:, 1);Vlcty=Vall(:,2);% Create fake velocity profile that won't need interpolationFalseVlcty=ones(length(Vlcty), 1);% Interpolate Depth using fake velocity profile[DpthInterp, Vinterp] = interpm(Dpth, FalseVIcty, interpinterv);% Interpolate for Velocity corresponding to interpolated depthVlctylnt=interp 1 (Dpth,Vlcty,Dpthlnterp);

Vprofile = VlctyInt;indx = DpthInterp;

33

Page 35: A Scatter Diagram Approach to the Selection of Design

elseVprofile = Vall(:,2);indx = Vall(:,1);

end

Vnew(:, 1)=indx;Vnew(:,2)=Vprofile;

% Create a new matrix by tacking the the velocity vector to the index vector.Voutmat(:,1) = indx; % col. 1= position along riserVoutmat(:,2) = Vprofile; % col. 2= velocities

% Find power-in region, Qn, Rnh & Rnl[Lin, Qn, Rnh, Rnl] = trimrange6(Vnew, D, dVr, rho, nu);

% find total RnRn=Rnl+Rnh;

% if Rn=O, then Vc must be zero, and so this profile can't be the winner.%(since Vc=O means no excitation).% BUT, if Rn=O, then QnA2/2Rn gives div by zero error.%To keep the algorithm for selecting these cases,% let's make Rn incredibly large.for n=1:length(Rn)

if Rn(n)==ORn(n)= 10A256;

endend

% Find <pi>PiDisp = (Qn.^2)./(2.*Rn);

Voutmat(:,3) = Lin'; % col. 3= length ratioVoutmat(:,4) = PiDisp'; % col. 4= dissipated power

% Find the greatest dissipated power (the "winner")

[PiWinner, indxWinner] = max(abs(PiDisp));

LocationWinner = Voutmat(indxWinner, 1);VcWinner = Voutmat(indxWinner, 2);LratioWinner = Voutmat(indxWinner, 3);

% Plot the full profile, highlighting the power-in regionif ((plotflag==1)I(plotflag==2))

34

Page 36: A Scatter Diagram Approach to the Selection of Design

[done] = plotprofiles(Vall, VcWinner, dVr, Vprofile, Vnew, Powerin, plotflag);end

% Calculate the strouhal number and frequency associated with each profile's VcWinnerStr = strcalc(VcWinner, D, nu);ODft=D/12;WinFreq = Str.*VcWinner/ODft;

WinnerInfo = [ProfileNum, LocationWinner, VcWinner, LratioWinner, PiWinner, WinFreq];

% Output WinnerInfo to filefilename = 'winnersinfo.txt';filename = idwinouts(Winnerlnfo,filename);

Trimrange6

function [Lin, Qn, Rnh, Rnl] = trimrange6(V, D, dVr, rho, nu)%TRIMRANGE6 trims a velocity matrix V = [position, velocity] to only those vectors% within +/- dVr of Vci (each point along the vector).% Calculates length ratio within the trimmed region, and the Qn, Rnh & Rnl values% associated with each Vci.% No reordering of the velocity vector is necessary.

% Motivation: to estimate the power-in region of a riser experiencing% vortex-induced vibration.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 11/18/2002

% Split position and velocity from the V matrixposition = V(:,I);velocity = V(:,2);

% Establish boundary values (vector values- same length as Viordered)Vmin = velocity.*(1-(dVr/2));Vmax = velocity.*(1+(dVr/2));

% Calculate Qn and dLength for power-in region[Lin, Qn] = trimin(velocity, position, Vmin, Vmax, D, dVr, rho);

% Get strouhal number for each potential center velocity

35

Page 37: A Scatter Diagram Approach to the Selection of Design

Str = strcalc(velocity, D, nu);

% Find the length and Rnl of the low-Vr region[lowregion, Rnl] = trimlow2(velocity, position, Vmin, D, dVr, rho, nu, Str);

% Find the length and Rnh of the high-Vr region[highregion, Rnh] = trimhigh2(velocity, position, Vmax, D, dVr, rho, nu, Str);

Trimin

function [Lin, Qn] = trimin(velocity, position, Vmin, Vmax, D, dVr, rho)%TRIMIN finds the length and location of the portion of the power-in region.%It also calculates Qn for this region

% Motivation: to estimate the power-in region of a riser experiencing% vortex-induced vibration.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 11/18/02

ODft=D/12;

% Select all values >= Vmin and <= Vmax and calculate the length ratiofor i= 1:length(velocity)

% Find the points in the profile withing +/- dVr/2 of Vci[index, onesies]=find((velocity>=Vmin(i))&(velocity<=Vmax(i)));

% Starting the j loop (within the INDEX vector)%runningtotal(i) = 0;dX(1)=0;

% Find the length before the first point in the INDEX vector, if it isn't the% first point in the velocity profileif (index(1) -= 1)

dX(1) = (position(index(1))-position(index(1)-i))/2;end

for j=2:length(index)dX(j)=0;% check for continuity between current point and previous pointif (index(j-1)==(index(j)-1))

% Add the length between the current point and the previous pointdX(j) = dX(j) + (position(index(j))-position(index(j-1)));

% if not continuouselse

36

Page 38: A Scatter Diagram Approach to the Selection of Design

% Add half length after previous pointdX(j) = dX(j) + (position(index(j-1)) - position(index(j-1)+1))/2;% Add half length before current pointdX(j) = dX(j) + (position(index(j)) - position(index(j)-1))/2;% end if statement

end% end j loop (j = location in index loop)

end

% Add length after last point in the INDEX vector, if it isn't the last point% in the velocity vectorif (index(length(index)) ~= length(position))

dX(length(index)) = dX(length(index)) + (position(index(length(index))+1) -position(index(length(index))))/2;

end

%Note the power-in length for each i (location in velocity profile)Lin(i)=sum(dX);

% calculate dQn for each pt. in power-in regionfor k =1:length(index)

dQn(k)=O.5*rho*ODft*velocity(index(k)).^2*dX(k);end

Qn(i)=sum(dQn);

% end i loop (i = location in velocity profile)end

Trimlow2

function [lowregion, Rnl] = trimlow2(velocity, position, Vmin, D, dVr, rho, nu, Str)%TRIMLOW2 finds the length and location of the portion of the power-out region% in which the reduced velocity is lower than in the power-in region. It also% calculates Rn for this region (Rnl)

% Motivation: to estimate the power-in region of a riser experiencing% vortex-induced vibration.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 11/18/02

ODft=D/12;w=2*pi*Str.*velocity./ODft; %velocity(i) = present Vc candidate

% Calculate w, Rcm

37

Page 39: A Scatter Diagram Approach to the Selection of Design

Rcm=w*ODftA2/nu;

% Select all values less than Vmin and calculate the length ratiofor i= 1: length(velocity)

% Find the points in the profile less than -dVr/2 of Vci[index, onesies]=find(velocity<Vmin(i));

if isempty(index)Rnl(i)=O;dLength(i)=O;

else

% Starting the j loop (within the INDEX vector)%runningtotal(i) = 0;

dX(1)=O;% Find the length before the first point in the INDEX vector, if it isn't the% first point in the velocity profile

if (index(1) ~ 1)dX(1) = (position(index(1))-position(index(1)-i))/2;

end

for j=2:length(index)dX(j)=0;

% check for continuity between current point and previous pointif (index(j-1)==(index(j)-1))% Add the length between the current point and the previous pointdX(j) = dX(j) + (position(index(j))-position(index(j-1)));% if not continuous

else% Add half length after previous point

dX(j) = dX(j) + (position(index(j-1)) - position(index(j-1)+1))/2;% Add half length before current pointdX(j) = dX(j) + (position(index(j)) - position(index(j)-1))/2;end % end if statementend % end j loop (j = location in index loop)

% Add length after last point in the INDEX vector, if it isn't the last point% in the velocity vectorif (index(length(index)) -= length(position))dX(length(index)) = dX(length(index)) + (position(index(length(index))+1) -

position(index(length(index))))/2;end % end if statement

%Note the length of the region for each i (location in velocity profile)dLength(i)=sum(dX);

if w(i)==0Rn(i)=0;

38

Page 40: A Scatter Diagram Approach to the Selection of Design

else% calculate dRnl for each pt. in low-Vr regionfor k = 1:length(index)

dRnl(k)= (0.18*rho*ODft*velocity(index(k)) + 0.5*rho*pi*ODftA2*(2*sqrt(2)/sqrt(Rcm(i)) + 0.1)).*dX(k);end

Rnl(i)=sum(dRnl);end %end if w(i) statement

end %end if isempty(index) statement

% end i loop (i = location in velocity profile)end

lowregion = (abs(dLength))'; %changed here

Trimhigh2

function [highregion, Rnh] = trimhigh2(velocity, position, Vmax, D, dVr, rho, nu, Str)%TRIMHIGH2 finds the length and location of the portion of the power-out region% in which the reduced velocity is higher than in the power-in region. It also% calculates Rn for this region (Rnh)

% Motivation: to estimate the power-in region of a riser experiencing% vortex-induced vibration.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 11/18/02

ODft=D/12;w=2*pi*Str.*velocity./ODft; %velocity(i) = present Vc candidate

% Select all values greater than Vmax and calculate the length ratiofor i= 1:length(velocity)

% Find the points in the profile withing +/- dVr/2 of Vci[index, onesies]=find(velocity>Vmax(i));

if isempty(index)Rnh(i)=0;dLength(i)=0;

else

% Starting the j loop (within the INDEX vector)%runningtotal(i) = 0;

39

Page 41: A Scatter Diagram Approach to the Selection of Design

dX(1)=0;% Find the length before the first point in the INDEX vector, if it isn't the% first point in the velocity profile

if (index(1) ~ 1)dX(1) = (position(index(1))-position(index(1)-i))/2;

end

for j=2:length(index)dX(j)=0;

% check for continuity between current point and previous pointif (index(j-1)==(index(j)-1))% Add the length between the current point and the previous pointdX(j) = dX(j) + (position(index(j))-position(index(j- 1)));% if not continuous

else% Add half length after previous point

dX(j) = dX(j) + (position(index(j-1)) - position(index(j-1)+1))/2;% Add half length before current pointdX(j) = dX(j) + (position(index(j)) - position(index(j)-1))/2;end % end if statementend % end j loop (j = location in index loop)

% Add length after last point in the INDEX vector, if it isn't the last point% in the velocity vectorif (index(length(index)) -= length(position))dX(length(index)) = dX(length(index)) + (position(index(length(index))+1)

- position(index(length(index))))/2;end % end if statement

%Note the length of the region for each i (location in velocity profile)dLength(i)=sum(dX);

if w(i)==0Rnh(i)=0;

else% calculate dRnl for each pt. in high-vr region

for k =1:length(index)dRnh(k)= (0.2 *rho*(velocity(index(k)))A2/w(i)).*dX(k);end

Rnh(i)=sum(dRnh);end % end if w(i) statement

end %end if isempty(index) statement

% end i loop (i = location in velocity profile)end

highregion = (abs(dLength))'; %changed here

40

Page 42: A Scatter Diagram Approach to the Selection of Design

Plotprofiles

function [done] = plotprofiles(Vall, VcWinner, dVr, Vprofile, Vnew, Powerin, plotflag)%PLOTPROFILES plots velocity profiles with their power-in regions% highlighted.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 11/18/02

% plot full profileplot (Vall(:,2),Vall(:,1),'k') % if linearly interp., will be same as plotting Vnewhold onplot (Vnew(:,2),Vnew(:,1),'k*')% find points on power-in region (again)% Find the points in the profile withing +/- dVr/2 of VcWinnerVcmin = VcWinner*(1-dVr/2);Vcmax = VcWinner*(1+dVr/2);[index, onesies]=find((Vprofile>=Vcmin)&(Vprofile<=Vcmax));% Plot points of power-in region on profile plotPowerin=[Vnew(index, 1) Vnew(index,2)];plot (Powerin(:,2),Powerin(:,1),'r*')

% add title and labels

if plotflag==1% prompt user for profile nameprofilename = input('What is the name of this velocity profile? \n(Please put it in ...

single quotes)\n');titlewords = strcat(Velocity profile :', profilename,' with power-in region');title(titlewords);

elsetitle('Velocity profile with power-in region');

end

xlabel('Velocity (ft/sec)')ylabel('Relative position along riser')

Strcalc

function [St] = strcalc(Vcs, D, nu)%STRCALC estimates the Strouhal numbers that correspond to% Vcs, using the Str vs. Re table that corresponds to Shear7 Str code% 200.

% Vcwinner must be entered in ft/sec

% D should be entered in inches

41

Page 43: A Scatter Diagram Approach to the Selection of Design

% Motivation: to estimate the power-in region of a riser experiencing% vortex-induced vibration.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 10/29/02

% set outer diameter of the cylinderODin=D; % Change this lineODft=D/12;

% Str curve 200 from S7- corresponds to rough cylinderCurve200=[0 0.17; 20000 0.17; 30000 0.18; 40000 0.19; 50000 0.2;...

60000 0.21; 70000 0.22; 80000 0.23; 90000 0.24; 100000 0.24;...110000 0.24; 120000 0.24; 130000 0.24; 140000 0.24;...150000 0.24; 160000 0.24; 170000 0.24; 180000 0.24;...190000 0.24; 200000 0.24; 210000 0.24; 220000 0.24;...230000 0.24; 240000 0.24; 300000 0.24; 400000 0.24;...500000 0.24; 600000 0.24; 800000 0.24; 1000000 0.24;...2000000 0.24; 3000000 0.24; 4000000 0.24];

% Find Re for each VcRe=(Vcs*ODft)./nu;

% Find strouhal number for each Vcwinner by interpolationSt=interp1(Curve200(:, 1), Curve200(:,2), Re);

Idwinouts

function [FileName] = idwinouts(WinnerInfo, FileName)%IDWINOUTS appends the contents of the WinnerInfo to a text file,% resulting in a tab-delimited file. This can then be exported to% Excel, making it easy to compare the results of idwinner to Shear7

% Motivation: to estimate the power-in region of a riser experiencing% vortex-induced vibration.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 4/6/2002

FID=fopen(FileName,'a'); % opens file in "append" mode

fprintf(FID,'%f\t',WinnerInfo); % saves contents of WinnerInfo with% tabs between entries

fprintf(FID,'\n'); % adds carriage return

fclose(FID); % releases file

42

Page 44: A Scatter Diagram Approach to the Selection of Design

Scatterprep2

function [ScatMat, VcBounds, LrBounds, wheresit, check] = scatterprep2(numVcBins,numLrBins)%SCATTERPREP2 loads the output file from idwinner8noplot, and counts the% number of profiles (rows) that fit into numVcBins bins in center% velocity and numLrBins in length ratio.

% Outputs the probability matrix (in # of profiles), the matrix of Vc bin% boundaries, and the matrix of Lratio bin boundaries.

% Also outputs a matrix with the indices of the profiles included in each bin

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% Undergraduate, class of 2002% 4/20/2002

% load the winnersinfo matrix from the output fileload winnersinfo.txt;

% trim it to just the profile number, Vc, and LratioCountMat(:,1) = winnersinfo(:,1); % profile numberCountMat(:,2) = winnersinfo(:,3); % Vc winnerCountMat(:,3) = winnersinfo(:,4); % Length Ratio

numprofiles = length(winnersinfo(:,3));

% Establish upper & lower boundsVcMax=max(winnersinfo(:,3));VcMin=min(winnersinfo(:,3));LrMax = max(winnersinfo(:,4));LrMin=min(winnersinfo(:,4));

% Establish bin intervalsVcInt = (VcMax-VcMin)/numprofiles;LrInt = (LrMax-LrMin)/numprofiles;

% Make bin boundary matricesVcBounds = linspace(VcMin, VcMax,(numVcBins+1))';LrBounds = linspace(LrMin, LrMax,(numLrBins+ 1))';

% Create empty ScatMat matrixScatMat = zeros(numVcBins, numLrBins);

% Start search loop

43

Page 45: A Scatter Diagram Approach to the Selection of Design

% set ColCount, the variable that keeps track of which column we're in% in the wheresit matrix, which tells us which bin we're refering toColCount = 1;

% initialize the wheresit matrixwheresit = zeros(numprofiles, (numVcBins*numLrBins));

% i loop - one i is one Vc rowi= 1;j=1;

% set the (1,1) binnumber = find( (CountMat(:,2)>=VcBounds(1))&(CountMat(:,2)<=VcBounds(2)) &

(CountMat(:,3)>=LrBounds(1))&(CountMat(:,3)<=LrBounds(2)));

if (isempty(number))padded=zeros(numprofiles, 1);

elsepadded = wextend('c', 'zpd', number, (numprofiles-length(number)), '');

endwheresit(:,ColCount) = padded;

ScatMat(1,1)= ScatMat(1,1) + length(number);

% set the rest of the (1,j) row - each j refers to an Lratio columnfor j=2:(numLrBins)

ColCount = ColCount+ 1;number = find( (CountMat(:,2)>=VcBounds(1))&(CountMat(:,2)<=VcBounds(2)) &

(CountMat(:,3)>LrBounds(j))&(CountMat(:,3)<=LrBounds(j+ 1)));

if (isempty(number))padded=zeros(numprofiles, 1);

elsepadded = wextend(c', 'zpd', number, (numprofiles-length(number)), '');

endwheresit(:,ColCount) = padded;

ScatMat(1,j)= ScatMat(1,j) + length(number);end

% set the rest of the rows

for i=2:(numVcBins)

j=1;ColCount = ColCount+ 1;number = find( (CountMat(:,2)>VcBounds(i))&(CountMat(:,2)<=VcBounds(i+ 1)) &

(CountMat(:,3)>=LrBounds(j))&(CountMat(:,3)<=LrBounds(j+ 1)));

if (isempty(number))padded=zeros(numprofiles, 1);

44

Page 46: A Scatter Diagram Approach to the Selection of Design

elsepadded = wextend(c', 'zpd', number, (numprofiles-length(number)), 'r');

endwheresit(:,ColCount) = padded;

ScatMat(i,j)= ScatMat(ij) + length(number);

for j=2:(numLrBins)ColCount = ColCount+1;number = find( (CountMat(:,2)>VcBounds(i))&(CountMat(:,2)<=VcBounds(i+1)) &

(CountMat(:,3)>LrBounds(j))&(CountMat(:,3)<=LrBounds(j+1)));

if (isempty(number))padded=zeros(numprofiles, 1);

elsepadded = wextend('c', 'zpd', number, (numprofiles-length(number)), 'r');

endwheresit(:,ColCount) = padded;

ScatMat(i,j)= ScatMat(ij) + length(number);end

end

check = sum(sum(ScatMat));

% Output ScatMat to file

FID=fopen('scatterinfo.txt','a'); % opens file in "append" mode

for counter = 1:size(ScatMat,1)fprintf(FID,'%f\t',ScatMat(counter,:)); % saves contents of ScatMat with

% tabs between entriesfprintf(FID,'\n'); % adds carriage return

end

fclose(FID); % releases file

% Output whereis to file

FID=fopen('wheresit.txt','a'); % opens file in "append" mode

for counter2 = 1:size(wheresit,1)fprintf(FID,'%f\t',wheresit(counter2,:)); % saves contents of wheresit with

% tabs between entriesfprintf(FID,'\n'); % adds carriage return

end

45

Page 47: A Scatter Diagram Approach to the Selection of Design

% releases file

% Output VcBounds to file

FID=fopen('VcBounds.txt','a'); % opens file in "append" mode

for counter3 = 1:length(VcBounds)fprintf(FID,'%f\t',VcBounds(counter3,:));

fprintf(FID,'\n');end

fclose(FID);

% saves contents of VcBounds with% tabs between entries% adds carriage return

% releases file

% Output LrBounds to file

FID=fopen('LrBounds.txt','a'); % opens file in "append" mode

for counter4 = 1:length(LrBounds)fprintf(FID,'%f\t',LrBounds(counter4,:));

fprintf(FID,'\n');end

fclose(FID);

% saves contents of LrBounds with% tabs between entries% adds carriage return

% releases file

Colorcode3

function [colors, rangedivs] = colorcode3(wheresit, damage, numrows, numcols)%COLORCODE3 takes the wheresit matrix (one column for each bin, containing% the index numbers of the profiles that fall within that bin), and a two-% column matrix containing the profile index (1st column) and the damage rate% associated with that profile found by shear7. It calculates the average and% maximum damage rates belonging to each bin, and then sorts each bin into a% particular damage range, assigning it a color code number according to its% damage rate.

% A damage flag is set, allowing the user to choose whether to color code by the% average damage rate value or the maximum damage rate value. In the interests% of conservatism, this value is pre-set ot use the maximum value.

% An output flag is set, allowing the user to specify whether to output the% color codes for "colors" as a matrix, or to also output it to a file. It is set% to output the color codes to a file by default.

% The bins are calculated: creating 5 bins between the max and min damage rates.

46

fclose(FID);

Page 48: A Scatter Diagram Approach to the Selection of Design

% Look into absolute bin boundaries for the future (standardization).

% The outputs are a numrows by numcols matrix, containing the color code for each bin,% (i.e., formatted to be the same shape as the scatterplot matrix and a horizontal vector,% rangedivs, containing the boundaries of each damage rate range.

% Jessica Mary Donnelly% MIT Department of Ocean Engineering% 4/29/2002

% Flag average damage rate vs. max damage rate for color codingdamageflag=2; % 1=use average value 2=use maximum value

% Flag the ouput typeoutputflag=3; % 1=output color codes only 2=not used in this version

% 3=output color codes only, to file

% Set number of color codes. I use 5.numcodes = 5;

% Start the damage rate-finding procedure

% initialize dmgvals matrixdmgvals = zeros((size(wheresit, 1)),2);

% Start j loop (j= each bin)for j=1:(size(wheresit,2)) % changed from 1

tempcolumn=wheresit(:,j); % strip out column w/ indices of profiles in bin

tempdmg=zeros(length(tempcolumn), 1); %make empty column to hold damage values

% Start i loop (i= each element in vector)for i=1:(length(tempcolumn))

if tempcolumn(i)-=0tempdmg(i)=damage(tempcolumn(i),2);

elsetempdmg(i)=0;

end % end if loopend % end i looptempdmg;

% put bin's mean & max damage rate in dmgvals matrixdmgvals(j,1) = mean(tempdmg);dmgvals(j,2) = max(tempdmg);

end % endj loop

% Calculate the damage range dividers

47

Page 49: A Scatter Diagram Approach to the Selection of Design

% Establish bounding method% bounding = 1; % sets even bins in damage ratebounding =0; % uses order of magnitude in fatigue life

if bounding ==1

% Establish upper & lower boundsdmgMax=max(dmgvals(:,damageflag));dmgMin=min(dmgvals(:,damageflag));

% Make bin boundary matricesrangedivs = linspace(dmgMin, dmgMax,(numcodes+1))';

elseif bounding ==0dmgvals = 1 ./dmgvals; % coverts damage rate to fatigue liferangedivs = [0 1 10 100 1000 10A256]'; %assumes 5 bins

end

% start color-coding process

% start k loop (k= each bin in damage matrix)%for k= 1: (size(dmgvals, 1))for k=1:(numrows*numcols)

if ( (dmgvals(k,damageflag)>= rangedivs(1)) & (dmgvals(k,damageflag) < rangedivs(2)))colors(k)= 1;

elseif ( (dmgvals(k,damageflag)>= rangedivs(2)) & (dmgvals(k,damageflag) < rangedivs(3)))colors(k)=2;

elseif ( (dmgvals(k,damageflag)>= rangedivs(3)) & (dmgvals(k,damageflag) < rangedivs(4)))colors(k)=3;

elseif ( (dmgvals(k,damageflag)>= rangedivs(4)) & (dmgvals(k,damageflag) < rangedivs(5)))colors(k)=4;

elseif ( (dmgvals(k,damageflag)>= rangedivs(5)) & (dmgvals(k,damageflag) <= rangedivs(6)))colors(k)=5;

elsecolors(k)=0;

end % endif loop

end % end k loop

colors %debug

% reformat colors to numrows by numcols matrixcolors = reshape(colors,numcols,numrows)';

% output color codes to file, if desired

if (outputflag==3)

48

Page 50: A Scatter Diagram Approach to the Selection of Design

size(colors, 1)FID=fopen('colorcodesformatted.txt','a'); % opens file in "append" modefor counter = 1: size(colors, 1)

fprintf(FID,'%f\t',colors(counter,:)); % saves contents of wheresit with

% tabs between entriesfprintf(FID,'\n'); % adds carriage return

end% end for loop

fclose(FID); % releases file

end % end if loop

49