28th ecmi modelling week final report

21
European Consortium for Mathematics in Industry 28th ECMI Modelling Week Final Report 19.07.2015—26.07.2015 Lisboa, Portugal

Upload: others

Post on 27-Dec-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 28th ECMI Modelling Week Final Report

European Consortium for Mathematics in Industry

28th ECMI Modelling WeekFinal Report

19.07.2015—26.07.2015Lisboa, Portugal

Page 2: 28th ECMI Modelling Week Final Report

Group 4

Shape analysis of anaxisymmetric drop

Author 1: Adrian Domınguez VazquezUniversidad Carlos III de Madrid,

Av. de la Universidad, 30, 28911 Leganes, Madrid, Spain

Author 2: Ivar PerssonFaculty of Engineering, Lund University,

Box 118, SE-221 00 Lund, Sweden

Author 3: Joana Vaz BaltazarInstituto Superior Tecnico, University of Lisbon,

1049-001 Lisboa, Portugal

Author 4: Radojka CiganovicFaculty of Natural Sciences and Mathematics, University of Novi Sad,

Trg Dositeja Obradovica 4, 21000 Novi Sad, Serbia

Author 5: Robby RudatFak. Mathematik und Naturwissenschaften, Technische Universitat

Dresden,01062 Dresden, Germany

Instructor: Tihomir IvanovFaculty of Mathematics and Informatics, Sofia University

5 James Bourchier Blvd., 1164 Sofia, Bulgaria

2

Page 3: 28th ECMI Modelling Week Final Report

Abstract

The optimal parameters that better fit the Laplacian profile correspond-ing to a given drop shape obtained from an image have been numericallycomputed succesfully. Two types of drop are considered: a pendant drop,subjected to the action of gravity only, and a rotating drop subjected toboth, gravitational and centrifugal forces. An image processing algorithmis implemented to obtain the drop profile from a given image. Two numer-ical methods are studied: a first order Explicit Euler method and a moreaccurate fourth order Runge-Kutta method. According to the results, theRunge-Kutta method needs a better initial guess, being the rates of con-vergence of both methods identical. Ignoring the computational time, aproposed procedure would be to use the Explicit Euler method to improvea potentially bad initial guess and then use the Runge-Kutta method topinpoint the parameters closer to their real values.

Page 4: 28th ECMI Modelling Week Final Report

2 Shape analysis of a rotating axisymmetric

4.1 Introduction

The surface tension is a phenomenon caused by the cohesive forces amongliquid molecules. In the bulk of the liquid, each molecule is pulled equallyin every direction by neighboring liquid molecules, resulting in a net forceof zero. But at the surface the molecules do not have the same moleculeson all sides of them and therefore are pulled inwards. This creates someinternal pressure and forces liquid surfaces to contract to the minimal area.

Surface tension is this elastic tendency of liquids which makes themacquire the least surface area possible. It is an important factor in the phe-nomenon of capillarity. Capillary is the ability of a liquid to flow in narrowspaces without the assistance of, and in opposition to, external forces likegravity. It occurs because of intermolecular forces between the liquid andsurrounding solid surfaces: the combination of surface tension and adhesiveforces between the liquid and container act to lift the liquid.

Numerous methodologies have been developed for the measurement ofsurface tension. Of these, axisymmetric drop shape analysis (ADSA) meth-ods are considered to be the most powerful because of their accuracy, sim-plicity, and versatility. They are also very suitable for automated computerimplementation by means of digital image analysis.

So, the goal of this project is to determine the surface tension of a dropof a certain liquid when the shape of that drop is given.

First, we will present the mathematical model relating the surface tensionof a drop, subjected to the action of gravity and to rotation, with its shape.This model will be numerically solved using two different methods (ExplicitEuler and Runge-Kutta). After that, when the drop’s shape is given, twooptimization algorithms (Newton-Gauss and Levenberg-Marquardt) will beimplemented in order to obtain the optimal value of certain parameters thatcan be used to calculate the drop’s surface tension. At the end we will use aphoto of a drop and digitalize it to obtain a set of points that describes theexperimental profile we have. The results will be presented and discussed.

Page 5: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 3

4.2 Modelling the drop

