Skip to content

Commit

Permalink
Merge pull request #264 from rfj82982/master
Browse files Browse the repository at this point in the history
Add MHD module into main repository
  • Loading branch information
slaizet committed Apr 22, 2024
2 parents ebfe705 + 380017c commit 4e0112b
Show file tree
Hide file tree
Showing 23 changed files with 23,904 additions and 12 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Alphabetic order:
Paul Bartholomew (EPCC, UK)
Nikos Bempedelis (ICL, UK)
Georgios (Yorgos) Deskos (NREL, USA)
Jian Fang (STFC, UK)
Cedric Flageul (Poitiers, France)
Ricardo Frantz (Paris, France)
Athanasios Giannenas (ICL, UK)
Expand Down
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if (${BUILD_TESTING_FULL})
endif()
add_subdirectory(Gravity-current)
add_subdirectory(Mixing-layer)
add_subdirectory(OTV-Ozage-Tang-vortex-2D)
add_subdirectory(TBL-Turbulent-Boundary-Layer)
add_subdirectory(Wind-Turbine/NREL-5MW_ALM)
endif (${BUILD_TESTING_FULL})
16 changes: 16 additions & 0 deletions examples/OTV-Ozage-Tang-vortex-2D/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# OTV
set(case "OTV")
set(case_dir "${test_dir}/${case}")
file(MAKE_DIRECTORY ${case_dir})
set(input_file "input_test.i3d")
install(DIRECTORY DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${case})
install(FILES ${input_file} DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${case})
if(ADIOS2_FOUND)
install(FILES adios2_config.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/examples/${case})
endif()
# If testing active add test for OTV case
file(COPY ${input_file} DESTINATION ${case_dir})
if(ADIOS2_FOUND)
file(COPY adios2_config.xml DESTINATION ${case_dir})
endif()
add_test(NAME ${case} COMMAND ${MPIEXEC_EXECUTABLE} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} $<TARGET_FILE:xcompact3d> ${input_file} WORKING_DIRECTORY ${case_dir})
51 changes: 51 additions & 0 deletions examples/OTV-Ozage-Tang-vortex-2D/adios2_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<adios-config>
<io name="solution-io">
<engine type="BP4">
</engine>
<transport type="File">
<parameter key="Library" value="fstream"/>
<parameter key="ProfileUnits" value="Milliseconds"/>
</transport>
</io>
<io name="in-outflow-io">
<engine type="BP4">
</engine>
<transport type="File">
<parameter key="Library" value="fstream"/>
<parameter key="ProfileUnits" value="Milliseconds"/>
</transport>
</io>
<io name="turb-io">
<engine type="BP4">
</engine>
<transport type="File">
<parameter key="Library" value="fstream"/>
<parameter key="ProfileUnits" value="Milliseconds"/>
</transport>
</io>
<io name="restart-io">
<engine type="BP4">
</engine>
<transport type="File">
<parameter key="Library" value="fstream"/>
<parameter key="ProfileUnits" value="Milliseconds"/>
</transport>
</io>
<io name="statistics-io">
<engine type="BP4">
</engine>
<transport type="File">
<parameter key="Library" value="fstream"/>
<parameter key="ProfileUnits" value="Milliseconds"/>
</transport>
</io>
<io name="restart-forces-io">
<engine type="BP4">
</engine>
<transport type="File">
<parameter key="Library" value="fstream"/>
<parameter key="ProfileUnits" value="Milliseconds"/>
</transport>
</io>
</adios-config>
121 changes: 121 additions & 0 deletions examples/OTV-Ozage-Tang-vortex-2D/input_ot.i3d
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
! -*- 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

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

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

!====================
&MHDParam
!====================
mhd_equation=.true.
Stuart = 50.d0
Rem = 50.d0

/End

!=================
&CASE
!=================
/End
121 changes: 121 additions & 0 deletions examples/OTV-Ozage-Tang-vortex-2D/input_test.i3d
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
! -*- 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

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

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

!====================
&MHDParam
!====================
mhd_equation=.true.
Stuart = 50.d0
Rem = 50.d0

/End

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

0 comments on commit 4e0112b

Please sign in to comment.