-
Notifications
You must be signed in to change notification settings - Fork 0
/
diff.tex
918 lines (752 loc) · 74.8 KB
/
diff.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
\documentclass[VANCOUVER,STIX1COL]{WileyNJD-v2}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL /dir/cag-template_old.tex Sat Dec 10 20:01:41 2022
%DIF ADD /dir/cag-template.tex Sat Dec 10 20:01:41 2022
\usepackage{subfigure}
\usepackage{overpic}
\usepackage{makecell}
\usepackage{color}
\articletype{Article Type}%
\received{26 April 2016}
\revised{6 June 2016}
\accepted{6 June 2016}
\raggedbottom
%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}} %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
\providecommand{\DIFmodbegin}{} %DIF PREAMBLE
\providecommand{\DIFmodend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
\providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE
%DIF LISTINGS PREAMBLE %DIF PREAMBLE
\RequirePackage{listings} %DIF PREAMBLE
\RequirePackage{color} %DIF PREAMBLE
\lstdefinelanguage{DIFcode}{ %DIF PREAMBLE
%DIF DIFCODE_UNDERLINE %DIF PREAMBLE
moredelim=[il][\color{red}\sout]{\%DIF\ <\ }, %DIF PREAMBLE
moredelim=[il][\color{blue}\uwave]{\%DIF\ >\ } %DIF PREAMBLE
} %DIF PREAMBLE
\lstdefinestyle{DIFverbatimstyle}{ %DIF PREAMBLE
language=DIFcode, %DIF PREAMBLE
basicstyle=\ttfamily, %DIF PREAMBLE
columns=fullflexible, %DIF PREAMBLE
keepspaces=true %DIF PREAMBLE
} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim}{\lstset{style=DIFverbatimstyle}}{} %DIF PREAMBLE
\lstnewenvironment{DIFverbatim*}{\lstset{style=DIFverbatimstyle,showspaces=true}}{} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF
\begin{document}
% \title{This is the sample article title\protect\thanks{This is an example for title footnote.}}
\title{Spatial \DIFdelbegin \DIFdel{Adaptivity }\DIFdelend \DIFaddbegin \DIFadd{adaptivity }\DIFaddend with \DIFdelbegin \DIFdel{Boundary Refinement }\DIFdelend \DIFaddbegin \DIFadd{boundary refinement }\DIFaddend for SPH \DIFdelbegin \DIFdel{Fluid Simulation}\DIFdelend \DIFaddbegin \DIFadd{fluid simulation}\DIFaddend }
\DIFdelbegin %DIFDELCMD < \author[1]{%%%
\DIFdelend \DIFaddbegin \author[2]{\DIFaddend Yanrui Xu}
\DIFdelbegin %DIFDELCMD < \author[1]{%%%
\DIFdelend \DIFaddbegin \author[2]{\DIFaddend Chongming Song}
\DIFdelbegin %DIFDELCMD < \author[1]{%%%
\DIFdelend \DIFaddbegin \author[2,3]{\DIFaddend Xiaokun Wang*}
\DIFdelbegin %DIFDELCMD < \author[2,3]{%%%
\DIFdelend \DIFaddbegin \author[1,2,4]{\DIFaddend Xiaojuan Ban*}
\DIFdelbegin %DIFDELCMD < \author[1]{%%%
\DIFdelend \DIFaddbegin \author[2]{\DIFaddend Jiamin Wang}
\DIFdelbegin %DIFDELCMD < \author[1]{%%%
\DIFdelend \DIFaddbegin \author[2]{\DIFaddend Yalan Zhang}
\DIFdelbegin %DIFDELCMD < \author[4]{%%%
\DIFdelend \DIFaddbegin \author[5]{\DIFaddend Jian Chang}
\authormark{Yanrui Xu \textsc{et al}}
\DIFdelbegin %DIFDELCMD < \address[1]{\orgdiv{School of Computer and Communication Engineering}, \orgname{University of Science and Technology Beijing}, \orgaddress{\state{Beijing}, \country{China}}}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \address[1]{\orgdiv{Beijing Advanced Innovation Center for Materials Genome Engineering}, \orgname{University of Science and Technology Beijing}, \orgaddress{\state{Beijing}, \country{China}}}
\DIFaddend
\DIFdelbegin %DIFDELCMD < \address[2]{\orgdiv{Institute of Artificial Intelligence}, \orgname{University of Science and Technology Beijing}, \orgaddress{\state{Beijing}, \country{China}}}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \address[2]{\orgdiv{School of Intelligence Science and Technology}, \orgname{University of Science and Technology Beijing}, \orgaddress{\state{Beijing}, \country{China}}}
\DIFaddend
\address[3]{\orgdiv{Beijing Key Laboratory of Knowledge Engineering for Materials Science},
\orgname{University of Science and Technology Beijing}, \orgaddress{\state{Beijing}, \country{China}}}
\DIFdelbegin %DIFDELCMD < \address[4]{
%DIFDELCMD < \orgname{Bournemouth University}, \orgaddress{\state{Poole}, \country{United Kingdom}}}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \address[4]{\orgdiv{Key Laboratory of Perception and Control of Intelligent Bionic Unmanned Systems, Ministry of Education}, \orgname{University of Science and Technology Beijing}, \orgaddress{\state{Beijing}, \country{China}}}
\address[5]{
\orgname{Bournemouth University}, \orgaddress{\state{Poole}, \country{United Kingdom}}}
\DIFaddend
\corres{*Xiaokun Wang, *Xiaojuan Ban, University of Science and Technology Beijing. \email{[email protected], [email protected]}}
\DIFdelbegin %DIFDELCMD < \fundingInfo{Horizon 2020-Marie Skłodowska-Curie Action-Individual Fellowships (No.895941), National Key Research and Development Program of China (No.2020YFB0704501), National Natural Science Foundation of China (No.61873299), Key Research and Development Project of Hainan Province (No.ZDYF2020031)}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \fundingInfo{Horizon 2020-Marie Skłodowska-Curie Action-Individual Fellowships (No.895941), National Natural Science Foundation of China (No.61873299), Key Research and Development Project of Hainan Province (No.ZDYF2020031)}
\DIFaddend
% \presentaddress{This is sample for present address text this is sample for present address text}
%DIF < Fluid simulation is well-known for being visually stunning while computationally expensive. Spatial adaptivity can effectively ease the computational cost by discretizing the simulation space with varying resolutions. Adaptive methods nowadays mainly focus on refining the fluid surfaces to obtain more vivid splashes and wave effects. But such techniques hinder further performance gain under the condition where most of the vast fluid surface is tranquil. In this paper, we propose a novel boundary-distance based adaptive method for Smoothed Particle Hydrodynamics fluid simulation. The signed-distance field constructed with respect to the coupling boundary is introduced to determine particle resolution in different spatial positions. The resolution is maximal within a specific distance to the boundary, and decreases smoothly as the distance increases until a threshold is reached. The sizes of the particles are then adjusted towards the resolution via splitting and merging. Additionally, a wake flow preservation mechanism is introduced to keep the particle resolution at a high level for a period of time after a particle flows through the boundary object to prevent the loss of flow details. Experiments show that our method can more efficiently refine fluid-solid coupling details and effectively capture dynamic effects beneath the surface.
\DIFdelbegin %DIFDELCMD <
%DIFDELCMD < \abstract[Summary]{% Brief of adaptivity
%DIFDELCMD < Fluid simulation is well-known for being visually stunning while computationally expensive. Spatial adaptivity can effectively ease the computational cost by discretizing the simulation space with varying resolutions.
%DIFDELCMD < % Previous
%DIFDELCMD < % Defects
%DIFDELCMD < Adaptive methods nowadays mainly focus on the mechanism of refining the fluid surfaces to obtain more vivid splashes and wave effects. But such techniques hinder further performance gain under the condition where most of the vast fluid surface is tranquil. Moreover, energetic flow beneath the surface cannot be adequately captured with the interior of the fluid still being simulated under coarse discretization.
%DIFDELCMD < % Proposed method
%DIFDELCMD < In this paper, we propose a novel boundary-distance based adaptive method for Smoothed Particle Hydrodynamics (SPH) fluid simulation. The signed-distance field constructed with respect to the coupling boundary is introduced to determine particle resolution in different spatial positions. The resolution is maximal within a specific distance to the boundary, and decreases smoothly as the distance increases until a threshold is reached. The sizes of the particles are then adjusted towards the resolution via splitting and merging. Additionally, a wake flow preservation mechanism is introduced to keep the particle resolution at a high level for a period of time after a particle flows through the boundary object to prevent the loss of flow details.
%DIFDELCMD < % Experiments
%DIFDELCMD < Experiments show that our method can more efficiently refine fluid-solid coupling details and effectively capture dynamic effects beneath the surface.}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \abstract[Summary]{% Brief of adaptivity
Fluid simulation is well-known for being visually stunning while computationally expensive. Spatial adaptivity can effectively ease the computational cost by discretizing the simulation space with varying resolutions.
% Previous
% Defects
Adaptive methods nowadays mainly focus on the mechanism of refining the fluid surfaces to obtain more vivid splashes and wave effects. But such techniques hinder further performance gain under the condition where most of the vast fluid surface is tranquil. Moreover, energetic flow beneath the surface cannot be adequately captured with the interior of the fluid still being simulated under coarse discretization.
% Proposed method
This paper proposes a novel boundary-distance based adaptive method for Smoothed Particle Hydrodynamics (SPH) fluid simulation. The signed-distance field constructed with respect to the coupling boundary is introduced to determine particle resolution in different spatial positions. The resolution is maximal within a specific distance to the boundary and decreases smoothly as the distance increases until a threshold is reached. The sizes of the particles are then adjusted towards the resolution via splitting and merging. Additionally, a wake flow preservation mechanism is introduced to keep the particle resolution at a high level for a period of time after a particle flows through the boundary object to prevent the loss of flow details.
% Experiments
Experiments show that our method can refine fluid-solid coupling details more efficiently and effectively capture dynamic effects beneath the surface.}
\DIFaddend
\keywords{computer animation, fluid simulation, spatial adaptivity, boundary handling}
\jnlcitation{\cname{%
\author{Y.R. Xu},
\author{C.M. Song},
\author{X.K. Wang},
\author{X.J. Ban},
\author{J.M. Wang},
\author{Y.L. Zhang}, and
\author{J. Chang}} (\cyear{2022}),
\ctitle{Spatial Adaptivity with Boundary Refinement for SPH Fluid Simulation}, \cjournal{Computer Animation and Virtual Worlds}, \cvol{2022;00:1--12}.}
\maketitle
% \footnotetext{\textbf{Abbreviations:} ANA, anti-nuclear antibodies; APC, antigen-presenting cells; IRF, interferon regulatory factor}
\begin{figure*}[htbp]
\centering
\DIFdelbeginFL %DIFDELCMD < \subfigure[Surface-based refinement]{
%DIFDELCMD < \centering
%DIFDELCMD < \begin{overpic}[width=0.31\textwidth]{figure/refine_schem/surface.png}
%DIFDELCMD < \put (70,51) {refined}
%DIFDELCMD < \end{overpic}
%DIFDELCMD < \label{fig:refine_surface}}
%DIFDELCMD < \subfigure[Our boundary refinement.]{
%DIFDELCMD < \centering
%DIFDELCMD < \begin{overpic}[width=0.31\textwidth]{figure/refine_schem/bound.png}
%DIFDELCMD < \put (2,52) {refined}
%DIFDELCMD < \put (65,59) {not refined}
%DIFDELCMD < \end{overpic}
%DIFDELCMD < \label{fig:refine_bound}}
%DIFDELCMD < \subfigure[Ours + surface-based.]{
%DIFDELCMD < \centering
%DIFDELCMD < \begin{overpic}[width=0.31\textwidth]{figure/refine_schem/union.png}
%DIFDELCMD < \put (60,56) {refined}
%DIFDELCMD < \end{overpic}
%DIFDELCMD < \label{fig:refine_union}}
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \subfigure[Surface-based refinement]{
\centering
\begin{overpic}[width=0.31\textwidth]{figure/refine_schem/surface.jpg}
\put (70,51) {refined}
\end{overpic}
\label{fig:refine_surface}}
\subfigure[Our boundary refinement.]{
\centering
\begin{overpic}[width=0.31\textwidth]{figure/refine_schem/bound.jpg}
\put (2,52) {refined}
\put (65,59) {not refined}
\end{overpic}
\label{fig:refine_bound}}
\subfigure[Ours + surface-based.]{
\centering
\begin{overpic}[width=0.31\textwidth]{figure/refine_schem/union.jpg}
\put (60,56) {refined}
\end{overpic}
\label{fig:refine_union}}
\DIFaddendFL \vspace{-0.7\baselineskip}
\caption{Contrary to the previous surface-based refinement method (a), our method (b) refines fluid particles near boundary objects to allow \DIFdelbeginFL \DIFdelFL{for }\DIFdelendFL \DIFaddbeginFL \DIFaddFL{the }\DIFaddendFL fine-scale fluid-boundary coupling to enhance boundary coupling details. Our method can also be combined with the surface-based method to refine \DIFdelbeginFL \DIFdelFL{both }\DIFdelendFL near the boundary and the surface (c).}
\label{fig:refine}
\end{figure*}
\section{Introduction}
Fluid simulation plays an essential role in visual effects, for the physical-based result can produce magnificent eye-catching effects to maximize the sense of reality. Nevertheless, higher demand for simulation details usually means the rapid growth of computational cost due to the need for \DIFaddbegin \DIFadd{the }\DIFaddend finer discretization of multidimensional space and time. Though the choice of time step (\emph{temporal adaptivity}) can be readily adapted using Courant
-Friedrichs-Lewy (CFL) condition, the mechanism of \emph{spatial adaptivity} can still be further exploited considering variable conditions for better efficiency. The spatial adaptivity mechanism enables achieving exquisite fluid behaviours with more affordable expenses by optimizing the interval of sampling points to refine local areas with pertinence.
Nowadays, research on spatial adaptivity for Lagrangian fluid simulation mainly targets surface-based optimization, aiming at refining the surface details like splashes, waves and thin films to enrich the visual effects. Horvath and Solenthaler~\cite{Horvath13} use a higher resolution for particles within a certain distance to the free surface of the fluid; Winchenbach et al.~\cite{Winchenbach17} make the desired size of particles increase smoothly with the distance to the surface.
However, the surface-based strategy has the disadvantage of an inflexible intervention mechanism, which causes low computational efficiency and the failure to enhance specific dynamic areas. On the wide fluid surface, the area with the most high-frequency details is often the part where the fluid is coupled with other objects, such as a boat sailing across the water surface, arousing the waves around and behind the body. Meanwhile, the boat's rotating propeller below the surface can constantly transmit kinetic energy into the water, further producing splashes to the surface. When such a scenario is simulated using coarse discretization with surface-based refinement, the vast and calm surface brings a large computational burden, causing computational resources to be wasted in these unimportant areas. Also, the energy dissipation from the propeller area cannot be restrained effectively.
To conduct spatial adaptivity with more flexibility and efficiency, we propose a novel adaptivity method with boundary refinement for SPH fluid simulation, where particle resolution increases as the distance to the interested boundary \DIFdelbegin \DIFdel{objects decreases as }\DIFdelend \DIFaddbegin \DIFadd{object decreases (see }\DIFaddend Fig.\ref{fig:refine}\DIFdelbegin \DIFdel{shows}\DIFdelend \DIFaddbegin \DIFadd{)}\DIFaddend . The sizes of the particles are adjusted towards the resolution via splitting and merging. \DIFdelbegin \DIFdel{And }\DIFdelend \DIFaddbegin \DIFadd{Moreover, }\DIFaddend a wake flow preservation mechanism is introduced to retain the refined resolution for a \DIFdelbegin \DIFdel{period of time }\DIFdelend \DIFaddbegin \DIFadd{specific period }\DIFaddend after a particle flows through the boundary object \DIFdelbegin \DIFdel{, }\DIFdelend to prevent the loss of flow details. The results show that our method can \DIFdelbegin \DIFdel{not only }\DIFdelend enrich fluid details more economically \DIFdelbegin \DIFdel{, but also }\DIFdelend \DIFaddbegin \DIFadd{and }\DIFaddend produce more accurate visual effects in contrast to the surface-based strategy.
\section{Related Work}
Methods for spatial adaptivity in fluid simulation depend heavily on the fluid simulation approaches \DIFaddbegin \DIFadd{on which }\DIFaddend they are based\DIFdelbegin \DIFdel{on}\DIFdelend . For Eulerian approaches that simulate the fluid with grids, a \DIFdelbegin \DIFdel{common scheme is using }\DIFdelend \DIFaddbegin \DIFadd{standard scheme uses }\DIFaddend octrees to split some grids into finer grids \cite{Ando20}\DIFdelbegin \DIFdel{, meanwhile}\DIFdelend \DIFaddbegin \DIFadd{. Meanwhile}\DIFaddend , tilted grids can also be used \cite{Xiao20} to avoid numerical issues. For \DIFdelbegin \DIFdel{particle based }\DIFdelend \DIFaddbegin \DIFadd{particle-based }\DIFaddend Lagrangian approaches, the sizes of particles are adaptively adjusted \cite{Winchenbach17}. For hybrid approaches that inherit the traits of both Eulerian and Lagrangian methods, one can improve the efficiency by limiting the regions where particles are used \cite{Sato18} or combining octrees with \DIFaddbegin \DIFadd{an }\DIFaddend adjustable number of particles based on regional characteristics \cite{Nakanishi20}.
SPH~\cite{Koschier19} is a Lagrangian fluid simulation method that possesses the advantages of natural \DIFdelbegin \DIFdel{mass-conservation }\DIFdelend \DIFaddbegin \DIFadd{mass conservation }\DIFaddend and simplicity of advection computation. For adaptive SPH, Adams et al.~\cite{Adams07} resampled particles with different radii based on the size of local geometric features. Solenthaler and Gross~\cite{Solenthaler11} introduced a two-scale mechanism that coupled a low-resolution simulation with a high-resolution one\DIFdelbegin \DIFdel{; }\DIFdelend \DIFaddbegin \DIFadd{, }\DIFaddend and particles were directly inserted or deleted at the boundary between the two resolutions, which broke the mass-preserving condition. Horvath and Solenthaler~\cite{Horvath13} extended the previous work~\cite{Solenthaler11} to support multiple levels of resolution and conserve mass. Orthmann and Kolb~\cite{Orthmann12} increased the spatial resolution by splitting particles using a $1:2$ pattern and applied a temporal blending technique to achieve a smooth particle splitting process by maintaining continuous physical fields. Vacondio et al.~\cite{Vacondio16} used the variational principle to search for an optimized splitting pattern that minimized density error. They also introduced a coalescing scheme to realize the dynamic reduction of resolution. Winchenbach et al.~\cite{Winchenbach17} achieved adaptivity in incompressible SPH by introducing a new split-merge mechanism that produced an approximately continuous resolution based on the distance from the free surface of the fluid. Winchenbach and Kolb~\cite{Winchenbach21} later proposed a method to optimize the density error from the splitting process into \DIFaddbegin \DIFadd{an }\DIFaddend arbitrary number of particles by optimizing the position and mass of the split particles to increase the stability of the previous method \cite{Winchenbach17}.
\begin{figure*}[t]
\centering
\DIFdelbeginFL %DIFDELCMD < \subfigure{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/rod/fine210.png}
%DIFDELCMD < }
%DIFDELCMD < \subfigure{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/rod/mark215.png}
%DIFDELCMD < }
%DIFDELCMD < \subfigure{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/rod/surface215.png}
%DIFDELCMD < }
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \subfigure{
\centering
\includegraphics[width=0.31\textwidth]{figure/rod/fine210.jpg}
}
\subfigure{
\centering
\includegraphics[width=0.31\textwidth]{figure/rod/mark215.jpg}
}
\subfigure{
\centering
\includegraphics[width=0.31\textwidth]{figure/rod/surface215.jpg}
}
\DIFaddendFL
\setcounter{subfigure}{0}
\DIFdelbeginFL %DIFDELCMD < \subfigure[High-resolution ($r=0.063\textrm{m}$).]{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/rod_side/fine210.png}
%DIFDELCMD < \label{fig:rod_fine}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Ours, $\tau^{max}_{cylinder} = 21$.]{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/rod_side/mark215.png}
%DIFDELCMD < \label{fig:rod_mark}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Surface-based~\cite{Winchenbach17}.]{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/rod_side/surface215.png}
%DIFDELCMD < \label{fig:rod_surface}
%DIFDELCMD < }
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \subfigure[High-resolution ($r=0.063\textrm{m}$).]{
\centering
\includegraphics[width=0.31\textwidth]{figure/rod_side/fine210.jpg}
\label{fig:rod_fine}
}
\subfigure[Ours, $\tau^{max}_{cylinder} = 21$.]{
\centering
\includegraphics[width=0.31\textwidth]{figure/rod_side/mark215.jpg}
\label{fig:rod_mark}
}
\subfigure[Surface-based~\cite{Winchenbach17}.]{
\centering
\includegraphics[width=0.31\textwidth]{figure/rod_side/surface215.jpg}
\label{fig:rod_surface}
}
\DIFaddendFL \vspace{-0.7\baselineskip}
\caption{
Cylinder moving experiment, where the cylinder moves horizontally in the tank. The first row is the vertical view; the second row is a cross-section of the side view. \DIFdelbeginFL \DIFdelFL{Adaptive methods use max particle size $r_{base} = 0.2$ and $\alpha = 32$. }\DIFdelendFL Our method better reproduces the jagged (vertical view) and curved (side view) wave patterns in the high-resolution simulation. %DIF < A cylinder moves horizontally through a water tank, creating a wave pattern behind. The first row is the vertical view; the second row is a cross-section of the side view. Each particle is colour-coded according to its initial position (left: yellow, right: blue) with respect to the cross-section.
%DIF < We use $\tau^{max}_{rod} = 21$ in our method to prevent wake flow merging during the entire simulation.
%DIF < The wave pattern (b) generated using our method is more similar to the fine-scale simulation (a) than the previous method (c) and better reproduces the cross-section pattern.
\DIFaddbeginFL \DIFaddFL{Adaptive methods use max particle size $r_{base} = 0.2$ and $\alpha = 32$.
}\DIFaddendFL }
\label{fig:rod}
\end{figure*}
A popular approach for boundary handling of SPH fluids is particle-based methods that represent the solid objects with particles \cite{Akinci12, Band18b}. However, for fluid simulation using adaptive methods, particle-based boundary representation may encounter the problem of size discrepancy between fluid and boundary particles. Another approach for boundary handling is the boundary integral method. Fujisawa et al.~\cite{Fujisawa15} used empirically derived functions to handle triangle-mesh boundaries. Koschier and Bender~\cite{Koschier17} precomputed the integral of boundary on a fixed grid, where the precomputing was rather expensive. Bender et al.~\cite{Bender19} improved this method by precalculating a volume term. Chang et al.~\cite{Chang20} integrated computer-aided design (CAD) mesh file boundary representation into SPH by converting the volume integral to surface integral. Winchenbach et al.~\cite{Winchenbach20} proposed a boundary integral method that supports adaptive SPH, which approximated the boundary integral locally at each particle with a plane based on the signed-distance field of the boundary object. Though the boundary handling for adaptive SPH has been well-studied, \DIFdelbegin \DIFdel{little attention has been }\DIFdelend \DIFaddbegin \DIFadd{more attention needs to be }\DIFaddend paid to designing the adaptive mechanism dedicated to the fluid-solid boundary. So in this paper, we present \DIFdelbegin \DIFdel{the }\DIFdelend \DIFaddbegin \DIFadd{a }\DIFaddend spatial adaptivity method with \DIFaddbegin \DIFadd{the }\DIFaddend boundary refinement mechanism for SPH fluid simulation to capture detailed interaction effects.
\section{Adaptive SPH}
\subsection{SPH Basics}
To simulate fluid behaviour, the SPH method~\cite{Koschier19} describes physical fluid motion according to the Navier-Stokes equation:
\begin{equation}
\rho \frac{D\mathbf{v}}{Dt}=-\nabla p + \rho \upsilon \nabla^2 \mathbf{v} + \mathbf{f}_{ext},
\label{equ-2}
\end{equation}
where the change rate of the velocity $\mathbf{v}$ is determined by pressure $p$, density $\rho$, dynamic viscosity $\upsilon$ and external body force $\mathbf{f}_{ext}$.
To perform numerical computation, SPH discretizes the fluid into particles \DIFdelbegin \DIFdel{, }\DIFdelend and calculates the physical attributes of each particle using the attributes from neighbouring particles and a kernel function $W$, as:
\begin{equation}
A_i = \sum_j A_j \frac{m_j}{\rho_j} W(\mathbf{x}_i - \mathbf{x}_j, h_{ij}),
\label{eq:sph_base}
\end{equation}
where $A$ is the physical attribute. $i$ is the current particle. $j$ denotes neighbouring particles of $i$, whose distance to $i$ is smaller than the support radius $h_{ij}$. $h_{ij} = (h_i + h_j) / 2$, where $h_i = 2r_i$ and $r$ is the particle diameter. $m$ is mass. $\mathbf{x}$ is position. \DIFdelbegin \DIFdel{For the kernel function $W$, }\DIFdelend \DIFaddbegin \DIFadd{This paper uses }\DIFaddend a cubic spline function \DIFdelbegin \DIFdel{is used in this paper}\DIFdelend \DIFaddbegin \DIFadd{for the kernel function $W$}\DIFaddend . Any value followed by the subscript $i$ or $j$ means the value of that particle.
According to Eqn.~\ref{eq:sph_base}, density located at particle $i$ can be approximated as:
\begin{equation}
\rho_i = \sum_j m_j W_{ij},
\label{eq:sph_density}
\end{equation}
where $W_{ij}$ is short for $W(\mathbf{x}_i - \mathbf{x}_j, h_{ij})$.
Using the state equation from Becker and Teschner~\cite{Becker07}, the pressure at the particle $i$ can be calculated as:
\begin{equation}
p_i = B\left(\left(\frac{\rho_i}{\rho_0}\right)^\gamma - 1\right),
\end{equation}
where $B = \rho_0 c_s^2 / \gamma$. $\rho_0$ is the rest density denoting the density of the fluid without any compression. $c_s$ is the speed of sound in the fluid, which is often set to $100\textrm{m}/\textrm{s}$. $\gamma$ is set to $\gamma = 7$ for weakly compressible fluids.
The pressure force on the particle can then be computed as:
\begin{equation}
\mathbf{F}_i^p = -m_i \sum_j m_j \left(
\frac{p_i}{\rho_i^2} + \frac{p_j}{\rho_j^2}
\right)\nabla W_{ij}.
\end{equation}
The viscosity force can be approximated as \DIFaddbegin \DIFadd{follows}\DIFaddend :
\begin{equation}
\mathbf{F}_i^{vis} =
m_i \sum_j m_j \upsilon \left(\frac{\mathbf{v}_{ij}\cdot\mathbf{x}_{ij}}{|\mathbf{x}_{ij}|^2 + 0.01h_i^2}\right)\nabla W_{ij},
% \left\{
% \begin{array}{ll}
% m_i \sum_j m_j \upsilon \left(\frac{\mathbf{v}_{ij}\cdot\mathbf{x}_{ij}}{|\mathbf{x}_{ij}|^2 + 0.01h_i^2}\right)\nabla W_{ij} & \mathbf{v}_{ij}\cdot\mathbf{x}_{ij} < 0 \\
% \mathbf{0} & \mathbf{v}_{ij}\cdot\mathbf{x}_{ij} < 0
% \end{array}
% \right.,
\label{eq:vis}
\end{equation}
where $\mathbf{v}_{ij} = \mathbf{v}_i - \mathbf{v}_j$ is the relative velocity between $i$ and $j$. $\mathbf{x}_{ij} = \mathbf{x}_i - \mathbf{x}_j$.
The total force on a particle can be expressed as:
\begin{equation}
\mathbf{F}_i = \mathbf{F}_i^p + \mathbf{F}_i^{adv} + \mathbf{F}_i^{bound},
\end{equation}
where $\mathbf{F}^{adv}$ is the advection force consisting of gravity $\mathbf{G}$, viscosity force $\mathbf{F}^{vis}$, and surface tension~\cite{Akinci13}. $\mathbf{F}^{bound}$ is the force from the boundary to the fluid, which is explained in Section \ref{sec:boundary}. The velocity and position of the particle \DIFdelbegin \DIFdel{is }\DIFdelend \DIFaddbegin \DIFadd{are }\DIFaddend updated each time step with \DIFdelbegin \DIFdel{: }\DIFdelend $\mathbf{v}_i := \mathbf{v}_i + \Delta t \mathbf{F}_i / m_i$, $\mathbf{x}_i := \mathbf{x}_i + \Delta t \mathbf{v}_i$, where $\Delta t$ is the length of the time step.
\subsection{Split-merge Based Adaptivity}
Winchenbach et al.~\cite{Winchenbach17} achieved SPH adaptivity by splitting and merging particles with strict conservation of the total fluid mass. In this method, the desired size for each particle is computed using a sizing function based on the distance to the fluid's free surface:
\begin{equation}
m_i^{opt} = m^{base}\left(
\frac{\mathrm{min}(|\phi_i^f|,|\phi_{max}|)}{|\phi_{max}|}
(1 - \alpha) + \alpha
\right),
\label{eq:m_opt}
\end{equation}
where $m^{opt}$ is the optimal mass that is the desired mass for the particle. $\alpha$ is the adaptivity ratio that denotes the largest mass ratio \DIFdelbegin \DIFdel{being }\DIFdelend allowed between particles. $m^{base}$ is the largest allowed particle mass. $\phi^f$ is the distance to the fluid's free surface similar to Horvath and Solenthaler \cite{Horvath13}, which is negative inside the fluid. $\phi_{max}$ is the max distance to the surface within which particles are refined. Eqn.~\ref{eq:m_opt} ensures that the optimal mass decreases linearly and smoothly as the distance to the free surface decreases.
\begin{figure}[b]
\centering
\DIFdelbeginFL %DIFDELCMD < \subfigure[Splitting]{
%DIFDELCMD < \includegraphics[width=0.29\columnwidth]{figure/split_schem/split.png}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Merging]{
%DIFDELCMD < \includegraphics[width=0.29\columnwidth]{figure/split_schem/merge.png}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Redistribution]{
%DIFDELCMD < \includegraphics[width=0.29\columnwidth]{figure/split_schem/redistribute.png}
%DIFDELCMD < }
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \subfigure[Splitting]{
\includegraphics[width=0.29\columnwidth]{figure/split_schem/split.jpg}
}
\subfigure[Merging]{
\includegraphics[width=0.29\columnwidth]{figure/split_schem/merge.jpg}
}
\subfigure[Redistribution]{
\includegraphics[width=0.29\columnwidth]{figure/split_schem/redistribute.jpg}
}
\DIFaddendFL \vspace{-0.7\baselineskip}
\caption{Schematic diagram of particle splitting, merging and redistribution.}
\label{fig:split_schem}
\end{figure}
Splitting or merging is \DIFdelbegin \DIFdel{then }\DIFdelend applied to each particle to adjust its mass towards $m^{opt}$ if necessary. To determine the operation each particle needs, the particles are classified into five categories according to the ratio between the particle's mass and the optimal mass, $m_i^{rel} = m_i / m_i^{opt}$. The five classes are $S$ ($m_i^{rel} < 0.5$), $s$ ($0.5 \leq m_i^{rel} \leq 0.9$), $o$ ($0.9 < m_i^{rel} < 1.1$), $l$ ($1.1 \leq m_i^{rel} \leq 2$), and $L$ ($2 < m_i^{rel}$)
Particles of class $L$ undergo splitting to become multiple smaller particles (Section \ref{sec:split}); particles of class $s$ are merged into nearby $s$ or $S$ particles by distributing all of its mass to nearby particles (Section \ref{sec:merge}); and particles of class $l$ redistribute their excess mass to nearby $s$ particles similarly to merging (Section \ref{sec:merge}). The process is shown schematically in Fig. \ref{fig:split_schem}.
\subsubsection{Splitting}
\label{sec:split}
Particles of class $L$ are split into $n$ children particles where $n = \lceil m_i / m_i^{opt} \rceil$. The mass and positions of children particles are determined using precomputed split patterns\DIFdelbegin \DIFdel{and }\DIFdelend \DIFaddbegin \DIFadd{. They }\DIFaddend are further optimized online by solving a minimization problem on density error to reduce the error induced by splitting~\cite{Winchenbach21}. The other physical attributes of children particles are inherited from their parents.
\subsubsection{Merging and Redistribution}
\label{sec:merge}
Particles of class $s$ undergo merging, distributing all of their mass to nearby $s$ or $S$ particles, while particles of class $l$ redistribute their excess mass $m_i - m_i^{opt}$ to nearby $s$ particles. The distance between the mass-distributing particle $i$ and the mass-receiving particle $j$ must be within $h_i / 2$. The mass to distribute $m^{dist}$ is equally divided among the mass-receiving particles, while the other physical attributes are weight-averaged between $i$ and $j$ as:
\begin{equation}
A_j^* = \frac{\frac{m^{dist}}{n}A_i + m_j A_j}{\frac{m^{dist}}{n} + m_j},
\end{equation}
where $A^*$ is the \DIFdelbegin \DIFdel{new value of the attribute }\DIFdelend \DIFaddbegin \DIFadd{attribute's new value }\DIFaddend after redistribution, and $n$ is the number of mass-receiving particles.
\subsubsection{Techniques to Increase Stability}
Even with optimized splitting patterns and online optimization, splitting and merging can still introduce some density errors~\cite{Winchenbach21}. Temporal blending~\cite{Winchenbach17} and local viscosity~\cite{Winchenbach21} can increase the stability of particle splitting and merging.
Temporal blending is applied to particles that recently participated in splitting, merging, or mass redistribution. The \DIFdelbegin \DIFdel{density and velocity of these particles are blended with the }\DIFdelend original particle $o$ \DIFdelbegin \DIFdel{, which is the parent in splitting or the particle that redistributed mass }\DIFdelend \DIFaddbegin \DIFadd{before splitting or redistributing mass is stored. Then, $o$ is used to modify the density and velocity of its children or particles that received mass from it}\DIFaddend . The blended density is computed as:
\begin{equation}
\rho_i^{blended} = (1 - \beta) \rho_i + \beta \rho_o,
\end{equation}
where $\rho_o$ is the density of the original particle, computed using Eqn.~\ref{eq:sph_density}, but ignoring the density contribution from its children. $\beta$ is a temporal blending factor that is initialized to $0.5$ for particles generated in splitting and $0.2$ for particles involved in redistribution or merging. Then, $\beta$ is decreased by $0.1$ every time step until it reaches $0$. $\rho_i^{blended}$ is used instead of $\rho_i$ in further computations\DIFdelbegin \DIFdel{,}\DIFdelend .
The velocity of the original particle $\mathbf{v}_o$ is set to the average velocity of all its children particles \DIFdelbegin \DIFdel{, }\DIFdelend and is used to update the original particle's position $\mathbf{x}_o$. The blended velocity $\mathbf{v}_i^{blended} = (1 - \beta) \mathbf{v}_i + \beta \mathbf{v}_o$ is used instead of $\mathbf{v}_i$ to update the particle's position $\mathbf{x}_i$.
In the local viscosity technique, the viscosity coefficient $\upsilon$ in Eqn.~\ref{eq:vis} is multiplied with a factor $1 + 0.5(\beta_i + \beta_j)/2$ \DIFdelbegin \DIFdel{, to locally }\DIFdelend \DIFaddbegin \DIFadd{to }\DIFaddend increase the viscosity of newly split, merged or redistributed particles \DIFaddbegin \DIFadd{locally}\DIFaddend , thus increasing stability.
\begin{figure*}
\centering
\DIFdelbeginFL %DIFDELCMD < \subfigure[Ours, $\tau_{boat}^{max}=0$.]{
%DIFDELCMD < \includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/bound.png}
%DIFDELCMD < \label{fig:ship_our}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Ours, $\tau_{boat}^{max}=1$.]{
%DIFDELCMD < \includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/mark.png}
%DIFDELCMD < \label{fig:ship_mark}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Surface-based~\cite{Winchenbach17}.]{
%DIFDELCMD < \includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/surface.png}
%DIFDELCMD < \label{fig:ship_w17}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Low-resolution.]{
%DIFDELCMD < \includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/coarse.png}
%DIFDELCMD < \label{fig:ship_2}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[High-resolution.]{
%DIFDELCMD < \includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/fine.png}
%DIFDELCMD < \label{fig:ship_063}
%DIFDELCMD < }
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \subfigure[Ours, $\tau_{boat}^{max}=0$.]{
\includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/bound.jpg}
\label{fig:ship_our}
}
\subfigure[Ours, $\tau_{boat}^{max}=1$.]{
\includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/mark.jpg}
\label{fig:ship_mark}
}
\subfigure[Surface-based~\cite{Winchenbach17}.]{
\includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/surface.jpg}
\label{fig:ship_w17}
}
\subfigure[Low-resolution.]{
\includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/coarse.jpg}
\label{fig:ship_2}
}
\subfigure[High-resolution.]{
\includegraphics[width=0.18\textwidth]{figure/ship_reconstruct/fine.jpg}
\label{fig:ship_063}
}
\DIFaddendFL \caption{Surface reconstruction result of \DIFaddbeginFL \DIFaddFL{the }\DIFaddendFL boat-sailing experiment: (a), (b) and (c) are adaptive simulations using max particle size $r_{base} = 0.2$ and adaptive ratio $\alpha = 32$; (d) and (e) are uniform scale simulations with $r = 0.2$ and $r = 0.063$.}
\label{fig:ship_reconstruct}
\end{figure*}
\section{Semi-analytic Boundary Handling}
\label{sec:boundary}
A suitable boundary handling method for adaptive SPH is proposed in \cite{Winchenbach20}. This method uses a local plane to approximate the boundary at each particle. The plane approximation is based on a discrete signed-distance field (SDF) evaluated before simulation. The plane's distance $d$ to the particle equals the SDF magnitude at the particle's position, and the normal vector of the plane is the \DIFdelbegin \DIFdel{normalized }\DIFdelend \DIFaddbegin \DIFadd{normalised }\DIFaddend SDF gradient. \DIFdelbegin \DIFdel{The }\DIFdelend \DIFaddbegin \DIFadd{To approximate the boundary's contribution, the }\DIFaddend integral of the kernel function $W$ is evaluated over the region on the side of the plane \DIFdelbegin \DIFdel{corresponding to the inside of the boundary object, yielding a function to approximate the boundary's contribution}\DIFdelend \DIFaddbegin \DIFadd{that contains the boundary}\DIFaddend :
% \begin{equation}
% \lambda'(d) = \left\{
% \begin{array}{ll}
% \vspace{5pt}
% \makecell[l]{\frac{1}{30}[81q^6 - 144q^5+ \\ 80q^3 -42q + 15]} & 0 \leq q \leq 0.5\\
% \vspace{5pt}
% \makecell[l]{\frac{-8}{15}[2q^6 - 9q^5 + 15q^4 \\ - 10q^3 + 3q - 1]} & 0.5 < q \leq 1 \\
% \makecell[l]{1-\lambda'(-q)} & -1 \leq q < 0
% \end{array}
% \right.,
% \end{equation}
\begin{equation}
\lambda'(d) = \left\{
\begin{array}{ll}
\vspace{5pt}
\makecell[l]{\frac{1}{30}[81q^6 - 144q^5+ 80q^3 -42q + 15]} & \hspace{2em} 0 \leq q \leq 0.5\\
\vspace{5pt}
\makecell[l]{\frac{-8}{15}[2q^6 - 9q^5 + 15q^4 - 10q^3 + 3q - 1]} & \hspace{2em} 0.5 < q \leq 1 \\
\makecell[l]{1-\lambda'(-q)} & \hspace{2em} -1 \leq q < 0
\end{array}
\right.,
\end{equation}
where $q = d / h_i$.
A penalty term is introduced to penalize solid penetration: $\beta(d) = 1 - d / h_i$. The penalty term is directly multiplied onto $\lambda'(d)$, obtaining the corrected value $\lambda(d) = \beta(d) \lambda'(d)$.
% $\partial\beta(d) / \partial(d) = - 1 / h_i$
% $\nabla\lambda'(d) = \partial\beta / \partial(d) \mathbf{n} \lambda'(d) + \beta(d)\nabla'(d)$.
The density equation Eqn.~\ref{eq:sph_density} is then modified to consider the boundary:
\begin{equation}
\rho_i = \sum_j m_j W_{ij} + \sum_b \rho_0 \lambda_i^b,
\end{equation}
where $b$ denotes the boundary object(s). $\lambda_i^b = \lambda(\mathrm{sdf}^b(\mathbf{x}_i))$, where $\mathrm{sdf}^b(\mathbf{x}_i)$ is the signed-distance to $b$ from the position of $i$.
The pressure at the boundary can be mirrored~\cite{Akinci12} or extrapolated~\cite{Band18b} from the pressure of nearby fluid particles. In the case of pressure mirroring, the pressure force from the boundary is:
\begin{equation}
\mathbf{F}_{i \leftarrow b}^p = -m_i \rho_0 \frac{p_i}{\rho_i^2} \nabla\lambda_i^b.
\label{eq:bound_p}
\end{equation}
The friction between \DIFaddbegin \DIFadd{the }\DIFaddend fluid and solid follows the Coulomb model, which is proportional to the boundary's pressure force on the particle:
\begin{equation}
\mathbf{F}_{i\leftarrow b}^{fric} = \mu ||\mathbf{F}_{i\leftarrow b}^p|| \mathbf{t}_{ib},
\label{eq:bound_fric}
\end{equation}
where $\mathbf{t}_{ib}$ is a unit vector pointing to the direction of relative tangential velocity between fluid and boundary.
The total force from the boundary objects to a particle is $\mathbf{F}_i^{bound} = \sum_b (\mathbf{F}_{i \leftarrow b}^p + \mathbf{F}_{i\leftarrow b}^{fric})$.
\vspace{-0.5\baselineskip}
\begin{algorithm}[htb]
\par\setlength\parindent{2em}
\noindent \textbf{SPH Computation}
Establish neighbour list
Compute and blend density
Calculate advection forces
Compute fluid pressure
Apply boundary pressure and friction
Update and blend velocity
Update position
\noindent \textbf{Adaptive Mechanism}
\textcolor[RGB]{71,156,233}{Compute $\phi^b$ from boundary SDF (Eqn.~\ref{eq:bound_distance})}
\textcolor[RGB]{71,156,233}{Wake flow preservation (Algorithm \ref{alg:two})}
\textbf{if} combine surface-based: Detect surface
\textcolor[RGB]{71,156,233}{Calculate optimal mass (Eqn.~\ref{eq:refine_bound})}
Splitting, merging and redistribution
\caption{Boundary refinement for SPH. New steps in our method are marked blue.}
\label{alg:one}
\end{algorithm}
\section{Adaptive Boundary Coupling}
\label{sec:adaptive_our}
\DIFdelbegin \DIFdel{In fluid-boundary coupling, the }\DIFdelend \DIFaddbegin \DIFadd{The }\DIFaddend region near the boundary objects is often of interest \DIFdelbegin \DIFdel{, therefore }\DIFdelend \DIFaddbegin \DIFadd{in fluid-boundary coupling. Therefore }\DIFaddend it is desirable to use \DIFaddbegin \DIFadd{the }\DIFaddend refined particles near the important boundary objects to emphasise the details of boundary coupling. However, \DIFaddbegin \DIFadd{refining the entire surface can cause an unnecessary increase in particle number. }\DIFaddend Previous work~\cite{Winchenbach17} refines particles only near the free surface of the fluid, which cannot cover the entire boundary region and can cause detail loss in boundary coupling. Moreover, in some cases, only the region near the boundary object is of interest, such as a ship sailing on a vast water surface.
\DIFdelbegin \DIFdel{Refining the entire surface can cause an unnecessary increase in particle number.
}\DIFdelend
Given the above problems, we propose a boundary refinement method to refine particles near specific boundary objects. The method can either be used alone to refine only near the boundary or \DIFdelbegin \DIFdel{be }\DIFdelend combined with surface-based refinement schemes~\cite{Winchenbach17} to refine both the surface and the boundary regions, which is outlined in Algorithm \ref{alg:one}.
To achieve particle refinement near boundary objects, we modify the sizing function of Eqn.~\ref{eq:m_opt} to \DIFdelbegin \DIFdel{take }\DIFdelend \DIFaddbegin \DIFadd{consider }\DIFaddend the distance to boundary objects\DIFdelbegin \DIFdel{into consideration}\DIFdelend . Instead of optimizing particle mass according to the distance to the free surface $\phi^f$, we use the distance to boundary objects to define a value $\phi^b$ to adjust the particle size:
\begin{equation}
\phi_i^b = \min\left(\max_{b^*}\left(-\mathrm{sdf}^{b^*}(\mathbf{x}_i) + \phi_{b^*}^{fine}\right), 0\right),
\label{eq:bound_distance}
\end{equation}
where $b^*$ denotes the interested boundary objects near which the fluid particles should be refined. $\phi_{b^*}^{fine}$ is a user-controlled parameter: all particles with distance to $b^*$ smaller than $\phi_{b^*}^{fine}$ are refined to the smallest scale. We use $\phi_{b^*}^{fine} = h_i$ unless explicitly mentioned.
To only refine the region near the boundary, one can \DIFdelbegin \DIFdel{simply }\DIFdelend replace $\phi_i^f$ with $\phi_i^b$ in Eqn.~\ref{eq:m_opt}, namely:
\begin{equation}
m_i^{opt} = m^{base}\left(
\frac{\mathrm{min}(|\phi_i^b|,|\phi_{max}|)}{|\phi_{max}|}
(1 - \alpha) + \alpha
\right),
\label{eq:refine_bound}
\end{equation}
and to refine both near the boundary region and the fluid surface, one should substitute $\phi_i^f$ in Eqn.~\ref{eq:m_opt} with $\phi_i = \max(\phi_i^b, \phi_i^f)$.
\begin{figure*}[htpb]
\centering
\subfigure[Ours, $\tau_{boat}^{max} = 0$.] {
\DIFdelbeginFL %DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/ship/bound90.png}
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \includegraphics[width=0.31\textwidth]{figure/ship/bound90.jpg}
\DIFaddendFL }
\subfigure[Ours, $\tau_{boat}^{max} = 1$.] {
\DIFdelbeginFL %DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/ship/mark90.png}
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \includegraphics[width=0.31\textwidth]{figure/ship/mark90.jpg}
\DIFaddendFL }
\subfigure[Surface-based~\cite{Winchenbach17}.] {
\DIFdelbeginFL %DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/ship/surface90.png}
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \includegraphics[width=0.31\textwidth]{figure/ship/surface90.jpg}
\DIFaddendFL }
\subfigure[Low-resolution ($r = 0.2\mathrm{m}$).] {
\DIFdelbeginFL %DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/ship/coarse90.png}
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \includegraphics[width=0.31\textwidth]{figure/ship/coarse90.jpg}
\DIFaddendFL }
\subfigure[High-resolution ($r = 0.063\mathrm{m}$).] {
\DIFdelbeginFL %DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/ship/fine90.png}
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \includegraphics[width=0.31\textwidth]{figure/ship/fine90.jpg}
\DIFaddendFL }
\vspace{-0.7\baselineskip}
\caption{Boat-sailing experiment. Adaptive methods use $r_{base} = 0.2$ and $\alpha = 32$.}
\label{fig:ship}
\end{figure*}
\subsection{Wake Flow Preservation by Delaying Merge}
\label{sec:wake_flow}
For scenarios where the fluid flows past the boundary object or the boundary object moves through the fluid, interesting wake flow effects are generated behind the boundary object, such as the wave behind a ship moving through water. However, when using $\phi_i^b$ to determine particle size, the wake flow \DIFdelbegin \DIFdel{tends to lose }\DIFdelend \DIFaddbegin \DIFadd{loses }\DIFaddend detail because the optimal mass quickly returns to the largest value as the boundary object moves away from the particle. Consequently, the particles in the wake flow merge into larger particles, reducing the detail level.
To preserve wake flow detail, we inhibit the particle merging process if the particle was recently in the vicinity of the boundary, as Algorithm \ref{alg:two} shows. For each interested boundary object $b^*$, the user can set a duration to delay merging $\tau^{max}_{b^*}$ for particles that have flowed around it\DIFdelbegin \DIFdel{; }\DIFdelend \DIFaddbegin \DIFadd{, }\DIFaddend and each particle tracks its \DIFdelbegin \DIFdel{own }\DIFdelend remaining duration to delay merging, denoted as $\tau_i$. Every time step, for each particle $i$ and each interested boundary object $b^*$, if the particle satisfies $\mathrm{sdf}^{b^*}(\mathbf{x}_i)\leq h_i$ , we set its remaining duration $\tau_i := \tau^{max}_{b^*}$ if the duration is not already longer. The duration is decremented at each time step by the time step length $\Delta t$ as $\tau_i:=\tau_i-\Delta t$. As long as the particle satisfies $\tau_i > 0$, $\phi^b_i$ is not allowed to decrease: if the newly computed value $\phi^{b}_{i,t}$ for the time step $t$ is lower than the previous value $\phi^{b}_{i,t-1}$, we set it to $\phi^{b}_{i,t} := \phi^{b}_{i,t-1}$. To retain the smoothness of the $\phi^b$ field, the $\phi^b_i$ values for $\tau_i > 0$ are then propagated to surrounding particles using the method from Horvath and Solenthaler \cite{Horvath13}. This approach effectively delays particle merging in the wake flow by the time length of $\tau^{max}_{b^*}$.
\vspace{-0.5\baselineskip}
\begin{algorithm}[htb]
\par\setlength\parindent{2em}
\noindent \textbf{for each} particle $i$
\textbf{for each} interested boundary object $b^*$:
\hspace{2em}\textbf{if} $\mathrm{sdf}^{b^*}(\mathbf{x}_i)\leq h_i$:
\hspace{2em}\hspace{2em}set duration $\tau_i:=\mathrm{max}(\tau_{b^*}^{max},\tau_i)$
decrement duration $\tau_i:=\tau_i-\Delta t$
\textbf{if} $\tau_i>0$:
\hspace{2em}$\phi_{i,t}^b:=\mathrm{max}(\phi_{i,t}^b,\phi_{i,t-1}^b)$
\caption{Wake flow preservation.}
\label{alg:two}
\end{algorithm}
\vspace{-1.5\baselineskip}
\section{Results and Discussions}
%DIF < To test the effectiveness and capabilities of our method, in this section, we compare the proposed approach with simulations of
%DIF < fixed resolutions and the state-of-the-art SPH adaptive simulation scheme~\cite{Winchenbach17} under various scenarios. We first applied the \emph{propeller spinning} scenario to validate the importance of the self-adaptive coupling boundary for fluid simulation, where we place a horizontally-rotating propeller in water. Then A \emph{boat-sailing} scenario was carried out using different configurations to show how an adaptive coupling boundary of fluid can be more effective than a pure
%DIF < optimization of particle sizes concerning the distance to the fluid's surface. Finally, a Karman Vortex Street experiment illustrated that finer adaptive resolution of fluid flowing through a cylinder can produce equivalently rich details as a global high-resolution simulation.
\DIFdelbegin %DIFDELCMD <
%DIFDELCMD < %%%
\DIFdelend To test the effectiveness and capabilities of our method, in this section, we use multiple scenarios to compare the proposed approach with simulations of uniform particle scale and the surface-based state-of-the-art SPH adaptive scheme~\cite{Winchenbach17}\DIFaddbegin \DIFadd{, }\DIFaddend which adapts resolution near the free surface.
We use Weakly Compressible SPH~\cite{Becker07} for fluid simulation and the semi-analytic boundary handling method proposed in~\cite{Winchenbach20} for boundary coupling. The time step length is determined using the CFL condition with a scaling parameter of $0.5$. Surface reconstruction and rendering are conducted using Houdini and mantra with Intel Xeon Gold 5218. All simulations are coded using the Taichi programming language~\cite{hu2019taichi} and run on an NVIDIA Tesla V100 GPU.
\subsection{Efficiency Comparison}
Efficiency is a crucial aspect of adaptive simulation mechanisms. We show that our method can produce a similarly detailed result using fewer particles than the surface-based adaptive mechanism~\cite{Winchenbach17} and is more vivid than a low-resolution simulation.
\paragraph{Boat-sailing}
In this scenario, a boat sails quickly across a calm fluid surface, stirring up waves and splashes around and behind the body. For the adaptive methods, we use the max particle size $r_{base} = 0.2$ and an adaptive ratio $\alpha = 32$ \DIFdelbegin \DIFdel{, }\DIFdelend and choose $\phi_{b^*}^{fine} = 0$ in our method. For uniform size simulations, we perform a low-resolution and a high-resolution simulation using $r = 0.2$ and $r = 0.063$, where the particle size respectively equals \DIFdelbegin \DIFdel{to }\DIFdelend the largest and smallest particle size in adaptive simulation. The particles are colour-coded according to velocity.
Fig.\ref{fig:ship_reconstruct} and Fig.\ref{fig:ship} show the experimental results rendered with reconstructed fluid surface and particles\DIFaddbegin \DIFadd{, }\DIFaddend respectively. Considering the splashes around the ship, the visual level of detail is similar between the previous surface-based method~\cite{Winchenbach17} (Fig.\ref{fig:ship_w17}) and our method with or without wake flow preservation (Fig.\ref{fig:ship_mark}, \ref{fig:ship_our}). The three adaptive results are all much more detailed than the uniform low-resolution simulation (Fig.\ref{fig:ship_2}), though \DIFaddbegin \DIFadd{they }\DIFaddend may lack some detail compared to high-resolution (Fig.\ref{fig:ship_063}). For the wake flow effect, the result of our method without wake flow preservation (Fig.\ref{fig:ship_our}) is relatively coarse, but when wake flow preservation is added to our method (Fig.\ref{fig:ship_mark}), the visual detail level is comparable to the surface-based method (Fig.\ref{fig:ship_w17}).
%DIF < \begin{figure}[hb]
%DIF < \centering
%DIF < \includegraphics[width=\columnwidth]{figure/data/rod_count.png}
%DIF < \caption{Particle count in moving rod experiment. One frame equals to $1/24\mathrm{s}$.}
%DIF < \label{fig:rod_count}
%DIF < \end{figure}
\DIFdelbegin %DIFDELCMD <
%DIFDELCMD < %%%
\DIFdelend To evaluate the efficiency of \DIFaddbegin \DIFadd{the }\DIFaddend proposed method, the particle count and time consumption using different methods are plotted in Fig.\ref{fig:ship_data}. The solid lines show the particle count, and the dashed lines show the time consumption. It can be seen that the uniform low-resolution simulation uses the least particles\DIFdelbegin \DIFdel{; }\DIFdelend \DIFaddbegin \DIFadd{. While }\DIFaddend our adaptive method with $\tau_{boat}^{max} = 0$ increases the particle count slightly\DIFdelbegin \DIFdel{; }\DIFdelend \DIFaddbegin \DIFadd{. Further, }\DIFaddend our method with $\tau_{boat}^{max} = 1$ begins with a low particle count, which increases since frame $65$ when the boat starts moving and producing wake flow, and decreases back to a low value after frame $107$ when the boat leaves the simulated zone because the duration to delay merging for the wake flow has expired. Under both conditions, our method significantly reduces the average particle count over time compared to the surface-based method~\cite{Winchenbach17} and the high-resolution simulation. The time consumption curves follow a similar trend. This experiment shows that our method can reduce the time cost compared to the state-of-the-art surface-based adaptive mechanism~\cite{Winchenbach17} with no or negligible negative influence on visual quality.
\begin{figure*}
\centering
\DIFdelbeginFL %DIFDELCMD < \subfigure[Boat-sailing experiment.]{
%DIFDELCMD < \includegraphics[width=0.635\textwidth]{figure/data/ship.png}
%DIFDELCMD < \label{fig:ship_data}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Cylinder moving experiment.]{
%DIFDELCMD < \includegraphics[width=0.3\textwidth]{figure/data/rod_count.png}
%DIFDELCMD < \label{fig:rod_count}
%DIFDELCMD < }
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \subfigure[Boat-sailing experiment.]{
\includegraphics[width=0.635\textwidth]{figure/data/ship.jpg}
\label{fig:ship_data}
}
\subfigure[Cylinder moving experiment.]{
\includegraphics[width=0.3\textwidth]{figure/data/rod_count.jpg}
\label{fig:rod_count}
}
\DIFaddendFL \vspace{-0.7\baselineskip}
\caption{Particle count and time consumption in boat-sailing and cylinder moving experiment. Solid lines denote particle count; dashed lines denote time consumption. One frame equals \DIFdelbeginFL \DIFdelFL{to }\DIFdelendFL $1/24\mathrm{s}$.}
\end{figure*}
\subsection{Effect Evaluation}
\paragraph{Cylinder moving}
Fig.\ref{fig:rod} shows an experiment where a cylinder is moved horizontally through a water tank in a straight line to generate a wave pattern. The particles are coloured according to whether their initial positions are on one side of the moving path of the cylinder. A jagged pattern can be seen from the vertical view (first row), and curved patterns can be seen \DIFdelbegin \DIFdel{in }\DIFdelend \DIFaddbegin \DIFadd{from }\DIFaddend the side view of a cross-section (second row). Fig.\ref{fig:rod_fine} shows the result of a uniformly scaled high-resolution simulation performed using the smallest allowed particle size in the two adaptive simulations, $r = 0.063$, which should be the most accurate among the three simulations. Fig.\ref{fig:rod_mark} uses our boundary refinement method where particles are adaptively refined near the cylinder. We use $\tau_{cylinder}^{max} = 21$, which is longer than the simulation duration, to prevent wake flow merging for the entire simulation to achieve a high level of detail. Fig.\ref{fig:rod_surface} uses surface-based refinement~\cite{Winchenbach17}. The two adaptive simulations use $r_{base} = 0.2$ and $\alpha = 32$. Compared to the surface-based method, our method is more similar to the high-resolution simulation in terms of the size and number of jags from the vertical view and the shape of the curved pattern in the cross-section, indicating our method can achieve a better accuracy compared to surface-based method~\cite{Winchenbach17} under certain settings.
The particle count of the cylinder moving experiment is displayed in Fig.\ref{fig:rod_count}. Our method uses a larger number of particles compared to the surface-based method~\cite{Winchenbach17} to achieve higher accuracy, but the particle count is still considerably lower than the high-resolution simulation.
\paragraph{Propeller spinning}
In this experiment, a propeller is fully submerged \DIFdelbegin \DIFdel{into }\DIFdelend \DIFaddbegin \DIFadd{in }\DIFaddend the fluid and spins horizontally to generate turbulence. We use this scenario to demonstrate the ability of our method to be combined with surface-based refinement~\cite{Winchenbach17}.
Fig.\ref{fig:prop} shows the particle view of a cross-section of the propeller spinning experiment. From Fig.\ref{fig:prop_union}, it can be seen that the particle size is refined both near the surface and around the propeller. Compared with only using surface-based refinement as in Fig.\ref{fig:prop_surface}, the combined method can generate more details in a vortex, as shown in the zoomed-in areas, and also has a more similar shape to the vortex in a high-resolution simulation (Fig.\ref{fig:prop_fine}). This experiment shows that adding our method to the surface-based method~\cite{Winchenbach17} can enhance dynamic details produced by boundary coupling.
\begin{figure}[htbp]
\centering
\DIFdelbeginFL %DIFDELCMD < \subfigure[High-resolution ($r=0.063\textrm{m}$).]{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/prop/fine.png}
%DIFDELCMD < \label{fig:prop_fine}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Ours + surface-based~\cite{Winchenbach17}.]{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/prop/union.png}
%DIFDELCMD < \label{fig:prop_union}
%DIFDELCMD < }
%DIFDELCMD < \subfigure[Only surface-based.]{
%DIFDELCMD < \centering
%DIFDELCMD < \includegraphics[width=0.31\textwidth]{figure/prop/surface.png}
%DIFDELCMD < \label{fig:prop_surface}
%DIFDELCMD < }
%DIFDELCMD < %%%
\DIFdelendFL \DIFaddbeginFL \subfigure[High-resolution ($r=0.063\textrm{m}$).]{
\centering
\includegraphics[width=0.31\textwidth]{figure/prop/fine.jpg}
\label{fig:prop_fine}
}
\subfigure[Ours + surface-based~\cite{Winchenbach17}.]{
\centering
\includegraphics[width=0.31\textwidth]{figure/prop/union.jpg}
\label{fig:prop_union}
}
\subfigure[Only surface-based.]{
\centering
\includegraphics[width=0.31\textwidth]{figure/prop/surface.jpg}
\label{fig:prop_surface}
}
\DIFaddendFL \vspace{-0.7\baselineskip}
\caption{
A cross-section of the propeller spinning experiment where colour denotes velocity. Adaptive methods use $r_{base} = 0.1$, $\alpha = 32$, $\tau^{max}_{propeller} = 0$. In the zoomed-in areas, our method (b) generates a more detailed vortex compared to (c), closer to the high-resolution result (a).
% Propeller spinning experiment where a propeller rotates in the fluid. A cross-section of the fluid is displayed. Particle colour denotes velocity. Compared to the surface-based method (c), our method (b) generates a vortex (the zoomed-in area) with finer details, which is also more similar to the high-resolution simulation (a).
}
\label{fig:prop}
\end{figure}
\section{Conclusion \DIFaddbegin \DIFadd{and Discussion}\DIFaddend }
\DIFaddbegin \subsection{\DIFadd{Limitations}}
\paragraph{\DIFadd{Visual effects}}
\DIFadd{In the surface-based only SPH adaptive mechanism, the sizes of the particles are always transformed smoothly in space according to a continuous and stable distance. However, our boundary-based adaptive method may encounter the difficulties of particle merging. The divided small particles, as a part of the waves stirred up by the solid boundary, may not have suitable $s$ or $S$ neighbour particles to be merged when falling back to the fluid surface.
}
\begin{figure*}[h]
\centering
\subfigure[Our method without wake flow preservation ($\tau_{box}^{max} = 0$).]{
\begin{overpic}[width=0.155\textwidth]{figure/box/box_schem_bound2.jpg}
\put (19,17) {\footnotesize refine}
\put (60,12) {\footnotesize fluid}
\put (22,29.5) {\footnotesize box}
\end{overpic}
\includegraphics[width=0.27\textwidth]{figure/box/bound1.jpg}
\includegraphics[width=0.27\textwidth]{figure/box/bound4.jpg}
\includegraphics[width=0.27\textwidth]{figure/box/bound5.jpg}
\label{fig:box_bound}
}
\subfigure[Our method with wake flow preservation ($\tau_{box}^{max} = 1$).]{
\begin{overpic}[width=0.155\textwidth]{figure/box/box_schem_mark2.jpg}
\put (19,17) {\footnotesize refine}
\put (40,8.5) {\footnotesize fluid}
\put (22,29.5) {\footnotesize box}
\put (50,17) {\footnotesize wake flow}
\end{overpic}
\includegraphics[width=0.27\textwidth]{figure/box/mark1.jpg}
\includegraphics[width=0.27\textwidth]{figure/box/mark4.jpg}
\includegraphics[width=0.27\textwidth]{figure/box/mark5.jpg}
\label{fig:box_mark}
}
\vspace{-0.7\baselineskip}
\caption{\DIFaddFL{Moving box experiment. In this experiment, a box-shaped boundary object moves close to the fluid surface but does not touch the fluid, causing particle refinement near it but not disturbing it. The leftmost column shows the experimental setup; the other columns show the result. Colour denotes particle size. Our method uses $r_{base} = 0.2$ and $\alpha = 32$. The distance between the box and the fluid surface is $0.1$.}}
\label{fig:fly_box}
\end{figure*}
\DIFadd{As shown in Fig.~\ref{fig:fly_box}, we make a solid box fly over the fluid surface without substantive contact to demonstrate this issue. Only the sizes of the fluid particle will be affected by the signed distance field from the solid object. We carried out this experiment separately with and without the wake flow preservation mechanism. The sizes of the particles are colour-coded as smaller particles have brighter appearances. Here we can see that our wake flow preservation mechanism delays the merging process effectively.
}
\DIFadd{However, we can also observe that when the solid object leaves the fluid, some small particles are left unmerged on the surface. This is because our method only allows the merging procedure to take place between particles of $s$ or $S$ class. When small particles begin to merge, there may be no $s$ or $S$ particles in the range of merging. On the other hand, the surface-based adaptive mechanism naturally guarantees fluid particles near each other obtain similar sizes as it only depends on particles' distances to the fluid surface, so particles of suitable class are easier to be found.
}
\paragraph{\DIFadd{Energy conservation}}
\DIFadd{The particle splitting and merging techniques applied in this paper would also introduce potential energy conservation violations into the simulation. We measured the total energy (including kinetic and gravitational potential energy) for the boat-sailing experiment in Fig.~\ref{fig:ship} and the moving box experiment in Fig.~\ref{fig:fly_box} and drew the statistical diagram in Fig.~\ref{fig:energy_diagram}.
}
\begin{figure*}[h]
\centering
\subfigure[Boat-sailing experiment.]{
\includegraphics[width=0.635\textwidth]{figure/data/ship_energy.jpg}
\label{fig:ship_energy}
}
\subfigure[Moving box experiment.]{
\includegraphics[width=0.3\textwidth]{figure/data/energy_box.jpg}
\label{fig:energy_box}
}
\vspace{-0.7\baselineskip}
\caption{\DIFaddFL{Statistical analysis of energy change (sum of total kinetic and gravitational potential energy) in boat-sailing and moving box experiments with a frame rate of $24$ fps. The energy change with time is expressed with the ratio of the current time's energy to the first frame's.}}
\label{fig:energy_diagram}
\end{figure*}
\DIFadd{In Fig.~\ref{fig:ship_energy}, we can see that for the boat-sailing experiment, both our method and surface enhancement method~\mbox{%DIFAUXCMD
\cite{Winchenbach17} }\hspace{0pt}%DIFAUXCMD
obtain energy higher than both high-resolution and low-resolution simulation results. This manifests in the random spatter of fluid particles during the simulation, indicating the instability issue of the method. This issue is further demonstrated in Fig.~\ref{fig:energy_box}, where, as the chart shows, the violation of energy conservation energy happens during the merging process. The energy cannot remain stable when the solid box starts to cause the fluid to split and merge. Moreover, for the experiment applying wake flow preservation, the period of conserving energy performs worse. Though this instability is relatively small (generally less than $1\text{\textperthousand}$ energy fluctuation), it can generate unexpected artefacts if the simulation scenario is not carefully configured.
}
\subsection{\DIFadd{Summary}}
\DIFaddend We propose a new boundary refinement mechanism for adaptive SPH to refine particles near the \DIFdelbegin \DIFdel{boundary, }\DIFdelend \DIFaddbegin \DIFadd{coupling boundary }\DIFaddend and retain resolution for the flow generated by \DIFdelbegin \DIFdel{boundary objects.
}\DIFdelend \DIFaddbegin \DIFadd{solid objects.
%DIF >
}\DIFaddend Experiments show that, \DIFdelbegin \DIFdel{in contrast to }\DIFdelend \DIFaddbegin \DIFadd{compared to the }\DIFaddend surface-based \DIFdelbegin \DIFdel{refinement}\DIFdelend \DIFaddbegin \DIFadd{only refinement mechanism}\DIFaddend , our method can \DIFdelbegin \DIFdel{not only reduce the time consumption without affecting quality for a scenario where the boundary object is the source of dynamic fluid effects, but also }\DIFdelend \DIFaddbegin \DIFadd{improve the computation efficiency significantly for enhancing fluid details when simulating fluid-solid coupling scenarios.
%DIF >
Further, the proposed method can }\DIFaddend produce more accurate visual \DIFdelbegin \DIFdel{effects when the boundary coupling below the surface influences the results . Our method has the potential to improve the efficiency or visual quality in a large proportion of fluid animation }\DIFdelend \DIFaddbegin \DIFadd{results for underwater coupling scenarios such as propeller spinning.
%DIF >
Therefore, our method can be widely applied to most fluid simulation scenarios to improve efficiency and visual quality }\DIFaddend since many fluid simulations focus on the interaction between fluid and solid.
%DIF >
A limitation of our method is that when a \DIFdelbegin \DIFdel{solitary }\DIFdelend \DIFaddbegin \DIFadd{solid }\DIFaddend particle leaves the refined region due to splashing etc., it would lack merge partners and remain in the unrefined region, causing a small redundancy in particles. \DIFdelbegin \DIFdel{We aim to deal with this limitation in further research}\DIFdelend \DIFaddbegin \DIFadd{Also, the splitting and merging process of our method would cause a potential violation of energy conservation and generate visual artefacts such as unrealistic splashes.
}
\DIFadd{In the future, we will explore a more stable and accurate particle splitting-merging mechanism for adaptive SPH fluid simulation. The critical issue is balancing the particles' sizes close to each other and creating a progressive merging process to avoid a sudden change of local density field}\DIFaddend .
% \begin{figure}
% \centering
% \includegraphics[width=6cm]{figure.jpg}
% \caption{
% Diagrams aid a readers perception of the paper, to correctly convey information.}
% \label{fig:ex}
% \end{figure}
\section*{Acknowledgement}
This research was funded by: Horizon 2020-Marie Skłodowska-Curie Action-Individual Fellowships (No.895941), National \DIFdelbegin \DIFdel{Key Research and Development Program of China (No.2020YFB0704501), National }\DIFdelend Natural Science Foundation of China (No.61873299), Key Research and Development Project of Hainan Province (No.ZDYF2020031).
\nocite{*}% Show all bib entries - both cited and uncited; comment this line to view only cited bib entries;
\bibliography{example}
\section*{Author Biography}
\DIFdelbegin %DIFDELCMD < \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/YanruiXu.jpg}}{\textbf{Yanrui Xu} is a Ph.D. student in Computer Science and Technology at University of Science and Technology Beijing. He received a Master's degree in University of Science and Technology Beijing, in 2020. His research field is computer graphics, especially physically-based fluid simulation.}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/YanruiXu.jpg}}{\textbf{Yanrui Xu} is a PhD student at the School of Intelligence Science and Technology, University of Science and Technology Beijing.
%
He received his Master's degree from the University of Science and Technology Beijing in 2020.
%
His research interests include physical-based simulation and fluid animation.}
\DIFaddend \end{biography}
\vspace{7ex}
\DIFdelbegin %DIFDELCMD < \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/ChongmingSong.JPG}}{\textbf{Chongming Song} is a postgraduate student in Computer Science and Technology at University of Science and Technology Beijing. She received an undergraduate Diploma in University of Science and Technology Beijing, in 2021. Her research field is computer graphics, especially physically-based fluid simulation.}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/ChongmingSong.JPG}}{\textbf{Chongming Song} is a postgraduate student at the School of Intelligence Science and Technology, University of Science and Technology Beijing. She received an undergraduate Diploma in University of Science and Technology Beijing, in 2021. Her research field is computer graphics, especially physically-based fluid simulation.}
\DIFaddend \end{biography}
\vspace{7ex}
\DIFdelbegin %DIFDELCMD < \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/XiaokunWang.jpg}}{\textbf{Xiaokun Wang} is an associate professor in School of Computer and Communication Engineering, University of Science and Technology Beijing, China. He received a Ph.D. degree in Computer Science and Technology from University of Science and Technology Beijing, in 2017. His research interests include computer graphics, virtual reality and human-computer interaction.}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/XiaokunWang.jpg}}{\textbf{Xiaokun Wang} is an associate professor in Intelligence Science and Technology, University of Science and Technology Beijing, China. He received a Ph.D. degree in Computer Science and Technology from the University of Science and Technology Beijing, in 2017. He is currently working at the National Centre for Computer Animation at Bournemouth University funded by the EU's Horizon 2020 Marie Curie Individual Fellowship. His research interests include computer graphics, virtual reality and human-computer interaction.}
\DIFaddend \end{biography}
\vspace{4.15ex}
\DIFdelbegin %DIFDELCMD < \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/XiaojuanBan.png}}{\textbf{Xiaojuan Ban} is a professor in Artificial Intelligence and leader of the Computer Animation Group at University of Science and Technology Beijing, China. She received her master's degree in computer application and Ph.D. degree in control theory and control engineering from the University of Science and Technology Beijing. Her research interests include computer graphics, artificial intelligence, human-computer interaction, big data analysis and 3D visualization.}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{biography}{
\vspace{4ex}
\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/XiaojuanBan.jpg}}{\textbf{Xiaojuan Ban} is a professor at the School of Intelligence Science and Technology, University of Science and Technology Beijing. She is the leader of the Artificial Intelligence and 3D Visualization Group at University of Science and Technology Beijing, China. She received her master's degree in computer application and Ph.D. degree in control theory and control engineering from the University of Science and Technology Beijing. Her research interests include computer graphics, artificial intelligence, human-computer interaction, big data analysis and 3D visualization.}
\DIFaddend \end{biography}
\DIFdelbegin %DIFDELCMD < \vspace{1.3ex}
%DIFDELCMD <
%DIFDELCMD < \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/JiaminWang.jpg}}{\textbf{Jiamin Wang} is a postgraduate student in Computer Science and Technology at University of Science and Technology Beijing. She received an undergraduate Diploma in University of Science and Technology Beijing, in 2021. Her research field is computer graphics, especially physically-based fluid simulation.}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/JiaminWang.jpg}}{\textbf{Jiamin Wang} is a PhD student at the School of Intelligence Science and Technology, University of Science and Technology Beijing. She received an undergraduate Diploma in University of Science and Technology Beijing, in 2021. Her research field is computer graphics, especially physically-based fluid simulation.}
\DIFaddend \end{biography}
\vspace{7ex}
\DIFdelbegin %DIFDELCMD < \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/YalanZhang.jpg}}{\textbf{Yalan Zhang} received her Ph.D. degree in Computer Science and Technology from University of Science and Technology Beijing, China, in 2020. Currently, she is a lecturer at University of Science and Technology Beijing. Her research interests include computer graphics, 3-D visualization and computer vision.}
%DIFDELCMD < %%%
\DIFdelend \DIFaddbegin \begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/YalanZhang.jpg}}{\textbf{Yalan Zhang} received her PhD degree in Computer Science and Technology from University of Science and Technology Beijing, China, in 2020. Currently, she is a lecturer in School of Intelligence Science and Technology, University of Science and Technology Beijing. Her research interests include computer graphics, 3-D visualization and computer vision.}
\DIFaddend \end{biography}
\vspace{7ex}
\begin{biography}{\includegraphics[width=66pt,height=86pt]{VANCOUVER/figure/photos/JianChang.jpg}}{\textbf{Jian Chang} is a professor in computer animation at Bournemouth University, United Kindom. He received his Ph.D. degree in Computer Graphics from Bournemouth University, in 2007. His research interests include physics based modelling (deformation \& fluid), motion synthesis, virtual reality (surgery simulation), and novel HCI (eye tracking, gesture control and haptic).}
\end{biography}
\vspace{5ex}
\end{document}