In this section, we will follow an article by Rotenberg, Boruvka and Neumann[6] in order to present the derivation of the model describing the non rotatingdrop.

ADSA methods are based on the numerical fit between the experimen-tally obtained shapes of drops and the mathematical model given by theclassical Young-Laplace equation of capillarity. This equation describes themechanical equilibrium conditions for two homogeneous fluids separated byan interface [5]:

∆p = 2Hσ, (4.1)

where H is the mean curvature of the interface, σ is the surface tension and∆p is the pressure difference across the interface.

The interface is described completely as a function of the coordinates x,y and z. The graphical representation of the problem (the description ofthe meridional section alone) can be seen in Fig. (4.1), which is a reduceddescription of the system, due to its symmetry.

a)

R1

R2

0

ds

dxdz z

x

s

z

xs

q

q

b)

z

xsx

sz

0

q

Figure 4.1: Definition of the coordinate system: a) Profile of a sessile drop;b) Profile of a pendant drop.

The Young-Laplace equation of capillarity can be written in the followingway, using the fact that the curvature of a surface can be obtained by theinverse of the radius of the curvature, as shown in [6],

∆p = σ

(1

R1+

1

R2

), (4.2)

where R1 and R2 are the two principle radii of curvature, see Fig. (4.1).

In the absence of external forces, other than gravity, the pressure differ-ence is due to the effect of the hydrostatic pressures and is a linear functionof the elevation z, measured from the datum plane:

Page 6: 28th ECMI Modelling Week Final Report

4 Shape analysis of a rotating axisymmetric

∆p = ∆p0 + ∆ρ g z, (4.3)

where ∆p0 the pressure difference at a selected datum plane, ∆ρ is thedifference in the densities of the two bulk phases and g is the gravitationalacceleration.

According to Fig. (4.1) the x axis is tangent to the curved interface andnormal to the axis of symmetry and the origin is placed at the apex. Thus,we will have the following identities:

∆p0 = 2H0σ = 2σ1

R0,

1

R1=dθ

ds,

1

R2=

sinθ

x,

(4.4)

where R0 is the radius of curvature at the origin (0, 0), s is the arc lengthmeasured from the origin and θ is the turning angle measured between thetangent to the interface at the point (x, z) and the datum plane.

Since R1 turns in the plane of the paper the identity for R1 representingthe rate of change of the turning angle θ with respect to the arc-lengthparameter s, is true by definition. On the other hand, R2 rotates in a planeperpendicular to the plane of the paper and about the axis of symmetry.

Substituting the first of these three equations in (4.3), and then usingthe other two remaining equations in (4.2) we obtain:

∆p = 2σ1

R0+ ∆ρ gz = σ

(dθ

ds+

sinθ

x

). (4.5)

This equation can be rearranged to:

ds=

2

R0+

∆ρ g

σz − sinθ

x. (4.6)

Besides this relation, we also need to define the relations for the merid-ional curve. This can be represented in a parametric form

x = x(s), z = z(s).

Again using Fig. (4.1) we get the differential identities:

dx

ds= cosθ,

dz

ds= sinθ.

(4.7)

For the three differential equations (4.6), (4.7) we consider as initialconditions

x(0) = z(0) = θ(0) = 0.

Page 7: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 5

So, the model relating the surface tension σ of a drop subjected only togravity is given by this first-order differential system:

ds=

2

R0+

∆ρ g

σz − sinθ

x,

dx

ds= cosθ,

dz

ds= sinθ,

x(0) = z(0) = θ(0) = 0.

(4.8)

Then, for given R0 and ∆ρ, σ and g the complete shape of the curve canbe obtained.

If the drop is subjected to the action of gravity, as well as to rotation,with angular velocity ω, along the z axis, the problem will be similar andwe still can obtain the three last equations in (4.8), but the first equationin (4.8) must have an extra term.

When the drop is rotating there exists the centrifugal force

~fc = ~ω × ~ω × ~r,

where ~ω = (0, 0, ω) and ~r = (x(s), 0, z(s)) ≡ (x, 0, z).Computing the cross vectors we get:

~fc = (−ω2x, 0, 0).

Since pressure is obtained as the quotient between a force and an area,we need to compute the following integral:∫ x

