Application of Computer Aided Design to the Image ...

1

Transcript of Application of Computer Aided Design to the Image ...

Page 1: Application of Computer Aided Design to the Image ...

可 視 化 情 報Vo1.11 No.43 (1991年10月)

論文

Application of Computer Aided Design to the

Image Processing of a Two-Dimensional Laminar Jet Flow

G., ZARBI and K., TAKAHASHI

ABSTRACT

This study utilizes computer aided design graphic simulation in the image processing

of visualized streamlines for the jet flow through a nozzle into the atmosphere. The flow

is assumed to be two-dimensional, incompressible, steady and laminar. The combination

of this simulation modelling with the image processing technique proved to increase the

efficiency of data processing and results in many aspects. Distributions of flow velocity,

vorticity and pressure are calculated using a streamline coordinate system for governing

equations. The results of CAD simulation are then compared with those obtained in

applying direct image processing technique (conventional simulation) and with numerical

ones for various Reynolds numbers and channel angles.

Key Words: Internal Flow, Viscous Flow, Computer Aided Design (CAD), Velocity Dis-

tribution, Streamline Coordinates, Image processing, Fluid Mechanics, Two-Dimensional

Flow, Laminar Jet

Introduction

This study deals with the liquid jet flow

through an orifice into the atmosphere. An

example of such a flow can be seen in a

fluid power component, especially around

the restriction of a hydraulic control valve,

which is a basic means for the control of

fluid power.

The flow inside a control valve is very

difficult to solve numerically due to the

geometry of free surfaces being hard to

determine initially. However, taking free

surfaces as a streamline coordinate curve,

a numerical solution can be achieved. Thus

streamline coordinate methods are very

useful for solving such a problem.

A number of authors have approached

their numerical simulation adopting such

coordinates. Takahashi developed stream-

line coordinate representing the free surface

of liquid for a two-dimensional steady flow

to solve the flow with complicated geom-

etries2). Takahashi et al3) used image pro-

cessing of a jet flow employing streamline

coordinates. Tsukiji and Takahashi4) per-

formed another numerical analysis on axi-

symmetric jet, using a streamline coordin-

ate system. Zarbi and Takahashi5) analyzed

flow through a nozzle into the atmosphere,

expanding the velocity distribution across

*Received Feb . 25, 1991; revision received August

30, 1991.**Department of Mechanical Engineering Sophia Uni-

versity, Tokyo, Japan

45

Page 2: Application of Computer Aided Design to the Image ...

234 G. ZARBI and K. TAKAHASHI

the jet flow to a Fourier series in the

streamline coordinates.

In the present study, the velocity field is

obtained from visualized streamlines using

the streamline coordinate system.

Comparisons are made between various

CAD and CAM (computer aided design and

manufacturing) systems available in the

present industrial market, employing the

experiences of five years work. On the

basis of these comparisons, for their range

of applicability and functionability in com-

bination with the image processing tech-

nique, useful results on the visualized flow

fields are obtained.

Nomenclature

L*: Half of the orifice width shown in

Fig. 1.

Q*: Flow rate per unit thickness.

q•‡*: Uniform velocity at an infinite dis-

tance downstream.

q*: Velocity.

q: Normalized velocity (=q*/q*•‡).

Re: Reynolds number=Q*/v*.

u, v: Normalized velocity components of

q in the x- and y-directions, res-

pectively.

ă: Normalized measuring ratio.

v*: Kinematic viscosity.

Į: Angle made by the x-axis and the

velocity (Fig. 1).ƒ¿

: Half of the channel angle.

ƒÓ: Normalized coordinate defined by

Eq. (9) in the Flow direction.

ƒÓ: Normalized coordinate defined by

Eq. (8) normal to the ƒÓ-direction.ƒ¶

: Normalized vorticity.

Superscript*: Dimensionless quantity: Re-

ference quantities L* and q•‡* are used for

mormalizing quantities.

