VISUAL SIMULATION OF MAGNETIC FLUIDS
Tomokazu Ishikawa
1
, Yonghao Yue
1
, Kei Iwasaki
2
, Yoshinori Dobashi
3
and Tomoyuki Nishita
1
1
The University of Tokyo, Tokyo, Japan
2
Wakayama University, Wakayama, Japan
3
Hokkaido University, Sapporo, Japan
Keywords:
Magnetic Fluids, SPH (Smoothed Particle Hydrodynamics) Method, Magnet Simulation, Spiking Phe-
nomenon.
Abstract:
In this paper, we focus on simulation of magnetic fluids. Magnetic fluids behave as both fluids and as magnetic
bodies, and these characteristics allow them to generate ‘spike-like’ shapes along a magnetic field. Magnetic
fluids are popular materials for use in works of art. Our goal is to simulate such works of art. In the field
of electromagnetic hydrodynamics, many methods have also been proposed for simulating such spike shapes
based on numerical fluid analysis. However, those methods are computationally expensive and they typically
require tens of hours just to simulate a single spike. We propose a more efficient method by combining a
procedural approach and the SPH method (smoothed particle hydrodynamics). Our method simulates overall
behaviors of the magnetic fluids using the SPH method and then synthesizes the spike shapes by using the
procedural approach. We demonstrate our method can generate visually plausible results within a reasonable
computational cost.
1 INTRODUCTION
In the field of computer graphics, fluid simulation
is one of the most important research topics. Many
methods have therefore been proposed to simulate re-
alistic motion of fluids by introducing physical laws.
Previous methods have attempted to simulate incom-
pressible fluids, such as smoke, water and flames, as
well as compressible fluids such as explosions and
viscous fluids (Stam, 1999) (Fedkiw et al., 2001)
(Goktekin et al., 2004) (Yngve et al., 2000). In this
paper, we focus on visual simulation of magnetic flu-
ids.
A magnetic fluid is a colloidal solution consisting
of micro-particles of ferromagnetic bodies, a surfac-
tant that covers the magnetic micro-particles, and a
solvent that acts as the base (see Fig.1). Therefore,
magnetic fluids behave as both fluids and as magnetic
bodies and can be magnetized and attracted to a mag-
net. Thanks to the controllability of the shapes of the
magnetic fluids by magnetic forces, magnetic fluids
have been widely used for various products such as
electrical and medical equipments. A more interest-
ing application of the magnetic fluids have appeared
for creating new works of art. When a magnet is loca-
Figure 1: Structure material of magnetic fluid.
ted near a magnetic fluid, the magnetic fluid forms
spiky shapes like horns along the direction of the
magnetic field generated by the magnet (see Fig. 2).
This is known as the ‘spiking phenomenon’. The
art work using the magnetic fluids utilizes this phe-
nomenon and generates interesting shapes by apply-
ing magnetic forces to the fluids.
Magnetic fluids have been studied extensively in
the field of electromagnetic hydrodynamics. The phe-
nomena covered by electromagnetic hydrodynamics
can be further classified into plasma and magnetic flu-
ids. A plasma is an electromagnetic fluid that gen-
erally has charge (i.e. an electric current flows) but
does not haveanydefined interfaces (or free surfaces).
The dynamics of aurora, prominence, and flares in the
319
Ishikawa T., Yue Y., Iwasaki K., Dobashi Y. and Nishita T..
VISUAL SIMULATION OF MAGNETIC FLUIDS.
DOI: 10.5220/0003867303190327
In Proceedings of the International Conference on Computer Graphics Theory and Applications (GRAPP-2012), pages 319-327
ISBN: 978-989-8565-02-0
Copyright
c
2012 SCITEPRESS (Science and Technology Publications, Lda.)
Figure 2: Spiking phenomenon of magnetic fluid (photo-
graph).
sun can be calculated by simulating a plasma. On
the other hand, a magnetic fluid has usually inter-
faces but does not have any charges. We can find a
few researches on the visual simulation of these phe-
nomena in the field of computer graphics. However,
to the best of our knowledge, no methods have been
proposed for simulating the magnetic fluids in the
field of computer graphics. Although we could use
techniques developed in the field of magnetohydro-
dynamics, their computational cost is extremely high
(Yoshikawa et al., 2011). They typically require tens
of hours to simulate a single spike only.
We therefore propose an efficient and visually
plausible method for simulating the spiking phe-
nomenon, aiming at the virtual reproduction of the
art work. Our method combines a procedural ap-
proach and the SPH (smoothed particle hydrodynam-
ics) method. The SPH method is used to compute
overall surfaces of the fluid with a relatively small
number of particles. Then, we generate the spike
shapes procedurally onto the fluid surface. Although
our method is not fully physically-based, it is easy to
implement and we can reproduce spike shapes that are
similar to those observed in the real magnetic fluids.
2 RELATED WORK
Many methods have been proposed to simulate in-
compressible fluids such as smoke and flames (Stam,
1999) (Fedkiw et al., 2001). Goktekin et al. proposed
a simulation method for viscoelastic fluids by incor-
porating an elastic term into the Navier Stokes equa-
tions (Goktekin et al., 2004).
Stam and Fuime introduced the SPH method into
the CG field for representing flames and smoke (Stam
and Fiume, 1995). M¨uller et al. proposed a SPH-
based method based to simulate fluids with free sur-
faces (M¨uller et al., 2003). Recently, many methods
using the SPH method have been proposed, e.g., sim-
ulation of viscoelastic fluids (Clavet et al., 2005), in-
teraction of sand and water (Rungjiratananon et al.,
2008), and fast simulation of ice melting (Iwasaki
magnetic
field
magnetic fluid
(a) (b) (c)
Figure 3: Potentiality of shapes of magnetic fluid. (a), (b)
and (c) show the state with minimum potential energy, min-
imum magnetic energy and minimum surface energy, re-
spectively.
et al., 2010). Our method also uses the SPH method
and to simulate the magnetic fluids.
In computer graphics, no methods have been pro-
posed for simulating electromagnetic hydrodynam-
ics. Although a technique for simulating the mag-
netic field was proposed by Thomaszewski et al
(Thomaszewski et al., 2008), only the magnetism of
rigid bodies is calculated as an influence of mag-
netic fields. Baranoski proposed a visual simulation
method for the aurora by means of simulating the
interaction between electrons and the magnetic field
using particles with an electrical charge (Baranoski
et al., 2003) (Baranoski et al., 2005). However, these
methods do not take into account fluid dynamics.
In the field of physics, the characteristics of mag-
netic fluids have been studied since 1960. Rosenswig
demonstrated spiking phenomena by using quantita-
tive analysis (Rosensweig, 1987). Sudo et al. have
studied the effects of instability, not only in the spik-
ing phenomenon, but also on the surfaces of mag-
netic fluids (Sudo et al., 1987). Han et al. mod-
eled the formation of a chain-shape between colloidal
particles according to the magnetization of the parti-
cles(Han et al., 2010). Combined with a lattice Boltz-
mann method, they showed that the colloidal parti-
cles would form lines along the magnetic field. How-
ever, their method cannot represent the spike shapes.
Yoshikawa et al. combined the MPS (Moving particle
Semi-implicit) method with the FEM (Finite Element
Method) and simulated magnetic uids. Even when
using 100,000 particles and a mesh with 250,000
tetrahedra, they were able to reproduce only a single
spike (Yoshikawa et al., 2011).
3 SPIKING PHENOMENON
Before explaining our simulation approach, we will
describe the mechanism about the formation of the
spike shape (Rosensweig, 1987). There are three im-
portant potential energies E
g
, E
mag
and E
s
that relate
GRAPP 2012 - International Conference on Computer Graphics Theory and Applications
320
to the formation mechanism.
E
g
is the potential energy of gravity. If only the
gravity is applied as an external force to the magnetic
fluid, the fluid will form a horizontal surface at a con-
stant height, as shown in Fig. 3 (a), since E
g
is at
the minimum level under this condition. E
mag
is the
magnetic potential energy. If only the magnetic force
is applied as an external force, the fluid will form a
certain number of spheroids that stand at the bottom
of the vessel, as shown in Fig. 3 (b). E
mag
is at a
minimum level under these conditions. E
s
is the sur-
face energy. If the surface tension alone is applied as
the external force, the fluid will form into a spherical
shape, as shown in Fig. 3 (c). E
s
is at the minimum
level under these conditions. The actual shape is the
one that minimizes the summation of these three en-
ergies, resulting in spike-like shapes, as shown in Fig.
2.
Therefore, in order to simulate the spiking phe-
nomena, the three forces need to be taken into ac-
count: the gravity, magnetic forces, and the surface
tension. At the early stages of this research, we tried
to simulate the spiking phenomenon by using the SPH
method only. However, it turned out that we could
not reproduce the spikes unless we used a significant
number of particles, resulting in a very long compu-
tation time. Thus, we use the SPH method to simu-
late the overall behavior of the fluids and develop a
new procedural method to generate the spike shapes.
Details of our method is described in the following
sections.
4 OUR SIMULATION METHOD
As we described before, our method combines the
SPH method and a procedural approach. In this sec-
tion, we first describe the governing equations of
the magnetic fluid that are solved by using the SPH
method (Section 4.1). Next, we describe the computa-
tion of the magnetic force applied to each particle and
a technique for generating the fluid surface by using
the result of the SPH simulation (Section 4.2). Then,
we describe the procedural method for computing the
spike shape (Section 4.3).
4.1 Governing Equations
The behavior of incompressible fluids is described by
the following equations.
·u = 0, (1)
u
t
= (u·)u
1
ρ
p+ ν∇
2
u+ F. (2)
Equation (1) is the continuity equation, and Navier-
Stokes equation (Equation (2)) describes the conser-
vation of momentum. u is the velocity vector, t is
time, ρ is the fluid density, p is the pressure and ν is
the kinematic viscosity coefficient. F is the external
force that includes the gravity, the magnetic force, and
the surface tension (Iwasaki et al., 2010).
Our method solves the above equations by using
the SPH method. That is, the magnetic fluids are rep-
resented by a set of particles and the motion of the
fluids is simulated by calculating the motions of the
particles. For this calculation, we use the method de-
veloped by Iwasaki et al (Iwasaki et al., 2010). This
method is significantly accelerated by using the GPU
and is capable of simulating water. We extend the
method to the simulation of magnetic fluids. The dif-
ference of magnetic fluids from the non-magnetic flu-
ids is that the magnetic force is induced when mag-
netic field exists. The computation of the magnetic
force is described in the next subsection.
4.2 Calculation of Magnetization and
Magnetic Force
Each particle represents a small magnetic fluid ele-
ment, and its motion is calculated by taking into ac-
count the properties of both fluid and magnetic body.
To calculate the magnetic force, our method assumes
the paramagnetism, that is, each particle does not have
any magnetic charges if there is no external magnetic
field. However, if a magnetic field is applied, each
particle becomes magnetized in the direction along
the applied magnetic field. In this paper, we assume
that the magnetic field is induced by a bar magnet
placed near the fluid. In order to handle a magnet with
an arbitrary shape, we can use the method developed
by Thomaszewski et al (Thomaszewski et al., 2008).
The magnetic field is calculated by approximating
the bar magnet as a magnetic dipole. We assume that
the north and south poles of the magnetic bar have an
equal magnitude of magnetic charge but the signs are
different (positive or negative). When computing the
magnetic force working on each particle, it is not suf-
ficient to calculate only the force induced directly by
the magnetic bar. This is due to the paramagnetism.
When each particle is placed in the magnetic field of
the magnetic bar,the particle is magnetized and works
as if it were a small spherical magnet. Therefore, our
method first computes the magnetic field at equilib-
rium state, taking into account the magnetization of
the particles. After that, the magnetic force for each
particle is calculated. The details are described in the
following.
The magnetic moment m due to a magnetic dipole
VISUAL SIMULATION OF MAGNETIC FLUIDS
321
㻿
bar magnet
SPH particle
r
i
㻿
1
m
2
m
d
㻿
(a) (b)
distance between
the poles
position
vector
magnetic
vector
H(r
i
)
magnetic field lines
magnetic field lines
due to magnetized particle
Figure 4: Calculation of the magnetization and the magnetic force. (a) First, we calculate the magnetic field vector at each
SPH particle induced by a magnetic dipole. (b) Next, we calculate the influence of other particles from the magnetized
particles.
Figure 5: Photograph of a real magnetic fluid surface.
Figure 6: The surface computed using Equation (13).
is defined by the following equation:
m = q
m
d, (3)
where q
m
is the magnitude of the magnetic charge and
d is a vector connecting from the south to north poles.
We call the magnetic vector induced by the magnetic
bar as a background magnetic vector. Let us assume
that the origin is at the midpoint between the north
and the south poles. Then, the background magnetic
vector H
dipole
(r) at position r is expressed by the fol-
lowing equation.
H
dipole
(r) =
1
4πµ
m·r
r
3
, (4)
where µ is the permeability of the magnetic fluid and
r =
r
. Each particle is magnetized due to the back-
ground magnetic vector field and induces an addi-
tional magnetic vector field. Thus, in order to obtain
the final magnetic vector H(r
j
) at particle j, the mag-
netic interactions between particles have to be com-
puted by solving the following equation,
H(r
j
) = H
dipole
(r
j
)
V
4πµ
N
i=1
i6= j
χH(r
i
) ·r
ij
r
3
ij
, (5)
where V is the volume of a particle and we assume
that the volume of all particles are equal, r
i
is the po-
sition of particle i, N is the total number of particles, χ
is the magnetic susceptibility. r
ij
= r
j
r
i
, and r
ij
= |
r
j
r
i
|. The magnetic susceptibility changes due to
the external magnetic field. It is known that the mag-
netization of the magnetic fluids is saturated when the
magnitude of an external magnetic field is larger. We
calculate the magnetization in all particles based on
the actual relationship between the magnetization and
an external magnetic field in (Yoshikawa et al., 2011).
The gradient part of the second term in Equation (5)
is calculated by the following equation,
χH(r
i
) ·r
ij
r
3
ij
= (χH(r
i
)) ·
r
ij
r
3
ij
+ χH(r
i
) ·(
r
ij
r
3
ij
).
(6)
We use the kernel function to calculate the partial dif-
ferential of H (r
i
), that is,
(χH(r
i
)) =
N
j=1
j6=i
m
j
ρ
j
χH(r
j
)w(r
ij
), (7)
where w(r
ij
) is the kernel function. We use the fol-
lowing kernel function frequently refered in the SPH
method (M¨uller et al., 2003),
w(r) =
315
64πh
9
(h
2
r
2
)
3
0 r h
0 h < r,
(8)
where h is the effective radius of each particle. We
calculate Equation (5) taking into account the influ-
ences from all the particles. We use the Gauss-Seidel
method to solve Equation (5).
GRAPP 2012 - International Conference on Computer Graphics Theory and Applications
322
Next, the magnetic force F
mag
(r
i
) is calculated by
using the following equation (Rosensweig, 1987),
F
mag
(r
i
) = ∇φ
i
(r
i
), (9)
where,
φ
i
=
µ | H(r
i
) |
2
2
. (10)
∇φ
i
in Equation (9) is calculated by using the kernel
function represented by Equation (8), that is,
∇φ
i
=
j
m
j
φ
j
ρ
j
w(r
ij
). (11)
4.3 Computing Spike Shapes
The formation of the small spike shapes on the
magnetic fluid surface can be explained by the bal-
ance among the forces of the surface tension, grav-
ity and the stress due to magnetization (Rosensweig,
1987)DAs we described before, our method synthe-
sizes the spike shapes by employing the procedural
approach. The basic idea is as follows. We prepare a
procedural height field representing the spike shapes
generated on a flat surface. Next, during the simula-
tion, the height field is mapped onto the curved sur-
face calculated by using the SPH particles. When the
fluid surface is flat and a magnetic field is perpendic-
ular to the flat surface, the spike shapes can be rep-
resented as a height field z(x, y) expressed by the fol-
lowing equation (see 7 for derivation).
z(x, y) =
C
0
(sink
1
x+C
1
cosk
1
x)(sink
2
y+C
2
cosk
2
y),
(12)
where C
i
(i = 0, 1, 2), k
1
and k
2
are parameters con-
trolling the spike shapes. There is a constraint on k
1
and k
2
: these need to be integers that satisfy k
2
1
+ k
2
2
is the same for possible combinations of k
2
1
and k
2
2
. Σ
means the sum of the possible combinations. For the
real magnetic fluids, a regular hexagonal pattern is of-
ten observed (see Fig. 5). Therefore, we choose the
constants in Equation (12) so that such a pattern can
be reproduced:
z(x, y) = C
0
(cos
k
2
(
3x+ y) + cos
k
2
(
3xy) + cosky).
(13)
The above equation is used for the procedural height
field representing the spike shapes on a flat surface.
We set k to 50. Fig. 6 shows an example of the spike
shapes synthesized by using Equation (13). Com-
pared to Fig. 5, we can see that the synthesized shape
is very similar to the real spike shapes. The size of
the spike is controlled by adjusting C
0
. We simply as-
sume that C
0
is proportional to the magnitude of the
magnetic field.
C
0
= β | H(x) |, (14)
where, β is the proportional coefficient, | H(x) | is the
magnitude of the magnetic field at position x.
In the real world, the following three structural
features are observed: 1) positions of the spikes are
symmetric as shown in Fig. 5, 2) distances between
neighboring spikes become shorter when the mag-
netic force becomes stronger, and 3) the spikes are
formed along the direction of the magnetic field lines.
We develop a mapping method so that these three fea-
tures are reproduced.
First, we set the intersection between the extended
line connecting a magnetic dipole and the fluid sur-
face to the origin of the texture coordinate defined by
xy in Equation (13). This is because the magnetic field
created from one magnet becomes symmetrical field
with respect to a point centering on magnet. We trace
six directions from the origin of the texture coordi-
nates and calculate the mapping coordinates of the
vertices of the spike because the height field repro-
duced by Equation (13) has three axes of symmetry
(see Fig. 7 (a)). Let x
0
be the position of the top of
the spike just above the magnet. For each direction of
six tangent vectors align to the three axes, the posi-
tion of n-th spike x
n
from the origin is calculated by
the following equation,
x
n
= x
n1
+ l(H(x
0
))d
n1
, (15)
where l is a function representing the distance be-
tween the tops of n 1-th and n-th spikes and it is
determined by H(x
0
). d
n1
is the tangent vector on
the fluid surface at the mapping coordinate s
n1
. Ex-
perimentally, we used l =
α
|H(x
0
)|
, where α = 0.15.
To represent the characteristics that the spikes
grow along the direction of the magnetic field lines,
we calculate the magnetic field vector at x
1
, and we
calculate the intersection between the fluid surface
and the magnetic field vector. The intersection point
is the mapping coordinate s
1
. By repeatedly apply-
ing this operation to a mapping area, we calculate the
mapping coordinates.
The positions of the tops of the spikes between
two adjacent symmetry axes (red points in Fig. 7 (c))
are calculated by interpolating the positions of two n-
th spikes (yellow points in Fig. 7 (c)).
The mapping area is determined by using the par-
ticles whose magnitudes of the magnetizations are
greater than a threshold. The magnitude of magne-
tization is calculated by the balanced equation (Equa-
tion (26)) for simple spike shapes in equilibrium (see
7). We use the minimum value of the magnetization
M
c
as the threshold. M
c
is calculated by the following
equation,
VISUAL SIMULATION OF MAGNETIC FLUIDS
323
magnetic field vector
tangent vector
mapping coordinate
( )
1
H x
spike coordinate
( )
1 1 1
a
= +
s x H x
0
d
fluid surface
1
s
㻿
mapping coordinate
0
s
( )
( )
0 0 0 1
l+ =x H x d x
texture
coordinate
simulation
coordinate
interpolation point
axis of symmetry
(a)
(b)(c)
Figure 7: (a) Spike texture coordinates are used as the height eld. (b) To calculate the coordinates of the spike vertices, we
trace along the fluid surface. (c) The coordinates other than an axis of symmetry are calculated by interpolation.
x
y
z
SPH particles
representing
magnetic fluid
change of the fluid
surface influenced by
the magnetic field
(a) (b)
magnet
Figure 8: The simulation space of our method. (a) The mag-
netic fluids, which are represented by a set of SPH particles,
are stored in a cubic container. (b) The magnet is located
underneath the container. Then the motions of the magnet
fluids are simulated by moving the magnet.
M
2
c
=
2
µ
(1+
1
γ
)
p
(ρ
1
ρ
2
)gκ, (16)
where ρ
1
and ρ
2
are the density of the magnetic fluid
and air, respectively. κ is the magnitude of the surface
tension.
5 RENDERING
The surfaces of the magnetic fluids are extracted by
using the method proposed by Yu et al. (Yu and Turk,
2010). Since the magnetic fluids are colloid fluids, the
transmitted light in the magnetic fluids is scattered.
However, since the colors of the magnetic fluids are
black or brown in general, the albedo of magnetic flu-
ids is very small. Thus, the light scattering effects in-
side the magnetic fluids are negligible. Therefore, our
method ignores the light scattering inside the mag-
netic fluids. We used POV-Ray to render the surfaces.
6 RESULTS
For the simulation of our method, we used CUDA
for the SPH method and the calculation of the mag-
netic force at each SPH particle. The number of par-
ticles used in the simulation shown in Figs. 9 and
10 is 40,960. The average computation time of the
simulation for a single time-step is 6 milliseconds
on a PC with an Intel(R) Core(TM)2 Duo 3.33GHz
CPU, 3.25GB RAM and an NVIDIA GeForce GTX
480 GPU. The parameters used in the simulation are
shown in Table 1. The average computation time of
the surface construction for a frame is 2 minutes on
the same PC. The initial fluid surface is shown in Fig.
8 (a). The fluid is contained in a box, which is not
shown. Fig. 8 (b) shows how the shape of the fluid
surface changes when a magnet approaches the bot-
tom of the box. Fig. 9 shows an animation sequence
of the magnetic fluid when we move the magnet in
the vertical direction. As shown in Fig. 9, the spikes
grow and increase when the magnet moves closer to
the magnetic fluids. Fig. 10 shows an animation se-
quence of the magnetic fluid when we eliminate the
magnet field. The surface becomes flat as we decrease
the magnitude of the magnetic field. These results
demonstrate that our method can simulate the para-
magnetic property of magnetic fluids. Fig.9 shows
an animation of magnetic fluids with the movement
of a magnet. As shown in Fig.9, the spikes grow
and increase when we move the magnet closer to the
magnetic fluids. These results demonstrate that our
method can simulate the paramagnetic property of
magnetic fluids. Fig. 11 shows an example where we
use two magnets. Compared to the case when using
only a single magnet, the directions of the spikes get
GRAPP 2012 - International Conference on Computer Graphics Theory and Applications
324
(a) t = 1.6 sec. (b) t = 3.2 sec. (c) t = 4.8 sec.
(d) Enlarged view of (c).
Figure 9: Formation of spikes in the magnetic fluids. Spike shapes grow as the magnet approaches the bottom of the magnetic
fluids.
(a) t = 5.2 sec. (b) t = 6.8 sec. (c) t = 8.4 sec. (d) t = 10.0 sec.
Figure 10: Magnet fluids act as fluids when the magnetic field is reduced.
(a) t = 5.2 sec. (b) t = 6.8 sec. (c) t = 8.4 sec.
(d) Using only a single
magnet.
Figure 11: (a) to (c) show the results of the magnet fluids and the spikes by setting two magnets under the magnetic fluids. (d)
shows the simulation result of the spikes using a single magnet for comparison. Compared with (d), the spikes closer to the
other magnet get mush distorted in (a) to (c), the spikes which are closer to the other magnet get much distorted.
Table 1: Parameter setting of magnetic fluid simulation.
param. meaning value
dt time step 0.00075
ν kinematic viscosity coefficient 0.12
m particle mass 0.016
R particle radius 0.5
h effective radius 1.3
g gravitational acceleration 9.8
k coefficient of surface tension 7.5
q
m
magnitude of the magnetic charge 5.0
µ permeability of the magnetic fluid 4 π × 10
7
χ magnetic susceptibility 0.01
changed according to the change in the magnetic field
due to the other magnet.
7 CONCLUSIONS AND FUTURE
WORK
We have proposed a visual simulation method for
magnetic fluids whose shapes change according to
the magnetic field. We compute the spike shapes us-
ing a procedural approach, and map the shapes onto
the fluid surface. Our method demonstrates that the
magnitude of the magnet field influences the shapes
of the magnet fluids and the magnet fluids act as flu-
ids when the magnet field is eliminated. There are
three limitations for our method. First, the conserva-
tion of the fluid volume is not considered when map-
ping the spike shapes onto the fluid surface. Second,
our method cannot handle the fusion of more than one
spike shapes, while we can observe such a fusion in
real magnetic fluids. Third, our method does not sim-
ulate the flows of spikes along the velocity and vortic-
ity of the magnetic fluid, since the function used for
representing the spike shapes is not changed by the
fluid behavior.
In future work, we would like to calculate the
spike pattern other than regular hexagonal pattern dy-
namically using Equation (12) and represent the other
spike shape arrangement. Moreover, to apply our
method to works of art, we would like to control the
magnetic field by using electric current flows.
VISUAL SIMULATION OF MAGNETIC FLUIDS
325
REFERENCES
Baranoski, G., Rokne, J., Shirley, P., Trondsen, T., and Bas-
tos, R. (2003). Simulation the aurora. Visualization
and Computer Animation, 14(1):43–59.
Baranoski, G., Wan, J., Rokne, J., and Bell, I. (2005). Sim-
ulating the dynamics of auroral phenomena. ACM
Transactions on Graphics (TOG), 24(1):37–59.
Clavet, S., Beaudoin, P., and Poulin, P. (2005). Particle-
based viscoelastic fluid simulation. In Proceedings of
the 2005 ACM SIGGRAPH/Eurographics symposium
on Computer animation, pages 219–228. ACM, ACM.
Cowley, M. D. and Rosensweig, R. E. (1967). The interfa-
cial stability of a ferromagnetic fluid. Journal of Fluid
Mechanics, 30(4):671–688.
Fedkiw, R., Stam, J., and Jensen, H. W. (2001). Visual sim-
ulation of smoke. In Proceedings of SIGGRAPH 2001,
Computer Graphics Proceedings, Annual Conference
Series, pages 15–22. ACM, ACM Press / ACM SIG-
GRAPH.
Goktekin, T. G., Bargteil, A. W., and OfBrien, J. F. (2004).
A method for animating viscoelastic fluids. In Pro-
ceedings of SIGGRAPH 2004, Computer Graphics
Proceedings, Annual Conference Series, pages 463–
468. ACM, ACM Press / ACM SIGGRAPH.
Han, K., Feng, Y. T., and Owen, D. R. J. (2010). Three-
dimensional modelling and simulation of magnetorhe-
ological fluids. International Journal for Numerical
Methods in Engineering, 84(11):1273–1302.
Iwasaki, K., Uchida, H., Dobashi, Y., and Nishita, T. (2010).
Fast particle-based visual simulation of ice melting.
Computer Graphics Forum (Pacific Graphics 2010),
29(7):2215–2223.
M¨uller, M., Charypar, D., and Gross, M. (2003).
Particle-based uid simulation for interactive appli-
cations. In Proceedings of the 2003 ACM SIG-
GRAPH/Eurographics symposium on Computer ani-
mation, pages 154–159. ACM, ACM.
Rosensweig, R. (1987). Magnetic fluids. Annual Review of
Fluid Mechanics, 19:437–461.
Rungjiratananon, W., Szego, Z., Kanamori, Y., and Nishita,
T. (2008). Real-time animation of sand-water inter-
action. Computer Graphics Forum (Pacific Graphics
2008), 27(7):1887–1893.
Stam, J. (1999). Stable fluids. In Proceedings of SIG-
GRAPH 1999, Computer Graphics Proceedings, An-
nual Conference Series, pages 121–128. ACM, ACM
Press / ACM SIGGRAPH.
Stam, J. and Fiume, E. (1995). Depicting fire and other
gaseous phenomena using diffusion processes. In
Proceedings of SIGGRAPH 1995, Computer Graphics
Proceedings, Annual Conference Series, pages 129–
136. ACM, ACM Press / ACM SIGGRAPH.
Sudo, S., Hashimoto, H., Ikeda, A., and Katagiri, K. (1987).
Some studies of magnetic liquid sloshing. Journal of
Magnetism and Magnetic Materials, 65(2):219–222.
Thomaszewski, B., Gumann, A., Pabst, S., and Strasser, W.
(2008). Magnets in motion. In Proceedings of SIG-
GRAPH Asia 2008, Computer Graphics Proceedings,
Annual Conference Series, pages 162:1–162:9. ACM,
ACM Press / ACM SIGGRAPH Asia.
Yngve, G. D., O’Brien, J. F., and Hodgins, J. K. (2000).
Animating explosions. In Proceedings of SIGGRAPH
2000, Computer Graphics Proceedings, Annual Con-
ference Series, pages 29–36. ACM, ACM Press /
ACM SIGGRAPH.
Yoshikawa, G., Hirata, K., Miyasaka, F., and Okaue, Y.
(2011). Numerical analysis of transitional behavior
of ferrofluid employing mps method and fem. Mag-
netics, IEEE Transactions on, 47(5):1370–1373.
Yu, J. and Turk, G. (2010). Reconstructing surfaces of
particle-based uids using anisotropic kernels. In Pro-
ceedings of the 2010 ACM SIGGRAPH/Eurographics
Symposium on Computer Animation, pages 217–225.
ACM, Eurographics Association.
APPENDIX A
Surface Deformation of Magnetic Fluid. In this
appendix, we consider the case where the liquid sur-
face is initially horizontal (the surface is equal to
the xy-plane as shown in Fig. 12) (Cowley and
Rosensweig, 1967). We apply a vertical magnetic
field (in z direction) and calculate how the liquid sur-
face changes according to the magnetic field. We
show that we can obtain Equation (12) for describing
the surface displacement according to the magnetic
field. The variables of the density and magnetic field
are defined as shown in Fig 12. When the liquid sur-
face is slightly deformed (Fig. 13), the variation of the
magnetic flux density inside the magnetic fluid, b
1
=
B B
0
, and the variation of the magnetic field, h
1
=
H H
01
have the following relationship:
b
1
= (µh
1x
, µh
1y
, ˆµh
1z
), (17)
where the magnetic flux density and the magnetic
field are parallel. µ is the permeability, ˆµ is the dif-
ferential permeability, h
1x
, h
1y
, h
1z
show the x, y and
z components of h
1
, since the magnetic flux density
and the magnetic field are parallel. By letting the
magnetic potential inside the magnetic fluid be φ
1
the
magnetic field h
1
in case of no electric current can be
expressed as:
h
1
= ∇φ
1
. (18)
If the electric current is flowing, the magnetic field
due to electric currents must be considered and the
potential term becomes complicate. By using the fol-
lowing equation,
H = ·B, (19)
the divergence of the variation of the magnetic flux
density can be rewritten as:
·b
1
= µ
2
φ
1
x
2
+
2
φ
1
y
2
+ ˆµ
2
φ
1
z
2
. (20)
GRAPP 2012 - International Conference on Computer Graphics Theory and Applications
326
x
z
Magnetic fluid
Air
density
density
magnetic field H gravity g
magnetic field H magnetic field M
01 01
02
O
ρ
1
2
ρ
(> )
2
ρ
Figure 12: Horizontal interfacial boundary and vertical
magnetic field. Each character equation of the fluid set as in
the figure.
Figure 13: Deformation of the interfacial boundary by ap-
plied vertical magnetic field.
On the other hand, the magnetic field potential φ
2
above the magnetic fluid satisfies the following equa-
tion:
2
φ
2
x
2
+
2
φ
2
y
2
+
2
φ
2
z
2
= 0. (21)
Moreover, φ
1
= 0 (z ) and φ
2
= 0 (z
) can be used as boundary conditions because each
magnetic field is not affected by the deformation of
the interfacial boundary at z ± . Due to the condi-
tion that the tangential component of magnetic field
H is equal on both sides of the liquid surface, and the
surface normal component of magnetic flux density B
has the same value on both sides of the interface, the
following equation is satisfied on the deformed liquid
surface.
φ
1
φ
2
= M
01
z(x, y)
ˆµ
∂φ
1
z
µ
0
∂φ
2
z
= 0,
(22)
where, M
01
= |M
01
|, z(x, y) is the height field of the
deformed liquid surface. Then, the following equa-
tions satisfy Equation (20), (21) and (22) and the
boundary condition.
φ
1
=
M
01
1+ γ
z(x, y)exp
k
s
ˆµ
µ
z
!
, (23)
φ
2
=
γM
01
1+ γ
z(x, y)exp(kz), (24)
where, γ =
q
ˆµµ
µ
2
0
and z(x, y) must satisfy the following
equation:
2
x
2
+
2
y
2
+ k
2
z(x, y) = 0, (25)
The general solution of this equation is the one
shown in Equation (12).
APPENDIX B
Equilibrium of Force inside Spike Shape. In this
appendix, we explain that the minimum value of the
magnetization is represented as Equation (16) when
the magnetic fluid forms a spike shape. Considering
the balance between the surface tension and the dif-
ference in the stress on both sides of the liquid sur-
face, the equilibrium equation of forces at the liquid
surface can be represented by the following equation
when the spike is formed.
(T
zz
n
z
)
1
(T
zz
n
z
)
2
α
2
x
2
+
2
y
2
z = 0, (26)
where T
zz
is the normal stress in z direction and n
z
is
the normal vector of z-axis. In the air and the mag-
netic fluid, T
zz
can be written as follows, considering
the magnetic pressure.
(T
zz
n
z
)
1
= p
1
+
1
2
(B
0
H
01
+ H
01
b
1z
+ B
0
h
1z
)
(T
zz
n
z
)
2
= p
2
+
1
2
(B
0
H
02
+ H
02
b
2z
+ B
0
h
2z
).
(27)
Substituting the following equation of pressure
distribution in Equation (26),
p
1
= ρ
1
gz+
1
2
(B
0
h
1z
H
01
b
1z
)
p
2
= ρ
2
gz+
1
2
(B
0
h
2z
H
02
b
2z
),
(28)
the following equation can be derived considering
Equation (22) and (25),
(ρ
1
ρ
2
)g
γ
1+ γ
0
M
2
01
+ αk
2
z(x, y) = const.
(29)
Because z is not zero when the spike is deformed,
Equation (29) holds only when the constant on the
right side and the term in parentheses on the left side
are zero.That is,
M
2
01
=
1+ γ
µ
0
γ
n
(ρ
1
ρ
2
)
g
k
+ αk
o
. (30)
If the magnetization of magnetic fluid is less than
Equation (30), the liquid surface does not change.
When k =
q
(ρ
1
ρ
2
)g
α
, the right hand side of equation
is minimum. The minimum value is shown in Equa-
tion (16).
VISUAL SIMULATION OF MAGNETIC FLUIDS
327