0∆ρω2u du =

1

2∆ρω2x2.

Therefore, a new model is obtained:

ds=

2

R0+

12∆ρω2

σx2 +

∆ρ g

σz − sinθ

xdx

ds= cosθ

dz

ds= sinθ

x(0) = z(0) = θ(0) = 0

(4.9)

The first equation in (4.9) has several parameters, namely R0, ∆ρ, ω,σ and g. If we nondimensionalize the system we will reduce the number ofparameters, simplifying the resolution of such equation, and we will avoid

Page 8: 28th ECMI Modelling Week Final Report

6 Shape analysis of a rotating axisymmetric

the occurrence of significant errors due to the fact that the values of theseparameters are of very different orders.

The second term in the equation has dimension m−1, so we can nondi-mensionalize it by multiplying it with an arbitrary length R ([R] ≡ m).

We define the following new variables:

s′ =s

R, x′ =

x

R, z′ =

z

R.

From here we obtain:

ds = Rds′, dx = Rdx′, dz = Rdz′.

We have to do the following calculations:

• dθds

=dθ

Rds′and

ds=

2

R0+

12∆ρω2

σ(Rx′)2 +

∆ρ g

σ(Rz′)− sinθ

(Rx′)

⇒ dθ

ds′= 2

1

R0R+

12∆ρω2

σR3x′2 +

∆ρ g

σR2z′ − sinθ

x′

• dxds

=Rdx′

Rds′=dx′

ds′= cosθ

• dzds

=Rdz′

Rds′=dz′

ds′= sinθ

Now, let us introduce the following notation:

b =1

R0, d = bR, Ω =

12∆ρω2R3

σandB =

∆ρ gR2

σ.

Using these identities and writing the equations denoting the variables fornotational simplicity with x, z and s, instead of x′, z′ and s′ we can rewritethe model (4.9):

ds= 2d+ Ωx2 +Bz − sinθ

xdx

ds= cosθ

dz

ds= sinθ

x(0) = z(0) = θ(0) = 0

(4.10)

Page 9: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 7

4.3 Numerical Methods

Solving the ODE system

An Explicit Euler method (EE) and a fourth order Runge-Kutta method(RK4), see [1] have been implemented to get the solution of the system ofordinary differential equations (4.10) corresponding to the Young-Laplaceequation of capillarity for an axisymmetric drop. These two methods giveacceptable results with an affordable computational time. Implicit methodshave not been considered due to the larger computational time required.

Explicit Euler (EE) method

The most simple numerical method for solving ordinary differential equa-tions is the Euler method. Discretizing the ODE system (4.10) with the EEmethod, we obtain

xn+1 − xn∆s

= cos θn,

zn+1 − zn∆s

= sin θn,

θn+1 − θn∆s

= 2d+Bzn + Ωx2n −

sin θnxn

.

(4.11)

Fourth order Runge-Kutta (RK4) method

The next method we have used is the explicit fourth order Runge-Kuttamethod, which is actually a generalization of the Euler method. The equa-tions describing the RK4 method are

k1 = f(sn, yn),

k2 = f

(sn +

h

2, yn +

h

2k1

),

k3 = f

(sn +

h

2, yn +

h

2k2

),

k4 = f (sn + h, yn + hk3) ,

yn+1 = yn +h

6(k1 + 2k2 + 2k3 + k4), (4.12)

with sn and yn standing for the independent variable (s) and the depen-dent variables (θ, x, z) respectively, and where

f =

(2d+ Ωx2 +Bz − sinθ

x, cosθ, sinθ

). (4.13)

Page 10: 28th ECMI Modelling Week Final Report

8 Shape analysis of a rotating axisymmetric

Practical estimation of the rate of convergence

The estimation of the rate of convergence is based on the assumption thatc changes slowly when we change the step-size h.

Let us now look at these three equations:

u(x) = yh + chα,

u(x) = yh2

+ c

(h

2

)α,

u(x) = yh4

+ c

(h

4

)α,

where yh(x) is the numerical solution obtained with a given method usinga step h, and yh/2(x) and yh/4(x) are the numerical solution given for thesame method for h/2 and h/4.

