본문 바로가기

LIGGGHTS

Calculation step의 저장

LIGGGHTS에서 현재 시점의 step을 variable로 저장하는 방법. (메뉴얼을 뒤져도 안나온다)

variable                   step_now equal step
fix                        print_time  all print 100 "current step = ${step_now}" screen yes

현재 시점의 time으로 기록하고 싶다면,

variable                   dt_ equal 0.00001
timestep                   ${dt_}

variable                   step_now equal step
variable                   time_now equal step*v_dt_

fix                        print_time  all print 100 "current step, dt, time = ${step_now}, ${dt_}, ${time_now}" screen yes

출력결과는

current step, dt, time = 100, 1e-05, 0.001
current step, dt, time = 200, 1e-05, 0.002
current step, dt, time = 300, 1e-05, 0.003
current step, dt, time = 400, 1e-05, 0.004
current step, dt, time = 500, 1e-05, 0.005
current step, dt, time = 600, 1e-05, 0.006
current step, dt, time = 700, 1e-05, 0.007
current step, dt, time = 800, 1e-05, 0.008
current step, dt, time = 900, 1e-05, 0.009
current step, dt, time = 1000, 1e-05, 0.01

'LIGGGHTS' 카테고리의 다른 글

ATOM LOOP  (0) 2023.07.24
SERVO VARIABLE  (0) 2023.07.12
Fix or Compute stored value  (0) 2023.07.02
Print variable  (0) 2023.06.30
PARAVIEW를 이용한 시계열 Plot 작성하기 - Part 2  (0) 2023.06.27