Fig.1 Flow field geometry.

2. Simulation for obtaining velocity field

2.1 Visualization of streak lines

Streak lines used in this study were vis-

ualized by hydrogen bubble technique the

process and application of which were fully

covered by Reference(4). An example of

the results is shown in Fig.17.

2.2 Image processing by conventional

simulation using streamline coordi-

nates

The visualized streak lines were traced

and placed on a common tablet digitizer.

Since the flow was steady, these streak lines

coincide with streamlines. The coordinates

of points on each streamline then was dig-

itized. A third-order polynomial was

chosen to fit with a streamline between two

neighboring streamline points.

A mesh system then was generated using

a series of curves orthogonal to the curves

fitted to streamlines. In choosing the initial

streamlines from the visualized streak lines,

care was taken to coincide the streak line

with the division points on the orthogonal

curve passing through the two sharp points

of the orifice. These mesh node coordinates

were then fed into a computer program for

46

Page 3: Application of Computer Aided Design to the Image ...

Application of Computer Aided Design to the Image Processing of a Two-Dimensional Laminar 235

further processing using streamline coor-

dinates.

A streamline (ƒÓ-curve) and a curve (

•¬ -curve) normal to it are chosen to repre-

sent the streamline coordinate curves. The

governing equations with respect to inde-

pendent variables ƒÓ and •¬ are expressed

as follows2):

The continuity equation•¬

The equation of metric coefficient ă

•¬ The equation of motion in the ƒÓ-direction

•¬ The equation of motion in the •¬-direction

•¬ The definition equation of vorticity

•¬ The vorticity transport equation

•¬ The combination of Eqs. (1) and (2) leads

to•¬

Flow velocity q and metric coefficient ă

are related to •¬ and ƒÓ as follows:•¬•¬

•¬ The following equations7) will be applied

to evaluate the residual on the artificially

inserted streamlines near the boundaries,

for the equations of continuity and metric

coefficient ƒÉ:•¬

•¬ The values of ƒ¶ and q can be calculated

from the difference equations which appro-