If we subtract second equation from the first, and also third one fromthe second, we will obtain

0 = yh + chα − yh2

+ c

(h

2

)α0 = yh

2+ c(

h

2)α − yh

4+ c

(h

4

)α.

Now we haveyh/2(x)− yh(x)

yh/4(x)− yh/2(x)= 2α,

and from there we obtain the convergence rate α

α = log2

(∣∣∣∣ yh/2(x)− yh(x)

yh/4(x)− yh/2(x)

∣∣∣∣) . (4.14)

Optimization methods

In order to find the set of parameters corresponding to the Laplacian profilethat better fits the given experimental shape of the drop, an optimizationproblem has to be solved. First, we will define the objective function whichgives the error between the theoretical and the experimental profiles.

Definition of the error function

Suppose that (Xm, Zm)m=Mm=1 is a set of experimentally points that describe

the meridional section of an interface and (xk, zk)k=Nk=1 is a set of points from

a calculated Laplacian curve. For each point of the experimental profileof the drop we search for the nearest point from the calculated Laplaciancurve. The objective function to minimize is then defined as

Page 11: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 9

E(d,Ω, B) :=1

2

M∑m=1

[(xn(d,Ω, B)−Xm)2 + (zn(d,Ω, B)− Zm)2

], (4.15)

where (xn, zn), ∀n ∈ 1, ..., N is the nearest point from the Laplacian curveto each experimental point. The optimum set of parameters (dopt,Ωopt, Bopt)must then verify

∂E

∂d= 0,

∂E

∂Ω= 0,

∂E

∂B= 0.

(4.16)

Newton-Gauss algorithm

The first algorithm considered to solve the optimization problem is theNewton-Gauss (NG) algorithm, see [2]. This method yields the followingsystem of linear equations to be solved iteratively,

∂2E∂d2

∂2E∂d∂Ω

∂2E∂d∂B

∂2E∂d∂Ω

∂2E∂Ω2

∂2E∂Ω∂B

∂2E∂d∂B

∂2E∂Ω∂B

∂2E∂B2

(dk,Ωk,Bk)

∆d

∆Ω

∆B

k

= −

∂E∂d

∂E∂Ω

∂E∂B

(4.17)

with, ∆d

∆Ω

∆B

k

=

dk+1 − dkΩk+1 − Ωk

Bk+1 −Bk

(4.18)

The iterative process starts with an initial guess (d0,Ω0, B0) and stopswhen the correction (∆d,∆Ω,∆B)k is below a given tolerance.

The second derivatives of the error function are computed numericallyusing second order divided differences, given by the following general ex-pression for a function g : R→ R, a certain variable x and a step h:

∂2g

∂x2=g(x+ h)− 2g(x) + g(x− h)

h2(4.19)

Thus, for instance, the second derivative of the error function for thevariable d is given by

Page 12: 28th ECMI Modelling Week Final Report

10 Shape analysis of a rotating axisymmetric

∂2E

∂d2=E(d+ h,Ω, B)− 2E(d,Ω, B) + E(d− h,Ω, B)

h2(4.20)

For B and Ω will be similar.

The cross derivatives are approximated, for a function g : R → R, acertain variable x and a step h, using the formula

∂2g

∂x∂y=g(x+ hx, y + hy)− g(x+ hx, y)− g(x, y + hy) + g(x, y)

hx, hy(4.21)

where x and y stands for general independent variables and h, hx and hythe steps considered for each of the variables, respectively.

Thus, for example, for Ω constant ∂2E∂d∂B will be equal to

∂2E

∂d∂B=E(d+ hd,Ω, B + hb)− E(d+ hd,Ω, B)− E(d,Ω, B + hB) + E(d,Ω, B)

hd, hB(4.22)

The other cross derivatives will be similar.

Levenberg-Marquardt algorithm

One of the most used optimization algorithm is Levenberg-Marquardt (LM).Our aim is to minimize error function, which is given with (4.15). If we put

err(xn(d,Ω, B), zn(d,Ω, B)) =[(xn(d,Ω, B)−Xm)2 + (zn(d,Ω, B)− Zm)2

],

(4.23)then we resolve our problem with the folowing sheme:

