Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rusanov Solver #6

Open
wants to merge 22 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f626d04
added error message for bad write; exposed additional method
johnpwakefield Dec 29, 2022
3218987
exposed additional method until issue can be debugged
johnpwakefield Dec 29, 2022
953e7de
first draft of muscl solver
johnpwakefield Dec 29, 2022
1ea6e4d
make localization interface public in iterator_class.f90
johnpwakefield Jan 19, 2023
d816cfc
fixed boundary conditions
johnpwakefield Jan 19, 2023
dfcdc78
advection and detonation test cases with and without periodic boundaries
johnpwakefield Jan 19, 2023
c51814e
fixed periodic bcs
johnpwakefield Jan 20, 2023
60c0861
updated test cases
johnpwakefield Jan 20, 2023
83f05aa
added sod case
johnpwakefield Jan 21, 2023
04509fc
fixed bad comment
johnpwakefield Jan 23, 2023
aae1e0b
moved several definitions to a hyperbolic_general.f90 module in prepa…
johnpwakefield Feb 9, 2023
78c63e6
added reflection bc test
johnpwakefield Feb 9, 2023
bf28b38
Merge branch 'develop' into muscl
johnpwakefield Feb 9, 2023
2762043
extensive style cleanup in preparation of merging with upstream
johnpwakefield Feb 9, 2023
1cef485
reverted to upstream makefile in HIT case
johnpwakefield Feb 9, 2023
a3bbdc5
fixed issues with monitor files
johnpwakefield Feb 9, 2023
d9dfdb9
added rusanov scheme
johnpwakefield Feb 9, 2023
66dcb74
fixed issues with monitor files
johnpwakefield Feb 9, 2023
a1efa41
fixed number of ghost cells to one for Rusanov
johnpwakefield Feb 9, 2023
c0eb31d
added Rusanov advection test case
johnpwakefield Feb 9, 2023
cd9e65e
Merge branch 'muscl' into rusanov
johnpwakefield Feb 9, 2023
1bd264e
fixed conflicts with upstream branch
johnpwakefield Feb 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions examples/advection_rusanov/GNUmakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# NGA location if not yet defined
NGA_HOME ?= ../..

# Compilation parameters
PRECISION = DOUBLE
USE_MPI = TRUE
USE_FFTW = FALSE
USE_HYPRE = FALSE
USE_LAPACK = TRUE
PROFILE = FALSE
DEBUG = TRUE
COMP = gnu
EXEBASE = nga

# Directories that contain user-defined code
Udirs := src

# Include user-defined sources
Upack += $(foreach dir, $(Udirs), $(wildcard $(dir)/Make.package))
Ulocs += $(foreach dir, $(Udirs), $(wildcard $(dir)))
include $(Upack)
INCLUDE_LOCATIONS += $(Ulocs)
VPATH_LOCATIONS += $(Ulocs)

# Define external libraries - this can also be in .profile
HDF5_DIR = /opt/hdf5
HYPRE_DIR = /opt/hypre
LAPACK_DIR = /opt/lapack-3.10.1
FFTW_DIR = /opt/fftw-3.3.10

# NGA compilation definitions
include $(NGA_HOME)/tools/GNUMake/Make.defs

# Include NGA base code
Bdirs := particles core hyperbolic data solver config grid libraries
Bpack += $(foreach dir, $(Bdirs), $(NGA_HOME)/src/$(dir)/Make.package)
include $(Bpack)

# Inform user of Make.packages used
ifdef Ulocs
$(info Taking user code from: $(Ulocs))
endif
$(info Taking base code from: $(Bdirs))

# Target definition
all: $(executable)
@echo COMPILATION SUCCESSFUL

# NGA compilation rules
include $(NGA_HOME)/tools/GNUMake/Make.rules
2 changes: 2 additions & 0 deletions examples/advection_rusanov/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
standard advection test case advecting different shapes over a periodic domain
to evaluate accuracy and diffusion
24 changes: 24 additions & 0 deletions examples/advection_rusanov/input
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Parallelization
Partition : 2 1 1

# Mesh definition
Lx : 1.0
nx : 128
Ly : 1.0
ny : 128
Lz : 1.0
nz : 1
Periodic : true

# Initialization
Shapes : c

# Direction
Advection direction : 1 1 0

# Time integration
Max cfl number : 0.5

# Ensight output
Ensight output period : 0.01

2 changes: 2 additions & 0 deletions examples/advection_rusanov/src/Make.package
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# List here the extra files here
f90EXE_sources += geometry.f90 simulation.f90
80 changes: 80 additions & 0 deletions examples/advection_rusanov/src/geometry.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
!> Various definitions and tools for initializing NGA2 config
module geometry
use config_class, only: config
use precision, only: WP
implicit none
private

!> Single config
type(config), public :: cfg

public :: geometry_init

contains

!> Initialization of problem geometry
subroutine geometry_init
use sgrid_class, only: sgrid
use param, only: param_read
implicit none
type(sgrid) :: grid

! Create a grid from input params
create_grid: block
use sgrid_class, only: cartesian
logical :: periodic
integer :: i, j, k, nx, ny, nz
real(WP) :: Lx, Ly, Lz
real(WP), dimension(:), allocatable :: x, y, z

! read in grid definition
call param_read('Lx', Lx)
call param_read('nx', nx)
call param_read('Ly', Ly)
call param_read('ny', ny)
call param_read('Lz', Lz)
call param_read('nz', nz)
call param_read('Periodic', periodic)

! allocate
allocate(x(nx+1), y(ny+1), z(nz+1))

! create simple rectilinear grid
do i = 1, nx+1
x(i) = real(i-1,WP) / real(nx, WP) * Lx
end do
do j = 1, ny+1
y(j) = real(j-1,WP) / real(ny, WP) * Ly
end do
do k = 1, nz+1
z(k) = real(k-1,WP) / real(nz, WP) * Lz
end do

! generate serial grid object
grid=sgrid(coord=cartesian, no=1, x=x, y=x, z=x, xper=periodic, &
& yper=periodic, zper=periodic)

end block create_grid

! create a config from that grid on our entire group
create_cfg: block
use parallel, only: group
integer, dimension(3) :: partition

! read in partition
call param_read('Partition', partition, short='p')

! create partitioned grid
cfg = config(grp=group, decomp=partition, grid=grid)

end block create_cfg

! Create masks for this config
create_walls: block
cfg%VF=1.0_WP
end block create_walls

end subroutine geometry_init

end module geometry

Loading