Skip to content

Commit

Permalink
Merge pull request #4 from fangjian19/master
Browse files Browse the repository at this point in the history
merge MHD module to the incompact3d, add a new example OTV2D, passed …
  • Loading branch information
fangjian19 authored Mar 19, 2024
2 parents b0d643d + 9e22756 commit 4ff8409
Show file tree
Hide file tree
Showing 21 changed files with 25,165 additions and 12 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ if (${BUILD_TESTING})
# TBL
add_test(NAME TBL COMMAND ${MPIEXEC_EXECUTABLE} -n ${MPIEXEC_MAX_NUMPROCS} ${CMAKE_INSTALL_PREFIX}/bin/xcompact3d input_test.i3d WORKING_DIRECTORY ${test_dir}/TBL)
# Wind Turbines
add_test(NAME Wind-Turbine COMMAND ${MPIEXEC_EXECUTABLE} -n ${MPIEXEC_MAX_NUMPROCS} ${CMAKE_INSTALL_PREFIX}/bin/xcompact3d input_test.i3d WORKING_DIRECTORY ${test_dir}/Wind-Turbine)
add_test(NAME Wind-Turbine COMMAND ${MPIEXEC_EXECUTABLE} -n ${MPIEXEC_MAX_NUMPROCS} ${CMAKE_INSTALL_PREFIX}/bin/xcompact3d input_test.i3d WORKING_DIRECTORY ${test_dir}/Wind-Turbine)
# OTV2D
add_test(NAME OTV2D COMMAND ${MPIEXEC_EXECUTABLE} -n ${MPIEXEC_MAX_NUMPROCS} ${CMAKE_INSTALL_PREFIX}/bin/xcompact3d input_ot.i2d WORKING_DIRECTORY ${test_dir}/OTV2D)
endif()

1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ add_subdirectory(Mixing-layer)
add_subdirectory(Taylor-Green-Vortex)
add_subdirectory(Turbulent-Boundary-Layer)
add_subdirectory(Wind-Turbine/NREL-5MW_ALM)
add_subdirectory(Ozage-Tang-Vortex-2D)
14 changes: 14 additions & 0 deletions examples/Ozage-Tang-Vortex-2D/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/Ozage-Tang-Vortex-2D)
install(FILES input_ot.i2d DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/Ozage-Tang-Vortex-2D)
if(${USE_ADIOS2})
install(FILES ../adios2_config.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/Ozage-Tang-Vortex-2D)
endif()
# If testing active add test for 2D OTV case
if (${BUILD_TESTING})
set(case_dir "${test_dir}/OTV2D")
file(MAKE_DIRECTORY ${case_dir})
file(COPY input_ot.i2d DESTINATION ${case_dir})
if(${USE_ADIOS2})
file(COPY ../adios2_config.xml DESTINATION ${case_dir})
endif()
endif()
133 changes: 133 additions & 0 deletions examples/Ozage-Tang-Vortex-2D/input_ot.i2d
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
! -*- mode: f90 -*-

!===================
&BasicParam
!===================

! Flow type (1=Lock-exchange, 2=TGV, 3=Channel, 4=Periodic hill, 5=Cylinder, 6=dbg-schemes)
itype = 2

! Domain decomposition
p_row=0 ! Row partition
p_col=0 ! Column partition

! Mesh
nx=128 ! X-direction nodes
ny=128 ! Y-direction nodes
nz=1 ! Z-direction nodes
istret = 0 ! y mesh refinement (0:no, 1:center, 2:both sides, 3:bottom)
beta = 0.259065151 ! Refinement parameter (beta)

! Domain
xlx = 6.28318530717958 ! Lx (Size of the box in x-direction)
yly = 6.28318530717958 ! Ly (Size of the boy in y-direction)
zlz = 6.28318530717958 ! Lz (Size of the boz in z-direction)

! Boundary conditions
nclx1 = 0
nclxn = 0
ncly1 = 0
nclyn = 0
nclz1 = 0
nclzn = 0

! Flow parameters
iin = 1 ! Inflow conditions (1: classic, 2: turbinit)
re = 50. ! nu=1/re (Kinematic Viscosity)
u1 = 8. ! u1 (max velocity) (for inflow condition)
u2 = 8. ! u2 (min velocity) (for inflow condition)
init_noise = 0.0 ! Turbulence intensity (1=100%) !! Initial condition
inflow_noise = 0.0 ! Turbulence intensity (1=100%) !! Inflow condition

! Time stepping
dt = 0.0001 ! Time step
ifirst = 1 ! First iteration
ilast = 100 ! Last iteration

! Enable modelling tools
ilesmod=0 ! if 0 then DNS
iscalar=0 ! If iscalar=0 (no scalar), if iscalar=1 (scalar)
iibm=0 ! Flag for immersed boundary method

! Enable io
ivisu=1 ! Store snapshots
ipost=1 ! Do online postprocessing

ifilter=0
C_filter=0.49

mhd_active = .true.
/End

!====================
&NumOptions
!====================

! Spatial derivatives
ifirstder = 4 ! (1->2nd central, 2->4th central, 3->4th compact, 4-> 6th compact)
isecondder = 5 ! (1->2nd central, 2->4th central, 3->4th compact, 4-> 6th compact, 5->hyperviscous 6th)

! Time scheme
itimescheme = 5 ! Time integration scheme (1->Euler,2->AB2, 3->AB3, 4->AB4,5->RK3,6->RK4)

/End

!=================
&InOutParam
!=================

! Basic I/O
irestart = 0 ! Read initial flow field ?
icheckpoint = 100 ! Frequency for writing backup file
ioutput = 100 ! Frequency for visualization
ilist = 5 ! Frequency for the output
nvisu = 1 ! Size for visualisation collection

/End

!=================
&Statistics
!=================

nstat = 1 ! Size arrays for statistic collection

/End

!====================
&PartiParam
!====================

ipartiout = 0
numpartix = 0,0,0
partirange = 0.01,0.01,0.001,1.999,0.01,3.99

/End


!====================
&MHDParam
!====================

mhd_equation=.true.
Stuart = 50.d0
Rem = 50.d0

/End

!#######################
! OPTIONAL PARAMETERS
!#######################

!=================
&LESModel
!=================
jles=0
smagcst=0.1
walecst=0.5
iwall=0
/End

!=================
&CASE
!=================
/End
Loading

0 comments on commit 4ff8409

Please sign in to comment.