(dn+1,Ωn+1, Bn+1) = (dn,Ωn, Bn) + (JTJ + λ ∗ I)−1JT err(xCalc, zCalc),(4.24)

where λ > 0, I is identity matrix and J is Jacobian from r, that is

J = ∆r =(∂r∂d

∂r∂ω

∂r∂B

)(4.25)

Obtaining the initial guess

The iterative methods presented above for solving the optimization problemneed an initial guess (d0,Ω0, B0) in order to start the optimization process.This guess must be computed from the given experimental data. In orderto do that, we find a polynomial that fits a set of points x1, ...xL fromthe experimental profile of the drop including its apex, which correspondsto the origin of the coordinate system. Since the drop is axisymmetric,thispolynomial only have even terms, as for example,

Page 13: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 11

p(x) = ax4 + bx2. (4.26)

Using this polynomial, we can define an objective function to optimizein order to get the initial guess by considering the right hand side of thefirst equation in (4.10). The objective function is then defined as,

Φ(d,Ω, B) =L∑l=1

(g(d,Ω, B, xl, , θl, zl)− yl)2 (4.27)

where zl and θl are computed using the fitted polynomial,

zl = p(xl), (4.28)

θl = tan−1

(dz

dx

)= tan−1

(dp(xl)

dx

), (4.29)

g(d,Ω, B, xl, θl, zl) is the right hand side of the first equation in (4.10) eval-uated in xl, zl and θl and the values yl are defined as,

yl =dθ

ds |xl=dθ

dx |xl

dx

ds |xl=

1

1 +(dp(xl)dx

)2

d2p(xl)

dx2(4.30)

The problem to be solved is then,

∂Φ

∂d= 0,

∂Φ

∂Ω= 0,

∂Φ

∂B= 0,

(4.31)

which leads to the following linear system of equations,

∑L

l=1 4∑L

l=1 2x2l

∑Ll=1 2zl∑L

l=1 2x2l

∑Ll=1 x

4l

∑Ll=1 x

2l zl∑L

l=1 2zl∑L

l=1 x2l zl

∑Ll=1 z

2l

(dk,Ωk,Bk)

∆d

∆Ω

∆B

k

= −

∑L

l=1 2[yl + sin θl

xl

]∑L

l=1 x2l

[yl + sin θl

xl

]∑L

l=1 zl

[yl + sin θl

xl

] (4.32)

These are the equations for the most general case. The equations can bechanged to fit allready known parameters. For example, Ω = 0 leads to

∑L

l=1 4∑L

l=1 2x2l

∑Ll=1 2zl

0 1 0∑Ll=1 2zl

∑Ll=1 x

2l zl

∑Ll=1 z

2l

(dk,Ωk,Bk)

∆d

∆Ω

∆B

k

= −

∑L

l=1 2[yl + sin θl

xl

]0∑L

l=1 zl

[yl + sin θl

xl

] (4.33)

Page 14: 28th ECMI Modelling Week Final Report

12 Shape analysis of a rotating axisymmetric

In order to get a better estimation of the initial guess, specially forpendant drops, this process is split into two steps. In the first step, theobjective is to obtain d. Ω and B are set to zero and the polynomial is fittedusing a set of points located around the apex. Once d is obtained, it is fixedfor the second step and Ω and B are computed by fitting the polynomial toa wider part of the drop shape.

Image processing

In the sections before all calculations were based on a given curve, but in thebasic problem was to do the calculations based on a given picture. To closethe gap between the picture and the curve, a picture-processing algorithmwas implemented. This algorithm imports a given picture like picture 4.2and converts it into a grey scaling picture, which is saved as a matrix withthe size of the resolution of the picture.

500 1000 1500 2000 2500

200

400

600

800

1000

1200

1400

1600

1800

Figure 4.2: Picture of a pendant drop.

Given a threshold value, that matrix is converted to a binary matrix,dividing the values under and above the threshold. Also an a algorithm isimplemented to fix the reflections on the drop, to get an black and whitepicture like in picture 4.3 .

In the end the algorithm is crawling around the drop, collecting theindices of the pixel on the border. To get an even shape only every jth pixelis taken, where j is a number depending on the resolution of the picture.

Page 15: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 13

