Sie sind auf Seite 1von 23

1

Pamaker 2.2.1

A colloldal sLablllLy LoolklL




May 2013

ull Aschauer
LaboraLolre de Lechnologle des poudres
Lcole polyLechnlque federale de Lausanne
Lausanne, SwlLzerland
MaLerlals 1heory
L1P Zurlch
Zurlch, SwlLzerland
2
!"#$% '( )'*+%*+,
lnLroducLlon .................................................................................................................................................. 3
Pow Lo clLe .................................................................................................................................................... 3
1he lnLerface ................................................................................................................................................. 3
Menus ....................................................................................................................................................... 4
uouble cllck flles Lo open ...................................................................................................................... 4
ConLrolllng Lhe ploL ................................................................................................................................... 3
1he ploL pane ............................................................................................................................................ 3
CreaLlng and modlfylng serles ................................................................................................................... 6
1heoreLlcal background ................................................................................................................................ 9
lnLeracLlon calculaLlons ............................................................................................................................. 9
SLablllLy evaluaLlon .................................................................................................................................... 9
1he bullL-ln models ..................................................................................................................................... 11
ulsperslon (vdW) ..................................................................................................................................... 11
Pamaker .............................................................................................................................................. 11
Cregory ............................................................................................................................................... 11
vlncenL ................................................................................................................................................ 11
LffecLlve .............................................................................................................................................. 12
LlecLrosLaLlc ............................................................................................................................................ 12
PPl ...................................................................................................................................................... 12
LSA ....................................................................................................................................................... 12
SLerlc ....................................................................................................................................................... 13
8ergsLrom ........................................................................................................................................... 13
WrlLlng plug-ln models ................................................................................................................................ 14
SeLup your envlronmenL ......................................................................................................................... 14
lmplemenL Lhe lnLeracLlon funcLlons ...................................................................................................... 14
Complle Lhe plugln .................................................................................................................................. 17
ConLacL ........................................................................................................................................................ 19
Annex .......................................................................................................................................................... 20
Annex 1: Lxcel daLa formaL ..................................................................................................................... 20
Annex 2: Al deflnlLlon ............................................................................................................................ 21
hamaker2.Serle ................................................................................................................................... 21
hamaker2.arLlcle ............................................................................................................................... 21
hamaker2.Medlum .............................................................................................................................. 21
verslon hlsLory ............................................................................................................................................ 22
verslon 2.0.0 ........................................................................................................................................... 22
verslon 2.1.0 ........................................................................................................................................... 22
verslon 2.2.0 ........................................................................................................................................... 22
verslon 2.2.1 ........................................................................................................................................... 22
8eferences .................................................................................................................................................. 23

3
-*+.'/01+2'*
Pamaker 2.2 ls a program for Lhe predlcLlon of Lhe colloldal sLablllLy of suspenslons. lL allows Lhe sLudy of
lnLeracLlon beLween dlsslmllar parLlcles as a funcLlon of any varlable of Lhe colloldal sysLem, Lherefore
enabllng sclenLlsLs and englneers Lo undersLand whaL aspecLs conLrol Lhe sLablllLy (or lnsLablllLy) of Lhelr
sysLems and how Lo achleve Lhe requlred degree of sLablllLy.
3'4 +' 12+%
When publlshlng resulLs obLalned uslng Lhe Pamaker sofLware package, please clLe Lhe followlng
reference:
u. Aschauer, C. 8urgos-MonLes, 8. Moreno, . 8owen, !ournal of ulsperslon Sclence and 1echnology,
32(4), 470-479 !"#$$%&
!5% 2*+%.("1%
AfLer double cllcklng Lhe Pamaker2" appllcaLlon, you wlll see Lhe maln wlndow. 1he Pamaker 2.0
wlndow ls dlvlded lnLo Lhree maln parLs (llgure 1). ln Lhe LopmosL parL one conLrols Lhe ploL dlsplay and
axes. 8elow follows Lhe ploLLlng pane where Lhe graphlcs are dlsplayed (and manlpulaLed for Lhe 3u
case). 1he boLLom mosL parL flnally allows Lo conLrol Lhe dlfferenL serles Lo dlsplay. ConLrary Lo Pamaker
1.x lL ls now posslble Lo conLrol all aspecLs of Lhe sysLem for each of Lhe serles.

'()*+, $. /0, 12324,+ "&# 32(5 6(5786
4
6%*0,
lor Lhe momenL Pamaker 2.0 ls mosLly conLrolled Lrough elemenLs ln Lhe maln wlndow and conLalns
only one menu wlLh Lhe mosL essenLlal lLems (llgure 2).

'()*+, ". /0, 9'(:,9 3,5*
!"#$%" allows reopenlng a prevlously saved .ham2" flle. 1he same can also be achleved by
double cllcklng a .ham2" flle (see below).
&'(#" wlll save Lhe currenLly open flle Lo dlsk. lf no locaLlon has been speclfled (by prevlously
savlng Lo dlsk or openlng from dlsk), a prompL for Lhe locaLlon wlll appear.
&'(# '*%" wlll save Lhe currenLly open flle Lo dlsk as well, however Lhe locaLlon prompL wlll
appear ln any case, allowlng Lo save Lo a dlfferenL locaLlon (l.e. prevenLlng a prevlous verslon of
Lhe flle from belng overwrlLLen).
+,"-./" wlll save Lhe flle ln a dlfferenL formaL, readable by anoLher appllcaLlon. 1he followlng
cholces are avallable:
o +,0#1": Saves Lhe daLa ln a Lab separaLed LexL formaL, whlch can be read uslng MlcrosofL
Lxcel. 1he daLa formaL can be found ln Lhe annex.
234/" wlll LermlnaLe Pamaker 2.0. ln case Lhere are unsaved changed you wlll be prompLed Lo
save your documenL.
7'0#$% 1$218 (2$%, +' '9%*
ln order Lo open .ham2" flles by double cllcklng Lhem, Lhe .ham2" flle Lype has Lo be assoclaLed wlLh
Lhe Pamaker2" appllcaLlon. 1hls sLep ls operaLlng sysLem dependenL.
Cn MlcrosofL Wlndows: 8lghL cllck Lhe .ham2" flle and choose Cpen wlLh." from Lhe popup
menu. 1hen browse for Lhe Pamaker2.exe appllcaLlon on your hard drlve and selecL Lhe Always
use Lhe selecLed program Lo open Lhls klnd of flle" checkbox.
Cn Mac CS x: 8lghL cllck Lhe .ham2" flle and choose CeL lnfo". under Cpen WlLh:" selecL
CLher" Lhen browse Lo Lhe Pamaker2.app appllcaLlon on your hard drlve and Lhen cllck Lhe
Change All." buLLon.
Cn Llnux: Wlndow sysLem dependenL. lease consulL your sysLems manual for deLalls.
now you can open .ham2" flles by double cllcklng Lhe flle.
3
)'*+.'$$2*: +5% 9$'+
1he ploL appearance can be conLrolled ln Lhe followlng panel (llgure 3).

