Skip to content

Commit

Permalink
Merge pull request clawpack#50 from rjleveque/dimsplit
Browse files Browse the repository at this point in the history
Dimsplit
  • Loading branch information
rjleveque committed Dec 30, 2014
2 parents 133e2a1 + c2b0f44 commit 8d9414e
Show file tree
Hide file tree
Showing 22 changed files with 1,088 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ SOURCES = \
$(AMRLIB)/advanc.f \
$(AMRLIB)/bound.f90 \
$(AMRLIB)/stepgrid.f \
$(AMRLIB)/stepgrid_dimSplit.f \
$(AMRLIB)/cellave.f \
$(AMRLIB)/fss.f \
$(AMRLIB)/zeroin.f \
Expand Down Expand Up @@ -126,7 +127,10 @@ SOURCES = \
$(AMRLIB)/icall.f \
$(AMRLIB)/preicall.f \
$(AMRLIB)/step2.f90 \
$(AMRLIB)/step2x.f90 \
$(AMRLIB)/step2y.f90 \
$(AMRLIB)/flux2.f \
$(AMRLIB)/flux2_dimSplit.f \
$(AMRLIB)/inlinelimiter.f \
$(AMRLIB)/cstore.f \
$(AMRLIB)/saveqc.f \
Expand Down
28 changes: 28 additions & 0 deletions euler/shockbubble/2d_axisym/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

.. _apps_euler_shockbubble_2d_axisym:

2D Axisymmetric shock-bubble intereaction
==========================================


Shock-bubble interaction solved with 2-dimensional axisymmetric Euler
equations using AMR.

A circular (i.e. spherical) bubble of gas is hit by a shock wave.
The same gas is inside and outside the bubble (ideal gas with gamma = 1.4).
The gas inside the bubble has a lower density but the same pressure
initially as the gas outside. Parameters are specified in `setrun.py`.

A passive tracer is also advected to show the motion of the gas originally inside
the bubble.

Version history:
----------------

- This version works with Clawpack 5.3.0
- 28 Dec 2014:

- Updated `Makefile` to include dimensional splitting
option introduced in 5.3.
- Moved from `apps/euler_2d_shockbubble` to `apps/euler/shockbubble/2d_axisym`

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def aa(current_data):


plotfigure = plotdata.new_plotfigure(name='u-velocity', figno=3)
plotfigure.show = False
plotfigure.kwargs = {'figsize':(16,5)}

# Set up for axes in this figure:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def setrun(claw_pkg='amrclaw'):
# Order of accuracy: 1 => Godunov, 2 => Lax-Wendroff plus limiters
clawdata.order = 2

# Use dimensional splitting? (not yet available for AMR)
# Use dimensional splitting?
clawdata.dimensional_split = 'unsplit'

# For unsplit method, transverse_waves can be
Expand Down
File renamed without changes.
File renamed without changes.
144 changes: 144 additions & 0 deletions euler/shockbubble/3d/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@

# Makefile for Clawpack code in this directory.
# This version only sets the local files and frequently changed
# options, and then includes the standard makefile pointed to by CLAWMAKE.
CLAWMAKE = $(CLAW)/clawutil/src/Makefile.common

# See the above file for details and a list of make options, or type
# make .help
# at the unix prompt.


# Adjust these variables if desired:
# ----------------------------------

CLAW_PKG = amrclaw # Clawpack package to use
EXE = xamr # Executable to create
SETRUN_FILE = setrun.py # File containing function to make data
OUTDIR = _output # Directory for output
SETPLOT_FILE = setplot.py # File containing function to set plots
PLOTDIR = _plots # Directory for plots

OVERWRITE ?= True # False ==> make a copy of OUTDIR first
RESTART ?= False # Should = clawdata.restart in setrun

# Environment variable FC should be set to fortran compiler, e.g. gfortran

# Compiler flags can be specified here or set as an environment variable
FFLAGS ?=

# ---------------------------------
# List of sources for this program:
# ---------------------------------

AMRLIB = $(CLAW)/amrclaw/src/3d