200 400 600 800 1000 1200 1400 1600 1800 2000 2200

200

400

600

800

1000

1200

1400

1600

Figure 4.3: Binary black and white picture

Given the wide of the tube the indices are finally transformed into the neededcoordinates.

Page 16: 28th ECMI Modelling Week Final Report

14 Shape analysis of a rotating axisymmetric

4.4 Numerical Results

The numerical results were obtained by functions implemented in Matlab.

Solving the ODE system

EE and RK4 methods were tested for two sets of values for the model pa-rameters:

1. Pendant drop: Ω = 0, d = 2.0644 and B = −2.4;

2. Rotating drop: Ω = −1.873, d = 1.504438 and B = 0.

The shape, (x, z), of the drop obtained from both methods was praticallythe same, as it can be seen in Fig. (4.4).

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

3

Figure 4.4: Shape obtained from EE and RK4.

The convergence rates of two methods were estimated using eq. (4.14),and are represented in Fig. (4.5) and (4.6).

0 50 100 150 200 2500.4

0.5

0.6

0.7

0.8

0.9

1

1.1Convergence rates for x and z axis

Indice of points

Rate

of converg

ence, alp

ha

x−coordinates

z−coordinates

0 50 100 150 200 250−6

−4

−2

0

2

4

6Convergence rates for x and z axis

Indice of points

Rate

of converg

ence, alp

ha

x−coordinates

z−coordinates

Figure 4.5: Rate of convergence of EE and RK4, respectively, for the pendantdrop.

The rates of convergence are very similar, though it was expected thatRK would have 4th order convergence.

Page 17: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 15

0 20 40 60 80 100 120 140 160 1800

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5Convergence rates for x and z axis

Indice of points

Rate

of converg

ence, alp

ha

x−coordinates

z−coordinates

0 20 40 60 80 100 120 140 160 180−1

0

1

2

3

4

5Convergence rates for x and z axis

Indice of points

Rate

of converg

ence, alp

ha

x−coordinates

z−coordinates

Figure 4.6: Rate of convergence of EE and RK4, respectively, for the rotatingdrop.

Optimization methods

We were given several sets of experimental data, which we used as input forNG and LM algorithms. Here we just present the results for the two setscorresponding to the pendant and rotating drops mentioned.

The initial values selected for the experimental data set of the pendantdrop were Ω = 0, d = 2 and B = −2.3, and for the rotating drop they wereΩ = −1.85, d = 1.5 and B = 0. These values were very close to the realones.

For these initial values, the values obtained for Ω, d and B, which mini-mized the error function (4.15), are indicated in the following tables.

Pendant drop

NG EE NG RK LM EE LM RK

Ω 0 0 0 0

d 2.0584 2.0642 2.003699 2.040388

B -2.4208 -2.3997 -2.300573 -2.308510

time (s) 0.14195 0.4637 0.9774 1.2538

Rotating drop

NG EE NG RK LM EE LM RK

Ω -1.8932 -1.8747 -1.849561 -1.850084

d 1.5099 1.5048 1.499807 1.499031

B 0 0 0 0

time (s) 0.18803 0.82283 1.8028 3.0245

From these results we can easily conclude that the computational timefor the RK method is considerably longer than the one for the EE method,with both NG and LM algorithms.

Fig. (4.7)-(4.10) represent the shape of the drop for these values.

Page 18: 28th ECMI Modelling Week Final Report

16 Shape analysis of a rotating axisymmetric

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x axis

z a

xis

Newton−Gauss algorithm with 1st order Explicit Euler

Calculated

Given

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

x axis

z a

xis

Newton−Gauss algorithm with 4th order Runge−Kutta

Calculated

Given

Figure 4.7: Comparing the shape obtained by NG with EE and RK4, re-spectively, for the pendant drop, with tolerance 0.01.

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

x axis

z a

xis

Newton−Gauss algorithm with 1st order Explicit Euler

Calculated

Given

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5

x axis

z a

xis

Newton−Gauss algorithm with 4th order Runge−Kutta

Calculated

Given

Figure 4.8: Comparing the shape obtained by NG with EE and RK4, re-spectively, for the rotating drop, with tolerance 0.0001.

