Skip to content

Commit a8abfed

Browse files
committed
step 3: extracting vonMises stress for selected 1D line in domain
1 parent bc102c8 commit a8abfed

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

src/post_process/m_data_output.fpp

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -573,12 +573,16 @@ contains
573573
574574
end subroutine s_open_energy_data_file ! ----------------------------------------
575575
576-
subroutine s_open_kymo_data_file() ! ------------------------
576+
subroutine s_open_kymo_data_file(t_step) ! ------------------------
577+
! Time-step that is currently being post-processed
578+
integer, intent(in) :: t_step
577579
578-
character(LEN=path_len + 3*name_len) :: file_path !<
579-
!! Relative path to a file in the case directory
580+
! Relative path to a file in the case directory
581+
character(LEN=path_len + 3*name_len) :: file_path
580582
581-
write (file_path, '(A)') '/kymo_data.dat'
583+
! Kymo information is in binary database format
584+
! Generates relative path to database, opened for current time-step
585+
write (file_path, '(A,I0,A)') '/', t_step, '/kymo_data.dat'
582586
file_path = trim(case_dir)//trim(file_path)
583587
584588
! Opening the simulation data file
@@ -1190,15 +1194,17 @@ contains
11901194
subroutine s_write_kymo_data_file(q_prim_vf)
11911195
type(scalar_field), dimension(sys_size), intent(IN) :: q_prim_vf
11921196
integer :: j, k, l, t !< Generic loop iterators
1193-
1194-
do l = 0, p
1195-
do k = 0, n
1196-
do j = 0, m
1197-
1198-
end do
1199-
end do
1197+
real(kind(0d0)) :: vonMises !< selected planes for kymograph comparison
1198+
1199+
do t = 0, t_stop
1200+
do j = 0, m
1201+
vonMises = q_prim_vf(xiend+1)%sf(j, 0, 0)
1202+
if (proc_rank == 0) then
1203+
write (251, '(10X, 8F24.8)') &
1204+
vonMises
1205+
end if
1206+
end do
12001207
end do
1201-
12021208
12031209
end subroutine s_write_kymo_data_file
12041210

src/post_process/m_start_up.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ subroutine s_read_input_file
8282
polydisperse, poly_sigma, file_per_process, relax, &
8383
relax_model, cf_wrt, sigma, adv_n, ib, num_ibs, &
8484
cfl_adap_dt, cfl_const_dt, t_save, t_stop, n_start, &
85-
cfl_target, surface_tension &
85+
cfl_target, surface_tension, &
8686
sim_data, hyperelasticity, kymograph
8787

8888
! Inquiring the status of the post_process.inp file
@@ -206,7 +206,7 @@ subroutine s_save_data(t_step, varname, pres, c, H)
206206
end if
207207

208208
if (kymograph .and. proc_rank == 0) then
209-
call s_open_kymo_data_file()
209+
call s_open_kymo_data_file(t_step)
210210
end if
211211

212212
if (kymograph) then

0 commit comments

Comments
 (0)