MODULES = \
$(AMRLIB)/amr_module.f90
#$(AMRLIB)/gauges_module.f90 \
#$(AMRLIB)/regions_module.f90 \
SOURCES = \
qinit.f \
setprob.f \
cellave.f \
fdisc.f \
$(CLAW)/riemann/src/rpn3_euler.f90 \
$(CLAW)/riemann/src/rpt3_euler.f90 \
$(CLAW)/riemann/src/rptt3_euler.f90 \
$(AMRLIB)/amr3.f90 \
$(AMRLIB)/setaux.f90 \
$(AMRLIB)/bc3amr.f \
$(AMRLIB)/opendatafile.f \
$(AMRLIB)/b4step3.f90 \
$(AMRLIB)/qad.f \
$(AMRLIB)/src3.f90 \
$(AMRLIB)/src1d.f90 \
$(AMRLIB)/advanc.f \
$(AMRLIB)/bound.f \
$(AMRLIB)/stepgrid.f \
$(AMRLIB)/stepgrid_dimSplit.f \
$(AMRLIB)/auxcoarsen.f \
$(AMRLIB)/fixcapaq.f \
$(AMRLIB)/estdt.f \
$(AMRLIB)/igetsp.f \
$(AMRLIB)/reclam.f \
$(AMRLIB)/birect.f \
$(AMRLIB)/cleanup.f \
$(AMRLIB)/colate.f \
$(AMRLIB)/errest.f \
$(AMRLIB)/flag2refine.f \
$(AMRLIB)/allowflag.f \
$(AMRLIB)/bufnst.f \
$(AMRLIB)/spest.f \
$(AMRLIB)/errf1.f \
$(AMRLIB)/gfixup.f \
$(AMRLIB)/filval.f \
$(AMRLIB)/filpatch.f \
$(AMRLIB)/prefilp.f \
$(AMRLIB)/flglvl.f \
$(AMRLIB)/fluxad.f \
$(AMRLIB)/fluxsv.f \
$(AMRLIB)/ginit.f \
$(AMRLIB)/grdfit.f \
$(AMRLIB)/intfil.f \
$(AMRLIB)/moment.f \
$(AMRLIB)/nestck.f \
$(AMRLIB)/prepc.f \
$(AMRLIB)/prepf.f \
$(AMRLIB)/projec.f \
$(AMRLIB)/signs.f \
$(AMRLIB)/findcut.f \
$(AMRLIB)/smartbis.f \
$(AMRLIB)/putnod.f \
$(AMRLIB)/putsp.f \
$(AMRLIB)/regrid.f \
$(AMRLIB)/setgrd.f \
$(AMRLIB)/setuse.f \
$(AMRLIB)/stst1.f \
$(AMRLIB)/tick.f \
$(AMRLIB)/trimbd.f \
$(AMRLIB)/update.f \
$(AMRLIB)/nodget.f \
$(AMRLIB)/upbnd.f \
$(AMRLIB)/basic.f \
$(AMRLIB)/outval.f \
$(AMRLIB)/copysol.f \
$(AMRLIB)/outvar.f \
$(AMRLIB)/outmsh.f \
$(AMRLIB)/outtre.f \
$(AMRLIB)/domain.f \
$(AMRLIB)/setflags.f \
$(AMRLIB)/shiftset.f \
$(AMRLIB)/conck.f \
$(AMRLIB)/domshrink.f \
$(AMRLIB)/domprep.f \
$(AMRLIB)/domup.f \
$(AMRLIB)/domcopy.f \
$(AMRLIB)/coarsen.f \
$(AMRLIB)/intcopy.f \
$(AMRLIB)/preintcopy.f \
$(AMRLIB)/icall.f \
$(AMRLIB)/preicall.f \
$(AMRLIB)/step3.f \
$(AMRLIB)/step3x.f \
$(AMRLIB)/step3y.f \
$(AMRLIB)/step3z.f \
$(AMRLIB)/flux3.f \
$(AMRLIB)/flux3_dimSplit.f \
$(AMRLIB)/limiter.f \
$(AMRLIB)/philim.f \
$(AMRLIB)/cstore.f \
$(AMRLIB)/saveqc.f \
$(AMRLIB)/valout.f \
$(AMRLIB)/check.f \
$(AMRLIB)/restrt.f \
$(AMRLIB)/quick_sort1.f \
$(AMRLIB)/init_alloc.f90 \
$(AMRLIB)/resize_alloc.f90 \
$(AMRLIB)/restrt_alloc.f90

#-------------------------------------------------------------------
# Include Makefile containing standard definitions and make options:
include $(CLAWMAKE)

29 changes: 29 additions & 0 deletions euler/shockbubble/3d/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

.. _apps_euler_shockbubble_3d:

3D shock-bubble intereaction
==============================


Shock-bubble interaction solved with 3-dimensional axisymmetric Euler
equations using AMR.

A spherical bubble of gas is hit by a shock wave.
The same gas is inside and outside the bubble (ideal gas with gamma = 1.4).
The gas inside the bubble has a lower density but the same pressure
initially as the gas outside. Parameters are specified in `setrun.py`.

A passive tracer is also advected to show the motion of the gas originally inside
the bubble.

Version history:
----------------

- This version works with Clawpack 5.3.0
- 28 Dec 2014:

- Updated `Makefile` to include dimensional splitting
option introduced in 5.3.
- Moved from `amrclaw/examples/euler_3d_shockbubble` to
`apps/euler/shockbubble/3d`

7 changes: 7 additions & 0 deletions euler/shockbubble/3d/addaxes.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
% add axes to 3d plots if grid is turned off
hold on
plot3([0 1.2],[.5 .5],[0 0],'k')
plot3([1.2 1.2],[.5 .5],[0 .5],'k')
plot3([1.2 1.2],[0 .5],[0 0],'k')
hold off

28 changes: 28 additions & 0 deletions euler/shockbubble/3d/afterframe.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
if PlotType ~= 4
axis([0 2 0 0.5 0 0.5]);
daspect([1 1 1]);
end

if PlotType==1
yrbcolormap
caxis([0,3])
end

if PlotType==3
set(gca,'box','on');
end
camlight;

% showcubes;
% setcubecolor('k',1);
% setcubecolor('b',2);
% setcubecolor('r',3);

if PlotType==5
camlight left;
grid off;
end

shg
colorbar;
clear afterframe
Loading

0 comments on commit 8d9414e

Please sign in to comment.