A simple question about periodicty

42 views
Skip to first unread message

Refet Ali Yalcin

unread,
Jul 16, 2022, 5:53:06 PM7/16/22
to Smuthi
Dear All,

I want to ask a question about placing the periodic boundary conditions. I couldn't find a documentation about defining unit cells

I inspected two examples
https://smuthi.readthedocs.io/en/latest/_source/04%20examples/fifteen_periodic_spheres_in_slab/discussion.html  
in fifteen spheres case:

In 15 spheres example, BCs are defined as:
    # define unit cell
    a1 = np.array([1001, 0, 0], dtype=float)
    a2 = np.array([0, 1001, 0], dtype=float)

Do the upper arrays consider the area with corners
(0,0,0) (1001,0,0) (0,1001,0) (1001,1001,0)? If so, how can it account for the spheres that have negative coordinates?

Here is the location of spheres from the example file.

particle_list = [part.Sphere(position=[-200, -200, 1000], refractive_index=rfidx, radius=150, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[200, 200, 2000], refractive_index=rfidx, radius=100, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[0, 30, 1500], refractive_index=rfidx, radius=120, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[-300, -200, 2700], refractive_index=rfidx, radius=110, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[110, 150, 2720], refractive_index=rfidx, radius=140, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[200, 0, 390], refractive_index=rfidx, radius=120, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[-100, 380, 400], refractive_index=rfidx, radius=100, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[200, -100, 1900], refractive_index=rfidx, radius=100, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[-320, 300, 2050], refractive_index=rfidx, radius=110, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[-360, -360, 220], refractive_index=rfidx, radius=100, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[100, 300, 1160], refractive_index=rfidx, radius=100, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[-150, 300, 2360], refractive_index=rfidx, radius=120, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[-270, -300, 2200], refractive_index=rfidx, radius=130, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[-170, -180, 1470], refractive_index=rfidx, radius=100, l_max=lmax, m_max=mmax),
                  part.Sphere(position=[340, -300, 1500], refractive_index=rfidx, radius=100, l_max=lmax, m_max=mmax)]

Kind regards,
Refet Yalcin

Amos Egel

unread,
Jul 21, 2022, 10:36:50 AM7/21/22
to Refet Ali Yalcin, Smuthi
Dear Refet,

The periodicity definition reads

# define unit cell
a1 = np.array([1001, 0, 0], dtype=float)
a2 = np.array([0, 1001, 0], dtype=float)

This means that the geometry is periodic with respect to a shift by [1001, 0, 0] and with respect to a shift by [0, 1001, 0].
So if a particle is placed at position=[-200, -200, 1000], this results in the same geometry as if the particle would have been placed at position=[-200+1001, -200, 1000] or at position=[-200+1001, -200+1001, 1000]. In other words, it is not necessary to place all particles into an xy-square along [0,0], [0, 1001], [1001,0], [1001,1001]. The particles can also for example be located in a square [-500, -500], [-500, 501], [501, -500], [501,501] or any other square with edge lengths [1001, 1001].

@Dominik, is that correct? Maybe you want to clarify?

Best regards, Amos



--
Smuthi project repository: https://gitlab.com/AmosEgel/smuthi
Online documentation https://smuthi.readthedocs.io/en/latest/
---
You received this message because you are subscribed to the Google Groups "Smuthi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smuthi+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smuthi/CA%2Bd8Ad%2BPadukuiMCS%3D3y5kJo9G%2B3nLcmHCQ%2BsCcsTw6J%2Bo%3DLQg%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages