scieee Science in your language
[en] (orig)

Characterization of Cellular Damage Induced by the Bubble Bursting Phenomenon

Author: Matute Conejero, Pablo
Year: 2025
Source: https://idus.us.es/bitstreams/aa790ea0-78fe-4264-9722-7ec916e1da41/download
P oyec o Fin de Ca e a
Ingenie ía de Telecomunicación
Fo ma o de Publicación de la Escuela Técnica
Supe io de Ingenie ía
Au o : F. Ja ie Payán Some
Tu o : Juan José Mu illo Fuen es
Dep. Teo ía de la Señal y Comunicaciones
Escuela Técnica Supe io de Ingenie ía
Uni e sidad de Se illa
Se illa, 2013
T abajo Fin de G ado
G ado en Ingenie ía Ae oespacial
Cha ac e iza ion o Cellula Damage In-
duced by he Bubble Bu s ing Phenomenon
Au o : Pablo Ma u e Coneje o
Tu o : D. Al onso Miguel Gañán Cal o
Co u o : D. Jose Ma ía López-He e a Sánchez
Dp o. Ingenie ía Ae oespacial y Mecánica de Fluidos
Escuela Técnica Supe io de Ingenie ía
Uni e sidad de Se illa
Se illa, 2025
T abajo Fin de G ado
G ado en Ingenie ía Ae oespacial
Cha ac e iza ion o Cellula Damage Induced by
he Bubble Bu s ing Phenomenon
Au o :
Pablo Ma u e Coneje o
Tu o :
D. Al onso Miguel Gañán Cal o
Ca ed á ico de Mecánica de Fluidos
Co u o :
D. Jose Ma ía López-He e a Sánchez
Ca ed á ico de Mecánica de Fluidos
Dp o. Ingenie ía Ae oespacial y Mecánica de Fluidos
Escuela Técnica Supe io de Ingenie ía
Uni e sidad de Se illa
Se illa, 2025
T abajo Fin de G ado:
Cha ac e iza ion o Cellula Damage Induced by he Bubble Bu s -
ing Phenomenon
Au o : Pablo Ma u e Coneje o
Tu o : D. Al onso Miguel Gañán Cal o
Co u o : D. Jose Ma ía López-He e a Sánchez
El ibunal nomb ado pa a juzga el abajo a iba indicado, compues o po los siguien es p o eso es:
P esiden e:
Vocal/es:
Sec e a io:
acue dan o o ga le la cali icación de:
El Sec e a io del T ibunal
Fecha:

Ag adecimien os
A mi mad e y abuela, e e en es undamen ales en mi ida, po su cons an e apoyo, gene osidad y
ejemplo.
A mi pad e, que me e desde el cielo.
A mi ía Ana, po su ce canía y apoyo cons an e.
A quienes me han acompañado du an e es os cua o inol idables años, compa iendo e os, isas,
desespe ación y muchos buenos momen os.
A odos ellos, mi más since o ag adecimien o.
Pablo Ma u e Coneje o
G ado en Ingenie ía Ae oespacial
Se illa, 2025
I
Resumen
E
l enómeno conocido como ’Bubble Bu s ing’ ha demos ado juga un papel impo an e en
di e sos escena ios. En e odos ellos, uno pa icula men e in e esan e es su capacidad pa a
p o oca la mue e celula en bio eac o es.
El obje i o de es e es udio es ca ac e iza co ec amen e la le alidad de una bu buja que explo a
en la supe icie del agua, eniendo en cuen a una se ie de mecanismos que jamás se han conside ado,
además de los que ya se con abilizan.
Pa a ello, se han lle ado a cabo una se ie de simulaciones, a iando el núme o de Ohneso ge,
median e Basilisk y Py hon.
III

1 In oduc ion. The Bubble Bu s ing
P oblem.
O
ne o he mos de eloped luid mechanics ields in he pas 50 yea s has been mic o luidics.
D i en by he la es disco e ies o nano echnology, his discipline has p o en o be c ucial
o nume ous echnical and scien i ic applica ions. Coun less examples o his can be p o ided,
co e ing disciplines om bioenginee ing o medicine o manu ac u ing indus y o he ae ospace
sec o .
In he p esen , mic o luidics keeps expanding i sel and will con inue o p o ide signi ican
ad ancemen s o humani y, opening he doo o new oppo uni ies in he esea ch and de elopmen
o echnologies wi h a di ec impac on e e yday li e.
Among all phenomena ela ed o i , he bubble bu s ing p oblem dese es special a en ion.
Bubble bu s ing consis s in he collapse o an ai bubble, in his case nex o he wa e su ace, and
i s e olu ion in ime. A i s sigh his may no appea o be a e y signi ican p oblem; ne e heless,
i has a di ec impac on li e on Ea h, as i is esponsible o he wa e cycle. [5]
The ca i y le by he bubble leads o an explosion ha gene a es ae osols ha anspo in o
he a mosphe e sal s, o ganic ma e , mic oo ganisms and o he compounds. These ac as cloud
condensa ion nuclei and p omo e hei o ma ion, being hen essen ial [13].
Besides, he up u e o he bubble has a signi ican impac on li e su ounding he ca i y. P essu e
g adien s and o he o ces in ol ed in he p ocess can a ec mic oo ganisms. In ma ine ecosys ems,
i has p o en o ha e consequences in he ecosys em’s dynamics and biogeochemical p ocesses o
he ma ine li e.
Fo all hese easons, he s udy o he bubble bu s ing phenomena does no only con ibu e o he
unde s anding o mic o luidics, bu also i allows us o unde s and he a mosphe ic and biological
p ocesses in ol ed.
1.1 The Bubble Bu s ing P oblem
In he ollowing lines, we will p o ide a b ie desc ip ion o he p oblem as well as he ools and
p ocedu es used o i s esolu ion.
Whene e a bubble ises h ough a liquid and ge s o he su ace, a gas-liquid in e ace, he
in e play be ween di e en physical o ces leads o an explosion. This explosion is no hing mo e
han a je ha eaches a e y high eloci y and emi s d ople s.
In his s udy we will conside ha he inne ai bubble has iden ical p ope ies as he ex e io ai
and ha he bubble a aches o he in e ace wi hou modi ying i , as shown in Figu e 1.2. Al hough
his is no e y p ecise, as wha eally happens is ha he e is a de o ma ion o he wa e su ace, i
o e s a good app oxima ion. This will be u he analyzed in he subsequen chap e s.
1
2Chap e 1. In oduc ion. The Bubble Bu s ing P oblem.
Figu e 1.1
Bubble bu s ing p ocess on a bubble a ached o he unde wa e su ace, e olu ion on
he inside and ou side is shown. Ex ac ed om [15].
Figu e 1.2 Bubble conside ed a his s udy.
As men ioned, when he bubble adhe es o he gas-liquid in e ace, a hin liquid laye is o med.
Due o he mal luc ua ions, he hin wa e ilm ha sepa a es he inne bubble ai om he ex e io
b eaks. The new in e ace will de elop a apid e olu ion o i s geome y, sea ching o a new s a e
o equilib ium.
Figu e 1.3 E olu ion o he wa e -ai in e ace.
1.1.1 Global Pa ame e s
Bond numbe
This phenomenon is guided by as ly di e en o ces ha , howe e , a e ully de ined by wo
dimensionless numbe s: Bond and Ohneso ge.
Bond numbe quan i ies he ela ion be ween g a i a ional o ces and su ace ension.
Bo =ρgL2
σ(1.1)
In ou case we will ocus on a Bo«1, meaning ha capilla y e ec s will p ac ically de e mine he
e olu ion o he sys em o e g a i y. Since g a i y hen is no e y signi ican , we can assume ha
he ini ial geome y o he bubble is nea ly a sphe e – a ci cle in 2D. As a simpli ica ion, i will be
conside ed comple ely sphe ical.
1.1 The Bubble Bu s ing P oblem 3
ρgR2
σ≪1R2≪0.072
1000 ×9.81 R≪2.7mm
I he bubble adius (i ’s cha ac e is ic leng h) is much less han 2.7 mm, his should be a good
app oxima ion.
Ohneso ge numbe
Ohneso ge numbe measu es he impo ance o iscous o ces in on o a combina ion be ween
ine ial o ces and su ace ension.
Oh =µ
√ρσL(1.2)
Viscous o ces o e see damping he e ec s o ine ia and su ace ension in he dynamics o he
sys em, he eby modi ying he e olu ion o he phenomena.
Fu he mo e, Oh will de e mine he bubble adius i e e y o he a iable is ixed.
R=µ
Oh ·√ρσ 2
The e o e, depending on Bond and Ohneso ge numbe s, he sys em will p oduce a di e en
ou come.
1.1.2 The impo ance o Oh & he je phenomena
As said be o e, he collapse o he bubble is ollowed by a je , which is esponsible o he d ople s
(Figu e 1.4).
Figu e 1.4 Je and i s d ople emi ed o Oh =0.00833 ; (R=200µm). .
Nume ical da a show ha a ound Oh = 0.03, he je ha ollows he collapse eaches maximum
eloci y [
6
]. This is due o a balance be ween ine ia, capilla i y and iscous o ces, in such a way
ha he ene gy a ailable o je o ma ion is maximized.
Ano he in e es ing Ohneso ge numbe is 0.052, a e which no liquid spou will be emi ed in o
he ai [9].
4Chap e 1. In oduc ion. The Bubble Bu s ing P oblem.
1.2 Basilisk
To un ou di e en simula ions, we will use Basilisk. Basilisk is an open-sou ce p og am, designed
o Linux, based on he C p og amming language. I s main pu pose is o se e as an e icien
ad anced nume ical me hod sol e . To achie e his, Basilisk uses adap i e Ca esian g ids, meaning
i e ines he g id whe e a highe accu acy is needed - in his s udy, luid in e aces.
We will u he explain di e en me hods and unc ions ha Basilisk handles.
1.2.1 Basilisk’s Quad ee/Oc ee Adap i e Mesh Re inemen (AMR)
AMR is he co e o Basilisk’s compu a ional e iciency; i is he p ocedu e ha i uses o de e mine
whe e o inc ease he g id e inemen .
O en, g ids acqui e a g ea e p ecision by aising he numbe o cells in he whole domain;
howe e , AMR adjus s he compu a ional g id esolu ion only in he egions whe e a ine de ail is
equi ed, such as a eas wi h s eep g adien s, u bulence o he in e ace be ween wo luids - his is
speci ically ou case.
Depending on whe he a 2D o 3D scena io is un, Basilisk will use a quad ee o oc ee s uc u e,
espec i ely.
1. 2D Quad ee
The domain s a s as a single cell. I a highe e inemen is needed, he cell is di ided in o
ou o he cells.
2. 3D Oc ee
The domain s a s as a cubic cell. I a highe e inemen is needed, he cube will be di ided
in o ano he eigh cubic cells.
By de ining an e o h eshold, he p og am will decide whe e o inc ease he g id le el. This is
cons an ly checked a e e y ime s ep and i he e o is below a second e o h eshold, meaning
ha such a le el o e inemen is no longe needed, he cells a e me ged back in o a la ge cell.
To g an ha each cell can compu e i s de i a i es, halo cells (ghos cells) a e in oduced. These
a e nonphysical (a i icial) cells ha se e as communica ion be ween di e en le el e inemen
g ids, o in e pola ions o o bounda y condi ions.
Explained e y b ie ly, i a cell is a he bo de o he domain i lacks a leas a neighbou , hus o
secu e bounda y condi ions ghos cells a e used. Fo example, i we wan o impose in a 2D domain
ha he eloci y o he low when i en e s he domain is
u=1.0
a halo cell is c ea ed and s o es
his alue, allowing he i s eal cell o calcula e i s de i a i es. In his sense, i a cell neighbo s a
g ea e o smalle le el g id, he ine cell es ima es he alue by using in e pola ions wi h adjacen
cells.
Figu e 1.5 T ee-G id s uc u e. Pic u e ex ac ed om [19]. Mo e in o ma ion is a ailable he e.
1.2 Basilisk 5
1.2.2 VOF Me hod
The goal o he VOF Me hod is o de e mine he in e ace be ween wo luids using a olume ac ion
unc ion, “ ”, which a ies be ween 0 and 1.
The whole domain o s udy is di ided in o many cells, in which he ollowing ad ec ion equa ion
is measu ed.
∂
∂ +u·∇ =0(1.3)
I “ ” is equal o 0 o 1, i means ha ha cell is illed by one o ano he luid; i i akes alues in
be ween, ha means ha he cell con ains he in e ace. Two di e en echniques can be used hen
o econs uc he in e ace: S anda d VOF o PLIC-VOF, his las one used by Basilisk.
PLIC-VOF (Piecewise Linea In e ace Calcula ion) is an e olu ion o he S anda d VOF, sol ing
one o i s main p oblems, he di usion o he in e ace when ad ec ing “ ”. This means ha he
whole cell is conside ed o be he in e ace, which clea ly is no . PLIC-VOF calcula es he shape o
he in e ace inside he cell ollowing his p ocedu e.
1. The ec o n, no mal o he in e ace is calcula ed.
n=∇
|∇ |(1.4)
2.
A scala "d" is calcula ed such ha he olume ac ion o he econs uc ed in e ace ma ches
he gi en VOF ac ion inside he cell.
A luid = Acell = (∆x)2A luid(d) = (∆x)2(1.5)
Being ∆x he leng h o he cell.
3. Finally he ec o which con ains he shape o he in e ace, xis calcula ed.
n·x=d(1.6)
In p ac ice, he bisec ion me hod is applied o equa ion
Rn·x− (∆x)2=0
and
n·x=d
is
sea ched in an i e a i e p ocess.
No e ha a local e e ence sys em has been used, se ing as he o igin he cells lowe le
co ne .
1.2.3 Na ie -S okes cen e ed
Na ie -S okes sol e na ie -s okes/cen e ed.h is a Basilisk unc ion used o incomp essible lows
whe e densi y a ies (mul iphase luids).
I s main objec i e is o sol e he equa ion 1.7 h ough he Helmhol z-Hodge p ojec ion me hod.
∂u
∂ +u·∇u=−∇p+ν∇2u,∇·u=0(1.7)
This in ol es, i s , p edic ing he eloci y wi hou aking in o accoun he p essu e.

6Chap e 1. In oduc ion. The Bubble Bu s ing P oblem.
ρu∗−un
∆ =−ρun·∇un+µ∇2un+
Following his, incomp essibili y is imposed
∇·un+1=0
, leading o a Poisson equa ion o
p essu e:
∇·1
ρ∇p=1
∆ ∇·u∗
Las ly, he eloci y ield is co ec ed o achie e he incomp essibili y condi ion.
un+1=u∗−∆
ρ∇p
This has p o en o be compu a ionally e icien o mul i-phase lows, whe e VOF is needed.
2 Bubble modelling & simula ions
T
his chap e will ocus on he explana ion o he simula ions ca ied ou , p o iding an analy ical
demons a ion o he hypo hesis made.
2.1 Bubble
2.1.1 Fluid p ope ies
Fi s o all, wo luids a e p esen in his se o simula ions: wa e and ai .
The p ope ies o bo h luids co espond o hei abula ed alue a 20ºC.
Table 2.1 Densi y and dynamic iscosi y o wa e a di e en empe a u es.
Tempe a u e (°C) Densi y (kg/m3) Dynamic iscosi y (kg/(m·s))
0 999.82 0.001792
5 1000.00 0.001520
10 999.77 0.001308
15 999.19 0.001139
20 998.29 0.001003
25 997.13 0.000891
30 995.71 0.000798
35 994.08 0.000720
Table 2.2 Densi y and dynamic iscosi y o ai a di e en empe a u es.
Tempe a u e (°C) Densi y (kg/m3) Dynamic iscosi y (kg/(m·s))
0 1.292 1.71 ×10−5
5 1.269 1.73 ×10−5
10 1.247 1.76 ×10−5
15 1.225 1.80 ×10−5
20 1.204 1.82 ×10−5
25 1.184 1.85 ×10−5
30 1.164 1.88 ×10−5
35 1.146 1.91 ×10−5
7
8Chap e 2. Bubble modelling & simula ions
Ano he ele an pa ame e o he luid is he su ace ension, which depends no only on empe -
a u e, bu also on he pu i y o he liquid, he a mosphe ic p essu e and he na u e o he adjacen
liquid o gas. Table 2.3 shows su ace ension o pu e wa e , in con ac wi h ai and a a mosphe ic
p essu e depending on i s empe a u e.
Table 2.3
Su ace ension o wa e a di e en em-
pe a u es .
Tempe a u e (°C) Su ace ension (N/m)
0 0.07564
5 0.07494
10 0.07422
15 0.07349
20 0.07275
25 0.07200
30 0.07124
35 0.07047
2.1.2 Bubble geome ical model
In his sec ion, we will jus i y he ini ial geome y o he bubble.
In he i s ins ance, we shall igno e he de o ma ion ha occu s when he bubble eaches he
su ace. This can be p o en by compa ing loa abili y o ces and su ace ension o ces.
I we conside a gene ic bubble wi h adius R, we can es ima e he loa abili y o ce as:
F loa = (ρ1−ρ0)gV (2.1)
Being he ene gy hen:
E loa = (ρ1−ρ0)gV R(1−sinα),
which will ha e o be he same as he esis ance ha he su ace ension opposes:
σ=σcosα(2.2)
Eσ=Z Zsphe ical cap σ(α)dS =Z2π
0Zπ
2
α0
σ(α)R2cosαdαdφ=Z2π
0Zπ
2
α0
σR2cos2αdαdφ(2.3)
Guided by he scheme in Figu e 2.2, we can es ima e ha :
E loa =Eσ
Eσ=σπR2π
2−α0−1
2sin(2α0)
(ρ1−ρ0)g4
3πR4(1−sinα0) = σπR2π
2−α0−1
2sin(2α0)
2.1 Bubble 9
Figu e 2.1
Deduc ion o he po ion o he bubble ha ises abo e he wa e . De o ma ion due o
p essu e has no been aken in o accoun .
4(ρ1−ρ0)g
3σR2=1
1−sinα0
(π
2−α0−1
2sin(2α0))
sinα0=h
R;sin(2α0) = 2sin(α0)q1−sin2(α0);sin(2α0) = 2h
Rs1−h
R2
4(ρ1−ρ0)g
3σR2=1
1−h
R

π
2−a csinh
R−h
Rs1−h
R2

I we scan o e a ange o alues o R he nex g aph is ob ained (2.2). I is clea om he esul s
ha , unde he assump ion o comple ely no de o ma ion, bubbles wi h a adius no g ea e han
1mm
adjus well enough o his app oxima ion. This bubble will ise
1%
o he adius (
0.5%
o he
diame e ) abo e he wa e .
While acknowledging ha his cons i u es a signi ican o e simpli ica ion, inc easingly highe
wi h he bubbles’ adii, o he s udies ha p ecisely de e mine he ull bubble shape, such as [
18
],
ha e ul ima ely eached he same conclusion (Figu e 2.3).
Hence, aking in o accoun he de o ma ion induced by g a i y (Bond numbe ) and wha was jus
exposed, a bubble wi h a adius no g ea e han
1mm
can be conside ed a pe ec ci cle - a sphe e
in 3D, like he one shown in Figu e 2.4 - wi hou in oducing signi ican e o s.
2.1.3 Ini ial condi ions conside ed
As i is shown in Figu e 2.4 he bubble al eady s a s opened a he op. As his happens in a e y
sho pe iod o ime, compa ed o he explosion o he ca i y, i should no be a sou ce o signi ican
e o s.
Then, d i en by he in e nal p essu e o he bubble, he gas is expelled e y quickly and a se ies
o o ices appea s. This in e nal p essu e has been modeled ollowing he Young-Laplace equa ion.
16 Chap e 2. Bubble modelling & simula ions
can each sizes up o
15µm
and s udies such as [
2
] measu e he Young’s modulus o he whole cell
a 0.7kPa.
The e o e, ou goal is o es ima e le hal h esholds o he wo k o he p essu e g adien s and he
iscous o ces.
•Le hal c i e ion o p essu e g adien s.
1. Mechanical Ene gy S o ed in he Memb ane
The elas ic ene gy pe uni olume s o ed in a CHO cell unde a angen ial s ain
ε
is
gi en by he ollowing o mula:
w=1
2Esε2[J/m2] (2.7)
whe e Esis he Young’s modulus o he cell N/m2
2. To al Mechanical Powe
I his ene gy is deposi ed wi hin a sho exposu e ime
∆
, he o al ins an aneous powe
is:
˙
W=w
∆ =1
2Esε2·1
∆ (2.8)
3. Nume ical Es ima ion
–Es=700 N/m2
–ε=0.6(60% s ain)
–∆ =10−6s
Subs i u ing in o he exp ession:
˙
W=1
2·700
10−6·(0.6)2(2.9)
=1.26 ×108(2.10)
≈108W/m3(2.11)
•Le hal c i e ion o ∇·(τ′·u)
The emaining e m o he ene gy equa ion 2.6 can be di ided in o wo o he s i expanded,
one being he adi ional EDR and he o he ha accoun s o he wo k done by iscous o ces.
∇·(τ′·u) = τ′:∇u+u·∇·τ′
A e y in e es ing way o se ing a le hal h eshold o his case is ela ing he shea s ess
de eloped in he luid wi h hese wo e ms and measu ing di ec ly ha shea s ess, which
is he physical a iable ha is di ec ly in ol ed wi h lysis. Ne e heless, we will use he
adi ional EDR (
=τ′:∇u
)c i e ion o CHO cells ( h eshold
=108
) o he whole exp ession,
due o he ac ha i has p o en o cha ac e ize co ec ly a le hal olume when no o he
mo al mechanisms a e in ol ed.