'()*+, ;. /0, <:8= >85=+8: <25,:
1he followlng opLlons are avallable:
51-/ /6"#":
o 78": ploLs Lhe lnLeracLlon poLenLlal as a funcLlon of a slngle varlable (speclfled uslng Lhe
pull-down menu varlable 1", see below).
o 98": ploLs Lhe lnLeracLlon poLenLlal as a funcLlon of Lwo varlables (speclfled by Lhe Lwo
pull-down menus varlable 1" and varlable 2" respecLlvely) as a surface.
o 5-/#$/4'1": ploLs Lhe lnLeracLlon poLenLlal on Lhe y-axls (normallzed by k1)
o :-.0#": ploLs Lhe force (flrsL derlvaLlve of Lhe poLenLlal wlLh respecL Lo separaLlon) on
Lhe y-axls (normallzed by k1/nm)
;'.4'<1# =": 1he (prlmary) ploL varlable. ln case of a 2u ploL Lhe lnLeracLlon poLenLlal wlll be
ploLLed as a funcLlon of Lhls varlable. ln case of a 3u ploL Lhls varlable wlll be Lhe flrsL coordlnaLe
axls.
o >'$?#": glves Lhe range of Lhe flrsL varlable, whlch wlll be calculaLed.
;'.4'<1# 7": 1he secondary ploL varlable. Cnly acLlve ln case a 3u ploL ls selecLed.
o >'$?#": glves Lhe range of Lhe second varlable.
@$/#.'0/4-$ ',4*": glves Lhe range of Lhe lnLeracLlon poLenLlal Lo be dlsplayed. use Lhls Lo cap
Lhe ploL and noL Lo dlsplay very large values (lnLeracLlon mlnlma).
!5% 9$'+ 9"*%
1he ploL pane ls where Lhe currenLly acLlve ploL ls dlsplayed (and modlfled ln Lhe case of a 3u ploL).


'()*+, ?. @A23<:, 8B 2 "C 257 ;C <:8=
A 2u ploL shows Lhe lnLeracLlon poLenLlal as a funcLlon of Lhe selecLed varlable 1" ln Lhe glven range. A
3u ploL shows Lhe lnLeracLlon poLenLlal as a funcLlon or varlable 1" and varlable 2" ln Lhe selecLed
ranges respecLlvely. ln Lhe case of a 3u ploL Lhe followlng acLlons can modlfy Lhe way Lhe ploL ls vlewed:
6
urag lefL mouse buLLon: 1ranslaLe Lhe graph ln Lhe wlndow
urag rlghL mouse buLLon: 8oLaLe Lhe graph. 1he roLaLlon ls done uslng Lrackball mode. 1hls
means LhaL when dragglng ln Lhe cenLer of Lhe screen Lhe graph wlll be roLaLed around Lhe Lwo
axes lylng ln Lhe screen plane whereas close Lo Lhe borders of Lhe screen a roLaLlon around Lhe
axls normal Lo Lhe screen wlll be performed.
Mouse wheel: Zoom ln or ouL of Lhe graph.
).%"+2*: "*/ ;'/2(<2*: ,%.2%,
Serles are creaLed and modlfled ln Lhe boLLom-mosL secLlon of Lhe wlndow (llgure 3).

