espressomd-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Few quick questions. Electrostatics, LB.


From: Harmanjit Singh
Subject: Re: [ESPResSo-users] Few quick questions. Electrostatics, LB.
Date: Wed, 4 Feb 2015 18:22:07 +0530

Thank you so much for your most illuminating response, the script that I am using is appended in the PS.
Also please let me know where I can learn how to implement a distance function for your boundary shape in the C code. I will learn it. because that seems a better way to go about things than the script that I have attached (as you mentioned the boundaries would leak)... And in that case dont bother looking at the script, because i will probably not use this method later (if i learn how to implement distance function).
And I think I will have to have a non periodic_BC if I want the particles to move in all three directions (by electrostatic forces). The maximum periodicity that can be allowed for my problem is only in Z direction.
Regards
Harmanjit Singh

P.S.: the simulation script:
set n_part 10
set lx 100; set ly 100; set lz 100
setmd box_l $lx $ly $lz
setmd time_step 0.001
##########################################################################
setmd skin 0.4
setmd periodic 1 1 1
constraint wall normal 1 0 0 dist 0 type 1
constraint wall normal -$lx 0 0 dist [expr {(-$lx) + (-0.5)}] type 1
constraint wall normal 0 1 0 dist 0 type 1
constraint wall normal 0 -$ly 0 dist [expr {(-$ly) + (-0.5)}] type 1
##########################################################################
for {set i 0} {$i < $n_part} {incr i} {
    set posx [expr $lx*[t_random]]
    set posy [expr $ly*[t_random]]
    set posz [expr ($lz)*[t_random] + 1.0]
    part $i pos $posx $posy $posz q -10 type 0
}
##########################################################################
#in x-z plane at y=0
set pointsx 19; set pointsy 19; set pointsz 199; set charge_part -10; set type_part 1
##############
set posx 0; set posy 0; set posz 5; set separation 5
for {set i 0} { $i < $pointsx} {incr i} {
set posy 5; set posz 5; set separation 5
    set posx [expr {$posx + $separation}]
   
    for {set j 0} {$j < $pointsz} {incr j} {
    set posz [expr {$posz + $separation}]
    part [expr {$n_part + $j}] pos $posx $posy $posz q $charge_part type $type_part fix 1 1 1
    }
    set n_part [expr {$n_part + $pointsz}]
}
#in x-z plane at y=100
set posx 0; set posy 0; set posz 5; set separation 5
for {set i 0} { $i < $pointsx} {incr i} {
set posy [expr {$ly-5}]; set posz 5; set separation 5
    set posx [expr {$posx + $separation}]
   
    for {set j 0} {$j < $pointsz} {incr j} {
    set posz [expr {$posz + $separation}]
    part [expr {$n_part + $j}] pos $posx $posy $posz q $charge_part type $type_part fix 1 1 1
    }
    set n_part [expr {$n_part + $pointsz}]
}
#in y-z plane at x=0
set posx 0; set posy 0; set posz 5; set separation 5
for {set i 0} { $i < $pointsy} {incr i} {
set posx 5; set posz 5; set separation 5
    set posy [expr {$posy + $separation}]
   
    for {set j 0} {$j < $pointsz} {incr j} {
    set posz [expr {$posz + $separation}]
    part [expr {$n_part + $j}] pos $posx $posy $posz q $charge_part type $type_part fix 1 1 1
    }
    set n_part [expr {$n_part + $pointsz}]
}
#in y-z plane at x=100
set posx 0; set posy 0; set posz 5; set separation 5
for {set i 0} { $i < $pointsy} {incr i} {
set posx [expr {$lx-5}]; set posz 5; set separation 5
    set posy [expr {$posy + $separation}]
   
    for {set j 0} {$j < $pointsz} {incr j} {
    set posz [expr {$posz + $separation}]
    part [expr {$n_part + $j}] pos $posx $posy $posz q $charge_part type $type_part fix 1 1 1
    }
    set n_part [expr {$n_part + $pointsz}]
}
puts "number of particles are $n_part"
##########################################################################
set temp 2.494; set gamma 1
thermostat langevin $temp $gamma
##########################################################################
set sig 0.5; set cut 1; set eps 10.0; set shift [expr 0.25*$eps]
inter 0 0 lennard-jones $eps $sig $cut $shift 0
inter 0 1 lennard-jones $eps $sig $cut $shift 0
inter 1 1 lennard-jones $eps $sig $cut $shift 0
##########################################################################
cellsystem domain_decomposition
#-no_verlet_list
##########################################################################
inter forcecap 0
puts [inter coulomb 1.0 dh 0 30 ]
##########################################################################
set integrate_steps 100
for {set i 0} { $i < $integrate_steps } { incr i} {
    integrate
    writevtk data/part_pos_$i.vtk
puts "$i step of $integrate_steps done"
}
##########################################################################

On Tue, Feb 3, 2015 at 6:35 PM, Georg Rempfer <address@hidden> wrote:
> Good Day Everybody,

Hello

> This is my first post. I have been using ESPResSo for a month now. I have both version 3.2.0 and 3.3.0(using this) with LB components, mpi, gpu, cuda, fftw3 compiled in.
> I have a few quick questions.
> Is there a way to use lb fluid in slitpore? While I tried this the simuation gave error that lbboundary does not accept the slitpore parameter.

Yes. Read the User's Guide about lbboundary wall

> What is best way to make two point charges kept ~10- 50 molecular distance unit apart to interact electrostatically? Which algorithm should be applied?

If two particles is all you need, wouldn't a simple coulomb pair force work? In periodic boundaries on of the specialized algorithms for your periodicity. Read the User's Guide.

> I am simulating a system where I have lined an array of negatively charged particles on the boundaries of the simulation box ( I realized I could not use charged plates because constraint plate works only in z direction, or is there a better way to do this?). There are a few charged molecules in the box, but they do not move at all during simulation as if they are not affected by any electrostatic field at all. I have tried p3m, mmm2d and played around with the arguments, without luck.

We need to see your script to tell you what's wrong.

> Where can I read how p3m, mmm2d work? How to implement has been very well explained in documentations, but what they do in the back end was not really clear to me.

The User's Guide contains references to the papers detailing these algorithms.

> Is there a way to simulate lb fluid in only specific custom defined boundaries? Like a U-tube.

Yes. You might be able to construct your channel from several cylinder boundaries. If not you would have to implement a distance function for your boundary shape in the C code.

> Follow-up question- if I fix particles in any geometry I want (u-tube like) and then simulate lb fluid, will this work? Will the fluid see the particles as a boundary and move along that in u tube?

The particles exert only friction onto the fluid. Depending on the frictional prefactor (lbfluid friction ...) and the particle density, your walls would leak more or less. This is not the right way to go about this problem.

And ultimately: https://www.google.de/#q=espresso+users+guide


reply via email to

[Prev in Thread] Current Thread [Next in Thread]