2.2 Measu ing impac on su ounding li e 17
Despi e i may seem we a e igno ing he con ibu ion o he e m
u·∇·τ′
, i we make a simple
deduc ion o a mo al h eshold i s esul is again
108
, since he mo al mechanism is simila
o he p essu e g adien ’s one, hus making i a easonable c i e ion.
In p ac ice,
u·∇·τ′
is usually o e shadowed by
τ′:∇u
and
−∇·(Pu)
, hence playing a mino
ole (Figu e 3.28.
Code 2.3 E en ha sa es and calcula e a iables ela ed o he impac on su ounding li e.
e en sa e_simula ion ( += 0.001; <= TTF) {
scala EDR_Walls[], EDR_p opio[];
ec o g ad_p[];
o each() {
g ad_p.x[] = (p[1,0] - p[-1,0]) / (2. * Del a);
g ad_p.y[] = (p[0,1] - p[0,-1]) / (2. * Del a);
double mu = [] * (mu1) + (1.0 - []) * (mu2);
double d dz = (u.x[1,0] - u.x[-1,0]) / (2.0 * Del a);
double d d = (u.x[0,1] - u.x[0,-1]) / (2.0 * Del a);
double dudz = (u.y[1,0] - u.y[-1,0]) / (2.0 * Del a);
double dud = (u.y[0,1] - u.y[0,-1]) / (2.0 * Del a);
double d2udz2 = (u.y[1,0] - 2.*u.y[] + u.y[-1,0]) / (sq(Del a));
double d2d d 2 = (u.x[0,1] - 2.*u.x[] + u.x[0,-1]) / (sq(Del a));
double d2d dz2 = (u.x[1,0] - 2.*u.x[] + u.x[-1,0]) / (sq(Del a));
double d2ud dz = (u.y[1,1] - u.y[-1,1] - u.y[1,-1] + u.y[-1,-1]) /
(4.0 * sq(Del a));
double d2d d dz = (u.x[1,1] - u.x[-1,1] - u.x[1,-1] + u.x[-1,-1]) /
(4.0 * sq(Del a));
double au_zz = 2.0 * mu * dudz;
double au_ = 2.0 * mu * d d ;
double au_ z = mu * (dudz + d d );
double au_ he a he a = 2.0 * mu * u.y[] / y;
double Po _dis_ is = au_ * dud + au_zz * d dz + au_ he a he a
* u.y[] / y + au_ z * (dudz + d d );
double Po _g ad_p = - (u.y[] * g ad_p.y[] + u.x[] * g ad_p.x[]);
double Po _F_ is = mu * ( u.y[] * (2.0*(d2d d 2 + (1./y)*d d - u.y
[]/sq(y)) + d2d dz2 + d2ud dz) + u.x[] * (d2d d dz + (1./y)*dudz
+ (1./y)*d d + d2udz2));
EDR_Walls[] = Po _dis_ is;
EDR_p opio[] = Po _dis_ is + (Po _g ad_p > 0. ? Po _g ad_p : 0.) + (
Po _F_ is > 0. ? Po _F_ is : 0.);
}
cha name[256];
sp in ( name, "snapsho -%g.cs ", );
18 Chap e 2. Bubble modelling & simula ions
FILE * p = open( name, "w");
p in ( p, "x,y,u.x,u.y, ,EDR_p opio,EDR_Walls n");
o each()
p in ( p, "%g,%g,%g,%g,%g,%g,%g n", x, y, u.x[], u.y[], [],
EDR_p opio[], EDR_Walls[]);
close( p);
}
Code 2.3 shows he e en in Basilisk in which he a iables a e calcula ed and sa ed. I is
impo an o no e, in ligh o he impac on su ounding li e, ha he wo k o p essu e g adien s
and iscous o ces has only been accoun ed o when hey a e posi i e, as o he wise hey could
p oduce alues ha would o e shadow o he le hal mechanisms ha may occu wi hin he luid.
Tha is, p essu e g adien s will only be accoun ed o when hey a e con a y o he mo emen o
he luid, and he wo k o iscous o ces will only be accoun ed o when hey p o ide ene gy o he
cell.
3 Da a Analysis
I
n his chap e we will go o e he esul s o he simula ions ha ook place. F om now on he
his o ically used o mula o EDR
=τ:∇U
will be named EDR_Walls and ou own de eloped
o mula will be called EDR_p opio =−∇·(Pu)+∇·(τ′·u).
3.1 In oduc ion o da a analysis
Du ing he p ocess o in es iga ion on how o compu e he le hal zone, se e al indings ha e been
made; usually h ough ial and e o .
In o al, h ee di e en me hods we e unde aken o ul ill his ask, each one wi h i s own p os
and cons.
•Me hod 1: G id In e pola ion and Back acking wi h mask.
•Me hod 2: P ecision Augmen ed In e pola ion and Back acking wi h no mask.
•Me hod 3: Basilisk based Adap a i e G id and Fo wa d T acking wi h mask.
The jus i ica ion o de eloping h ee me hods lies in he pu sui o highe accu acy and igo ,
along wi h acco dance o wha expe imen al da a shows.
3.1.1 De e mina ion o an dimensionless le hal h eshold
I is impo an o know ha , in e e y simula ion conduc ed, he esul s ha e no dimensions, since
he code has been non-dimensionalized based on he Ohneso ge numbe .
The e o e, as i will ha e o be used in e e y me hod, i is c ucial o de e mine he dimensionless
h eshold o each Ohneso ge numbe .
Since e e y mo al bounda y has been es ima ed a 108i is a e y simple calcula ion:
[EDRSI] = kg
m·s3
EDRadim =EDRSI ·T3
ρ·R2;kg/(m·s3)·s3
kg/m3·m2=kg/m
kg/m=1
T= ρR3
σ
19
20 Chap e 3. Da a Analysis
3.2 Me hod 1: G id In e pola ion and Back acking wi h mask
The p ocedu e ollowed o de e mine he le hal zone consis s o wo di e en phases. Fi s o all, we
ha e un a se o simula ions o di e en Ohneso ge numbe s, sa ing a iables o in e es . Then,
he le hal zone will be de e mined by making a backwa d pa icle acking based on he eloci y
ield. Full code can be ound in Appendix A.
The me hodology ollowed has been o e alua e om he inal ime s ep back o he ini ial one
e e y coo dina e sa ed in he simula ion and sea ch o hose ha had eco ded a mo al EDR alue.
Whene e a ’pa icle’ eco ds le hali y, i is hen acked un il =0 is eached in he simula ion. This
is compu a ionally e y simple; howe e , wha was p e iously an ad an age became a hind ance:
Basilisk’s AMR ( he adap i e g id).
As a consequence, we we e o ced o cons uc a egula g id and o in e pola e he eloci y
ield based on he da a ha was sa ed wi h he adap i e g id, losing some p ecision and adding a
conside able compu a ional cos .
3.2.1 Pa icle T acking
Table 3.1 Sa ed a iables in each ime s ep in Me hod 1.
x y u.x u.y EDR_p opio EDR_Walls
... ... ... ... ... ... ...
−4.84375 0.15625 1.6062 ×10−5−5.88018 ×10−71−1.369 ×10−13 −1.369 ×10−13
... ... ... ... ... ... ...
No e: in he able abo e, is he a iable om he VOF Me hod. =1 means ha he cell is ully
subme ged in wa e .
Fo e e y ime s ep compu ed, he pa icles ha ul ill (x,y, n) = 1and EDRi(x,y, n)>ε∗
a e s o ed L( i) = {(xj,yj)}N
j=1.
Then, e e y mo al poin is back acked based on he eloci y ield, in wha e ec i ely is a
Lag angian acking.
x(n−1)
j=x(n)
j−ux(x(n)
j,y(n)
j, n)·∆ (3.1)
y(n−1)
j=y(n)
j−uy(x(n)
j,y(n)
j, n)·∆ (3.2)
As said be o e, he de e mina ion o he eloci y ield has been a complex ask, in which we had
o ind a comp omise solu ion be ween accu acy and compu a ional cos .
The app oach aken was o p ocess he da a wi h Py hon ins ead o Basilisk C and o use some o
i s lib a ies. Speci ically, o econs uc he eloci y ield, we ha e used:
scipy.in e pola e.g idda a((x_da a, y_da a), u_da a, (x_j, y_j))
Gi en a disc e e ield, his unc ion implemen s a Delaunay iangula ion based on he nea es
poin s a ailable, he ones ha we e sa ed in he simula ion, he eby c ea ing a egula g id.
Due o he high p ecision needed in he su oundings o he bubble, a double s age g id has been
de eloped, o e ing a s anda d esolu ion o
2048 ×2048
in he whole domain ha doubles o
x∈[−5,1],y∈[0,4]
. This has p o en o be c ucial as he o ex gene a ed in he gas phase du ing
he collapse o he bubble can add signi ican e o s in he Lag angian back acking o he posi ions.
This becomes pa icula ly ele an o pa icles nea he in e ace, which a e, as eco ded in his
s udy, e y impo an , ul ima ely leading o some inaccu acies.
3.2 Me hod 1: G id In e pola ion and Back acking wi h mask 21
Code 3.1 Func ion ha gene a es he wo-s age g id.
de gene a _malla_no_uni o me( es):
nx_ ino = in ( es * 0.75)
nx_g ueso = es - nx_ ino
x1 = np.linspace(XMIN, XFOCO, nx_ ino, endpoin =False)
x2 = np.linspace(XFOCO, XMAX, nx_g ueso)
x_g id = np.conca ena e([x1, x2])
ny_ ino = in ( es * 0.7)
ny_g ueso = es - ny_ ino
y1 = np.linspace(YMIN, YFOCO, ny_ ino, endpoin =False)
y2 = np.linspace(YFOCO, YMAX, ny_g ueso)
y_g id = np.conca ena e([y1, y2])
e u n x_g id, y_g id
Figu e 3.1 The wo s ages o he g id.

22 Chap e 3. Da a Analysis
Figu e 3.2 G id.
Du ing he back acking, a each ins an , he eloci y ield assigned o he pa icle co esponds
o he one ha he cell in which he pa icle is loca ed has. These cells a e no hing mo e han he
adjacen space o each poin o he wo-s age g id. This is su ely he eason o he inaccu acies
ound in he analysis o he esul s.
Code 3.2 Func ions ha de e mine he pa icles’ eloci y.
de busca _indices(x, y):
ix = np.sea chso ed(XGRID, x) - 1
iy = np.sea chso ed(YGRID, y) - 1
ix = np.clip(ix, 0, len(XGRID) - 1)
iy = np.clip(iy, 0, len(YGRID) - 1)
e u n ix, iy
de in eg a _ ayec o ia(pun os, dumps):
o a chi o in e e sed(dumps):
d = pd. ead_cs (a chi o)
u, = ca ga _ elocidad(d )
x = pun os[:, 0].numpy()
y = pun os[:, 1].numpy()
ix, iy = busca _indices(x, y)
pun os[:, 0] += u[iy, ix] * DT
pun os[:, 1] += [iy, ix] * DT
den o = (pun os[:, 0] >= XMIN) & (pun os[:, 0] <= XMAX) &
(pun os[:, 1] >= YMIN) & (pun os[:, 1] <= YMAX)
pun os = pun os[den o]
i pun os.shape[0] == 0:
b eak
e u n pun os
3.3 Me hod 2: P ecision Augmen ed In e pola ion and Back acking wi h no mask 23
The unc ion np.sea chso ed is he one in cha ge o his.
3.2.2 Final Volume
Once known he posi ion
(xj,yj)
o e e y le hal poin a
=0
, since we a e wo king in an axisym-
me ic domain wi h Xas he axis o e olu ion, he ollowing o mula is used:
V=∑
(i,j) le hal mask
2πyi,j·∆x·∆y
Howe e , in o de o a oid coun ing he same egion mo e han once, a p ocedu e ha we will
e e o as ’mask’ has been used. This mask consis s o calcula ing in which cell he pa icle inally
is. Then, he coo dina es and cha ac e is ic o he cell a e used in he p e ious o mula. I wo o
mo e pa icles end in he same cell i will only be compu ed once hus no coun ing he same egion
wice o mo e.
3.2.3 P os and cons
Al hough i achie es a su p isingly good econs uc ion o he ini ial shape o he bubble, pa icles
nea he op wa e in e ace depic a g ea nume ical imp ecision (Figu e 3.5). Fu he mo e, when
back acking, he same pa icle can be coun ed le hal mo e han once i i s ays in he le hal zone o
mo e han one sa ed ins an , as new le hal pa icles a e gene a ed in each ins an wi hou conside ing
hose ha ha e been gene a ed in p e ious ins an s. Ye , his p oblem is sol ed wi h he inal mask.
Tha said, he alues eco ded a e much less han hose eco ded by Walls e al in [20].
3.3
Me hod 2: P ecision Augmen ed In e pola ion and Back acking wi h no
mask
In his case, he p ocedu e ollowed is exac ly he same as in he p e ious me hod; howe e , a highe
p ecision in he esul s, as well as a g ea e acco d o expe imen al da a, has been pu sued. This
has been achie ed h ough an addi ional in e pola ion p ocedu e and wi h some changes in he
econs uc ion o he mo al olume.
3.3.1 P ecision Augmen ed Pa icle T acking
When i comes o he de e mina ion o he eloci y o a speci ic pa icle, me hod 1, showed g ea
inaccu acies. The e o e, a bilinea in e pola ion has been implemen ed in me hod 2, based on he
egula g id, allowing us o achie e a highe le el o accu acy a i s ins ance.
Code 3.3 Func ion ha implemen s bilinea in e pola ion.
de in e pola _bilineal(x, y, campo, xg id, yg id):
ix, iy = busca _indices(x, y)
x1, x2 = xg id[ix], xg id[ix + 1]
y1, y2 = yg id[iy], yg id[iy + 1]
dx = (x - x1) / (x2 - x1)
dy = (y - y1) / (y2 - y1)
00 = campo[iy, ix]
10 = campo[iy, ix + 1]
01 = campo[iy + 1, ix]
24 Chap e 3. Da a Analysis
11 = campo[iy + 1, ix + 1]
e u n (1 - dx) * (1 - dy) * 00 + dx * (1 - dy) * 10 + (1 - dx) * dy *
01 + dx * dy * 11
3.3.2 Final Volume
Again, once known he posi ion
(xj,yj)
o e e y le hal poin a
=0
, he ollowing o mula is used
1:
V=∑
(i,j) le hal
2πyi,j·∆x·∆y
In his case, no mask has been used o he eason ha p e ious da a showed a e y low le hal
olume in compa ison o [
20
] and expe imen al da a. Thus, in he pu sui o achie ing conco dance
wi h hese esul s, we chose o elimina e i . This means ha in his me hod, he olume is calcula ed
conside ing e e y le hal pa icle.
3.3.3 P os and cons o his me hod
The ’p ecision augmen ed back acking’ shows a high p ecision, unde s anding his as ha he
pa icles a e one nex o each o he as i is expec ed; howe e , i does no achie e a g ea e accu acy,
when i comes o he ini ial shape o he bubble, han Me hod 1. Ne e heless, he esul s o
EDR_Walls a e o he same o de o magni ude as hose eco ded in [20].
Fo his me hod, coun ing he pa icles mo e han once in he back acking is possible due o he
elimina ion o he mask. Tha is o su e he eason o he highe le els o mo al olume.
3.4
Me hod 3: Basilisk based Adap a i e G id and Fo wa d T acking wi h
mask
Las ly, a hi d me hod was implemen ed o mi iga e he issues encoun e ed in he analysis o he
esul s o Me hod 2. In his one, he same p ocedu e ha Walls e al uses o econs uc he le hal
zone is implemen ed; howe e , in his case, an adap i e posi ioning o pa icles h ough he luid
has been de eloped, ollowing a simila app oach o Basilisk’s AMR.
The pa icles ha e been acked o wa d, in con as wi h p e ious me hods, sa ing hei dimen-
sionless EDR alues h ough he simula ion. This gua an ees ha le hal zones (le hal pa icles ha
eco d mo al EDR alues) a e coun ed jus once. Then, based on he spa ial dis ibu ion o he
pa icles, again using a mask, he mo al olume is compu ed.
3.4.1 T acking
Table 3.2 Sa ed a iables in each ime s ep in Me hod 1.
x y EDR_p opio EDR_Walls u.x u.y Le
... ... ... ... ... ... ... ...
−4.843 0.156 −1.36 ×10−13 −1.36 ×10−13 1.60 ×10−5−5.88 ×10−77 1
... ... ... ... ... ... ... ...
1∆xand ∆y
a e calcula ed h ough he dimensions o he g id wi h he highe esolu ion, as da a in he p e ious me hod
showed ha all he le hal poin s will su ely end up he e.
3.4 Me hod 3: Basilisk based Adap a i e G id and Fo wa d T acking wi h mask 25
No e: A new se o a iables was needed o implemen his me hod, hus unning new simula ions.
In pa icula , Le , which indica es he le el o he Basilisk g id in ha place, was c ucial o de elop
an adap i e posi ioning o he pa icles.
Fi s ly, an ini ial g id was de eloped, assigning each cell o he Basilisk’s AMR a =0 a pa icle.
Code 3.4 Me hod 3 in ial mesh.
de gene a _malla_inicial(pa h_cs , L0=10.0):
d = pd. ead_cs (pa h_cs )
d = d [(d [’ ’] == 1) & (d [’y’] < 4) & (d [’Le ’].be ween(5, 12))]
x_lis , y_lis , h_lis , ipo_lis = [], [], [], []
o _, ow in d .i e ows():
x = ow[’x’]
y = ow[’y’]
le = in ( ow[’Le ’])
h = L0 / (2 ** le )
= h / 4 # adio de dispe sión local
i le >= 7:
o angle in [0, 2*np.pi/3, 4*np.pi/3]:
dx = * np.cos(angle)
dy = * np.sin(angle)
x_lis .append(x + dx)
y_lis .append(y + dy)
h_lis .append(h)
ipo_lis .append(3)
eli le >= 5:
o angle in [0, np.pi/3, 2*np.pi/3, np.pi, 4*np.pi/3, 5*np.
pi/3]:
dx = * np.cos(angle)
dy = * np.sin(angle)
x_lis .append(x + dx)
y_lis .append(y + dy)
h_lis .append(h)
ipo_lis .append(6)
x_pa = np.a ay(x_lis , d ype=np. loa 32)
y_pa = np.a ay(y_lis , d ype=np. loa 32)
h_pa = np.a ay(h_lis , d ype=np. loa 32)
ipo = np.a ay( ipo_lis , d ype=np.uin 8)
p in ( " Malla e inada gene ada: {len(x_pa )} pa ículas.")
e u n x_pa , y_pa , h_pa , ipo
No e: This pa o he code belongs o he la es e sion, meaning ha , in his case, he e is no
jus one pa icle in each cell, bu h ee o six, depending on he le el o he cell. A highe le el
32 Chap e 3. Da a Analysis
Figu e 3.11
Non-dimensional le hal olume in each case as a unc ion o he Laplace numbe .
Displayed in loga i mic scale.
3.5.2 To al olume
Now, ano he se o g aphs is p esen ed, depic ing his ime he le hali y in absolu e e ms.
As a unc ion o he Ohneso ge numbe
Figu e 3.12
Dimensional le hal olume as a unc ion o he Ohneso ge numbe . G aphs ob ained as
a esul o me hod 1, 2 and 3 a e displayed om le o igh .

3.5 Resul s 33
Figu e 3.13
Dimensional le hal olume as a unc ion o he Ohneso ge numbe . G aphs ob ained as
a esul o me hod 1, 2 and 3 a e displayed om le o igh in loga i mic scale.
The esul s in Figu e 3.12 a e ema kable. The balance be ween p essu e g adien s, iscous dissipa-
ion, wo k done by he iscous o ces and he bubbles’ olume leads o a maximum in le hali y, in
absolu e e ms, a
Oh ≈0.008
o
R≈210µm
o Me hod 1,
Oh ≈0.01
o
R≈150µm
o Me hod
2 and a maximum a Oh ≈0.006 o R≈380µm o Me hod 3.
This has ne e been s udied be o e, no eco ded. In ac , Donald E. Spiel s a es in [
16
] ha
“Mic oo ganisms a e known o be killed by bu s ing bubbles. The smalle he bubble, he mo e
le hal. ... The cen ipe al accele a ion o he opening cap o , say, a 1mm-diame e bubble is abou
58,500g’s! The caps o smalle bubbles... a e subjec ed o e en la ge accele a ions.”
As a unc ion o he bubbles adii
Figu e 3.14
Dimensional le hal olume as a unc ion o he bubbles adii. G aphs ob ained as a
esul o me hod 1, 2 and 3 a e displayed om le o igh .
Figu e 3.15
Dimensional le hal olume as a unc ion o he bubbles adii. G aphs ob ained as a
esul o me hod 1, 2 and 3 a e displayed om le o igh in loga i mic scale.
34 Chap e 3. Da a Analysis
3.5.3 Le hal zone mo phology
Me hod 1. Le hal zone a =0
The econs uc ion o he le hal zone has as an ou come he ollowing images. These images do
no appea o co espond wi h he esul s ob ained in he g aphs. This is mainly due o he way he
le hal zone was plo ed: an a emp was made o gene a e a closed a ea ins ead o plo ing each
poin indi idually. Fo he ollowing me hods, only he poin s will be plo ed.
Figu e 3.16 Le hal zone a =0. Me hod 1 .
3.5 Resul s 35
Figu e 3.17 Le hal zone a =0. Me hod 1 .
I can be no ed in hese images ha no p o usion like eco ded in [
20
] appea s. This will be
add essed in he nex subsec ion.
Me hod 2. Le hal zone a =0
The Lag angian econs uc ion a =0 in Me hod 2 has yielded he ollowing images.
Figu e 3.18 Le hal zone a =0. Me hod 2 .
36 Chap e 3. Da a Analysis
Figu e 3.19 Le hal zone a =0. Me hod 2 .
Figu e 3.20 Le hal zone a =0. Me hod 2 .
As i can be no iced, he esul s di e om hose ob ained in [
20
]. While Walls e all p edic s a
p o usion o he le hal zone benea h he bubble, ha should co espond o hose pa icles ha will
become pa o he je , ou s udy eco ds in Me hod 2 ha he pa icles come om he la e al pa o
he bubble.
As a demons a ion o his las s a emen , we p esen in Figu e 3.21 he Lag angian acking o
3.5 Resul s 37
di e en pa icles, adjacen o he bubble, o wa dly in ime. In addi ion, i is p esen ed in Figu e
3.22 a compa ison be ween p e ious s udies and he ac ual one.
Figu e 3.21
Fo wa d-in- ime Lag angian acking o se e al pa icles a ound he bubble e eals
e idence o an upwa d ex ending ail ha sp eads along he bubble’s la e al egion is
obse ed .

38 Chap e 3. Da a Analysis
Figu e 3.22
Compa ison o he p o usion eco ded in [
20
] (le ) and he ail eco ded in he ac ual
one ( igh ).
This implies ha he mos exposed cells a e hose si ua ed a he side o he bubble and no below.
This makes ce ain cell cul u es mo e likely o su e g ea e damage han o he s, such as in e acial
cell cul u es.
Me hod 3. Le hal zone a =0
Con e sely, me hod 3 p o ides a le hal zone in =0 close o wha Walls e al desc ibes.
Figu e 3.23 Le hal zone a =0 based on EDR_p opio. Me hod 3.
3.5 Resul s 39
Figu e 3.24 Le hal zone compa ison a =0 based o EDR_p opio and EDR_Walls. Me hod 3.
Figu e 3.25 Le hal zone a =0 based on EDR_p opio. Me hod 3.
In his case, he ail eco ded in me hod 2 does no appea , ha ing ins ead a sub le p o usion.
Tempo al e olu ion o he le hal zone
Fu he mo e, we ha e been able o de ine accu a ely how he le hal zone de elops o e ime. This
has been compu ed di ec ly wi h Basilisk C, no needing, he e o e, any in e pola ion.
As i is isible in Figu e 3.26 and 3.27, when ou own EDR o mula is used, he olumes whe e
he luid is mo al become bigge , which is wha is expec ed. Howe e , wha is eally in e es ing is
ha in Figu e 3.27 he le hal a ea sp eads h ough he je , while in Figu e 3.26 i does no . This is in
acco dance wi h wha expe imen al da a depic in [
3
], whe e i says ha , a e a se o expe imen s,
mos o he cells ha died wen h ough he je .
40 Chap e 3. Da a Analysis
Figu e 3.26
Tempo al e olu ion o he le hal zone o
Oh =0.00833
, calcula ed wi h he his o ical
EDR o mula "EDR Walls" in his case.
Figu e 3.27 Tempo al e olu ion o he le hal zone o Oh =0.00833, calcula ed wi h ou o mula.
In addi ion, i is shown in Figu e 3.28 and 3.29 he spa ial dis ibu ion o le hal mechanisms
wi hin he luid when he je is o med, which is he mos c i ical ins an o cell damage (Figu e
3.4).
3.5 Resul s 41
Figu e 3.28 Spa ial dis ibu ion o he le hal mechanisms o Oh =0.00833.
Figu e 3.29 Spa ial dis ibu ion o EDR-p opio o Oh =0.00833.
48 Chap e A. Used Codes
double * au_max, in *plano) {
double aza = au_ + au_zz;
double de = au_ * au_zz - au_ z * au_ z;
double disc iminan e = sq(0.5 * aza) - de ;
double sq _ e m = (disc iminan e > 0.0) ? sq (disc iminan e) : 0.0;
double lambda1 = 0.5 * aza + sq _ e m;
double lambda2 = 0.5 * aza - sq _ e m;
double lambda3 = au_ ;
double d12 = abs(lambda1 - lambda2);
double d13 = abs(lambda1 - lambda3);
double d23 = abs(lambda2 - lambda3);
double maxdi = d12;
*plano = 0;
i (d13 > maxdi ) {
maxdi = d13;
*plano = 1;
}
i (d23 > maxdi ) {
maxdi = d23;
*plano = 2;
}
* au_max = 0.5 * maxdi ;
}
in main(in a gc, cha *a g []) {
i (ge en ("OH")) {
Oh = a o (ge en ("OH"));
}
size (L0);
DT = HUGE;
LEVEL = 12;
o igin (-L0/2., 0.);
ini _g id (1 << 5);
ho2 = 12e-4;
mu2 = Oh/55;
ho1 = 1.;
mu1 = Oh;
.sigma = 1.;
p in (s de , " Oh = %g Le el = %d ho2 = %g n", mu1, LEVEL, ho2)
;
un();

A.1 Basilisk 49
}
double geome y(double x, double y) {
double C1 = sq(x + R1 + 2*L2) + sq(y) - sq(R1);
double C2 = sq(x + Rc) + sq(y - L3) - sq(Rc);
double D1 = - x - 1e-8;
double D2 = y - L3;
double D3 = - x - (2*Rc);
double D1D2 = min(D1, D2);
double D1D2D3 = max(D1D2, D3);
double D1D2D3C1 = min(D1D2D3, C1);
double D1D2D3C1C2 = min(-D1D2D3C1, C2);
e u n -D1D2D3C1C2;
}
e en ini ( = 0) {
i (! es o e ( ile = "dump")) {
double eps = 0.05;
e ine ( sq(x + R1 + 2*L2) + sq(y) > sq(R1-eps) && sq(x + R1 + 2*L2)
+ sq(y) < sq(R1+eps) && le el < LEVEL);
e ine (x < eps && x > -(2*Rc+eps) && le el < LEVEL);
ac ion( , geome y(x,y));
}
}
e en ini _p essu e ( = 0) {
double del a = 2.0 * Rc;
o each() {
i ( [] == 0) {
i (x < -del a) {
p[] = 0.0;
} else i (x >= -del a && x < 0) {
double anh_ al = anh(20*(x+del a/2));
p[]=-1- anh_ al;
} else i (x > 0) {
p[] = -2.0;
}
} else {
p[] = -2.0;
}
}
}
e en adap (i++) {
p in (s de ,"ins an e = %g d = %g LEVEL = %d n", , d , LEVEL);
scala 1[];
o each()
1[] = [];
50 Chap e A. Used Codes
adap _wa ele ({ 1}, (double[]){1.e-3}, minle el = 7, maxle el = LEVEL
);
}
e en sa e_simula ion ( += 0.001; <= TTF) {
scala EDR_Walls[], EDR_p opio[];
ec o g ad_p[];
o each() {
g ad_p.x[] = (p[1,0] - p[-1,0]) / (2. * Del a);
g ad_p.y[] = (p[0,1] - p[0,-1]) / (2. * Del a);
double mu = [] * (mu1) + (1.0 - []) * (mu2);
double d dz = (u.x[1,0] - u.x[-1,0]) / (2.0 * Del a);
double d d = (u.x[0,1] - u.x[0,-1]) / (2.0 * Del a);
double dudz = (u.y[1,0] - u.y[-1,0]) / (2.0 * Del a);
double dud = (u.y[0,1] - u.y[0,-1]) / (2.0 * Del a);
double d2udz2 = (u.y[1,0] - 2.*u.y[] + u.y[-1,0]) / (sq(Del a));
double d2d d 2 = (u.x[0,1] - 2.*u.x[] + u.x[0,-1]) / (sq(Del a));
double d2d dz2 = (u.x[1,0] - 2.*u.x[] + u.x[-1,0]) / (sq(Del a));
double d2ud dz = (u.y[1,1] - u.y[-1,1] - u.y[1,-1] + u.y[-1,-1]) /
(4.0 * sq(Del a));
double d2d d dz = (u.x[1,1] - u.x[-1,1] - u.x[1,-1] + u.x[-1,-1]) /
(4.0 * sq(Del a));
double au_zz = 2.0 * mu * dudz;
double au_ = 2.0 * mu * d d ;
double au_ z = mu * (dudz + d d );
double au_ he a he a = 2.0 * mu * u.y[] / y;
double Po _dis_ is = au_ * dud + au_zz * d dz + au_ he a he a
* u.y[] / y + au_ z * (dudz + d d );
double Po _g ad_p = - (u.y[] * g ad_p.y[] + u.x[] * g ad_p.x[]);
double Po _F_ is = mu * ( u.y[] * (2.0*(d2d d 2 + (1./y)*d d - u.y
[]/sq(y)) + d2d dz2 + d2ud dz) + u.x[] * (d2d d dz + (1./y)*dudz
+ (1./y)*d d + d2udz2));
EDR_Walls[] = Po _dis_ is;
EDR_p opio[] = Po _dis_ is + (Po _g ad_p > 0. ? Po _g ad_p : 0.) + (
Po _F_ is > 0. ? Po _F_ is : 0.);
}
cha name[256];
sp in ( name, "snapsho -%g.cs ", );
FILE * p = open( name, "w");
p in ( p, "x,y,u.x,u.y, ,EDR_p opio,EDR_Walls n");
o each()
A.2 Pos -p ocessing 51
p in ( p, "%g,%g,%g,%g,%g,%g,%g n", x, y, u.x[], u.y[], [],
EDR_p opio[], EDR_Walls[]);
close( p);
}
This code is an adap a ion o he code p o ided by D. José Ma ía López-He e a Sánchez. The
ini ial p essu e ield and e e y hing ela ed o he le hali y has been de eloped o his inal deg ee
p ojec .
A.2 Pos -p ocessing
A.2.1 Le hal zone econs uc ion a =0. Me hod 1.
Code A.2 Le hal Zone Recons uc ion. Back acking. Me hod 1.
impo pandas as pd
impo numpy as np
impo o ch
om glob impo glob
impo ma plo lib.pyplo as pl
impo os
# ========================
# CONFIGURACIÓN
# ========================
DEVICE = "cpu"
DT = -0.001
RES = 2048
XMIN, XMAX = -5.0, 5.0
YMIN, YMAX = 0.0, 10.0
XFOCO, YFOCO = 1.0, 4.0
IMG_DIR = os.pa h.join("..", "imagenes")
os.makedi s(IMG_DIR, exis _ok=T ue)
# ========================
# UMBRAL ADAPTATIVO
# ========================
de calcula _umb al_adimensional(oh):
mu = 1e-3 # Pas
ho = 998.29 # kg/ m
sigma = 0.07275 # N/m
EDR_ isica = 1e8 # W/m
# CORRECTA ó mula: R = mu^2 / (Oh^2 * ho * sigma)
R = (mu**2) / (oh**2 * ho * sigma)
ac o = np.sq (sigma**3 / ( ho**3 * R**5))
e u n EDR_ isica / ac o , R
52 Chap e A. Used Codes
# ========================
# REJILLA NO UNIFORME
# ========================
de gene a _malla_no_uni o me( es):
nx_ ino = in ( es * 0.75)
nx_g ueso = es - nx_ ino
x1 = np.linspace(XMIN, XFOCO, nx_ ino, endpoin =False)
x2 = np.linspace(XFOCO, XMAX, nx_g ueso)
x_g id = np.conca ena e([x1, x2])
ny_ ino = in ( es * 0.7)
ny_g ueso = es - ny_ ino
y1 = np.linspace(YMIN, YFOCO, ny_ ino, endpoin =False)
y2 = np.linspace(YFOCO, YMAX, ny_g ueso)
y_g id = np.conca ena e([y1, y2])
e u n x_g id, y_g id
XGRID, YGRID = gene a _malla_no_uni o me(RES)
# ========================
# FUNCIONES
# ========================
de ex ae _pun os_le ales(dumps, umb al):
pun os = {"EDR_p opio": [], "EDR_Walls": []}
o a chi o in dumps:
d = pd. ead_cs (a chi o)
i no {"x", "y", " "}.issubse (d .columns):
con inue
o a in pun os:
i a in d .columns:
mask = (d [ a ] > umb al) & (d [" "] == 1.0)
p s = d .loc[mask, ["x", "y"]]. alues. olis ()
pun os[ a ].ex end(p s)
o cla e in pun os:
pun os[cla e] = o ch. enso (pun os[cla e], d ype= o ch. loa 32)
e u n pun os
de ca ga _ elocidad(d ):
ug id = g idda a_np(d , "u.x", XGRID, YGRID)
g id = g idda a_np(d , "u.y", XGRID, YGRID)
e u n o ch. enso (ug id), o ch. enso ( g id)
de g idda a_np(d , columna, xg id, yg id):
om scipy.in e pola e impo g idda a
pun os = d [["x", "y"]]. alues
A.2 Pos -p ocessing 53
alo es = d [columna]. alues
X, Y = np.meshg id(xg id, yg id, indexing="xy")
in e p = g idda a(pun os, alo es, (X, Y), me hod="linea ",
ill_ alue=0)
e u n in e p
de busca _indices(x, y):
ix = np.sea chso ed(XGRID, x) - 1
iy = np.sea chso ed(YGRID, y) - 1
ix = np.clip(ix, 0, len(XGRID) - 1)
iy = np.clip(iy, 0, len(YGRID) - 1)
e u n ix, iy
de in eg a _ ayec o ia(pun os, dumps):
o a chi o in e e sed(dumps):
d = pd. ead_cs (a chi o)
u, = ca ga _ elocidad(d )
x = pun os[:, 0].numpy()
y = pun os[:, 1].numpy()
ix, iy = busca _indices(x, y)
pun os[:, 0] += u[iy, ix] * DT
pun os[:, 1] += [iy, ix] * DT
den o = (pun os[:, 0] >= XMIN) & (pun os[:, 0] <= XMAX) &
(pun os[:, 1] >= YMIN) & (pun os[:, 1] <= YMAX)
pun os = pun os[den o]
i pun os.shape[0] == 0:
b eak
e u n pun os
de econs ui _masca a(pun os):
mask = np.ze os((len(YGRID), len(XGRID)), d ype=bool)
x = pun os[:, 0].numpy()
y = pun os[:, 1].numpy()
ix, iy = busca _indices(x, y)
mask[iy, ix] = T ue
e u n mask
de g a ica (mask, nomb e, e ique a):
X, Y = np.meshg id(XGRID, YGRID)
pl . igu e( igsize=(6, 6))
pl .con ou (X, Y, mask, le els=[0.5, 1], colo s=["# c8d62"], alpha
=0.8)
pl .con ou (X, Y, mask, le els=[0.5], colo s="black", linewid hs
=0.8)
pl .xlabel("x")
pl .ylabel("y ( adial)")
pl . i le( "Zona =0 ({e ique a})")

54 Chap e A. Used Codes
pl .axis("equal")
pl .g id(T ue, lines yle="--", linewid h=0.5, alpha=0.5)
pl . igh _layou ()
a chi o = os.pa h.join(IMG_DIR, "zona_ 0_{nomb e}_{e ique a}.png")
pl .sa e ig(a chi o, dpi=300)
pl .close()
p in ( " Imagen gua dada: {a chi o}")
de olumen_ e olucion(mask):
dx = np.di (XGRID).mean()
dy = np.di (YGRID).mean()
Y, _ = np.meshg id(YGRID, XGRID, indexing="ij")
e u n np.sum(2 * np.pi * Y[mask] * dx * dy)
# ========================
# MAIN
# ========================
i __name__ == "__main__":
olde = os.pa h.basename(os.ge cwd())
y:
oh_ al = loa ( olde . eplace("Oh_", ""))
UMBRAL, R = calcula _umb al_adimensional(oh_ al)
p in ( " Oh = {oh_ al:.5 } R = {R:.6e} m")
p in ( " Umb al EDR adimensional usado: {UMBRAL:.2 }")
excep Excep ion as e:
p in ( " E o al in e p e a Oh desde el nomb e de la ca pe a:
{e}")
UMBRAL = 92.59
dumps = so ed(glob("snapsho -*.cs "))
pun os_dic = ex ae _pun os_le ales(dumps, UMBRAL)
o cla e, e ique a in [("EDR_p opio", "p opio"), ("EDR_Walls", "
walls")]:
pun os = pun os_dic [cla e]
i pun os.shape[0] == 0:
p in ( " No hay pun os le ales pa a {cla e}")
con inue
pun os_ 0 = in eg a _ ayec o ia(pun os, dumps)
mask = econs ui _masca a(pun os_ 0)
nomb e = olde .lowe ()
g a ica (mask, nomb e, e ique a)
olumen = olumen_ e olucion(mask)
p in ( "[VOLUMEN-{e ique a.uppe ()}] Volumen del sólido de
e olución: { olumen:.6 } u")
A.2.2 Le hal zone econs uc ion a =0. Me hod 2.
A.2 Pos -p ocessing 55
Code A.3 Le hal Zone Recons uc ion. Augmen ed P ecision. Me hod 2.
impo ime
impo pandas as pd
impo numpy as np
impo o ch
om glob impo glob
impo ma plo lib.pyplo as pl
impo os
om scipy.in e pola e impo g idda a
impo a gpa se
# ========================
# ARGUMENTOS
# ========================
pa se = a gpa se.A gumen Pa se ()
pa se .add_a gumen ("--inpu _di ", equi ed=T ue, help="Ca pe a de
en ada con snapsho s CSV")
pa se .add_a gumen ("--ou pu _images_di ", equi ed=T ue, help="Ca pe a
de salida pa a imágenes")
pa se .add_a gumen ("--ou pu _ olumes_di ", equi ed=T ue, help="Ca pe a
de salida pa a olúmenes")
pa se .add_a gumen ("--su ijo", equi ed=T ue, help="Su ijo pa a
iden i ica los a chi os de salida")
a gs = pa se .pa se_a gs()
INPUT_DIR = a gs.inpu _di
IMG_DIR = a gs.ou pu _images_di
VOL_DIR = a gs.ou pu _ olumes_di
SUFIJO = a gs.su ijo
os.makedi s(IMG_DIR, exis _ok=T ue)
os.makedi s(VOL_DIR, exis _ok=T ue)
# ========================
# CONFIGURACIÓN
# ========================
DEVICE = "cpu"
DT = -0.001
RES = 2048
XMIN, XMAX = -5.0, 5.0
YMIN, YMAX = 0.0, 10.0
XFOCO, YFOCO = 1.0, 4.0
# ========================
# FUNCIONES AUXILIARES
# ========================
de calcula _umb al_adimensional(oh):
mu = 1e-3 # Pas
56 Chap e A. Used Codes
ho = 998.29 # kg/ m
sigma = 0.07275 # N/m
EDR_ isica = 1e8 # W/m
R = (mu**2) / (oh**2 * ho * sigma)
ac o = np.sq (sigma**3 / ( ho**3 * R**5))
e u n EDR_ isica / ac o , R
de gene a _malla_no_uni o me( es):
nx_ ino = in ( es * 0.75)
nx_g ueso = es - nx_ ino
x1 = np.linspace(XMIN, XFOCO, nx_ ino, endpoin =False)
x2 = np.linspace(XFOCO, XMAX, nx_g ueso)
x_g id = np.conca ena e([x1, x2])
ny_ ino = in ( es * 0.7)
ny_g ueso = es - ny_ ino
y1 = np.linspace(YMIN, YFOCO, ny_ ino, endpoin =False)
y2 = np.linspace(YFOCO, YMAX, ny_g ueso)
y_g id = np.conca ena e([y1, y2])
e u n x_g id, y_g id
XGRID, YGRID = gene a _malla_no_uni o me(RES)
de busca _indices(x, y):
ix = np.sea chso ed(XGRID, x) - 1
iy = np.sea chso ed(YGRID, y) - 1
ix = np.clip(ix, 0, len(XGRID) - 2)
iy = np.clip(iy, 0, len(YGRID) - 2)
e u n ix, iy
de g idda a_np(d , columna, xg id, yg id):
pun os = d [["x", "y"]]. alues
alo es = d [columna]. alues
X, Y = np.meshg id(xg id, yg id, indexing="xy")
in e p = g idda a(pun os, alo es, (X, Y), me hod="linea ",
ill_ alue=0)
e u n in e p
de ex ae _pun os_le ales(dumps, umb al):
pun os = {"p opio": [], "walls": []}
o al_a chi os = len(dumps)
p in ( " P ocesando { o al_a chi os} snapsho s pa a pun os le ales
...")
o idx, a chi o in enume a e(dumps):
d = pd. ead_cs (a chi o)
i no {"x", "y", " "}.issubse (d .columns):
A.2 Pos -p ocessing 57
con inue
i "EDR_p opio" in d .columns:
mask = (d ["EDR_p opio"] > umb al) & (d [" "] == 1.0)
p s = d .loc[mask, ["x", "y"]]. alues. olis ()
pun os["p opio"].ex end(p s)
i "EDR_Walls" in d .columns:
mask = (d ["EDR_Walls"] > umb al) & (d [" "] == 1.0)
p s = d .loc[mask, ["x", "y"]]. alues. olis ()
pun os["walls"].ex end(p s)
i idx % ( o al_a chi os // 10 + 1) == 0:
po cen aje = (idx + 1) / o al_a chi os * 100
p in ( " P og eso ex acción: {po cen aje:.1 }%")
o cla e in pun os:
pun os[cla e] = o ch. enso (pun os[cla e], d ype= o ch. loa 32)
e u n pun os
de in eg a _ ayec o ias(pun os_dic , dumps):
esul ados = {}
o al_dumps = len(dumps)
p in ( " In eg ando ayec o ias hacia =0 pa a odas las zonas...")
o zona, pun os in pun os_dic .i ems():
i pun os.shape[0] == 0:
p in ( " No se encon a on pun os pa a {zona}. Sal ando
in eg ación.")
esul ados[zona] = o ch.emp y((0,2))
con inue
pun os = pun os.clone()
o idx, a chi o in enume a e( e e sed(dumps)):
d = pd. ead_cs (a chi o)
u = o ch. enso (g idda a_np(d , "u.x", XGRID, YGRID))
= o ch. enso (g idda a_np(d , "u.y", XGRID, YGRID))
x = pun os[:, 0].numpy()
y = pun os[:, 1].numpy()
ix, iy = busca _indices(x, y)
pun os[:, 0] += u[iy, ix] * DT
pun os[:, 1] += [iy, ix] * DT
den o = (pun os[:, 0] >= XMIN) & (pun os[:, 0] <= XMAX) &
(pun os[:, 1] >= YMIN) & (pun os[:, 1] <= YMAX)
pun os = pun os[den o]
64 Chap e A. Used Codes
le al_walls = max_walls > EDR_adim
celda_ids = []
o x, y, hi in zip(x0, y0, h):
x_ = ound(x, 12)
y_ = ound(y, 12)
h_ = ound(hi, 12)
celda_ids.append((x_ , y_ , h_ ))
celda_ids = np.a ay(celda_ids)
celdas = de aul dic (lis )
o i, key in enume a e(celda_ids):
celdas[ uple(key)].append(i)
Vp, Vw = 0.0, 0.0
cen os_x_p opio, cen os_y_p opio, h_p opio = [], [], []
cen os_x_walls, cen os_y_walls, h_walls = [], [], []
o key, indices in celdas.i ems():
x_c, y_c, h_ al = key
A_celda = h_ al**2
i np.any(le al_p opio[indices]):
Vp += 2 * np.pi * y_c * A_celda
cen os_x_p opio.append(x_c)
cen os_y_p opio.append(y_c)
h_p opio.append(h_ al)
i np.any(le al_walls[indices]):
Vw += 2 * np.pi * y_c * A_celda
cen os_x_walls.append(x_c)
cen os_y_walls.append(y_c)
h_walls.append(h_ al)
wi h open(di ec o io_salida / " olumen_le al. x ", "w") as :
.w i e( "Volumen le al po EDR_p opio: {Vp:.6e} m^3 n")
.w i e( "Volumen le al po EDR_Walls: {Vw:.6e} m^3 n")
.w i e( "To al celdas e aluadas: {len(celdas)} n")
.w i e( "Celdas le ales (p opio): {len(cen os_x_p opio)} n")
.w i e( "Celdas le ales (walls): {len(cen os_x_walls)} n")
de g a ica _celdas(x, y, h, nomb e):
sizes = (np.a ay(h) / max(h))**2 * 50
pl . igu e( igsize=(10, 10))
pl .sca e (x, y, s=sizes, c=’ ed’, alpha=0.4)
pl .xlabel("x")
pl .ylabel("y")
pl . i le(nomb e)
pl .xlim(-5, 0)
pl .ylim(0, 4)

A.3 O he codes 65
pl .gca().se _aspec (’equal’, adjus able=’box’)
pl . igh _layou ()
pl .sa e ig(di ec o io_salida / "{nomb e}.png", dpi=600)
pl .close()
i cen os_x_p opio:
g a ica _celdas(cen os_x_p opio, cen os_y_p opio, h_p opio, "
zona_le al_EDR_p opio")
else:
p in ( " No hay celdas le ales po EDR_p opio pa a {
di ec o io_en ada.name}")
i cen os_x_walls:
g a ica _celdas(cen os_x_walls, cen os_y_walls, h_walls, "
zona_le al_EDR_Walls")
else:
p in ( " No hay celdas le ales po EDR_Walls pa a {
di ec o io_en ada.name}")
p in ( " P ocesado {di ec o io_en ada.name} {di ec o io_salida.
name}")
# =======================
# Bucle p incipal
# =======================
i __name__ == "__main__":
aiz_en ada = Pa h("da os p ocesamien o")
aiz_salida = Pa h(" esul ados")
aiz_salida.mkdi (exis _ok=T ue)
o ca pe a in so ed( aiz_en ada.i e di ()):
i ca pe a.is_di () and ca pe a.name.s a swi h("Oh_"):
ma ch = e.ma ch( "Oh_( d+ . d+)", ca pe a.name)
i no ma ch:
p in ( " Nomb e de ca pe a in álido: {ca pe a.name}")
con inue
oh = loa (ma ch.g oup(1))
ca pe a_salida = aiz_salida / ca pe a.name
p ocesa _zona_le al(ca pe a, ca pe a_salida, oh)
The codes abo e we e used o he econs uc ion o he le hal zone a =0. Assis ance om la ge
language models (LLMs) was employed du ing he de elopmen o hese speci ic codes, con ibu ing
signi ican ly o educing execu ion imes. All ou pu s we e closely e iewed and alida ed by he
au ho .
A.3 O he codes
66 Chap e A. Used Codes
Code A.6 LAUNCHER: Le hal Zone Recons uc ion. G id and Pa icle T acking. Me hod 3..
impo subp ocess
om pa hlib impo Pa h
cs _ oo = Pa h("cs ")
ou pu _ oo = Pa h("da os p ocesamien o")
ou pu _ oo .mkdi (exis _ok=T ue)
# Busca ca pe as ipo Oh_*
ca pe as_oh = so ed([d o d in cs _ oo .i e di () i d.is_di () and d.
name.s a swi h("Oh_")])
o ca pe a in ca pe as_oh:
nomb e = ca pe a.name
ca pe a_salida = ou pu _ oo / nomb e
ca pe a_salida.mkdi (pa en s=T ue, exis _ok=T ue)
p in ( " n P ocesando {nomb e}")
esul ado = subp ocess. un([
"py hon", "MallaHis EDR3_modula .py",
"--inpu ", s (ca pe a),
"--ou pu ", s (ca pe a_salida),
"--d ", "0.001",
"--np oc", "8"
])
i esul ado. e u ncode != 0:
p in ( " E o p ocesando {nomb e}")
else:
p in ( " Comple ado {nomb e}")
No e: In case anyone is in e es ed in unning hese codes, he only equi emen is o c ea e a olde
and place hem all he e. Inside his main olde , he e mus be ano he named ’da os p ocesamien o’.
This one should con ain addi ional olde s, each named a e he Ohneso ge numbe co esponding
o a simula ion Oh_0.* . Each o hese mus ha e se e al .cs iles wi h he ele an a iables o
each ime s ep sa ed in he simula ion.
Appendix B
Basilisk Ins alla ion Guide
B.1 In oduc ion
The ollowing guide aims o acili a e he ins alla ion and use o Basilisk, ocusing on he in e ace
and basic commands mo e han on i s p og amming.
Basilisk is a ee so wa e p og am based on sol ing pa ial di e en ial equa ions using adap i e
Ca esian meshes, ha is, sol ing in an en i onmen , cell by cell, he equa ions ha a e gi en o i .
This makes i e y use ul o simula ions in ields such as luid mechanics.
E e y hing ha is going o be explained is collec ed in he di e en en ies o he page o Basilisk.
B.2 Sys em equi emen s
•Ope a ing Sys em: Linux
•RAM Memo y: 4GB
•F ee disk space: 10GB (independen om ha needed o simula ions)
B.3 Ins alla ion
B.3.1 Download
Basilisk has been designed o he Linux ope a ing sys em and i is only possible o ope a e he
so wa e om i . The e o e, i is s ic ly necessa y o ha e i ins alled on he PC; howe e , bo h Mac
and Windows o e a simple way o un Linux wi hou ha ing o c ea e DualBoo s o use a di e en
compu e . This guide co e s only he Windows ins alla ion p ocess.
B.3.2 Ins alla ion p ocess o Windows
Enabling he Linux subsys em o Windows
Fi s o all, we should enable WSL (Windows Subsys em o Linux). To do so, we mus open he
Con ol Panel and go in o Unins all a p og am, below P og ams.
67
68 Chap e B. Basilisk Ins alla ion Guide
Figu e B.1 Con ol Panel.
Then, inside Tu n Windows ea u es on o o , we mus selec he op ion whe e i says Linux
Subsys em o Windows.
Figu e B.2 Tu n Windows ea u es on o o .
B.3 Ins alla ion 69
Figu e B.3 Linux Subsys em o Windows.
Ubun u ins alla ion
Nex hing o do is downloading Ubun u om Mic oso S o e. The e a e many op ions a ailable
o i , he bes one is he one ha says jus Ubun u, wi hou any hing else.
Te minal ini ializa ion
Once ins alled, we should p oceed o execu e he app
1
. As soon as i is opened, you will be asked o
a use and a passwo d. A e he ini ial se up, wha is shown in Figu e B.4 should appea , possibly
ollowed by addi ional messages.
Figu e B.4 Ubun u Te minal.
Basilisk ins alla ion
Fo he ins alla ion o Basilisk, he ins uc ions on he Ins alla ion sec ion o he p og am websi e
a e going o be ollowed; he e o e, i is highly ecommended o ead hem ca e ully. This sec ion
will also add ess po en ial issues ha may a ise du ing he p ocess and how o sol e hem 2
Below a se o codes will be shown ha mus be w i en in he Ubun u e minal, one a e ano he .
Fi s , i mus be w i en:
sudo ap ins all da cs make gawk
da cs clone h p://basilisk. /basilisk
1I is no ad isable o un Ubun u as an adminis a o i you a e no amilia wi h i , as i may damage he compu e
2
I is e y likely ha unexpec ed e o s will occu du ing he ins alla ion. A i icial In elligence such as Cha GPT
o G ok can be e y use ul in esol ing hem -simply a aching a sc eensho o he e o , accompanied by a small
desc ip ion should wo k

70 Chap e B. Basilisk Ins alla ion Guide
This way, he p og am will be ins alled, and o upda e i , i should be enough o ype:
cd basilisk
da cs pull
A e en e ing he i s sen ence, i is possible ha we may encoun e he e o displayed in Figu e
B.5.
Figu e B.5 Da cs e o du ing he ins alla ion.
To sol e his we will ins all da cs using cabal, a p og am ha acili a es he building, packaging
and dis ibu ion o lib a ies. The ollowing sen ences mus be en e ed:
sudo add-ap - eposi o y uni e se
sudo ap upda e
sudo ap ins all build-essen ial ghc cabal-ins all
cabal upda e
Then, we will add a line o code o one o he gene a ed iles. This will make he use o da cs easie ,
as i will no be necessa y o speci y, whene e i is called, ha i is s o ed in he cabal olde . I
should be w i en:
nano ~/.bash c
Add he nex line a he end o he ile ha will open:
expo PATH="$HOME/.cabal/bin:$PATH"
Once w i en, p ess: C l + O, hen En e and C l + X.
sou ce ~/.bash c
Las ly, i mus be w i en.
B.3 Ins alla ion 71
sudo ap ins all zlib1g-de
sudo ap ins all g++
cabal ins all da cs
Thus, da cs will be ins alled and he only command le o comple e he ins alla ion is he ollowing
one. The upda e p ocess is he same as p e iously shown, as i no e o had occu ed.
da cs clone h p://basilisk. /basilisk
Use ul lib a ies o Basilisk
Fo he co ec use and display o Basilisk, a numbe o p og ams a e needed, which will a y
depending on he needs o wha is p og ammed in Basilisk. He e a e he basic and mos common:
emacs,gnuplo ,b iew and ImageMagick.
•Emacs.
Emacs is he so wa e om which Basilisk codes will be p og ammed. I s use will be ex-
plained la e . To ins all i :
sudo ap -ge ins all emacs
emacs &
•Gnuplo .
Gnuplo allows use s o c ea e g aphs om da a.
sudo ap ins all gnuplo
•bView.
bView is ano he mo e sophis ica ed isualiza ion p og am ha allows mul iple unc ionali ies
ha will be discussed in de ail la e .
•ImageMagick.
Finally, ImageMagick is a .ppm iles iewe e y use ul o pos -p ocessing. 3
sudo ap ins all imagemagick
3
In he Basilisk Ins alla ion Guide, om hei own web, i is ecommended o execu e he nex sen ece, al hough wi h
wha is al eady ins alled is enough: sudo ap ins all gnuplo imagemagick mpeg g aph iz alg ind gi sicle ps oedi
72 Chap e B. Basilisk Ins alla ion Guide
B.4 Use o Basilisk
As explained in he in oduc ion, he nex pa o he guide will ocus on basic commands, he
Basilisk in e ace, and pos -p ocessing, bu will also co e aspec s o p og amming.
To unde s and how Basilisk wo ks and i s di e en unc ions, i is e y help ul o isi he p og am
page.
B.4.1 Linux use
To na iga e e icien ly, i is essen ial o know how Linux basic commands wo k. Knowing how
o na iga e be ween di ec o ies, c ea e hem and dele e hem is necessa y. The LinuxCommand
websi e p o ides a good explana ion o e e y hing one needs o know.
B.4.2 Emacs use. P og amming and compiling.
Emacs is he co e o Basilisk, whe e we will p og am.
To s a i , i should be w i en:
emacs &
A window, shown in Figu e B.6, should appea .
Figu e B.6 Emacs ini ial in e ace.
Fi s o all, by clicking in File in he le op co ne and hen in Visi New File a space, like one
shown in Figu e B.7, will pop up. The e we can w i e ou i s p og am.
The supe io ba , whe e i says Name, is whe e he name o ou p og am should be w i en,
ollowed by a .c.Tes .c, o example.
Nex , ano he ab will open (Figu e B.8), whe e we will inally code. E e y o he aspec is e y
in ui i e; howe e , no e ha be o e compiling a p og am, i mus be sa ed by clicking in Sa e.
To edi a ile, ins ead o p essing Visi New File, click on Open File.
B.4 Use o Basilisk 73
Figu e B.7 Emacs in e ace 2.
Figu e B.8 Emacs in e ace 3.
Once w i en a p og am, we mus compile, as i is common in e e y language, in he Ubun u
e minal. I any mis ake is made in he code, Ubun u will show an e o in he e minal.
I is impo an o know which lib a ies a e used in he p og am o a success ul compila ion.
Gene ally speaking, a Basilisk code should be compiled he ollowing way.
qcc -O2 -g -Wall p og ama.c -o p og ama -lm
B.4.3 BView2D
Basilisk allows he use o use an easy way o isualizing a iables sa ed du ing a simula ion
h ough b iew2D. I Basilisk has been ins alled jus as explained he e, hese s eps a e o be ollowed
o open he in e ace.
B iew2D is opened wi h he nex sen ence:

Lis o Codes
2.1 Implemen ed code o se ing ini ial p essu es 11
2.2 Code o bounda y condi ions 12
2.3 E en ha sa es and calcula e a iables ela ed o he impac on su ounding li e 17
3.1 Func ion ha gene a es he wo-s age g id 21
3.2 Func ions ha de e mine he pa icles’ eloci y 22
3.3 Func ion ha implemen s bilinea in e pola ion 23
3.4 Me hod 3 in ial mesh 25
3.5 Code agmen ha shows how he eloci y ield is in e pola ed in Me hod 3 26
A.1 Bubble Bu s ing Code 47
A.2 Le hal Zone Recons uc ion. Back acking. Me hod 1 51
A.3 Le hal Zone Recons uc ion. Augmen ed P ecision. Me hod 2 55
A.4 Le hal Zone Recons uc ion. G id and Pa icle T acking. Me hod 3. 60
A.5 Le hal Zone Recons uc ion. Le hal Volumes, EDR and Images. Me hod 3. 63
A.6 LAUNCHER: Le hal Zone Recons uc ion. G id and Pa icle T acking. Me hod 3. 66
81
Bibliog aphy
[1]
B uce Albe s, Alexande Johnson, Julian Lewis, Ma in Ra , Kei h Robe s, and Pe e Wal e ,
Molecula biology o he cell, 6 ed., Ga land Science, 2014.
[2]
Em ah Celik, Midha H. Abdul eda, Dony Maiguel, Jie Li, and Vincen T. Moy, Rea angemen
o mic o ubule ne wo k unde biochemical and mechanical s imula ions, Me hods 60 (2013),
no. 2, 195–201.
[3]
J. J. Chalme s, Y. Liu, M. Aucoin, J. Schul z, M. Glazman, B. Fiech ne , and A. J. Sinskey,
Quan i ica ion o damage o suspended insec cells as a esul o bubble up u e, Bio echnology
P og ess 10 (1994), no. 1, 40–46.
[4]
Dennis E. Dische , Paul Janmey, and Yu li Wang, Tissue cells eel and espond o he s i ness
o hei subs a e, Science 310 (2005), no. 5751, 1139–1143.
[5]
Al onso M. Gañán-Cal o, The ocean ine sp ay, P oceedings o he Na ional Academy o
Sciences (PNAS) (2022), Manusc ip compiled on Feb ua y 3, 2022.
[6]
Al onso M. Gañán-Cal o and José M. López-He e a, On he physics o ansien ejec ion
om bubble bu s ing, Jou nal o Fluid Mechanics 929 (2021), A12.
[7]
Lionel Guillou, A in Baba ahe i, Michael Sai akis, A melle Bohineus , S éphanie Dogniaux,
Clai e Hi oz, Abdul I. Ba aka , and Julien Husson, T-lymphocy e passi e de o ma ion is
con olled by un olding o memb ane su ace ese oi s, Molecula Biology o he Cell 27
(2016), no. 22, 3574–3582, Epub 2016 Sep 7.
[8]
Wei-Shou Hu, Claudia Be dugo, and John J. Chalme s, “ he po en ial o hyd odynamic damage
o animal cells o indus ial ele ance: cu en unde s anding”, Bio echnology Ad ances 29
(2011), no. 4, 448–460.
[9]
Ji San Lee, Byung Mook Weon, Su Ji Pa k, Jung Ho Je, Kamel Fezzaa, and Wah-Kea Lee,
Size limi s he o ma ion o liquid je s du ing bubble bu s ing, Na u e Communica ions 2
(2011), 367.
[10]
Oli e McRae, Pe e L. L. Walls, Venka esh Na a ajan, Ch is An oniou, and James C. Bi d,
Elucida ing he e ec s o mic obubble pinch-o dynamics on mammalian cell iabili y, Bio ech-
nology and Bioenginee ing 121 (2024), no. 2, 406–415.
[11]
B. Neuns oecklin, M. S e le , T. Solac oup, H. B oly, M. Mo bidelli, and M. Soos, De e mi-
na ion o he maximum ope a ing ange o hyd odynamic s ess in mammalian cell cul u e,
Jou nal o Bio echnology 194 (2015), 100–109, Epub 2014 Dec 18.
83
84 Bibliog aphy
[12]
Thomas S. Pen ield, Jing Xiong, and Linhong Ma, Mechanical he e ogenei y in he plasma
memb ane o li ing cells, Biophysical Jou nal 114 (2018), no. 8, 1909–1920.
[13]
Eugenio Ras elli, Cinzia Co inaldesi, An onio Dell’Anno, Ma co Lo Ma i e, Sil es o G eco,
Ma ia C is ina Facchini, Ma eo Rinaldi, Colin O’Dowd, Da ius Cebu nis, and Robe o
Dano a o, T ans e o labile o ganic ma e and mic obes om he ocean su ace o he ma ine
ae osol: an expe imen al app oach, Scien i ic Repo s 7(2017), 11475.
[14]
W. Rawicz, K. C. Olb ich, T. McIn osh, D. Needham, and E. E ans, E ec o chain leng h and
unsa u a ion on elas ici y o lipid bilaye s, Biophysical Jou nal 79 (2000), no. 1, 328–339.
[15]
Daniel Shaw, Qi Li, Janine Nunes, and Luc Deike, Ocean emission o mic oplas ic, PNAS
Nexus 2(2023).
[16]
Donald E. Spiel, The d ople s p oduced by indi idual bubbles bu s ing on a sea wa e su ace,
pp. 291–325, Sp inge Ne he lands, Do d ech , 1999.
[17]
Shinya Tanaka, Kei Takemu a, Takuya Takama su, and Masa u Mochizuki, E ec s o s e ching
speed on mechanical up u e o single cells, Biophysical Re iews and Le e s 16 (2021), no. 4,
1–9.
[18]
Yoshiaki Toba, D op p oduc ion by bu s ing o ai bubbles on he sea su ace (ii): Theo e ical
s udy on he shape o loa ing bubbles, Jou nal o he Oceanog aphical Socie y o Japan 15
(1959), no. 3, 121–130, Recei ed Sep embe 4, 1959.
[19] An oon an Hoo , The ee-g id s uc u e in basilisk, n.d.
[20]
Pe e L. L. Walls, Oli e McRae, Venka esh Na a ajan, Ch is Johnson, Ch is An oniou, and
James C. Bi d, Quan i ying he po en ial o bu s ing bubbles o damage suspended cells,
Scien i ic Repo s 7(2017), no. 15102.
[21]
Fang Yuan, Chen Yang, and Pei Zhong, Cell memb ane de o ma ion and bioe ec s p oduced
by andem bubble-induced je ing low, P oceedings o he Na ional Academy o Sciences 112
(2015), no. 51, E7039–E7047, Epub 2015 Dec 9.
[22]
Ma in Če ný, Ma in G ego , and Vladimí Šub , Mapping mechanical p ope ies o cellula
memb anes ia high- esolu ion echniques, Scien i ic Repo s 12 (2022), no. 1, 1453.