In Fig. (4.10) for EE, the computational time for the experiment withtolerance equal to 0.0001 was considerably bigger than the time for theexperiment with tolerance equal to 0.01, so only the last is presented.

Obtaining the initial guess

The implemented basic version of the initial guess algorithm gives mixedresults. If the initial guess was good enough was depending on the algorithmthat was using it and the part of the drop that was used to obtain the guess.

For the different algorithms and the given theoretical curves, there wasno real system to be seen if it was converging with the initial guess or not,but for every curve there was at least one algorithm that was converging.

But for the part of the curve it seemed that it was depending on thetype of drop that was given. For pendant drops it gave better results to usea bigger part of the drop, where for rotating drops the results with smallerparts of the curve were better.

For the curve obtained from the image processing the basic version didn’tgive a satisfying result. But with the two step version, it was possible to

Page 19: 28th ECMI Modelling Week Final Report

28th ECMI Modelling Week 17

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5Levenberg−Marquardt algorithm with 1st order Explicit Euler

x axis

z a

xis

Given

Calculated

0 0.2 0.4 0.6 0.8 10

0.5

1

1.5

2

2.5Levenberg−Marquardt algorithm with 4th order Runge−Kutta

x axis

z a

xis

Given

Calculated

Figure 4.9: Comparing the shape obtained by LM with EE and RK4, re-spectively, for the pendant drop, with tolerance 0.01.

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.90

0.5

1

1.5

2

2.5

3Levenberg−Marquardt algorithm with 1st order Explicit Euler

x axis

z a

xis

Given

Calculated

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.90

0.5

1

1.5

2

2.5

3Levenberg−Marquardt algorithm with 4th order Runge−Kutta

x axis

z a

xis

Given

Calculated

Figure 4.10: Comparing the shape obtained by LM with EE and RK4,respectively, for the rotating drop, with tolerances 0.01 and 0.0001, respec-tively.

obtain an initial guess, which was good enough, that the following algorithmwere converging and approximating the curve very well.

Image Processing Algorithm

The image-processing-algorithm implemented during the project, success-fully obtained the curve from the given picture. But for a good result a highresolution picture is needed. If the resolution is too low, the curve will benot smooth or you will obtain not enough points for a satisfying result. Forexample the figure 4.2 with a resolution of 2560x1920 gives a curve with 226points and with a resolution 1280x960 it gives a curve with 282 points (seeFig. (4.11)).

Page 20: 28th ECMI Modelling Week Final Report

18 Shape analysis of a rotating axisymmetric

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.80

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.80

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

Figure 4.11: Comparing the shape obtained from high and low resolutionpicture, respectively.

4.5 Conclusions

The optimal parameters that better fit the Laplacian profile correspondingto a given drop shape have been computed successfully.

As we can see in the results all methods produce results that are reason-ably good with initial conditions that are good enough. We have assessedthe stability and the computational times of both methods. The ExplicitEuler method is more stable than the Runge-Kutta method and it convergeswithout the need of a so accurate initial guess in comparison to the Runge-Kutta method. Even though the rates of convergence for the Explicit Eulerand the Runge-Kutta method are the same, the latter produces more accu-rate results. Ignoring the computational time, a proposed procedure wouldbe to use the Explicit Euler to improve a potentially bad initial guess andthen use the Runge-Kutta to pinpoint the parameters closer to their realvalues.

Page 21: 28th ECMI Modelling Week Final Report

Bibliography

[1] Butcher, JC. Numerical Methods for Ordinary Differential Equations.John Wiley & Sons, Ltd, 2008, second edition.

[2] J. Nocedal, SJW. Numerical Optimization. Operations Research.Springer, 1999.

[3] Ranganathan, A. The Levenberg-Marguardt Algorithm June 2004.

[4] Wikipedia. Surface tension.URL https://en.wikipedia.org/wiki/Surface_tension

[5] ———. Young-laplace equation.URL https://en.wikipedia.org/wiki/Young-Laplace_equation

[6] Y. Rotenberg, LB and Neumann, AW. Determination of surfacetension and contact angle from the shapes of axisymmetric fluid inter-faces. Journal of Colloid and Interface Science 93(1), 169–183, May1983.

19