'()*+, D. /0, E,+(,E <25,
1he popup menu &#.4#" conLrols on whlch of Lhe serles Lhe modlflcaLlons wlll be applled.
8y cllcklng Lhe ABB" buLLon you can add a new serle. 1he new serle wlll be placed aL Lhe end
and be named unLlLled Serle n" where n ls a consecuLlve number.
1he 83"140'/#" buLLon creaLes a copy of Lhe currenLly acLlve serle. 1he new serle wlll be names
Copy of x" where x ls Lhe name of Lhe currenLly acLlve serle.
1he 8#1#/#" buLLon ls only acLlve when more Lhan one serle exlsL. lL wlll remove Lhe currenLly
acLlve serle.
1he box below conLalns all parameLers abouL a serle, whlch can be changed.
C'D#": Lhe name used Lo ldenLlfy Lhe serle as lL wlll be dlsplayed ln Lhe Serles:" popup menu
and ln Lhe ouLpuL flles.
;4*4<1#": conLrols lf Lhe serle ls dlsplayed or noL.
E-1-.": uependlng on Lhe Lype of Lhe ploL Lhls parameLer conLrols:
o 2u: Lhe llne color of Lhe ploL
o 3u: Lhe surface color of Lhe ploL
F.4B": has an effecL only ln Lhe 3u ploL. Wlll change Lhe color of Lhe llne grld dlsplayed on Lop of
Lhe surface.
84*"#.*4-$": wlll conLrol whlch dlsperslon model ls used. lor a descrlpLlon of Lhe bullL-ln models
see below. lug-ln models should provlde Lhelr own documenLaLlon. lf a model requlres
addlLlonal parameLers, Lhese can be accessed uslng Lhe 5'.'D#/#.*%" buLLon.
7
+1#0/.-*/'/40": wlll conLrol whlch elecLrosLaLlc model ls used. lor a descrlpLlon of Lhe bullL-ln
models see below. lug-ln models should provlde Lhelr own documenLaLlon. lf a model requlres
addlLlonal parameLers, Lhese can be accessed uslng Lhe 5'.'D#/#.*%" buLLon.
&/#.40": wlll conLrol whlch sLerlc model ls used. lor a descrlpLlon of Lhe bullL-ln models see
below. lug-ln models should provlde Lhelr own documenLaLlon. lf a model requlres addlLlonal
parameLers, Lhese can be accessed uslng Lhe 5'.'D#/#.*%" buLLon.
G4*0": glves Lhe posslblllLy Lo lnclude lnLeracLlon poLenLlals, whlch are noL of dlsperslon,
elecLrosLaLlc or sLerlc naLure (l.e. magneLlc lnLeracLlon). 1here are no bullL-ln models of Lhls klnd,
only plug-lns wlll show up. Cllcklng Lhe 8#H4$#%" buLLon wlll show Lhe followlng dlalog (llgure
6).

