Introduction to Hyperbolic Equations and Fluid ... · PDF fileIntroduction to Hyperbolic...
Transcript of Introduction to Hyperbolic Equations and Fluid ... · PDF fileIntroduction to Hyperbolic...
ÉCOLE POLYTECHNIQUEFÉDÉRALE DE LAUSANNE
Introductionto HyperbolicEquationsandFluid-StructureInteraction
SemesterProjectof
BenjaminStamm
Directedby:Prof. Alfio Quarteroni
SimoneDeparis
Instituteof AnalysisandScientificComputing,EPFL,Lausanne
March10,2003
1
CONTENTS 2
Contents
1 Intr oduction 3
2 The waveequation 42.1 Themathematicalproblem . . . . . . . . . . . . . . . . . . . . . . . 42.2 Dirichlet boundaryconditions . . . . . . . . . . . . . . . . . . . . . 42.3 Neumannboundaryconditions . . . . . . . . . . . . . . . . . . . . . 4
3 Numerical approximation by the Newmark method 53.1 Dirichlet boundaryconditions . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 Theweakproblem . . . . . . . . . . . . . . . . . . . . . . . 53.1.2 Space-discretizationwith theGalerkinmethod . . . . . . . . 63.1.3 TheNewmarkmethod . . . . . . . . . . . . . . . . . . . . . 7
3.2 Neumannboundaryconditions . . . . . . . . . . . . . . . . . . . . . 103.2.1 Theweakproblem . . . . . . . . . . . . . . . . . . . . . . . 103.2.2 Space-discretizationwith theGalerkinmethod . . . . . . . . 113.2.3 TheNewmarkmethod . . . . . . . . . . . . . . . . . . . . . 11
3.3 TheMatlabCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.3.1 Approximationof
������������� �����. . . . . . . . . . . . . . . . . 13
3.4 Theoreticalstudyof theNewmarkmethod . . . . . . . . . . . . . . . 13
4 Leap-Frogmethod 154.1 Dirichlet boundaryconditions . . . . . . . . . . . . . . . . . . . . . 154.2 Neumannboundaryconditions . . . . . . . . . . . . . . . . . . . . . 16
5 Fluid-Structur e Interaction 175.1 Thefluid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.2 Thevessel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.3 Interaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.4 Thealgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205.5 Results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.5.1 First version . . . . . . . . . . . . . . . . . . . . . . . . . . 225.5.2 Secondversion . . . . . . . . . . . . . . . . . . . . . . . . . 25
6 Conclusions 27
7 Matlab Codes 287.1 TheNewmarkCode. . . . . . . . . . . . . . . . . . . . . . . . . . . 28
7.1.1 int f.m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327.1.2 dcentred.m . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
7.2 TheLeap-FrogCode . . . . . . . . . . . . . . . . . . . . . . . . . . 337.3 TheFluid-StructureInteractionCode. . . . . . . . . . . . . . . . . . 36
1 INTRODUCTION 3
1 Intr oduction
In this semesterproject, we dealt with hyperbolicpartial differential equationsandFluid-StructureInteraction.
Chapter2 is a short introductionin the wave equation. It’s the equationwhichdescribesthepropagationof waves.In thelastchapter, weusethisequationto describea onedimensionalvesselin asimplefluid-structureinteractionproblem.
In Chapter3 theNewmarkmethodis studiedin detail. Thetwo casesof differentboundaryconditions,Dirichlet and Neuman,hasto be treateddifferently, sincetheweakproblemis not thesame.In bothcases,theweakproblemof thewave equationis derived. Thenwe usetheGalerkinmethodto discretisethespace.This leadsus toasecondorderordinarydifferentialequation,whosesolutionis approximatedwith theNewmarkmethod.A Matlabcodeis developedfrom the theoreticaldescription.Thedescriptionof the codeis morean illustration in someparticularpassages.You willfind the codeat the endof this report. In the fluid-structureinteraction,we usetheNewmarkmethodto simulatethevessel.
In the following chapter, the Leap-Frogmethodis studied. It’s alsoa numericalmethodto approximatethesolutionof thewaveequation.Youcanalsofind theMatlabcodeat theendof this report.This methodcanbeusedin thefluid-structureproblem,but we did not.
In chapter5, a simplemodelof bloodflow, basedon thefluid-structureinteractionis developed.An algorithmis presented,which couplesthe fluid andthe vessel-part.Then,you canfind the resultsof two differentversionsof the algorithmanda shortanalysis.
A shortdiscussionof theprojectis givenin thechapter6.In chapter7, you find theMatlabcodesof theNewmark-andLeap-Frog-method.
Youcannotfind thecodesfor thesimulationof thefluid-structureinteractionproblem,becauseall thecodesneededto run theprogramaretoo big to presentit in this report.
2 THE WAVE EQUATION 4
2 The waveequation
2.1 The mathematicalproblem
Thisis ashortintroductionto thewaveequation.It describesmany wavephenomenons,like the string-, electro-magnetic-or acoustic-waves. The following mathematicalproblem(P) hasto bestudied:find ��������� satisfying��� �� � ���! #" �$� ���% �'&)(*" �,+ � (1)
with initial conditions � � % �.-�� + ��/ � % � (2)�� � � � % �.-�� + �10 � % � (3)
andboundaryconditions.Notethat � is thespace-timedomainandthatthespacehasdimensionone.Sowe have �2+ � % / � % 0 �435� 76 �.8 6 � , � % / � % 0 � beingthespace-domainand
� 76 �.8 6 � the time-domain. We alsohave� �*�9�:� , whereas and ( are two
constants.We supposethat ; �.<; 6 � and ; ��<;>= � exist.
2.2 Dirichlet boundary conditions
We saythattheproblemhasDirichlet boundaryconditionswhenweknow that� � % / ����� + 8 ( / �?��� � � % 0 ����� + 8 ( 0 �?��� (4)
where8 ( / �.8 ( 0 �A@ 6 �B8 6�C �D� . Note that it is necessarythat ��/ � % / � + 8 ( / �?� / � and��/ � % 0 � + 8 ( 0 �?� / � to getawell posedproblem.
2.3 Neumannboundary conditions
With Neumannboundaryconditions,thespatialderivativeon theboundaryis given:� ��E% � % / ����� + 8 ( / �?��� � ���% � % 0 ����� + 8 ( 0 ����� (5)
where8 ( / �B8 ( 0 �F@ 6 �.8 6GC ��� .
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 5
3 Numerical approximation by the Newmark method
3.1 Dirichlet boundary conditions
3.1.1 The weakproblem
In this section,we would like to find a problemequivalent to (P), which is simpler(to treatand)to solve. We would like only first orderderivativesin spaceinsteadof asecondorderone.For this, we multiply theequation(1) by a testfunction H��I@ % /KJ % 0 C �L� � H�M5N�/O�P+Q 0/ � % / � % 0 � andintegratetheobtainedequationin spacefrom
% / to% 0 . We obtainthe
following equation:R =TS=VU ; �; 6 � � � % ����� " H � % ��W % �! X" R =TS=>U ; �;>= � � � % ����� " H � % ��W % &Y(Z" R =[S=VU � � % ����� " H � % ��W %+ R = S= U ��� % ����� " H � % ��W % (6)
Integratingby partsgives\ =TS= U�$���% � � � % ����� " H � % ��W % + ���% � � % ����� " H � % �V] =TS= U � \ =TS= U
���% � � % ����� " ���% H � % ��W % (7)
Since% / and
% 0 do not dependon�, we canchangethesecondderivative in time and
theintegral. We have H � % / � + - +^H � % 0 � , becauseH_M`N / . This leadsto anequivalentproblemto (P): a �cbd- find � �?��� M�Ne�P+ Q 0 � % / � % 0 � satisfyingf �f 6 � R = S=VU � � % ����� " H � % ��W % &) #" R = S=VU ;;V= � � % ����� ;;>= H � % ��W % &Y(*" R = S=>U � � % ����� " H � % ��W %+ R =TS= U ��� % ����� " H � % ��W % (8)
for all H)MdN�/`�P+ Q 0/ � % / � % 0 � . To simplify the notationwe usethe scalarproducting � � % / � % 0 � �G����h���� � + \ = S= U ��� % � " hi� % ��W % (9)
We alsocandefinethefollowing bilinearforms: � Q 0 � % / � % 0 �Z3 Q 0 � % / � % 0 � ��� ( � g � � % / � % 0 �Z3 g � � % / � % 0 � ��� (10) � � � H � + #" \ = S= U���% � � % � ���% H � % ��W % (11)( � � � H � + (*" � � � H ����� (12)
Lemma 1 Thebilinear form � " � " � is continuous.
proof 1 We applytheCauchy-Schwarzinequality:] � � � H �j] + ]k� � ��E% � � H��% �����l]Pm#] � ] n S " ] H ] n S[oqpbecause� � HOM Q 0 � % / � % 0 � . rFinally, we obtainwith thisnotationstheweakproblem(WP) of (P):find ��M`N W �W�� � � � � H ��� � &) � � � H � &Y( � � � H � + ����� H ��� � (13)
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 6
� � % ��-7� + � / � % ��� � � � % ��-7� + � 0 � % �� � % / ����� + 8 ( / �?���� � % 0 ����� + 8 ( 0 �?���for all HsMtNF/ .3.1.2 Space-discretization with the Galerkin method
In this section,we searcha semi-discreteapproximationof the weakproblem(WP)usingtheGalerkinmethod.This leadsusto a secondorderCauchy-problemin time.
Let NEu be a v = &xw dimensionalsubspaceof V and NF/zy u5+{N�u#|!NF/ . Thenthefollowing problemis anapproximationof theweakproblem(WP).Finda function �$u}M`N�u thatsatisfies:W �W�� � � � u � H u � &Y � � u � H u � &Y( � � u � H u � + �G��� H u � (14)
�iu � % �.-�� + �E/Vy u � % ��� � � u � % ����� + �i0 y u � % ��iu � % / ����� + 8 ( / �?����$u � % / 0 ����� + 8 ( 0 �?���for all HsMtNF/zy u , where��/zy u and � 0 y u areprojectionsfrom N in N�u of �E/ resp. � 0 .
Thechoiceof N�u is completelyarbitrary. Sowecanchooseit theway, thatfor latertreatment,it will beaseasyaspossible.For example,wesubdividetheinterval @ % / � % 0 Cinto partitionsof equaldistancesh:% /~+ 0 o � o "z"V" o ���� o ������ 0 + % 0 � + % / & ��� ��w � "[�N u + �>H u M�� / � @ % / � % 0 C � ��H u ]�� �� y ����� SG� Ms��0 � a � + wc"z"z" v =��N /Vy u + �>H u M�N u �KH u � % / � +^H u � % 0 � + - �Note, that the finite dimensionallows us to build a finite basefor the correspondingspace.In thecaseof NF/Vy u wehave: � � � ������ � where
a � +�� "z"V" v = � � % � +����� ���-
if% M5@ 0 � ��� 0 C= � =VUu � �?� � � � if% M5@ ��� 0 � � C=VU � =u & � if% M5@ � � � � 0 C-
if% M5@ � � 0 � ����z� 0 C
while we addfor N u thetwo functions 0 and
� � � 0 definedas: 0 � % � + � =>U � =u &^w if% M!@ 0 � � C-
if% M!@ � � � � � 0 C ����� 0 � % � +¡� - if
% M�@ 0 � ���� C= � =>Uu � v = &qw if% M�@ ���� � ����z� 0 C
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 7
Sothatwecanwrite � u asa linearcombinationof thebasicelements:
�iu � % ����� + � � � 0¢£ � 0q¤� £ ����� " £ � % � (15)
� /zy u � % � + ����� 0¢£ � 0 � / � % £ � " £ � % �� 0 y u � % � + ����� 0¢£ � 0 � 0 � % £ � " £ � % �where ¤�10 ����� + 8 ( / �?��� and ¤� � � � 0 �?��� + 8 ( 0 ����� aregivenfunctionsand � /Vy u resp. �10 y uareapproximationsof � / resp. �10 . Usingthat � " � " � and ( � " � " � arebilinear formsandthatequation(14) is valid for eachelementof thebase� �� � ������ � , we obtain:����� 0¢£ � 0 W �W�� � ¤� £ �?��� " �� £ �� � ��� � & ���� 0¢£ � 0 ¤� £ ����� "P �� £ �� � � & ���V� 0¢£ � 0 ¤� £ �?��� "P( �� £ �� � � + �G���?������ � �
(16)a � +¡� "z"z" v = . This equationcanbe written in a vectorform. For this we definethevectors ¥� , ¥� / , ¥�10 and ¥� with components� � �?��� ��+ ����������� � ��� � � £ ����� ��+ ¤� £ �?����E/Vy £ �P+d��/ � % £ � � 0 y £ ��+^� 0 � % £ �andmatrices¦ , § and ¨ as© � £ �P+ �� £ �� � ����� � £ ��+ �� £ �� � � ( � £ ��+ ( �� £ �. � �Note that ¦ � § � ¨ªMq� ��� � 0V« ���� 0 , ¥�¬Mq� ����� 0 and ¥� Mq� ��� � 0 . So that (16) isequalto theCauchyproblem¦ " W �WK� � ¥� ����� & � § & ¨ � " ¥� ����� + ¥������� (17)¥� �?� / � + ¥��/WWK� ¥� �?� / � + ¥�103.1.3 The Newmark method
In this sectionthe Newmark methodis explainedandusedafterwardsin our specificproblem.For thetheoreticaldiscussionof theNewmark,let usconsidertheordinarydifferentialequationof secondorderin time
�� �� �?��� + h$���� � �?�����i®� ������� � M�@ 76 �B8 6 C� ��-7� +d��/®� ��-�� +d� 0 (18)
Notethatthedevelopmentof theNewmarkmethodisalsovalid for asystemof ordinarydifferentialequations.To simplify, we usethescalarODE. Thenext paragraphgives
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 8
you a motivationwhy theNewmarkmethodis chosenin this way. Theinterval @ 76 �.8 6 Cis subdividedin v 6 subintervalsof samelength ¯ � +±°G² � � ²� ² . Thisdefinesthepartition 76 + � 0 o � � o JVJzJ o � � ² � 0j+ 8 6 wherethe
��³aredefinedas
��³ + 76i&Y´ � " ��µ ��w � .We usetheTaylordevelopmentof secondorderof � �?��� . Finally wenote
h 6?¶ insteadofhi�?� ³ � � �?� ³ ���1®� �?� ³ ��� .� �?��³ � 0 � +q� ����³�� & ®� �?��³�� ´ � & w� � �?��³�� ´ � � &s· � �?��³F� ´ � � �}· � ����³�� ´ � � &s¸ � ´ ��¹V� (19)
Notethat · � ��� ³ � ´ � � is onceaddedandoncesubtracted.Wereplace· � �?� ³ � ´ � � by thezeroorderTaylor approximationof
� �?� ³ � + · � ��� ³ � 0 � ´ � � &�¸ � ´ ��¹[� . Usingthat � isa solutionof thedifferentialequation(18),we canreplacethesecondorderderivativeof � by
h 6 ¶ �P+ hi�?��³$� � �?��³����1®� �?��³���� + � �?��³F� . This leadsusto
� ��� ³ � 0 � +^� �?� ³ � &�´ � H ��� ³ � &º´ � � @ · h 6?¶ � S & � w� �!· � h 6?¶7C (20)
In addition,wedevelop®� �?���®� �?��³ � 0 � + ®� �?��³�� & � �?��³�� ´ � &)» � �?��³�� ´ � ��» � ����³�� ´ � &Y¸ � ´ � � � (21)
Approximating» � ��� ³ � ´ � with thehelpof thezeroorderTaylordevelopment,we find®� ��� ³ � 0 � + ®� �?� ³ � &º´ � @ » � ��� ³ � 0 � & � wj�¼» � � ��� ³ � C (22)
Now, we usealso that u is the solution of the differential equationand replacethesecondorderderivativeof � by
h 6?¶ .®� ��� ³ � 0 � + ®� �?� ³ � &º´ � @ » h 6?¶ � S & � wj��» �½h 6?¶7C (23)
Thisbringsusto thefollowing scheme:� ³ beinganapproximationof � ��� ³ � and H ³ onefor®� ��� ³ �
� � ³ � 0 +d� ³ &Y´ � H ³ &º´ � � @ · h 6?¶ � S & � 0� �5· �½h 6?¶�CH ³ � 0 +^H ³ &Y´ � @ » h 6?¶ � S & � w4��» � h 6?¶7C (24)
Now wearereadytoapplythemethodto thesystem(17). In theory, wehave ¥hi�?�� � ������i®� �?����� +¾ � 0 @ ¥� � ��¿ & � � ¥� C , but practicallyit coastsa lot of time to calculate¾ � 0 . Sowe
multiply bothpartsby ¦�� �¦À¥� ³ � 0 +q¦À¥� ³ &º´ � ¦{¥H ³ &º´ � � @ · ¥� 6?¶ � S & � 0� �5· � ¥� 6?¶7C�A´ � � � § & ¨ � @ · ¥� ³ � 0 & � 0� �!· � ¥� ³ C¦{¥H ³ � 0 +�¦Á¥H ³ &º´ � @ » ¥� 6 ¶ � S & � wj�¼» � ¥� 6 ¶�C �5´ ��� § & ¨ � @ » ¥� ³ � 0 & � wj��» � ¥� ³ C
(25)where ¥� 6 ¶ + ¥���?��³F� . Takingall ¥� ³ � 0 resp. ¥H ³ � 0 on theleft sidegivesyou
�� �@ ¦ &º´ � � · � § & ¨ � C ¥� ³ � 0 +q¦À¥� ³ &Y´ � ¦{¥H ³ &Y´ � � @ · ¥� 6?¶ � S & � 0� �5· � ¥� 6?¶�C�A´ � � � § & ¨ ��� 0� �!· � ¥� ³¦{¥H ³ � 0 +�¦Á¥H ³ &º´ � @ » ¥� 6?¶ � S & � wj�¼» � ¥� 6?¶�C �5´ ��� § & ¨ � @ » ¥� ³ � 0 & � wj��» � ¥� ³ C
(26)
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 9
Now, we would like to developanalgorithmfor solvingthesystem(26). We regroupthis systemthatwe canrecognizehow to definenew variables.
���� ���@ ¦ &º´ � � · � § & ¨ � C ¥� ³ � 0 +x@ ¦ &Y´ � � · � § & ¨ � C ¥� ³ �à6 �� � § & ¨ � ¥� ³ &º´ � ¦Á¥H ³&~´ � � @ · ¥� 6?¶ � S & � 0� �5· � ¥� 6?¶7C¦{¥H ³ � 0 +�¦Á¥H ³ &º´ � @ » ¥� 6 ¶ � S & � wj�¼» � ¥� 6 ¶�C �5´ � » � § & ¨ � ¥� ³ � 0�A´ ��� wj�¼» �z� § & ¨ � ¥� ³
(27)We definesomenew variables§_Ä �P+ @ ¦ &Y´ � � · � § & ¨ � C (28)¥8 < ³ �P+ §sÄ " ¥� ³ (29)¥8Å ³ �P+ ¦ " ¥H ³¥¿ � < ³ �P+ � § & ¨ � " ¥� ³Note that ¥8 < ³ MÆ� � � � 0 , ¥8 Å ³ M¬� � � � 0 and ¥¿ � < ³ MÆ� � � � 0 . We replacethe newvariablesin theabove-mentionedsystemÇ ¥8 < ³ � 0 + ¥8 < ³ �  6 �� ¥¿ � < ³ &Y´ � ¥8Å ³ &º´ � � @ · ¥� 6 ¶ � S & � 0� �5· � ¥� 6 ¶7C¥8 Å ³ � 0 + ¥8 Å ³ �!´ � » ¥¿ � < ³ � 0 �5´ ��� wj�¼» � ¥¿ � < ³ &º´ � @ » ¥� 6?¶ � S & � wj��» � ¥� 6?¶7C
(30)Thisallowsusto write analgorithmwith only four variables: ¥� � ¥8 < � ¥8 Å and ¥¿ � <initial step:
- ¥�s+È¥��/- ¥8 < +�@ ¦ &Y´ � � · � § & ¨ � C " ¥�- ¥8Å +q¦ " ¥�i0- ¥¿ � < + � § & ¨ � " ¥�
stepn:
- ¥8 < + ¥8 < �  6 �� ¥¿ � < &Y´ � ¥8Å &Y´ � � @ · ¥� 6 ¶ � S & � 0� �5· � ¥� 6 ¶7C- Solve thesystem§ Ä�y É�ÊBË " ¥�$Ì.Í f + ¥8 < � �10 " ¥¿ < S � � � � � 0 " ¥¿ <[Î � � S- ¥8Å + ¥8Å �5´ ��� wj��» � ¥¿ � < &º´ � @ » ¥��³ � � & � wj�¼» � ¥�T³ C- ¥¿ � < + ��¿ & � � " ¥�- ¥8 Å + ¥8 Å �5´ � » ¥¿ � <- Solve thesystem¦�É�ÊBË " ¥H ÌBÍ f + ¥8 Å � H 0 " ¥¾ 0 � H ���z� 0 " ¥¾ ���� 0
where ¥¿ < � resp. ¥¾ � is the i-th column of the matrix § Ä resp. ¦ and § Äky É�Ê.Ë +� ¥¿ < � JzJVJ ¥¿ < Î � � resp. ¦�É�ÊBËÁ+ � ¥¾ � JzJVJ ¥¾ ��� � and ¥� ÌBÍ f + � � � � JzJzJ � � ��� ��Ï resp.
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 10
¥H�ÌBÍ f + � H � � JzJVJ � H � � ��Ï . The obtainedvector ¥� at eachstepµ
is an approximationof theexactsolution,i.e. theelement� � is anapproximationof � � ������³ � 0 � .
The last stepis supplementary. If you are interestedin an approximationof thefirst derivative in time of the exact solution,then it could be calculatedat eachstep,like you calculate� . But therearesomeadditionalproblems. You like to solve thesystem¦ " ¥H ³ � 0 + ¥8 Å with ¦ M�� � � � 0>« � � � 0 , ¥H ³ � 0 Mº� � � � 0 and ¥8 Å Mº� � � � 0 .Thedifferenceto � is thatyoudon’t havetheinformationon theboundary, sothatyouhave v = &qw unknownsbut only v = �ºw equations.Thesolutionis in a 2 dimensionalspace.Usingthewell known functions
8 ( / and8 ( / , which describethefunction � on
thebound,H canbeapproximatedby centereddifferences(on theboundary),a secondordermethod. Having the valuesof v on the boundary, you apply the sameschemelike for � , i.e. takingthefirst andlastcolumnof M multipliedby H�0 and H � � � 0 on theothersideof the equality. TheelementH � of the obtainedvector ¥H at thestep
µis an
approximationof ;; 6 � � ������³ � 0 � .3.2 Neumannboundary conditions
Thegoalof this sectionis thesameasin thepreceding,thenumericalapproximationwith theNewmarkmethod,but this timewith Neumannboundaryconditions.It will beashortdescription,detailedonly onthepassageswheretheproceduredeviatesfrom theabove-mentionedone.By uncertainty, seethesamepassagein theprecedingsection.
3.2.1 The weakproblem
In thiscase,thewaveequationisalsomultipliedbyatestfunction HOM�Nx+ Q 0 � % / � % 0 �andintegratedin space.Thefirst differenceappearsin integratingby parts.Knowingthederivativesin spaceon thebound,it isn’t demandedto v beingzeroon thebound.We write:
�4 \ = S= U��� ��E% � " H W % + \ = S= U
� ���% " � H��% W % &Y � ��E% � % / ����� " H � % / � �! � ��E% � % 0 ����� " H � % 0 �+ \ = S= U
� ���% " � H��% W % &Y #" 8 ( / ����� " H � % / � �! '" 8 ( 0 �?��� " H � % 0 � (31)
With thesamedefinitionsof thescalarproductandtheforms � " � " � and ( � " � " � asabove,youarrive to theweakproblem(WP):find ��M`NW �WK� � � � � H ����� &Y � � � H � &)( � � � H � + �G��� H ����� &Y @ 8 ( 0 �?��� H � % 0 � � 8 ( / ����� H � % / � C (32)
� � % ��-7� + ��/ � % ��� � � � % ��-7� + �10 � % ����% � � % / ����� + 8 ( / �?������% � � % 0 ����� + 8 ( 0 �?���for all HsMtN .
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 11
3.2.2 Space-discretization with the Galerkin method
Likein thecaseof Dirichlet boundaryconditions,wereplaceN by afinite dimensionalsubspace. NEuÐ+¬�VHKuÑMt� / � @ % / � % 0 C � ��HKu ]P� � � y � ��� S � Mt� 0 � a � + wÒ"V"z" v = � (33)
Theapproximation� u M¼N u of �¼M�N canbewritten in the v = &�w -dimensionalbase� £ � , definedin theprecedingsection.We write
�iu � % ����� + � � � 0¢£ � 0 ¤� £ ����� " £ � % � (34)
andlet �E/Vy u , � 0 y u betheprojectionsfrom N in N�u of ��/ , � 0� /Vy u � % � + ���� 0¢£ � 0 � / � % £ � " £ � % ��i0 y u � % � + ���� 0¢£ � 0 �10 � % £ � " £ � % �� /zy u � % � and �i0 y u � % � beingapproximationsof � / � % � resp. �i0 � % � andasaconsequence,
thediscreteformulationof theweakproblemis given.� � � 0¢£ � 0 W �WK� � ¤� £ ����� " �� £ �. � ��� � & � � � 0¢£ � 0 ¤� £ ����� "z �� £ �. � � & � � � 0¢£ � 0 ¤� £ �?��� ">( �� £ �. � � (35)+ �G���?����.��G� &Y @ 8 ( 0 �?������.� % 0 � � 8 ( / ������Z� % / � Cfor all
� + w JzJVJ�v = &Ãw . So that this systemof equationcanbe written in a matrix-vectorform. For this, thesamedefinitionsof thematrices¦ , § , ¨ andthevectors ¥� ,¥� asin theprecedingsectionareused.We obtain¦ " ¥� �?��� & � § & ¨ � " ¥� ����� + ¥���?��� & ¥Ó �?��� (36)¥� �?� / � + ¥��/®¥� �?� / � + ¥� 0where ¥Ó ����� + � �4 '" 8 ( / �?���Ô- "z"V" - '" 8 ( 0 �?������Õ , ¦ � § � ¨±MÖ� ���K� 0V« ���z� 0 and¥� � ¥� Mt� ����� 0 .3.2.3 The Newmark method
Likein thecaseof Neumannboundaryconditions,theCauchyproblem(36)is resolvedby theNewmarkmethod.Sothatwe get
���� ���@ ¦ &º´ � � · � § & ¨ � C ¥� ³ � 0 +x@ ¦ &Y´ � � · � § & ¨ � C ¥� ³ �  6 �� � § & ¨ � ¥� ³ &º´ � ¦Á¥H ³&~´ � � @ · � ¥� 6 ¶ � S & ¥Ó ³ � 0 � & � 0� �5· ��� ¥� 6 ¶ & ¥Ó ³�� C¦{¥H ³ � 0 +�¦Á¥H ³ &º´ � @ » � ¥� 6?¶ � S & ¥Ó ³ � 0 � & � wj�¼» �z� ¥� 6?¶ & ¥Ó ³ � C �!´ � » � § & ¨ � ¥� ³ � 0�A´ ��� wj�¼» �z� § & ¨ � ¥� ³
(37)
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 12
where ¥Ó ³ + ¥Ó �?��³E� . We defineexactly the samevariablesas in the caseof Dirichletboundaryconditions,only thatthedimensionswill bedifferent:§_Ä ��+ @ ¦ &º´ � � · � § & ¨ � C (38)¥8 < ��+ §_Ä " ¥� (39)¥8 Å ��+ ¦ " ¥H¥¿ � < ��+ � § & ¨ � " ¥�Note that § Ä Mx� ����� 0>« ����� 0 and ¥8 < � ¥8Å7� ¥¿ � < Mx� ����� 0 . Now, thereis the samealgorithmpresented,but thedimensionsof thematrix’sandvectorsdiffers.
initial step:
- ¥�s+È¥� /- ¥8 < +�@ ¦ &Y´ � � · � § & ¨ � C " ¥�- ¥8 Å +q¦ " ¥� 0- ¥¿ � < + � § & ¨ � " ¥�
stepn:
- ¥8 < + ¥8 < �à6 �� ¥¿ � < &Y´ � ¥8 Å &Y´ � � @ · � ¥� 6?¶ � S & ¥Ó ³ � 0 � & � 0� �5· �z� ¥� 6?¶ & ¥Ó ³ � C- Solve thesystem§_Ä " ¥�s+ ¥8 <- ¥8 Å + ¥8 Å �5´ ��� wj��» � ¥¿ � < &º´ � @ » � ¥� ³ � � & ¥Ó ³ � 0 � & � wj�¼» ��� ¥� ³ & ¥Ó ³ � C- ¥¿ � < + ��¿ & � � " ¥�- ¥8 Å + ¥8 Å �5´ � » ¥¿ � <- Solve thesystem¦ " ¥H}+ ¥8 Å
For additionalinformationon the solutionthe first derivative in time canbe approxi-mated.You solve at eachstepof time thesystem¦ " ¥H ³ � 0 + ¥8 Å with ¥8 Å the lastcal-culatedin thealgorithm.Thedimensionsare ¦×M�� � � � 0>« � � � 0 and ¥8 Å � ¥�ÖMÖ� � � � 0 .Thanksto theright dimensions,thereis no problemto solve it.
3.3 The Matlab Code
TheMatlabCodefor the Newmarkmethodcalculatestheapproximationof thewaveequationwith the Newmarkmethod.All the computationsarebasedon the previoustheory. Youhaveasinputs:
% / , % 0 , v = , � / , � 0 , v 6 , , ( , » , · , � / , �i0 , � ,8 (�(�Ø W7Ù , 8 ( / and8 ( 0 . 8 (�(�Ø W7Ù (boundaryconditioncode)is atwo dimensionalbooleanline-vector, where
0 meansDirichlet and1 Neumannboundaryconditions.Thefirst elementcorrespondsto% / andthesecondto
% 0 . For example @ wÚw C meansNeumannboundaryconditionsin% / and
% 0 . The outputsareanerror messageor a plot for � and H¼+�; <; 6 (thefirstderivative in space).Theplot is thesurfacedefinedby � � % ����� resp. H � % ����� .
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 13
3.3.1 Approximation of����������.��½�����
The Simpsonformula is usedto approximate�T�.�?��� + ������������� ����� + R =[S= U ����������GW % .
Let @ �B8 CÜÛ � bean interval and � + ° � �� . You like to approximateR °� h$� % ��W % . The
Simpsonformulais thefollowing:Ý ¹ �Þh�� + � ß @ h$� � &5à h$� á& 8� � & hi��8z� C (40)
TheSimpsonformulais exactin degree5, becausethepoints , 8 and� � °� arethezeros
of thecorrespondingorthogonalpolynomialof degree3 in @ �.8 C .In our case,we approximate
� � �����in the two intervals @ ��� 0 � � C and @ � � � � 0 C , in
eachinterval by theSimpsonformula. In therestof theinterval @ % / � % 0 C thefunction
is identicto zero,andalso������� " . Let
% ��â S� bethepoints% �iã u � and � � + u � . Note
thatZ� ��� 0 � + - + Z� � � 0 � and� � �?����ä � �ß @ à ��� % �?� S� ����� w� & � " ��� % � ����� &5à ��� % �?� S� ����� w� Cä � ß @ ��� % �?� S� � & ��� % � � & ��� % ��� S� � C (41)
For� 0 and
� ���� 0 , we have� 0 �����åä � ß @ ��� 0 �� & ��� � � C� ���� 0 �����åä � ß @ ��� � � � 0 �� & ��� 7��� � C(42)
This is usedin theMatlab-file� µi� � J © J Theinputsare
�, v = , � ,% / ,� andit returns ¥���?��� .
3.4 Theoretical study of the Newmark method
The orderof the Newmark methoddependingon the parameterswill be determinedin this section.We considerthe differentialequation(18) andlet
¿be the following
application:æ � ³ � 0H ³ � 0!ç + ¿æ � ³H ³ ç +
æ � ³ &Y´ � H ³ &º´ � � � · h 6?¶ � S & � 0� �5· �½h 6?¶ �H ³ &º´ ��� » h 6?¶ � S & � wj��» � h 6?¶ � ç (43)
Let � betheexactsolutionof (18)and¥è ����� +æ � �?����$é ����� ç (44)
where �$é�+ê; <; 6 .Thenwe define ë ³ � ´ ��� + ¥è �?� ³ � 0 � � ¿#� ¥è �?� ³ ��� . Theapplication¿
will beof orderp, if ë ³ � ´ ��� + ¸ � ´ � ì � 0 � . We alreadyhave¿#� ¥è �?� ³ ��� +æ � �?� ³ � &º´ � ��é �?� ³ � &º´ � � � · h 6?¶ � S & � 0� �5· �½h 6?¶ ��$é ��� ³ � &Y´ ��� » h 6?¶ � S & � w4�¼» � h 6?¶ � ç (45)
3 NUMERICAL APPROXIMATION BY THE NEWMARK METHOD 14
andweusetheTaylorexpansionof ¥è �?��³ � 0 � .� ��� ³ � 0 � + � �?� ³ � &º´ � � é �?� ³ � & ´ � �� � é é ��� ³ � &º·K´ � � � é é ��� ³ � �5·K´ � � � é é ��� ³ �& ´ � ¹í � é é é �?� ³ � &Y¸ � ´ ��î[� (46)
We havealsothefirst orderdevelopmentof ��é é �?� ³ � 0 � :� é é �?��³ � 0 � +^� é é �?��³F� &º´ � � é é é �?��³�� &º¸ � ´ � � �ï � é é �?��³�� +^� é é �?��³ � 0 � �5´ � � é é é �?��³�� &º¸ � ´ � � � (47)
Now we replace·K´ � � � é é ����³F� + ·�´ � � � é é ����³ � 0 � �!·�´ � ¹ � é é é �?��³�� &º¸ � ´ � î � (48)
in theequation(46). This leadsusto
� �?� ³ � 0 � + � ��� ³ � &º´ � � é �?� ³ � &º´ � � � · � é é �?� ³ � 0 � & � w� �)· � � é é �?� ³ ���&~´ ��¹K� wí �5· � � é é é �?� ³ � &º¸ � ´ ��îT� (49)
In thesameway wecanalsofind� é �?� ³ � 0 � + � é �?� ³ � &Y´ ��� » � é é �?� ³ � 0 � & � w4��» � � é é �?� ³ ���&~´ � � � w� �¼» � &Y¸ � ´ � ¹ � (50)
andasconsequencewe have¥è �?� ³ � 0 � � ¿#� ¥è �?� ³ � 0 ��� +æ ´ � ¹ � 0ð �5· � �$é é é �?��³E� &Y¸ � ´ � î �´ � � � 0� �¼» � �$é é é �?� ³ � &Y¸ � ´ � ¹ � ç (51)
We seethat in thecaseof » + 0� , theNewmarkmethodis a secondorderone,andifnot, themethodis only a first orderone.
4 LEAP-FROGMETHOD 15
4 Leap-Frog method
Themathematicalproblemin this sectionis exactly the sameasin theprecedent,wewould like to approximatethe solution of the wave equation. This time, we don’tusethe Galerkinmethod,but the finite differences.We don’t differ the two casesofboundaryconditions,a latertreatmentfor this two instanceswill follow. Themethodisfirst explainedfor bothcases,but we neglectall difficultiesconnectedto theboundaryconditions.Likein previouschapter, let be
� ³ + 6 & ��µ �Xw � "P´ � and � + % / & �?� �#w � "�� ,where ´ � +D°G² � � ²� ² and � + =[S � = U� � (
� + w JzJVJ�v = &ew , µ + w JzJVJ�v 6 &¡w ). Forall functions
h �c�ñ�×� we noteh ³£ insteadof
hi� £ ��� ³ � , wherewe have the samediscretizationof spaceandtime asin the previouschapter. The finite differencesaregiven �$� �� � � ä � ³ � 0£ � ��� ³£ & � ³�� 0£´ � � (52)�$� ���% � ä � ³£ � 0 � ��� ³£ & � ³£ � 0� � (53)
Wereplacethetwo secondderivativesin (1) with theabovementionedapproximations.This leadsto thefollowing scheme� ³ � 0£ � �T� ³£ & � ³k� 0£´ � � �! #" � ³£ � 0 � �T� ³£ & � ³£ � 0� � &Y(*" � ³£ + � ³£ (54)
Advancingin time, we separatethe terms � in time��³ � 0 from theotheronesin time��³
and��³k� 0 . Let be ò_+  6u .� ³ � 0£ + � � ³�� 0£ & � � � � ò � ��(V´ � � � " � ³£ &) ò � " � � ³£ � 0 & � ³£ � 0 � &Y´ � � " � ³£ (55)
Besidesthe complicationson the boundary, the initial stepput someadditionalprob-lems.For calculating� �£ we need� /£ +^� � £ � 6 �!´ ��� , soit have to beapproximated.Usingtheinitial condition(3), weapplythecentereddifferences
�10 � £ �Òä � �£ � � /£� ´ � (56)
where � /£ +ó� � £ � 76��º´ ��� . Note that �i0 is the initial conditionfor thederivative intimeof � . Sowehave � /£ +^� �£ � � ´ � �10 � £ � andasconsequence� �£ + � � �£ & � ´ � " � 0 � £ � & � � � � ò � �!(z´ � � � " ��/ � £ � (57)&á ò � " � ��/ � £ � 0 � & �E/ � �Bô½õ S ��� &º´ � � " � 0£ï� �£ + ´ � " � 0 � £ � & � wj�! ò � � (z´ � �� � " �E/ � £ � (58)
& ò �� " � ��/ � £ � 0 � & �E/ � £ � 0 ��� & ´ � �� " � 0£4.1 Dirichlet boundary conditions
In thecaseof Dirichlet boundaryconditions,therearen’t any complication,becausewedon’t haveto calculate� ³ 0 and � ³���� 0 . Sowereplacesimply � ³ 0 by
8 ( / �?� ³ � and � ³���� 0by8 ( 0 �?� ³ � in theequation(55) for all ö'+q�jJzJzJ�v = .
4 LEAP-FROGMETHOD 16
4.2 Neumannboundary conditions
In caseof Neumannboundaryconditions,we needto calculate� ³ 0 and � ³���� 0 . Forthis, we need � ³/ +÷� � % / �d� ����³�� and � ³����� � +÷� � % 0 &Æ� ����³�� . Using the centereddifferenceapproximationof theboundaryconditions8 ( / �?� ³ � + ���% � �?� ³ � % / ���åä � ³� � � ³/� � (59)8 ( 0 �?� ³ � + ���% � �?� ³ � % 0 ���åä � ³� � � � � � ³� �� � (60)
leadsusto � ³/ + � ³� � � �}" 8 ( / ����³F� (61)� ³���� � + � ³��� & � �Ð" 8 ( / ��� ³ � (62)
Thefollowing equationsresultsby replacingthis in (55)� ³ � 00 + � � ³�� 00 & � � � � ò � �!(z´ � � � " � ³ 0 & � ò � " � � ³� �5�}" 8 ( / �?��³E��� &º´ � � " � ³0� ³ � 0���� 0 + � � ³�� 0����� 0 & � � � � ò � �!(z´ � � � " � ³���� 0 & � ò � " � � ³� &º�}" 8 ( / ��� ³ ��� &º´ � � " � ³���� 0andfor theinitial stepwe obtain
� � 0 + ´ � " �10 � % / � & � wj�� ò � � (V´ � �� � " � / � % / � (63)
&á ò � " � � / � � � �5�}" 8 ( / � �6 ��� & ´ � �� " � 00� ����� 0 + ´ � " �10 � % 0 � & � wj�ºw> ò � � (z´ � �� � " � / � % 0 � (64)
&á ò � " � � / � � � � &Y�}" 8 ( 0 � 76 ��� & ´ � �� " � 0����� 0
5 FLUID-STRUCTUREINTERACTION 17
5 Fluid-Structur e Interaction
Thefluid-structureinteractionis studiedin thissection.A simpleradialsymmetric1Dmodel(with aonedimensionalwall) is used.For any detailssee[1], chapter4. It isn’tpart of this work to develop the model. Briefly, for the fluid part we usethe Stokesequationsandfor thevesselthewaveequation.
5.1 The fluid
Like mentionedabove, theStokesequationsareusedin a moving domain(themodelwill besimplifiedafterwards).Theinitial domain ø*/ Û � � is supposedto be @ -F� g C 3@ -���ù / C . Let be
ù �F@ -���ú C 3 @ -�� g C ��� thedisplacementfunctionof thevessel.
O
y
ûýü� = Íû � þ < 6ûýü��³
ûýüÿ
x
vessel
���������� � ��� ���
��������� � �������
fluid
��������� � ������
������� �x
Figure1: Thephysicalproblem
The physicalproblemfor the fluid are the following Stokes equations. We usea Matlab code, which can only treat the casesof Dirichlet (homogeneousor non-homogeneous)or homogeneousNeumanboundaryconditionsfor ¥� . We put the fol-lowing boundaryconditions.
� + - Ø µ û ü � = ÍH + - Ø µ û ü � = Í� + � "��Ö"�� � J�� ��� �z� wj� � !#" �%$ �ú � Ø µ û ü��³H + - Ø µ û ü��³� ¥�� ¥µ �'&Ñ" ¥µ + - Ø µ û � þ < 6 (65)
Sotheproblembecomesto find ¥�s+ � � � H � and& that� ¥�� � �)( ¯d¥� &+*,& + - � µ ø 6 (66)W�� H � ¥� � + - � µ ø 6¥� � % � � ��� / � + ¥�E/ � % � � � � µ ø*/& � % � � ��� / � + & / � % � � � � µ ø*/� + - Ø µ û ü � = Í
5 FLUID-STRUCTUREINTERACTION 18
H + - Ø µ û ü � = Í� + àl"���"-� � J�� �.� ��� wj����!/" �0$ �ú � Ø µ û ü��³H + - Ø µ û ü��³� ¥�� ¥µ �1&Ñ" ¥µ + - Ø µ û � þ < 6¥� + ��-F� � ù� � � Ø µ û üÿWe would like to treatthis problemwithout moving the domain. To this aim, we fixthedomainandweusea transpirationmethodto approximatethevelocityat theupperboundary. Causedby this reason,the domain ø 6 hasto be reducedon a fix domainø ÌBÍ f . Let be ø Ì.Í f +�@ -�� g C 3 @ -��.ù / C and
ù}���� % � +32 �?�� % � &.4 . 2_�F@ - J g C 3 @ - J ú C ���will bethedisplacementof thevesselfrom thefixeddomain.
5768:9-;
57<=�> ?:@�A
5 <BDCE@
(L,�GF
)
O
HJIEKML5 <NPO
(0,��F
)
(L,0)
y
xx
Q � � �����
Figure2: Thesimplifiedmodel
Thesolutionsareonly calculatedon thereduceddomain.This leadsusto thesimpli-fiedproblem� ¥�� � �)( ¯d¥� &R*,& + - � µ øZÌ.Í f (67)W�� H � ¥� � + - � µ ø ÌBÍ f¥� � % � � ��� / � + ¥�E/ � % � � � � µ ø ÌBÍ f
& � % � � ��� / � + & / � % � � � � µ ø ÌBÍ f� + - Ø µ û � = ÍH + - Ø µ û � = Í� + � "���"-� � J � ��� ��� wj����!/" �0$ �ú � Ø µ û ��³H + - Ø µ û ��³� ¥�� ¥µ + - Ø µ û þ < 6¥� � % � � + 4 ����� + ��-�� � ÿ � % ������� Ø µ û ÿ y ÌBÍ f
5 FLUID-STRUCTUREINTERACTION 19
Notethatwe assumethat 2 is smallandasconsequencethe%
componentof ¥� on theboundary
û üÿ y Ì.Í f is supposedto bezero. Now � ÿ hasstill to beestimated,supposingthat we know
®2 . This is consideredto be a problemof the fluid-structureinteractionandis treatedin thesectioninteraction.
For the numericalcomputationof the fluid part, the Matlab codeMLife is used.Thiscodeis developedat thePolitecnicodi Milano, namelyfrom Prof. F. Saleriof theMOX.
5.2 The vessel
For thesimulationof thevessel,thewave equationwith homogeneousboundarycon-ditionsis used.Theequationis thefollowing one� � 2� � � �! #" � � 2�E% � & 8 " 2Ñ+ Q 6 (68)
whereQ 6 + Q � % ����� + ìTS = y Ì �VU y 6XWYDZ\[ u U dependsof
%and
�.
Determinationof theparameters:
+ ]\^_ ÿ � /8 + `_ ÿ � wj��a � ��ù �/
(69)
where
_ ÿ : vesseldensity� / : thicknessof thevessel] ^ : tangentialcomponentof thelongitudinalstress`: Youngmodulusa : Poissoncoefficient
For thenumericalcomputationof thesolutionof this equation,theNewmarkmethodis used.Theadvantageis thatwe canobtainalso
®2 . This will beusedin thefirst orderapproximationof � ÿ (seethesectioninteraction).
5 FLUID-STRUCTUREINTERACTION 20
5.3 Interaction
Rememberthatwenote ¥�,+ � � � H � . First,wewould liketo estimatethevelocityontheupperboundaryof thefluid domain,H � % ��ù / ����� , noted � ÿ � % ����� . We supposeto know®2 at eachstepof time
� ³. Theinterfaceconditionis thefollowing
H � % �.ù / & 2 � % ������ + � 2� � � % ����� + � ù� � � % ����� (70)� � % �.ù / & 2 � % ������ + -Then,thefirst orderTaylorapproximationin thepoint
� % ��ù / � in the � directionis used
H � % ��ù / & 2 � % ������� +qH � % �.ù / ����� & � H� � � % �.ù / ����� " 2 � % ����� &º¸ � 2 � % ����� � � (71)
Note that � ÿ � % ����� +ñH � % ��ù / ����� and as consequence,two approximationsare pre-sented- 6 u orderapproximation:
� ÿ � % ��� ³ � 0 � + � 2� � � % ��� ³ � 0 � (72)w�b 6 orderapproximation:
� ÿ � % ��� ³ � 0 � + � 2� � � % ��� ³ � 0 � � � H� � � % ��ù / ��� ³ � 0 � " 2 � % ��� ³ � 0 � (73)
5.4 The algorithm
Themainproblemof thefluid-structureinteractionis thatwe have two differentphys-ical laws (onefor thefluid partandonefor thestructurepart),which arecoupled.Forboth problemswe have a numericalmethodto do the calculuswith given initial andboundaryconditions.Thisalgorithmis a simplerversionfo thisonedescribedin [2].
The algorithm is presentedas v 6 stepsprogressingin time. In the stepµ M� w � JVJzJ � v 6 &ew � we are at the time
� ³and we would like to calculatethe solution
at time� ³ � 0 . Eachtime step,we have a sub-iterationindexedby k. At every stepk
(at time� ³
) the algorithmis separatedin two periods. In the first period,the Stokesproblemis solved in onestepof time
� ³to� ³ � 0 . Theobtainedresultin theprevious
time stepis usedas initial condition for the Stokesproblem(not as initial conditionfor the whole problem),concretely ¥� ³ y c ²ed�² and &
³ y c ²edG² . The boundaryconditionsinû ü � = Í , û ü��³ andû � þ < 6 areindependentof thevessel,soit canbeeasycalculated.Thelast
boundarycondition,this onû ÿ y ÌBÍ f is calculatedby transpirationstartingfrom 2
³ � 0 y cand
®2 ³ � 0 y c with result��-�� � ³ � 0 y cÿ �
. The solutionof the Stokesproblemis ¥� ³ � 0 y c � 0and&
³ � 0 y c � 0 . In thesecondperiod,using&³ � 0 y c � 0 , thestress
Qis calculatedat time� ³ � 0 (notethat
Qis alsoneededin time
� ³, but this is alreadycalculatedin the pre-
vioustime step).Thenthevesselproblemis solvedwith initial conditions2³ y c ²edG² and®2 ³ y c ²ed�² . Thisgivesus 2
³ y c � 0 and®2 ³ y c � 0 . Thenwerelaxthissolutionwith thesolutions
obtainedin f -stepbefore.Thesub-iterationis calculatedtill aconvergencetoleranceissatisfiedfor 2 or wehavemorethan v © % stepsin k. If thisconditionsaren’t satisfied,weput fÑ+gf &Ow andstartatthebegin of thesub-iteration.If not,wesavethesolutions,
5 FLUID-STRUCTUREINTERACTION 21
¥� ³ � 0 y c ²�dG² + ¥� ³ � 0 y c � 0&³ � 0 y c ²edG² + & ³ � 0 y c � 02³ � 0 y c ²�dG² +32 ³ � 0 y c � 0®2 ³ � 0 y c ²�dG² + ®2 ³ � 0 y c � 0
and we putµ + µ &¡w , f + w . Then the next time step is computedand new
sub-iterationsstartedand so on. This is donetill we haveµ + v 6 . Note that at
eachsub-stepf , we approximate��-F� � ³ � 0ÿ �
by��-F� � ³ � 0 y cÿ �
, becauseat step f¬+ w ,��-F� � ³ � 0ÿ �is not given. This is the reasonwhy we have to do this sub-iteration.At
step fx+ w , ��-�� � ³ � 0ÿ �is approximatedby
��-F� � ³ y c ²�dG²ÿ �and the solution of the ves-
sel problemgivesus a solution ¤2 ³ � 0 y � . We do a h -relaxationwith 2³ � 0 y 0 , concrete
2³ � 0 y � +gh " ¤2 ³ � 0 y � & � w4� h � " 2 ³ � 0 y 0 . This givesusanapproximationof
��-F� � ³ � 0ÿ �usingtranspiration,noted
��-�� � ³ � 0 y �ÿ �. ThensolvingtheStokesandthevesselproblem
startingfrom��-�� � ³ � 0 y �ÿ �
asboundaryconditiongivesusa betterapproximation(afterrelaxation)of
��-�� � ³ � 0ÿ �, notedas
��-�� � ³ � 0 y ¹ÿ �andso on, till we have convergencein
2 . At the endof this k-iterations��-�� � ³ � 0 y c ²edG²ÿ �
shouldbe a good approximationof��-F� � ³ � 0ÿ �.
For thegraphicalrepresentationof thealgorithm,seefig 3, we usethefollowing nota-tion: ��� µ & � � 0 � JVJzJ ��� µ & � � Ì � è � Ø � � & � � 0 � JzJVJ � Ø � � & � �i�� (74)
whereè
canbeú
for Transpiration,j for Stokes,Q
for thecalculationof thestressQ
or N for vessel.It meansthatwesolvetheproblemè
with theinputs� µ & � � 0 � JVJzJ ���Gµ & � � Ì
andasresultwehave Ø � � & � � 0 � JzJVJ � Ø � � & � � i . In fig 3,Ù 4T4TØT4 U is definedasfollowsÙ 4T4TØT4-U +lk m%n �.��] ¤2 �?��� ³ � 0 y c � 0 � 2 �?��� ³ � 0 y c ] �] ¤2 ���½� ³ � 0 y c � 0 ] (75)
Note that in theprogramme,2 is a vector. Every elementcorrespondto to a point ontheupperboundary(seeResults).
Figure3: Thealgorithm
5.5 Results
In this sectionsomeresultsof two differentversionsof this algorithmaregiven. Forbothversionstheparametersarethefollowings
5 FLUID-STRUCTUREINTERACTION 22
parameter valueg6cmv = 48
( 0.035� / 0.1_ ÿ 1.1] ^ 25000a 0.5ù / 0.5cm` - J�o�� ` "Kw - ð� 100» 0.5· 0.25v = &Ãw is numberof verticeson theboundary
ûIüÿ. This meansfirstly that the upper
boundaryis dividedin v = intervalsfor thesimulationof thevesselwith theNewmarkmethod.This define v = &�w pointson
ûýüÿ. Secondlyfor thesimulationof thefluid, a
triangulationis used,wherethis v = &5w pointsonû üÿ
correspondto theverticesonû üÿ
of thetriangulation.In bothcases�
is equalto- J w milli-seconds.vqp � = is chosenas
150andwe usethezeroordertranspirationfor � ÿ .
5.5.1 First version
In this version,thevesselequationis solvedwith Neumanboundaryconditions.
0 1 2 3 4 5 60.498
0.5
0.502
0.504
0.506
0.508
0.51
0.512
0.514
0.516
cm
cm
Figure4: Thevesselat time 0.002seconds
Figures4-7show thatthisversionis notagoodone.Notethedifferentscalesonthe� -axis.Following thewave front, you will noticethatthevesselbegin to swingbeforethewave front evenarrivesin this points. This is a fact thatcouldnot beobservedin
5 FLUID-STRUCTUREINTERACTION 23
0 1 2 3 4 5 60.48
0.49
0.5
0.51
0.52
0.53
0.54
0.55
0.56
cm
cm
Figure5: Thevesselat time 0.004seconds
0 1 2 3 4 5 60.42
0.44
0.46
0.48
0.5
0.52
0.54
0.56
0.58
0.6
0.62
wave front
Figure6: Thevesselat time 0.006seconds
5 FLUID-STRUCTUREINTERACTION 24
0 1 2 3 4 5 60.35
0.4
0.45
0.5
0.55
0.6
0.65
0.7
cm
cm
wave front
Figure7: Thevesselat time0.01seconds
−1 0 1 2 3 4 5 6 7−0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
cm
cm
Figure8: Thevelocityfield at time0.003seconds
5 FLUID-STRUCTUREINTERACTION 25
01
23
45
6
00.1
0.20.3
0.40.5
−1.5
−1
−0.5
0
0.5
1
1.5
2
x 104
xy
pres
sure
Figure9: Thepressureat time0.002seconds
reality. Why thepressuredecreasesthatmuchin thepoint��-F��-��
in fig.(9)? Why thismodeldoesnot work? Herearesomepossibleexplanationsandweakpointsof thismodel
- UsingNeumanboundaryconditionsfor thevessel,we havea partof thebound-ary ø 6 , the segmentbetweenthe points
��-��.ù / � and��-��.ùÐ�������
, wherewe havenot absolutlyan inflow. Maybeyou have theresomeeffects,which disturbthewholesimulation,like for examplethat thefluid pourout of thedomainin thissegment,andthis let decreasethepressurein this region.
- Sincethe vesselswingsthat much, it is possiblethat the parameter_ ÿ is toosmall. _ ÿ is the densityof the vesseland influencealso the stiffnessof thevessel.
- Do wehavereally ateachµ
-iterationconvergenceafterthe vqp � = steps.
- Thezeroordertranspirationcouldbebad. Maybethereis aneffect that, if 2 isalreadylarge,thenthebadapproximationsupport2 increasing,this meansthatthewave-amplitudeincreasesandthepressurewouldalsobehigh in this region
- It’smaybebecausewedon’t describetheincomingwaveasapressurewave,butasa Dirichlet boundaryconditionon thevelocityfield.
5.5.2 Secondversion
Sincethefirst versiondoesnotwork, anotherversionis tried. To bettercontrolthefluxon theinflow,
ûýü��³, we try themodelwith Dirichlet boundaryconditionsfor thevessel.
Becauseof lackof time,only theresultsof step1 to 40couldbecalculated.Thismeans
5 FLUID-STRUCTUREINTERACTION 26
afinal timeat thestep40of 0.004seconds,whichcorrespondsto 4 milli-seconds.Youcanseethat at time 0.004,fig.(11), the two solutionsaresimilar andthat alsoin thesecondversion,thevesselincreasesin thedomainbetween
% + w and% + w � � like in
thefirst version.It canbesuspectedthatalsoin this model,thevesselbegin to swing.Unfortunately, wehadno time to verify it. Thecomputationhadno time to finish,yet.
0 1 2 3 4 5 60.495
0.5
0.505
0.51
0.515
0.52
x
y
dashed line: Neuman boundary conditionssolid line: Dirichlet boundary conditions
Figure10: Thetwo vesselsat time 0.002seconds
0 1 2 3 4 5 60.48
0.49
0.5
0.51
0.52
0.53
0.54
0.55
0.56
0.57
x
y
dashed line: Neuman boundary conditionssolid line: Dirichlet boundary conditions
Figure11: Thetwo vesselsat time 0.004seconds
6 CONCLUSIONS 27
6 Conclusions
In this project,we analyzedtwo differentmethodsto approximatethesolutionof thewave equation,thenwe developeda simplemodelof the blood flow in arteries.Un-fortunately, the resultswerenot thatgood. Fromthis point of view, I cannot supplymeaningfulresults,but just the modellingof a physicalproblemandalsobeingcon-frontedwith a lot of questionsin programming,wasa very goodexperience.Fromthis point of view, I learntsomebasicsof hyperbolicpartialdifferentialequationsandsolutionmethodsaswell asanintroductionto fluid-structureinteraction,includingthedifficulties behindthat. It wasan interestingwork, which wasa mix betweentheo-retical study of somemethodsandprogrammingin Matlab. Thanksto this work, Ilearnthow to argueandsolve problemsin numericalanalysisaswell asprogrammingin Matlab andwrite articleswith LATEX. I evencouldvisit Milano.
7 MATLAB CODES 28
7 Matlab Codes
7.1 The Newmark Code
function res=newmarkbybeni(x0,x1,Nx,t0,t1,Nt,a ,c,th eta,ze ta,.. .ic1,ic2,force,bccode,bcv1,bcv2)
% u_tt - a*u_xx + c*u =f% approximation P1 of the wave equation with the Newmark method% Q = (t0,t1)x(x0,x1)% Nt: number of steps in time% Nx: number of steps in 1 dimensional space% theta, zeta: parameters of the Newmark method% force is a string depending of x and t% icond1 and icond2 are strings depending of x% bccode: vector of two elements(for each boundary point):% 0: Dirichlet boundary conditions% 1: Neuman boundary conditions% bcv1 and bcv2 are strings depending of t% this program needs the other programs: int_f.m, dcentred.m% examples:% newmarkbybeni(0,1,40,0,2,40,1,.5, .5,.25 ,’x.ˆ 2’,’1 +0*x’, ...% ’-x.*(1-x)’,[0 0],’sin(2*pi*t)’,’cos(2*pi*t)’)% newmarkbybeni(0,1,40,0,2,40,1,.5, .5,.25 ,’5*x .*(x- 1)’,.. .% ’1+0*x’,’-x.*(1-x)’,[0 0],’sin(2*pi*t)’,’0*t’)
% --- test for boundary and intials conditions ---t=t0;bc1=eval(bcv1);bc2=eval(bcv2);x=x0;ic1x0=eval(ic1);x=x1;ic1x1=eval(ic1);x=x0;
if (bccode(1)==0 & bccode(2)==0) % if Dirichlet B.C.if (bc1˜=ic1x0 | bc2˜=ic1x1)
disp(’bounary conditions don"t accord to initials conditions’);return;
endend
if (Nx<=2)disp(’Nx must be bigger than 2’); return;
end
% --- initialisation of global constants ---h=(x1-x0)/Nx;
7 MATLAB CODES 29
deltat=(t1-t0)/Nt;x=[x0:h:x1];time=[t0:deltat:t1];
e=ones(Nx+1,1);em(2:Nx,1)=ones(Nx-1,1);em(1,1)=1/2; em(Nx+1,1)=1/2;
M=h*spdiags([1/6*e 2/3*em 1/6*e],-1:1,Nx+1,Nx+1);A=a*1/h*spdiags([-e 2*em -e],[-1:1],Nx+1,Nx+1);C=c*M;
Mred=M(2:Nx,2:Nx);Mrel=M(2:Nx,:);
AC=A+C;ACrel=AC(2:Nx,:);A_u=M+zeta*deltatˆ2*AC;
U=zeros(Nx+1,Nt+1);V=zeros(Nx+1,Nt+1);U(:,1)=eval(ic1)’;u=U(:,1);V(:,1)=eval(ic2)’;v=V(:,1);
% +++++++++++++++++++++++++++++++++ +++% --- dirichlet boudary conditions ---% +++++++++++++++++++++++++++++++++ +++
if (bccode(1)==0 & bccode(2)==0)
% --- initialisation of U ---t=time;U(1,:)=eval(bcv1);U(Nx+1,:)=eval(bcv2);
% --- approximation of v on the bound ---t=[time t1+deltat];b1=eval(bcv1);b2=eval(bcv2);t=t0;V(1,2:Nt+1)=dcentred(b1,deltat,Nt);V(Nx+1,2:Nt+1)=dcentred(b2,deltat,Nt) ;
A_ured=A_u(2:Nx,2:Nx);A_urel=A_u(2:Nx,:);A1=A_u(2:Nx,1);A2=A_u(2:Nx,Nx+1);
7 MATLAB CODES 30
% --- step 0 ---b_u=A_urel*u;b_v=Mrel*v;AC_u=ACrel*u;v=v(2:Nx,1);
% --- steps 1 to Nt ---for n=1:Nt
t=t0+n*deltat; % t_(n+1)F11=int_f(force,Nx,h,x0,t0+(n-1)* delta t);F22=int_f(force,Nx,h,x0,t0+n*delt at);F1=F11(2:Nx)’;F2=F22(2:Nx)’;
b_u=b_u-deltatˆ2/2*AC_u+deltat*b_ v+del tatˆ2 *(zeta *F2+( .5-zet a)*F1 );b_uu=b_u-U(1,n+1)*A1-U(Nx+1,n+1)* A2;
u(2:Nx)=A_ured\b_uu; % solve A_u*u=b_uu(1)=U(1,n+1);u(Nx+1)=U(Nx+1,n+1);
b_v=b_v+deltat*(theta*F2+(1-theta )*F1- (1-th eta)*A C_u);AC_u=ACrel*u;b_v=b_v-deltat*theta*AC_u;
b_vh=b_v-V(1,n+1)*Mrel(:,1)-V(Nx+ 1,n+1 )*Mre l(:,Nx +1);v=Mred\b_vh;
U(2:Nx,n+1)=u(2:Nx);V(2:Nx,n+1)=v;
end
% +++++++++++++++++++++++++++++++++ ++% --- neumann boundary conditions ---% +++++++++++++++++++++++++++++++++ ++
elseif(bccode(1)==1 & bccode(2)==1)
L1(1:Nx+1,1)=zeros(Nx+1,1);L2(1:Nx+1,1)=zeros(Nx+1,1);
% --- step 0 ---b_u=A_u*u;b_v=M*v;AC_u=AC*u;L1(1,1)=-a*eval(bcv1);L1(Nx+1,1)=a*eval(bcv2);
7 MATLAB CODES 31
% --- steps 1 to Nt ---for n=1:Nt
t=t0+n*deltat; % t_(n+1)F1=int_f(force,Nx,h,x0,t0+(n-1)*de ltat) ’;F2=int_f(force,Nx,h,x0,t0+n*deltat )’;L2(1,1)=-a*eval(bcv1);L2(Nx+1,1)=a*eval(bcv2);
b_u=b_u-deltatˆ2/2*AC_u+deltat*b_v +...deltatˆ2*(zeta*(F2+L2)+(.5-zeta)*(F 1+L1) );
u=A_u\b_u; % solve A_u*u=b_u
b_v=b_v+deltat*(theta*(F2+L2)+(1-t heta) *(F1+ L1)-(1 -thet a)*AC_ u);AC_u=AC*u;b_v=b_v-deltat*theta*AC_u;
v=M\b_v;
U(:,n+1)=u;V(:,n+1)=v;
L1=L2;
endelse
disp(’Other boundary conditions not yet implemented’);return;
end
% --- visualization of the results ---figure(1);surf(U);title(’aprroximation of u’);xlabel(’time’);ylabel(’[x0,x1]’);figure(2);surf(V);title(’approximation of u_t’);xlabel(’time’);ylabel(’[x0,x1]’);
figure(3);
for i=1:Nt+1ymin(i)=min(U(:,i));ymax(i)=max(U(:,i));
end;
7 MATLAB CODES 32
ym=min(ymin);yM=max(ymax);
for i=1:Nt+1plot(x,U(:,i));grid;axis([x0 x1 ym yM]);tit=[’Time: ’, num2str(time(i))];title(tit);pause(.4);
end;
res=[U V];return;
7.1.1 int f.m
function res=int_f(f,Nx,h,x0,T)% approximation of (f(t),phi)_Lˆ2 with the simpson formula% h=(x1-x0)/Nx% t=T
t=T;for i=2:Nx
x=x0+h*[i-2 i-1.5 i-1 i-.5 i];F=eval(f);res(i)=h/3*(F(2)+F(3)+F(4));
end
% i==1x=x0+h*[0 .5 1];F=eval(f);res(1)=h/3*(F(1)/2+F(2));
% i==Nx+1x=x0+h*[Nx-1 Nx-.5 Nx];F=eval(f);res(Nx+1)=h/3*(F(2)+F(3)/2);return;
7.1.2 dcentred.m
function y=dcentred(f,deltat,Nt)% approximation by centred difference% f:1...Nt+2 !!!! => t1+deltat% y(0) given by initial conditiony=zeros(1,Nt);for i=2:Nt+1
y(1,i-1)=(f(i+1)-f(i-1))/(2*deltat);end;
7 MATLAB CODES 33
7.2 The Leap-Frog Code
function res=leap_frog(x0,x1,Nx,t0,t1,Nt,a,c,i c1,ic 2,forc e,bcc ode,.. .bc0,bc1)
% u_tt - a*u_xx + c*u =f% Q = (t0,t1)x(x0,x1)% Nt: number of steps in time% Nx: number of steps in 1 dimensional space% force is a string depending of x and t% icond1 and icond2 are strings depending of x% bccode: vector of two elements(for each boundary point),% 0: Dirichlet boundary conditions% 1: Neuman boundary conditions% bcv1 and bcv2 are strings depending of t% example:% leap_frog(0,1,20,0,2,80,.8,1,’x-1 ’,’1+0 *x’,’ 0*x’, [0 0],...% ’-cos(2*pi*t)’,’2*t’)
% --- test for boundary and intials conditions ---t=t0;bc0_t0=eval(bc0);bc1_t0=eval(bc1);x=x0;ic1x0=eval(ic1);x=x1;ic1x1=eval(ic1);x=x0;
if (bccode(1)==0 & bccode(2)==0) % dirichletif (bc0_t0˜=ic1x0 | bc1_t0˜=ic1x1)
disp(’bounary conditions don"t accord to initials conditions’);bc0_t0bc1_t0ic1x0ic1x1return;
endend
if (Nx<=2)disp(’Nx must be bigger than 1’); return;
end
% --- initialisation of global constants --- %
h=(x1-x0)/Nx;deltat=(t1-t0)/Nt;
7 MATLAB CODES 34
x=[x0:h:x1];time=[t0:deltat:t1];landa=deltat/h;
if(abs(a)>1/landa)disp(’CFL not respected!!! The leap-frog method will be unstable’);
end
u=zeros(Nx+1,1);U=zeros(Nx+1,Nt+1);U(:,1)=eval(ic1)’;u=U(:,1);v=eval(ic2)’;
f=zeros(Nx+1,1);d=zeros(Nx+1,1);e=zeros(Nx+1,1);
% --------------------------------- ---- %% --- Dirichlet boundary conditions --- %% --------------------------------- ---- %
if (bccode(1)==0 & bccode(2)==0)
% --- step 1 --- %
t=t0;f=eval(force)’;d=u;d_pos(1:Nx-1,1)=d(3:Nx+1);d_neg(1:Nx-1,1)=d(1:Nx-1);u(2:Nx)=deltat*v(2:Nx)+(1-a*landaˆ2-c *delt atˆ2/ 2)*d(2 :Nx)+ ...
a*landaˆ2/2*(d_pos(1:Nx-1)+d_neg( 1:Nx- 1))+d eltatˆ 2/2*f (2:Nx) ;t=t0+deltat;u(1)=eval(bc0);u(Nx+1)=eval(bc1);U(:,2)=u;
% --- step n --- %
for n=2:Ntt=n*deltat;
f=eval(force)’;e=d;d=u;d_pos(1:Nx-1)=d(3:Nx+1)’;d_neg(1:Nx-1)=d(1:Nx-1)’;
u(2:Nx)=-e(2:Nx)+(2-2*a*landaˆ2-c *delt atˆ2) *d(2:N x)+.. .
7 MATLAB CODES 35
a*landaˆ2*(d_neg+d_pos)+deltatˆ2*f (2:Nx );
t=(n+1)*deltat;u(1)=eval(bc0);u(Nx+1)=eval(bc1);
U(:,n+1)=u;end
% --------------------------------- - %% --- Neuman boundary conditions --- %% --------------------------------- - %
elseif (bccode(1)==1 & bccode(2)==1)
% --- step 1 --- %t=t0;f=eval(force)’;d=u;d_pos(1:Nx-1,1)=d(3:Nx+1);d_neg(1:Nx-1,1)=d(1:Nx-1);u(1)=deltat*v(1)+(1-a*landaˆ2-c*delta tˆ2/2 )*d(1 )+...
a*landaˆ2*(d(2)-h*bc0_t0)+deltatˆ 2/2*f (1);u(Nx+1)=deltat*v(Nx+1)+(1-a*landaˆ2-c *delt atˆ2/ 2)*d(N x+1)+ ...
a*landaˆ2*(d(Nx)+h*bc1_t0)+deltat ˆ2/2* f(Nx+ 1);u(2:Nx)=deltat*v(2:Nx)+(1-a*landaˆ2-c *delt atˆ2/ 2)*d(2 :Nx)+ ...
a*landaˆ2/2*(d_neg+d_pos)+deltatˆ 2/2*f (2:Nx );U(:,2)=u;
% --- step n --- %
for n=2:Ntt=n*deltat;
f=eval(force)’;e=d;d=u;d_pos(1:Nx-1)=d(3:Nx+1)’;d_neg(1:Nx-1)=d(1:Nx-1)’;bc0_tn=eval(bc0);bc1_tn=eval(bc1);u(1)=-e(1)+2*(1-a*landaˆ2-c*delta tˆ2)* d(1)+ ...
2*a*landaˆ2*(d(2)-h*bc0_tn)+deltat ˆ2*f( 1);u(Nx+1)=-e(Nx+1)+2*(1-a*landaˆ2-c *delt atˆ2) *d(Nx+ 1)+.. .
2*a*landaˆ2*(d(Nx)+h*bc1_tn)+delta tˆ2*f (Nx+1) ;u(2:Nx)=-e(2:Nx)+2*(1-a*landaˆ2-c *delt atˆ2) *d(2:N x)+.. .
a*landaˆ2*(d_neg+d_pos)+deltatˆ2*f (2:Nx );
U(:,n+1)=u;end
REFERENCES 36
end
figure(1);
for i=1:Nt+1 %length(time)ymin(i)=min(U(:,i));ymax(i)=max(U(:,i));
end;
ym=min(ymin);yM=max(ymax);
for i=1:Nt+1 %length(time)plot(x,U(:,i));grid;axis([x0 x1 ym yM]);tit=[’Time: ’, num2str(time(i))];title(tit);pause(.4);
end;
figure(2)surf(U);title(’approximation of u’);xlabel(’time’);ylabel(’[x0,x1]’);res=U;
7.3 The Fluid-Structur e Interaction Code
All the codeswhich are usedfor running the codeof the fluid-structureinteractionproblemis to largeto put in this report.
Aknowledgements
A big THANKS to SimoneDeparis,who was always available for questionsandshowed me a lot of useful things. I would also thankProf. F. Saleri,who spenthistime to receive me in Milano andintroduceme into MLife andProf. A. Quarteroni,who madeit possibleto have theopportunityto do thisproject.
References
[1] Alfio Quarteroni,LucaFormaggia,MathematicalModellingandNumericalSim-ulationof theCardiovascularSystem, 2002
[2] SimoneDeparis,Miguel Angel Fernandez,Luca FormaggiaandFabio Nobile,Acceleration of a fixedpoint algorithmfor fluid-structure interactionusingtran-spirationconditions, submittedto CRAS,2002
REFERENCES 37
[3] Alfio Quarteroni,Alberto Valli, NumericalApproximationof Partial DifferentialEquations, Springer, 1997