Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
g7fernandes committed Sep 25, 2019
2 parents 6bd37d6 + f83c843 commit 3e9dc2e
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 30 deletions.
2 changes: 2 additions & 0 deletions lennard.f90
Original file line number Diff line number Diff line change
Expand Up @@ -5451,6 +5451,8 @@ program main
if (wall(1:2) == 'pp' .or. wall(3:4) == 'pp') then
allocate(mic(N,2),mic_trf(2*N))
mic = 0
else
allocate(mic(1,2),mic_trf(2*1))
end if

! allocate(nxv(N*5),nxv_send(N*5))
Expand Down
32 changes: 16 additions & 16 deletions settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
# Argonio: epsilon/kb = 120K, sigma = 0.341nm
[global]
nimpre = 200 # quntidade de saidas
N = 8 # número de partículas
N = 1009 # número de partículas
Ntype = 2 # número de tipos de partícula
t_fim = 100 # tempo de execução
t_fim = 50 # tempo de execução
nimpre_init = 0 # começa a simular a partir no tempo referente ao snapshot (nimpre).
dt = 0.0001 # passo de tempo
dimX = 600 # Dimensões da região de cálculo
dimY = 600 #
mesh = 1 1 # 300 60 # malha(elementos)
dt = 0.00005 # passo de tempo
dimX = 100 # Dimensões da região de cálculo
dimY = 100 #
mesh = 10 10 # 300 60 # malha(elementos)
rcut = 3 # *sigma
wall = 'eeee' # condição Elastica ou Periodica nas paredes norte, sul, leste, oeste
termostato_nose_hoover = .false. #liga termostato Nose Hoover. Este funciona durante toda execução.
Expand All @@ -24,7 +24,7 @@
Td_hot = 2 # temperatura nas cold cells constante. Td_hot = -1 desliga termostato
Td_cold = 0.8 # v = sqrt(2*T) temperatura nas hot cells constante. Td_cold = -1 desliga termostato
force_lingradT = -1 # (NUMERO MULTIPLO DE 4 RECOMENDADO!) se > 0 irá dividir região no numero de subregiões entradas na direação X e será forçado um gradiente de temperatura linear. A região dos banhos será ignorada. A temperatura será controlado por um termostato velocity scaling
vd = 0 0 # velocidade distribuida com Maxwell Boltzmann = sqrt(Td')
vd = 2 2 # velocidade distribuida com Maxwell Boltzmann = sqrt(Td')
NMPT = 1000 # Número máximo de partículas que poderá mudar de process. Se não souber estimar, usar -1 ou o valor de N.
GField = 0 0 # Campo de força gravitacional que afeta todas as partículas
MField = 0 0 0 0 0 # Campo magnético vezes momento dipolo da particula magnética Hm. O primeiro numero número é a intensidade de m*H. O segundo e terceiro numeros são a direção do campo.. Os últimos dois números são a e b na função seno e heaviside de controlam o campo no tempo. Hm = H*m*sin(b*t)*heaviside(x-a)
Expand All @@ -36,33 +36,33 @@
# pr = constantes [A, B, alpha, beta] do lennard jones rugoso que simulará um cristal de atomos. Se o valor for dado, a particula poderá girar.
# o grupo com pr deve ser o último e deverá haver apenas um. Ver em rot_par.py como será o potencial
[par_0]
x = 'mole.csv'
v = 5 0 # velocidade global
x = 'molp.csv'
v = 0 0 # velocidade global
v_file = '%%v_file_0.csv' # velocidade de cada partícula
m = 1
nome = 'g1'
sigma = 1 # Lennard Jones
epsilon = 1 # Lennard Jones
quantidade = 7
quantidade = 1000
x_lockdelay = 0 # só vai poder mudar de posição a partir de t = x_lockdelay
rs = 0 # raio sólido. Posição de partículas na superfície de um sólido de raio rs
fric_term = 0 # fricção artifical não funciona quando o termostato nose hoover está ligado
ismolecule = .true.
[par_1]
x = 'parti.csv'
x = 'parp.csv'
v = 0 0 # velocidade global
v_file = '%%v_file_1.csv' # velocidade de cada partícula
m = 10
nome = 'g2'
sigma = 0.94 # Lennard Jones
epsilon = 0.428 # Lennard Jones
quantidade = 1
sigma = 1 # Lennard Jones
epsilon = 1 # Lennard Jones
quantidade = 9
x_lockdelay = 0 # só vai poder mudar de posição a partir de t = x_lockdelay
rs = 5 # raio sólido. Posição de partículas na superfície de um sólido de raio rs
fric_term = 0 # fricção artifical
ismolecule = .false.
pr = 0.1 0.1 20 20 0.071847 # constantes [A, B, alpha, beta, ph] do lennard jones rugoso que simulará um cristal de atomos 43.72584 43.72584

pr = 0 0.001 20 20 0.071847 # constantes [A, B, alpha, beta, ph] do lennard jones rugoso que simulará um cristal de atomos 43.72584 43.72584
#
#[par_2]
# x = 'p_g.csv'
# v = 0 0
Expand Down
30 changes: 16 additions & 14 deletions verify_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def file_len(fname):
x_file = x_file.replace("'","")
x_file = x_file.replace('"','')
if os.path.isfile(x_file):
q = config['par_'+str(i)]['quantidade'].split()[0]
if file_len('x_file') < q:
q = int(config['par_'+str(i)]['quantidade'].split()[0])
if file_len(x_file) < q:
print('Number of particles in file smaller then expected.')
os.system('xdg-open settings.ini')
break
Expand All @@ -82,20 +82,22 @@ def file_len(fname):
v_file = config['par_'+str(i)]['v_file'].split()[0]
v_file = v_file.replace("'","")
v_file = v_file.replace('"','')
if v_file[0] == '%' or os.path.isfile(x_file):
q = config['par_'+str(i)]['quantidade'].split()[0]
if file_len('v_file') < q:
print('Number of particles in file smaller then expected.')

if v_file[0] != '%':
if os.path.isfile(v_file):
q = config['par_'+str(i)]['quantidade'].split()[0]
if file_len(v_file) < int(q):
print('Number of particles in file smaller then expected.')
os.system('xdg-open settings.ini')
break
else:
aux = False
else:
print("Velocity file {} not found.".format(v_file))
os.system('xdg-open settings.ini')
input("Fix the config file, then enter to continue...")
config.read('settings.ini')
break
else:
aux = False
else:
print("Velocity file {} not found.".format(v_file))
os.system('xdg-open settings.ini')
input("Fix the config file, then enter to continue...")
config.read('settings.ini')
break


if sum(quant) != N:
Expand Down

0 comments on commit 3e9dc2e

Please sign in to comment.