'()*+, F. /0, 93(E>9 7(2:8)
Cn Lhe lefL Lhe avallable models are dlsplayed. upon selecLlng Lhem Lhey can be acLlvaLed (by
checklng Lhe A0/4(#" box) or deacLlvaLed and lf Lhey requlre addlLlonal parameLers, Lhe
ABB4/4-$'1 5'.'D#/#.*%" can be cllcked Lo seL Lhese.
&/'<414/6" wlll allow seLLlng Lhe parameLers for Lhe sLablllLy calculaLlon uslng Lhe followlng
dlalog (llgure 7).

'()*+, G. /0, E=2H(:(=I >2:>*:2=(85 7(2:8)
1he 0-$0#$/.'/4-$*" of parLlcles of Lype 1 and 2 (for a blnary sysLem) are glven ln wL.
calculaLed accordlng Lo:

powder
w
medium
m
c
m
= (1)
I4D#" deflnes Lhe Llme for whlch Lhe suspenslon should remaln sLable. ;4*0-3* 8.'?" flnally
allows selecLlng a calculaLlon model lncludlng vlscous drag (noL lmplemenLed yeL). lor more
deLall on Lhe sLablllLy calculaLlons see furLher down.
8
1he &J-K 4$ "1-/" box conLrols lf Lhe sLablllLy llne ls dlsplayed ln Lhe ploL (same color as Lhe
serle buL dashed).
>#L34.#B <'..4#." ls Lhe value of Lhe lnLeracLlon poLenLlal barrler requlred Lo prevenL
agglomeraLlon ln Lhe speclfled sysLem for Lhe speclfled Llme.
E-$*/'$/ B4*/'$0#" ls Lhe dlsLance Lo be used for lnLeracLlon poLenLlal calculaLlons ln case
dlsLance ls 58= selecLed as a ploL varlable.
1he LemperaLure of Lhe sysLem ls glven by I#D"#.'/3.#".
1he G#B43D" buLLon allows deflnlng Lhe properLles of Lhe suspenslon medlum uslng Lhe
followlng dlalog (llgure 8).

'()*+, J. /0, 7(2:8) =8 7,B(5, =0, E*E<,5E(85 3,7(*3
8#$*4/6" deflnes Lhe denslLy of Lhe fluld medlum and 84#1#0/.40 E-$*/'$/" glves lLs dlelecLrlc
consLanL. 1he Lable below conLrols Lhe conLenLs of Lhe sysLem. Specles may be added and
removed uslng Lhe ABB" and 8#1#/#" buLLons. Lach enLry has a M'<#1" whlch ls for ease of
ldenLlflcaLlon only. 1he ;'1#$0#" glves Lhe specles charge whereas Lhe E-$0#$/.'/4-$" glves
Lhe molar concenLraLlon of Lhe specles.
1he 5'./401# = 8#H4$#%" and 5'./401# 7 8#H4$#%" buLLons allow deflnlng Lhe parLlcles ln Lhe
sysLem uslng Lhe followlng dlalog (). lease noLe LhaL Lhe buLLon for parLlcle 2 ls only acLlve lf Lhe
N#/#.-?#$#-3* &6*/#D" box ls Llcked.

'()*+, K. /0, 7(2:8) =8 7,B(5, <2+=(>:, <+8<,+=(,E
arameLers Lo be glven are Lhe N'D'O#. E-$*/'$/", Lhe 8#$*4/6", Lhe 5'./401# 84'D#/#.", Lhe
P#/' 5-/#$/4'1" as well as Lhe P#/' 5-/#$/4'1 51'$#" whlch ls Lhe dlsLance from Lhe surface
where Lhe zeLa poLenLlal ls measured. 1he M4*/%" buLLon allows you Lo selecL Lhe ofLen hard Lo
flnd Pamaker consLanLs from a web-based reposlLory.
9
!5%'.%+21"$ #"18:.'0*/
-*+%."1+2'* 1"$10$"+2'*,
Pamaker 2.0 calculaLes Lhe lnLerparLlcle lnLeracLlon wlLhln Lhe uer[aguln, Landau, verwey and Cverbeck
(uLvC) model, addlng conLrlbuLlons for lnLeracLlons oLher Lhan van der Waals and elecLrosLaLlc
lnLeracLlon such as sLerlc lnLeracLlon models and oLhers. 1he baslc equaLlon descrlblng Lhe LoLal
lnLerparLlcle lnLeracLlon ! ln Pamaker 2.0 ls as follows:

vdW electrostat steric misc
V V V V V = + + +
!
(2)
!
"#$
, !
%&%'()*+(,(
and !
+(%)-'
belng Lhe conLrlbuLlons of Lhe aLLracLlve van der Waals, Lhe elecLrosLaLlc and
sLerlc lnLeracLlons respecLlvely. 1he sum over Lhe !
.-+'
lnLeracLlons allows addlng a collecLlon of oLher
lnLeracLlons dependlng on Lhe sysLem ln quesLlon. lor example one could add magneLlc lnLeracLlon
forces for parLlcles exhlblLlng Lhls properLy.
=+"#2$2+< %>"$0"+2'*
1he sLablllLy of a colloldal suspenslon ls evaluaLed accordlng Lo Lhe model publlshed by lsraelachvlll [1].
A parLlcle of dlameLer # and denslLy /
0
ln a suspenslon aL LemperaLure 2 wlll have a mean 8rownlan
veloclLy glven by:

3
2 2
3
1 1 4 12
2 2 3 2
p
p
d kT
mv v kT v
d
! "
! "
# $
% &
= ' ( '
) *
+ ,
- .
) *
/ 0
(3)
Where 3 ls Lhe 8olLzmann consLanL. AL a glven suspenslon concenLraLlon ' (ln wL. s/l) Lhe number of
parLlcles per unlL volume 4
0
ls glven as a funcLlon of Lhe denslLles of Lhe parLlcles /
0
and Lhe medlum /
.

as well as Lhe parLlcle dlameLer # by dlvldlng Lhe LoLal mass of all parLlcles .
02
by Lhe mass of a slngle
parLlcle .
0
.

3
100
4
3 2
m
pT
p
p
p
c
m
N
m
d
!
" !
= =
# $
% &
' (
(4)
lor a blnary sysLem Lhe number of parLlcles per unlL volume ls glven by Lhe sum of Lhe Lwo parLlcle
conLrlbuLlons:

,1 ,2 p p p
N N N = + (3)
1he number of parLlcles along one edge of Lhe unlL volume ls glven by Lhe cublc rooL of 4
0
, Lhe lnverse of
whlch flnally glves Lhe spaclng beLween Lwo parLlcles along Lhe edge. 1hls ls consldered as Lhe closesL
lnLerparLlcle spaclng # aL equlllbrlum.
10

3
1
p
d
N
= (6)
ln order for Lwo parLlcles Lo colllde, Lhe parLlcle has Lo Lravel Lhe lnLerparLlcle dlsLance # whlch as lL's
mean 8rownlan veloclLy " wlll requlre a Llme 5(, Lhus Lhe Llme beLween colllslons. 1he colllslon frequency
6
'
ls Lhen glven by Lhe lnverse of 5(.

1
c
v
f
t d
= =
!
(7)
Where for a blnary sysLem Lhe mean veloclLy ls consldered:

( )
1 2
1
2
v v v = + (8)
1he probablllLy 0 of Lwo parLlcles havlng a klneLlc energy allowlng Lhem Lo overcome an energy barrler
5$ ls glven by
exp
W
p
kT
!" # $
=
% &
' (
(9)
3 belng Lhe 8olLzmann consLanL and 2 Lhe LemperaLure. WlLhln a Llme (, (76
'
colllslons wlll occur, whlch
means LhaL for none of Lhese colllslons belng energeLlc enough Lo overcome Lhe barrler ls, a mlnlmum
value for 5$ ln order Lo avold energeLlc colllslons and Lhus agglomeraLlon can be calculaLed as:

min
1
ln
c
W
kT t f
! " # ! "
= $
% & % &
'
( )
( )
(10)
11
!5% #02$+?2* ;'/%$,
72,9%.,2'* @>/AB
1he user can choose from Lhe classlcal unreLarded lnLeracLlon model by Pamaker [2] or Lhe reLarded
models by Cregory [3] and vlncenL [4]. ln all models 8
9:%66
ls Lhe effecLlve Pamaker consLanL for Lhe
sysLem, ; ls Lhe parLlcle surface-surface separaLlon and ,
<
and ,
=
are Lhe parLlcle radll respecLlvely.
3";"8%.

( )
1 2 1 2
2 2
1 2 1 2 1 2
,
2
1 2
2
1 2 1 2
2 2
2 2 2 2 4
6 2 2
ln
2 2 4
H eff
ham
a a a a
h a h a h h a h a h a a
A
V h
h a h a h
h a h a h a a
! "
+
# $
+ + + + +
# $
=
# $
% & + +
+ # $
' (
+ + +
# $
) * + ,
(11)
C.%:'.<

( )
( )
,
1 2
1 2
9
1 ln 1
6
5.32
100 10
H eff
gre
A
a a bh
V h
h a a bh
b
!
!
!
"
# $ % &
= " +
' ( ) *
+
+ , - .
=
= /
(12)

D2*1%*+

( )
( ) ( )
( )
( ) ( )
( ) ( )
( )
( )
2
,
1
9
1
2
1
1 2
2
8
2ln 2 2 ln
12
1.01
2
0.14
100 10
2
H eff
vin
A u h u h ba y y
V h a y u h y
u h u h y u h y C h u h y
a
b
h
x
a
a
y
a
C a a h
u x xy x
!
"
"
#
$ % & ' & ' & '
= + + + + + ( ) * + * + * +
* + * + * +
+ + +
( )
, - , - , - . /
=
=
= 0
=
=
= + +
= + +
(13)
12
E((%1+2>%
1hls model lmplemenLs Lhe effecLlve dlsLance dependenL approach for Lhe Pamaker consLanL based on
dlelecLrlc consLanLs and refracLlve lndlces [3]. 1he Pamaker consLanL ls calculaLed as glven Lhe followlng
equaLlon and Lhen used ln Lhe unreLarded model (equaLlon 11):

( )
( )
2
2 2 3 3
2 2
2
2 2
3
2 2 2
3
4
1
3 4 2
16 2
p m
p m
m
H p m
p m
p m
h n n
n h
A kT n n
c
n n
!
" "
# !
" "
$
% &
$ ' ( $
) * + +
= $ + + +
, - . /
0 1
, -
+
2 3
+ + 4 5 +
6 7
(14)
E$%1+.',+"+21
1he Pogg-Pealy-lursLenau (PPl) [6] as well as Lhe Llnear SuperposlLlon ApproxlmaLlon (LSA) ls
lmplemenLed. ln all models Lhe lonlc sLrengLh >
'
and Lhe lnverse uebye lengLh ? are calculaLed as:

2
1
2
0
2
1
2
2 1000
c i i
c A
I c z
kT
e I N
!!
"
#
=
$ %
=
& '
( )
*
(13)
Where '
-
and @
-
are Lhe concenLraLlon and valence of lons ln soluLlon respecLlvely, A and A
B
Lhe dlelecLrlc
consLanL and Lhe elecLrlc consLanL respecLlvely, 3 8olLzmann's consLanL, 2 Lhe LemperaLure, % Lhe
elemenLary charge and 4
8
Avogadro's number.
1he surface poLenLlal C ls calculaLed from Lhe measurable zeLa poLenLlal ( vla

( ) exp
s
d ! " # = (16)
ds belng Lhe dlsLance from Lhe surface where Lhe zeLa poLenLlal ls measured.
33F

( ) ( ) ( ) ( ) ( ) ( ) ( )
2 2
0 1 2
1 2 1 2
1 2
ln 1 exp ln 1 exp
hhf
a a
V h h h
a a
!""
# # $ # # $
% &
= + + ' + ' ' '
( )
+
(17)
G=H

( ) ( )
0 1 2
1 2
1 2
4
exp
lsa
a a
V h h
a a h
!""
## $ = %
+ +
(18)
13
=+%.21
1he close Lo hard wall model lnLroduced by 8ergsLrom[7] ls lmplemenLed.
I%.:,+.';

( )
( )
( )
6
2
2 1
2
1 2
: 10
2
1
2 : 2
2
2 : 0
a
ber a a a
a
h d
a a kT
V h d h d d h
a a V
h d
!
"
#
$ < % &
'
( ) '
= * * + +
,
- .
+
/ 0
'
'
>
1
(19)
1he parameLer #
,
represenLs Lhe Lhlckness of Lhe adsorbed layer, and D Lhe volume fracLlon of
adsorbenL ln Lhe adsorbed layer. v ls Lhe molecular volume of Lhe solvenL and Lhe solvenL adsorbenL
lnLeracLlon parameLer.
14
A.2+2*: 9$0:?2* ;'/%$,
1he range of lnLeracLlon models avallable ln Pamaker 2 can easlly be exLended by Lhe user Lrough plug-ln
modules. 1he modules are complled [ava classes, lmplemenLlng a cerLaln lnLerface. 1he followlng ls a
shorL descrlpLlon on how Lo proceed Lo lmplemenL a new plug-ln.
=%+09 <'0. %*>2.'*;%*+
?our compuLer wlll need Lo have a !uk ([ava developmenL klL) lnsLalled. ?ou may download Lhls sofLware
from hLLp://[ava.sun.com/[avase/downloads/lndex.[sp.
-;9$%;%*+ +5% 2*+%."1+2'* (0*1+2'*,
LeLs assume you wanL Lo wrlLe a new dlsperslon lnLeracLlon model. Cur awesome new model can be
descrlbed by
( ) V h b ah = ! + (20)
whlch corresponds Lo Lhe noL very physlcal case of an llnearly lncreaslng poLenLlal. As you can see we wlll
need Lo lmplemenL Lwo parameLers , and E, whlch are lnLernal Lo our model.
uslng your favorlLe LexL edlLor creaLe a new [ava flle, l.e. Llnearulsperslon.[ava". 1he flle ls provlded for
your reference ln Lhe pluglns/plugln developmenL" dlrecLory.
All pluglns depend on a cerLaln number of sLandard [ava classes. So leLs sLarL by lmporLlng Lhese
import java.util.ArrayList;
import java.io.BufferedWriter;
import java.io.BufferedReader;
import java.io.IOException;

We Lhen deflne Lhe class, whlch ln Lhls case lmplemenLs ulsperslonlnLeracLlonModel". lf you were Lo
wrlLe anoLher Lype of model, Lhe classes would lmplemenL LlecLrosLaLlclnLeracLlonModel",
SLerlclnLeracLlonModel" or MlsclnLeracLlonModel" respecLlvely.
public class LinearDispersion implements
hamaker2.models.dispersion.DispersionInteractionModel {
double a, b;
boolean needs_save;
}

We deflne Lhe Lwo needed varlables a and b as double preclslon real numbers [usL lnslde Lhe class. We
also deflne Lhe varlable needs_save, whlch lndlcaLes lf Lhe varlables a and b have changed and need Lo
be saved,
WlLhln Lhls class we lmplemenL a cerLaln number of funcLlons:
Public LinearDispersion () {
/*default values: potential raises linearly from -5kT and becomes repulsive
at 10nm*/
a = 5/1E-8;
b= 5;
needs_save = false;
13
}

ls Lhe consLrucLor and should lnlLlallze all lnLernal varlables your plug-ln requlres Lo Lhelr defaulL values.

public String name() {
return "Linear Dispersion Interaction";
}

8eLurns Lhe name of Lhe lnLeracLlon funcLlon (dlsplayed ln Lhe correspondlng Pamaker 2 menu once Lhe
plugln ls lnsLalled).

public String reference() {
return "Hyper Colloids, 12(4), 150-153, (2008)";
}

8eLurn Lhe reference, where Lhe model can be found. 1hls ls dlsplayed as Lhe user hovers over Lhe
correspondlng menu lLem.

public boolean additionalParameters() {
return true;
}

lf Lhe model has addlLlonal parameLers, whlch can be seL uslng Lhe more dlalog" (see below), Lhls
funcLlon should reLurn Lrue.

public void showMoreDialog() {
MoreDialog dialog = new MoreDialog();
}

We slmply call Lhe more dlalog, whlch ls deflned furLher down ln Lhe class.

public double interactionPotential(hamaker2.Serie serie) {
return b + a * serie.getDistance();
}
public double interactionForce(hamaker2.Serie serie) {
return a;
}

1hese are Lhe maln workhorses of Lhe plug ln: 1hey reLurn Lhe lnLeracLlon poLenLlal and Lhe force
respecLlvely. 1he bullL-ln models lmplemenL Lhe force as analyLlc funcLlons, plug-lns may also use a
numerlcal way Lo obLaln Lhe force, whlch ls however dlscouraged for reasons of preclslon. See annex 2
16
for a llsL of funcLlon exporLed by Serle and conLalned ob[ecLs, whlch are llkely Lo be used ln Lhe
calculaLlon of Lhe poLenLlal and force.

public ArrayList plotVariables() {
return new ArrayList();
}

8eLurn an array of varlables agalnsL whlch Lhe user may ploL. We don'L wanL Lo ploL agalnsL elLher a or b
so we reLurn an empLy array.

public boolean getNeedsSave() {
return needs_save;
}

We reLurn lf Lhe model parameLers have changed and lf as a consequence savlng ls requlred (l.e. uo you
wanL Lo save" dlalog upon closlng of Pamaker 2).

public void save(BufferedWriter output) {
output.write(String.valueOf(a));
output.newLine();
output.write(String.valueOf(b));
output.newLine();
}

public void load(BufferedReader input) {
a = hamaker2.Utils.StringToDouble(input.readLine());
b = hamaker2.Utils.StringToDouble(input.readLine());
}

Pere we wrlLe and read Lhe model parameLers Lo or from a flle. lL ls lmporLanL Lo wrlLe and read ln Lhe
same sequence.

public LinearDispersion duplicate() {
LinearDispersion copy = new LinearDispersion ();
copy.a = a;
copy.b = b;
copy.needs_save = true;
return copy;
}

1o allow for deep" copylng of serles Lhe dupllcaLe" funcLlon ls used. Pere Lhe plugln should creaLe a
new lnsLance of lLself and flll Lhe values by maklng a deep copy of lLself. Cb[ecLs (lf any) should be
cloned, whlle prlmlLlve values (double, lnL, boolean) may be asslgned as usual uslng Lhe =" operaLor.
1he needs_save" varlable ls Lo be seL Lo Lrue" as dupllcaLlng conslsLs ln an operaLlon requlrlng savlng of
daLa.

17
1he followlng ls a very slmple lmplemenLaLlon of Lhe more dlalog. A compleLe descrlpLlon ls beyond Lhe
scope of Lhls manual, however a programmer proflclenL wlLh [ava and swlng should noL have any
problems wlLh Lhls code. lease refer Lo commenLs ln Lhe code for baslc explanaLlons.
private class MoreDialog extends javax.swing.JDialog {

public MoreDialog() {
//initialize the dialog and components
super((java.awt.Frame)null, true);
javax.swing.JLabel a_label = new javax.swing.JLabel("A:");
javax.swing.JLabel b_label = new javax.swing.JLabel("B:");
a_field = new javax.swing.JFormattedTextField(String.valueOf(a));
b_field = new javax.swing.JFormattedTextField(String.valueOf(b));

//create the ok and cancel buttons and attach the corresponding actions
javax.swing.JButton okButton = new javax.swing.JButton("OK");
okButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
//extract changed values
a = hamaker2.Utils.StringToDouble(a_field.getText());
b = hamaker2.Utils.StringToDouble(b_field.getText());
//close the dialog
setVisible(false);
//notify hamaker 2 that we need to save new data
needs_save = true;
}
});

javax.swing.JButton cancelButton = new javax.swing.JButton("Cancel");
cancelButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
//simply close the dialog
setVisible(false);
}
});

//create a simple grid layout and pack in the components
java.awt.GridLayout layout = new java.awt.GridLayout(3,2);
getContentPane().setLayout(layout);
getContentPane().add(a_label);
getContentPane().add(a_field);
getContentPane().add(b_label);
getContentPane().add(b_field);
getContentPane().add(cancelButton);
getContentPane().add(okButton);
pack();

//set the dialog to destroy when closing
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

//make it visible
setVisible(true);
}

//fields that need to be accessible in the action methods
private javax.swing.JFormattedTextField a_field;
private javax.swing.JFormattedTextField b_field;
}
)';92$% +5% 9$0:2*
lace Lhe Llnearulsperslon.[ava" flle ln Lhe pluglns" dlrecLory wlLhln your Pamaker2 dlrecLory. now
open a Lermlnal (Wlndows: SLarL Menu->8un, Lype cmd, Mac: Cpen AppllcaLlons/uLlllLles/1ermlnal,
Llnux: uepends on wlndow sysLem, mosL ofLen rlghL cllck and selecL new 1ermlnal" from menu).
navlgaLe Lo your Pamaker2/pluglns dlrecLory (uslng Lhe command cd). 1hen execuLe on wlndows
C:\Program Files\Java\jdk1.6.0_11\bin\javac" -classpath plugin
development\classes LinearDispersion.java
18

or on mac/llnux
javac classpath plugin development/classes LinearDispersion.java

lf your code conLalns no errors, you should geL a flle Llnearulsperslon.class ln Lhe pluglns dlrecLory and
upon sLarLlng of Pamaker2 you should see your brand new plugln ln Lhe correspondlng menu.
19
)'*+"1+
lease conLacL Lhe auLhor aL ull.aschauer[maL.eLhz.ch ln case you have quesLlons or commenLs. lf
emalls remaln unanswered or bounce (l may have moved Lo a new [ob) please address emalls Lo
paul.bowen[epfl.ch.
20
H**%J
H**%J KL EJ1%$ /"+" ('.;"+
lor a 2u ploL Lhe daLa wlll be saved as follows (v
l
ls Lhe lLh varlable value and
l[
ls Lhe lnLeracLlon
poLenLlal of Lhe lLh varlable value for Lhe [Lh serle):
L2+(2H:, M23, M23, N,+(,E $ M23, N,+(,E " .
"
<

11

12
.
"
=

21

22
.
F . . .
"
G

n1

n2
.

1hls means Lhe flrsL column conLalns Lhe lnLerparLlcle dlsLance (surface Lo surface), whlch are Lhe x-axls
values for all serles. 1he followlng columns conLaln Lhe lnLeracLlon poLenLlals (ln unlLs of k1) for Lhe
dlfferenL serles, one per column.
lor a 3u ploL Lhe daLa ls saved as follows (v
1l
ls Lhe lLh varlable value of varlable 1, v
2[
ls Lhe [Lh varlable
value of varlable 2 and
l[
ls Lhe poLenLlal for Lhe lLh and [Lh varlable value for varlable 1 and 2
respecLlvely):
N,+(,E $ M23,
L2+(2H:, $ M23,
"
<<
"
<=
F "
<G

L2+(2H:, " M23, "
=<

11

21
.
n1

"
==

12

22
.
n2

F . . . .
"
=.

1m

2m
.
nm


N,+(,E " M23,
.

1hls means LhaL Lhere ls one block (bold border) per serles. ln Lhe block ls Lhe Lop lefL cell Lhe serles
name. 1hen follows ln Lhe 3
rd
llne and 2
nd
column Lhe varlable values wlLh Lhelr respecLlve names ln llne 2
and column 1 respecLlvely. 1he lnslde of Lhe maLrlx Lhen conLalns Lhe values for each varlable value palr.
21
H**%J ML HN- /%(2*2+2'*
5";"8%.MO=%.2%
//return the interparticle distance in m
public double getDistance() ;

//return the temperature in K
public double getTemperature();

//returns if the system contains two types of particles
public boolean getHeterogeneous();

//return the particle 1 or 2 respectively
public hamaker2.Particle getParticle1();
public hamaker2.Particle getParticle2();

//return the medium
public hamaker2. Medium getMedium();

5";"8%.MON".+21$%
//returns the hamaker constant in J
public double getHamakerConstant();

//returns the density in kg/m3
public double getDensity();

//returns the particle diameter or radius in m
public double getDiameter();
public double getRadius();

//returns the zeta potential in V
public double getZetaPotential();

//returns the origin of the electrostatic interaction wrt the surface in m
public double getElectrostaticOrigin();

5";"8%.MO6%/20;
//return the density in kg/m3
public double getDensity();

//return the dielectric constant
public double getDielectricConstant();

//returns the number of species in the electrolyte
public int getNumElectrolyteComponents();

//returns the label, valence and concentration of electrolyte component i
//according to java standard (i=0..n-1) where n = getNumElectrolyteComponents();
public String getElectrolyteComponentLabel(int i);
public double getElectrolyteComponentValence(int i);
public double getElectrolyteComponentConcentration(int i);


22
D%.,2'* 52,+'.<
D%.,2'* MOPOP
lnlLlal release
D%.,2'* MOKOP
8ug flxes:
llxed a shallow-copy" bug ln models wlLh More" dlalogs, whlch resulLed ln parameLers Lo
change for all serles slmulLaneously when changlng one serle.
llxed a bug ln Lhe formaLLlng of Lhe requlred barrler when changlng sLablllLy parameLers.
new feaLures:
Added force ploLLlng
Added Lhe LffecLlve" ulsperslon model, whlch calculaLes Pamaker consLanLs on Lhe fly based on
dlelecLrlc consLanLs and refracLlve lndlces.
D%.,2'* MOMOP
8ug flxes:
llxed a bug ln Lhe ploL varlables lmplemenLaLlon. now all ploL varlables are recognlzed and
LreaLed correcLly. 1he Al lnLerface for Lhe lnLeracLlon model changed sllghLly, exlsLlng plug-lns
wlll have Lo be adapLed.
Changed onllne Pamaker consLanL llsL Lo reflecL new server u8L.
lmprovemenLs:
1he program now remembers Lhe dlrecLory lasL used for open/save operaLlons.
lmproved ploLLlng accuracy
Cul lmprovemenLs
new feaLures:
Added supporL for dlfferenL geomeLry classes. CurrenLly lmplemenLed are Sphere-Sphere and
Sphere-laLe. Added Lhe Sphere-laLe formulaLlon for all bullL-ln models.
8rush sLerlc model lmplemenLed
Added vlscous drag ln sLablllLy esLlmaLlon
Medlum dlalog box now prlnLs Lhe uebye lengLh for a glven LemperaLure
numerlcal values of exLrema are shown
Crosshalr ln ploL for easy exLracLlon of numerlc values
D%.,2'* MOMOK
8ug flxes:
llxed a bug LhaL would prevenL models ln Lhe Mlsc dlalog Lo be changed more Lhan once per
sesslon.
23
Q%(%.%*1%,
[1] !. n. lsraelachvlll, >G(%).*&%'H&,) ,G# IH)6,'% J*)'%+. Academlc ress: San ulego, 1991.
[2] P. C. Pamaker, K;L+-', $K;GO 4, 1038-1072.
[3] !. Cregory, M*H)G,& *6 N*&&*-# ,G# >G(%)6,'% I'-%G'% $KJ$O 83, (1), 138-143.
[4] 8. vlncenL, M*H)G,& *6 N*&&*-# ,G# >G(%)6,'% I'-%G'% $KG;O 42, (2), 270-283.
[3] W. 8. 8ussel, u. A. Savllle, W. 8. SchowalLer, N*&&*-#,& O-+0%)+-*G+. Cambrldge ress: Cambrldge,
u.k., 1983.
[6] 8. Pogg, 1. W. Pealy, u. W. luersLenau, 2),G+,'(-*G+ *6 (;% J,),#,L I*'-%(L $KFFO 62, (322),
1638-1631.
[7] L. 8ergsLrom, C. P. Schllllng, l. A. Aksay, M*H)G,& *6 (;% 8.%)-',G N%),.-' I*'-%(L $KK"O 73, (12),
3303-3314.