Skip to content

Commit 8491588

Browse files
authored
Update 2D Taylor Green Vortex
1 parent 4452457 commit 8491588

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

src/pre_process/m_check_patches.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ contains
314314
.or. &
315315
patch_icpp(patch_id)%length_y <= 0d0 &
316316
.or. &
317-
patch_icpp(patch_id)%vortex_l <= 0d0) then
317+
patch_icpp(patch_id)%vel(2)<= 0d0) then
318318

319319
call s_mpi_abort('Inconsistency(ies) detected in '// &
320320
'geometric parameters of Taylor Green '// &

src/pre_process/m_global_parameters.fpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,6 @@ contains
279279
patch_icpp(i)%alpha_rho = dflt_real
280280
patch_icpp(i)%rho = dflt_real
281281
patch_icpp(i)%vel = dflt_real
282-
patch_icpp(i)%vortex_l = dflt_real
283-
patch_icpp(i)%vortex_vel = dflt_real
284282
patch_icpp(i)%pres = dflt_real
285283
patch_icpp(i)%alpha = dflt_real
286284
patch_icpp(i)%gamma = dflt_real

src/pre_process/m_mpi_proxy.fpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ contains
8989
call MPI_BCAST(patch_icpp(i)%tau_e(1), 6, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
9090
call MPI_BCAST(patch_icpp(i)%alpha_rho(1), num_fluids_max, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
9191
call MPI_BCAST(patch_icpp(i)%alpha(1), num_fluids_max - 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
92-
call MPI_BCAST(patch_icpp(i)%vortex_l, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
93-
call MPI_BCAST(patch_icpp(i)%vortex_vel, 1, MPI_DOUBLE_PRECISION, 0, MPI_COMM_WORLD, ierr)
9492
end do
9593
9694
! Fluids physical parameters

src/pre_process/m_patches.f90

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,10 @@ subroutine s_2D_TaylorGreen_Vortex(patch_id, patch_id_fp, q_prim_vf) ! ---------
711711
! ensure that only the current patch contributes to the fluid
712712
! state in the cells that this patch covers.
713713
eta = 1d0
714-
U0 = patch_icpp(patch_id)%vortex_vel
715-
L0 = patch_icpp(patch_id)%vortex_l
714+
! U0 is the characteristic velocity of the vortex
715+
U0 = patch_icpp(patch_id)%vel(1)
716+
! L0 is the characteristic length of the vortex
717+
L0 = patch_icpp(patch_id)%vel(2)
716718
! Checking whether the patch covers a particular cell in the
717719
! domain and verifying whether the current patch has the
718720
! permission to write to that cell. If both queries check out,
@@ -732,7 +734,7 @@ subroutine s_2D_TaylorGreen_Vortex(patch_id, patch_id_fp, q_prim_vf) ! ---------
732734
! Assign Parameters =========================================================
733735
q_prim_vf(mom_idx%beg )%sf(i,j,0) = U0*SIN(x_cc(i)/L0)*COS(y_cc(j)/L0)
734736
q_prim_vf(mom_idx%end )%sf(i,j,0) = -U0*COS(x_cc(i)/L0)*SIN(y_cc(j)/L0)
735-
q_prim_vf(E_idx )%sf(i,j,0) = 100000d0 + (COS(2*x_cc(i))/L0 + &
737+
q_prim_vf(E_idx )%sf(i,j,0) = patch_icpp(patch_id)%pres + (COS(2*x_cc(i))/L0 + &
736738
COS(2*y_cc(j))/L0)* &
737739
(q_prim_vf(1)%sf(i,j,0)*U0*U0)/16
738740
! ================================================================================
@@ -1014,10 +1016,10 @@ subroutine s_2D_analytical(patch_id, patch_id_fp, q_prim_vf) ! -----------------
10141016
! ================================================================================
10151017

10161018
! Taylor Green Vortex===============================================
1017-
q_prim_vf(mom_idx%beg )%sf(i,j,0) = U0*SIN(x_cc(i)/l)*COS(y_cc(j)/l)
1018-
q_prim_vf(mom_idx%end )%sf(i,j,0) = -U0*COS(x_cc(i)/l)*SIN(y_cc(j)/l)
1019-
q_prim_vf(E_idx )%sf(i,j,0) = 100000d0 + (COS(2*x_cc(i))/l + COS(2*y_cc(j))/l)* &
1020-
(q_prim_vf(1)%sf(i,j,0)*U0*U0)/16
1019+
! q_prim_vf(mom_idx%beg )%sf(i,j,0) = U0*SIN(x_cc(i)/l)*COS(y_cc(j)/l)
1020+
! q_prim_vf(mom_idx%end )%sf(i,j,0) = -U0*COS(x_cc(i)/l)*SIN(y_cc(j)/l)
1021+
! q_prim_vf(E_idx )%sf(i,j,0) = 100000d0 + (COS(2*x_cc(i))/l + COS(2*y_cc(j))/l)* &
1022+
! (q_prim_vf(1)%sf(i,j,0)*U0*U0)/16
10211023
! ================================================================================
10221024

10231025
end if

0 commit comments

Comments
 (0)