ximate Eqs. (5)•`(9).

2. 3 Image processing by CAD Simulation

The visualized streak lines were sketch-

ed by means of a stylus pen on a

common tablet digitizer and then converted

into the CAD drawing elements (see Fig.

2 for the procedure). For the computer

aided design simulation, a series of com-

puter programs were used which are written

in the form of Macros (Lisp language) uti-

lizing the CAD functions. Each of the Mac-

ros used in the programs combines a num-

ber of CAD commands to form one single

command. The use of the programs are

possible without any programming expe-

rience, so that after a brief introduction

anyone can work with the system. Since

only little storage space is necessary, the

programs can be executed on a personal

computer. A common tablet digitizer is

used as the input device, hence the demand

on peripheral devices is kept low. In Mac-

ros used in the programs, the CAD func-

tions which are common to evry available

CAD system are utilized. Hence the trans-

ferability of the programs to other CAD

will not present any problem. Macros which

are combination of CAD functions speed-

up the data processing, increase the flexibil-

ity and accuracy.

Using CAD equipment the whole visua-

lized flow pattern can be sketched and stor-

ed permanently in the form of drawing

units. Once these streak lines are sketched,

47

Page 4: Application of Computer Aided Design to the Image ...

236 G. ZARBI and K. TAKAHASHI

Fig.2 Flow chart for CAD simulation .

recalling, processing and further manipula-

tion all will be done from within the CAD

graphic simulation area without any uncer-tainty of mislocation errors of traced streak

lines on digitizer, or waste of time in choos-

ing wrong streak lines. When we created

the flow pattern, it is then possible to

build-up a surface and mesh system on it

(see Fig.2).

Two surfaces can be generated on the

upper and lower portion of our flow field

and then join them to have a unified sur-

face for the entire flow field . The mesh then can be generated on this surface with any

desired mesh size. Mesh will

be constructed by blending be-

tween sections, corners, or ed-

ges. This is construction of a

set of new lines that lie on the

surface, proportionally parallel

to one of its edges and equally

spread across the surface.

Another possibility is the use

of a program that can scan the

flow field boundaries and create

a mesh system, smoothing them

with spline functions available

within the CAD with high de-

gree of accuracy (CAD can keep

up to 16 or more decimal di-

gits). The coordinate of the

mesh nodes are then extracted

using a program which runs

within the CAD memory stor-

age, utilizing CAD functions

in the form of Macros. The

mesh coordinates are then fur-

ther processed for the calcula-

tion of the flow field, applying

the governing equations within

the CAD storage area.

Applying conventional, CAD

simulation and numerical calculation me-

thod, velocity fields for symmetrical lam-

inar flows were calculated from visualized

pattern at Re=300 and 400 for various

channel angles. The flow parameters, q, Į,

Ħ and ă, were expressed as functions of

ƒÓ and •¬ in streamline coordinates. Since ƒÓ

and •¬ do not represent physical length, it

is necessary to transform ‡™ƒÓ and ‡™•¬ into

‡™s and ‡™n which are physical length (al-

though they are normalized). Knowing the

values for q, ƒÆ, ‡™ƒÓ and ‡™•¬ will lead us to

the values of ‡™s and ‡™n applying Eqs . (8)

and (9), and the shape of free surfaces

48

Page 5: Application of Computer Aided Design to the Image ...

Application of Computer Aided Design to the Image Processing of a Two-Dimensional Laminar 237

could then be easily determined.

3. Results and Discussion

3.1 Flow net generation

For numerical simulation, to facilitate

the plotting of flow net, ‡™s and ‡™n were

expressed in xy coordinates. From the

geometry of the flow field, shown in Fig.1,

the values of the xy coordinates along curve

FOE can be determined, applying the flow

conditions at the inlet to the convergent

channel. Proceeding from these values, the

x-y coordinates can be calculated for the

next position using ‡™s and ‡™n values.

Meshes with nonuniform grid spacing in

both directions were developed, i. e., for

mesh generating, an increase in the num-

ber of grid points in areas where gradients

in the flow are high (i. e., near the orifice

edges), and a decrease in the number of

grid points in the low gradient region (i.

e., near the center of the channel and far

upstream and downstream of the orifice)

were considered. Useful results were ob-

tained for grid numbers as high as 41•~42.

Figures 3 and 4 present meshes generated

by numerical simulation for Re=300 and 400

and for various channel angles.

In CAD application, a mesh size as big

as 5000 was generated to compare the

computing time with those of conventional

and numerical simulations. Figures 5 and

6 show flow nets generated on CAD with

some artificially inserted streamlines for

Re=400 and 300 and for various channel

angles.

After inputting all streamlines data in

the form of drawing units using a computer

aided design package, several ways were

Fig.3 Numerical result of a flow net gen-

erated for Re=400 and half channel-

angle 45•‹

Fig.4 Numerical result of a flow net

generated for Re=300 and half

channel-angle 30•‹.

Fig.5 CAD simulation result of a flow

net generated for Re=400 and

half channel-angle 45•‹.

Fig.6 CAD simulation result of a flow net

generated for Re=300 and half channel-

angle 30•‹.

49

Page 6: Application of Computer Aided Design to the Image ...

238 G. ZARBI and K. TAKAHASHI

employed to form a mesh system on stream-

lines. Various number of divisions on

streamlines were tried to achieve an op-

timum mesh size. The central streamline

was taken as a reference streamline to

work out the node coordinates on the mesh

system (see Fig. 2).

To have a more clear picture of the con-

dition at the sharp edges of orifice, different

numbers of grids were tried for various

streamline being taken as the base calcu-

lating reference streamline. The best re-

ference line was found to be the central

streamline, as the streamlines are more

stable in the central portion of the channel

and less separation occurs.

In applying CAD simulation method, it

was possible to insert artificial streamlines

near the wall to obtain more mesh near

the solid boundaries and free surfaces of

the fluid. This was done by the surface

generating function of the CAD. The re-

sidual for the continuity and ă equations

were considered using Eqs. (9) and (10),

to check the validity of these streams.

These residual values proved to be less

than for some cases equal to 1% for every

mesh point on these artificial streamlines.

However, near the restriction where the

curvature is large, these residuals were

slightly higher. On the average it can be

said that the residuals are about 1 to 2% .

We can conclude that the precision of CAD

applications on the visualized pattern de-

creases as the curvature of the streamline

increases.

For the conventional simulation of image

processing, meshes were generated for var-

ious Reynolds numbers and channel angles

(see Figs. 7 and 8).

For the experimental results, streamlines

passing through the equally spaced points

Fig.7 Conventional simulation result

of a flow net generated for Re

=400 and half channel-angle 45•‹.

Fig.8 Conventional simulation result of a flow

net generated for Re=300 and half chan

- nel-angle 30•‹.

on curve APD (Fig. 1), or very near to

them were chosen for the visualized flow

pattern.

In case of numerical solution we let the

positions of mesh points being denoted by

i in the ƒÓ-direction and j in the •¬-direction

(1•¬i•¬m and 1•¬j•¬n). The variable ƒÓ was

transformed into a new variable R by a

hyperbolic function R=tanh(ƒÓ), where ƒÓ1=

-•‡ corresponds with R1=-1 and ƒÓm=+•‡

with Rm=+1.

For the convenience in calculation, •¬=•}1

were assigned to the streamlines correspond-

ing to the solid walls.

Taking constant step width for Ri in the

ƒÓ -direction and for •¬i in the •¬-direction,

we proceeded with the computation. The

initial values of qif, Ħij and Įij were set

to zero and that of ăij to unity. Then, the

50

Page 7: Application of Computer Aided Design to the Image ...

Application of Computer Aided Design to the Image Processing of a Two-Dimensional Laminar 239

values of ăij, Ħij, qij and Įij are computed

from the difference equations by iteration5).

The entire streamlines are not shown in

the limited plotting scale area for the ve-

locity field. This is to have a more clear

and better understanding of the flow field

and the streamlines behavior.

3.2 Comparison of the CAD results with

conventional ones

In the present study a computer aided

design modelling which is rather new in

engineering field was applied to image pro-

cessing of visualized pathlines. The calcu-

lation and procedure steps are explained

in Fig. 2. In order to confirm the accuracies

of this simulation and the conventional one

numerical computation was carried out. In

numerical computation, we employed the

same procedure as Ref. (5).

By comparing Figs. 3 to 8, it is possible

to assess the smoothness and accuracy of

the shape of the streamlines generated by

CAD. The artificially inserted streamlines

help the concentration of grids near the

wall and restriction areas. This in turn

reduces residuals which are greatly related

to the mesh refinement in these areas.

In conventional modeling, it was not

possible to generate the number of meshes

as large as that generated by CAD on per-

sonal computer. This is because of the

massive calculation involved in treating

the high degree of polynomial fitted to the

streamlines. It would cause memory and

over flow problems.

In Figs. 9 to 11 some main feature of

CAD simulation results are given. In all

the cases presented for the present study,

Fig.9 (a) Velocity profiles obtained by

CAD simulation for Re=400 and

half channel-angle 45•‹.

Fig.9 (b) Velocity profiles obtained by

conventional simulation for Re

=400 and half channel-angle 45•‹.

Fig.10 (a) Velocity profiles obtained by

CAD simulation for Re=300 and

half channel-angle 45•‹.

Fig.10 (b) Velocity profiles obtained by

conventional simulation for Re

=300 and half channel-angle 45•‹.

51

Page 8: Application of Computer Aided Design to the Image ...

240 G. ZARBI and K. TAKAHASHI

Fig.11 (a) Velocity profiles obtained by CAD sim-

ulation for Re=300 and half channel-

angle 30•‹.

Fig.11 (b) Velocity profiles obtained by conventio-

nal simulation for Re=300 and half

channel-angle 30•‹.

Fig.12 Velocity profiles obtained by num-

erical simulation for Re=300 and

half channel-angle 45•‹.

Fig.13 (a) Comparison of velocity profiles

of CAD simulation with nume-

rical ones for Re=300 and half

channel-angle 45•‹.

Fig.13 (b) Comparison of velocity profiles

of CAD simulation with nume-

rical ones from the orifice pos-

ition for Re=400 and half

channel-angle 45•‹.

Fig.13 (c) Comparison of velocity profiles of

CAD simulation with numerical-

ones from the orifice position for

Re=300 and half channel-angle 30•‹.the velocities are normalized using the

uniform velocity q*•‡ at an infinite distance

downstream. These figures show that, con-

siderable improvement in velocity profiles

are obtained applying CAD simulation in

comparison to the conventional image pro-

cessing application.

This improvement together with the well

conformed results of CAD with those of

the direct numerical modeling values, give

support to the accuracy of CAD simulation.

Figures 12 to 16 show these . numerical re-

sults and their comparisons with those ob-

52

Page 9: Application of Computer Aided Design to the Image ...

Application of Computer Aided Design to the Image Processing of a Two-Dimensional Laminar 241

Fig.14 (a) Comparison of velocity profiles of

CAD simulation with conventional

ones for Re=400 and half channel-

angle 45•‹.

Fig.14 (b) Comparison of velocity profiles of

CAD simulation with conventional

ones for Re=300 and half channel-

angle 45•‹.

Fig.14 (c) Comparison of velocity profiles of CAD sim-

ulation with conventional ones for Re=300

and half channel-angle 30•‹.

Fig.15 Comparison of the shape of stream-

lines obtained by CAD simulation

with the numerical ones for Re=300

and half channel-angle 45•‹.

Fig.16 Comparison of the velocity distribution

along the free surface of fluid by CAD and

numerical simulation for Re=300 and half

channel-angle 45•‹.

Fig.17 Visualized streak lines for Re=

400 and half channel-angle 45•B.

tained by CAD and conventional simula-tions.In these figures the shape of velocity profiles are being compared and the mag-nitude of the velocities are not indicated. By looking at Figs.9-14, we can see

that the shape of velocity profiles obtained

in applying CAD simulation are well con-

formed with those of numerical and the

53

Page 10: Application of Computer Aided Design to the Image ...

242 G. ZARBI and K. TAKAHASHI

degree of conformity increases with a de-

crease in channel angle.

The computing time for CAD model

proved to be about 1/4 than that of con-ventional modeling by the same computer

facilities. The simplicity and precision of

CAD modeling is also worth noticing.

3.3 Benefits of CAD application in How

visualization

The followings are some merits in apply-

ing CAD simulation to flow visualization:

i) automatically and graphically data pro-

cessing and their manipulation by means

of Macros in absolute, ralative, and polar

coordinates save a great deal of time and

smooth the operation.

ii) it is possible and very useful to allocate

different layer and identities to individual

streamline, hence all the streamlines and

mesh elements can be treated together or

individually.

iii) Entities can be retrieved graphically

by a simple program for their radius of an

arc, normal vector, location of points along

the entity with any specific direction and

distance, intersection points and tangent on

entities, etc., just by referring to the iden-

tity of entities. These procedures are per-

formed graphically and are not involved

with the massive calculation of polynomial

equations fit to the streamlines as in the

conventional modeling. Hence, save enor-

mous amount of computing time, increase

accuracy (in comparison to iterative simu-

lation) and reduce programming struggle.

iv) with a simple group of developed Mac-

ros, it is easy to extract and store mesh

informations such as coordinates in three

different coordinate systems, relative dis-

tance with all neighboring nodes, absolute

distance from the origin, and vector direc-

tion with respect to the successive node.

v) it is possible to return to operating sys-

tem (OS) from within the CAD and utilize

various application softs without exiting

the CAD system which saves time.

vi) the streamlines are sketched using a

common digitizing tablet and stylus pen

(or mouse) with free-hand drawing. The sketched streamlines which are in the form

of drawing entities can be converted into

binary data file which are common to all

available CAD systems.

vii) relocation of any specific streamline

on the flow pattern and alteration in choos-

ing streamlines or in mesh size can be

done simply, quickly, and without error.

iix) the iterative graphically extracted co-

ordinates and simultaneous storage will

allow the generation of very big sizes of

mesh with little time. This would cause

the over flow and memory problems with

the sacrifice of time in conventional ap-

proach.

4. Conclusions

The two-dimensional, steady, incompress-

ible, laminar liquid jet flow from a nozzle

into the atmosphere was visualized. The

flow field was calculated using computer

aided design graphic simulation and image

processing technique. A streamline coordi-

nate system was adopted. In order to con-

firm the validity of this simulation results,

the governing equations were numerically

solved by finite difference method. The

results are well confirmed with the numer-

ical ones. To compare the CAD simulated

results with the conventional ones, the flow

field calculations were performed convention-

ally and CAD results showed considerable

improvements in velocity profiles, generated

flow nets, and in time saving.

For the present study applying CAD sim-

54

Page 11: Application of Computer Aided Design to the Image ...

Application of Computer Aided Design to the Image Processing of a Two-Dimensional Laminar 243

ulation the following conclusions are drawn:

i) it is much easier to manipulate the

number of divisions on streamlines for

their coordinate values with higher

accuracy than conventional simu-

lation.

ii) since a continuous line will be sketch-

ed rather than digitizing point-to-

point on each streamline, the human error will have less effect on extrac-

ting coordinate of points

iii) reduces other possible sources of error

associated with conventional way of

data processing such as error in di-

viding streamlines into equal number

of divisions, error in relocating grid

points on mesh system in which slight dislocation of digitized points will lead

to a large systematic error.

iv) the combination of CAD and image

processing technique saves computing time by 1/4 compared to convention

al image processing simulation.

Acknowledgment

The authors would like to express their

appreciation to Mr. Yuetsu Kodama, De-

partment of Mechanical Engineering, Koga-

kuin university, for his kind cooperation

in carrying out experiments when he was

a graduate student of Sophia university.

Reference

1) Takahashi, K. and Tsukiji, T.: Numerical analysis of a laminar jet using streamline coordinate system, Trans. CSME., Vol. 9, No. 3 (1985), p. 165

2) Takahashi, K.: A numerical analysis of flow using streamline coordinates, Bull. JSME., Vol. 25, No. 209 (1982), p. 1696.

3) Tsukiji, T. and Takahashi, K.: Numerical analysis of an axisymmetric jet using a streamline coordi-nate system, JSME., Int. J., Vol. 30, No. 267 (1987),

p. 1406.4) Takahashi, K., Tsukiji, T. and Sakagami, T.: Im-

age processing of a jet flow using a streamline coordinate system, Fluid Control Measurement, Pergamon Press, Vol. 2, (1985), p. 711.

5) Zarbi, G. and Takahashi, K.: Prediction of the laminar two-dimensional Jet flow through a conver-

gent channel, JSME International Journal, Vol. 34, No. 311 (1991)

6) Takahashi, K.: Recent development of fluid me-chanics in fluid power engineering, JSME Interna-tional Journal Series II, Vol. 32, No. 2 (1989), p. 147.

7) Hori, H., Tsukiji, T. and Takahashi, K.: Numerical processing of a visualized streak line image using a streamline coordinate system, Trans. Jpn. Soc. Mech. Eng., B, Vol. 56, No. 531 (1990), p. 3292.

55