Skip to content

Commit

Permalink
changed to match 2d_axisym better and to plot rho=0.5 isosurface. Dim…
Browse files Browse the repository at this point in the history
…ensional splitting is much faster
  • Loading branch information
rjleveque committed Dec 28, 2014
1 parent b654b72 commit c2b0f44
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
4 changes: 3 additions & 1 deletion euler/shockbubble/3d/afterframe.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
if PlotType ~= 4
axis([0 1.2 0 0.5 0 0.5]);
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
Expand All @@ -23,4 +24,5 @@
end

shg
colorbar;
clear afterframe
12 changes: 6 additions & 6 deletions euler/shockbubble/3d/setplot3.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
setopengl;
setviews % set viewpoints so that view(xSlice), for example, can be used.

PlotType = 3; % type of plot to produce:
PlotType = 1; % type of plot to produce:
% 1 = pcolor on slices (with optional contours)
% 2 = contour lines in 3d on transparent slices
% 3 = Schlieren plot on slices
Expand All @@ -21,8 +21,8 @@

PlotData = [1 1 1 0 0 0]; % Data on refinement level k is plotted only
% if k'th component is nonzero
PlotGrid = [0 0 0 0 0 0]; % Plot grid lines on each level?
PlotGridEdges = [1 0 0 0 0 0]; % Plot edges of patches of each grid at
PlotGrid = [1 0 0 0 0 0]; % Plot grid lines on each level?
PlotGridEdges = [1 1 0 0 0 0]; % Plot edges of patches of each grid at
% this level on slices?
PlotCubeEdges = [0 0 0 0 0 0]; % Plot edges of cube of refinement patch at
% this level?
Expand All @@ -49,11 +49,11 @@
% Note: Lengths of SurfTransparency and SurfColors must greater than or
% equal to the length of SurfValues..

IsosurfValues = [2.4 0.5]; % Plot surfaces at q = surfValue(i).
IsosurfValues = [0.5]; % Plot surfaces at q = surfValue(i).

IsosurfAlphas = [0.2 1 ]; % Transparency of each surface
IsosurfAlphas = [0.5]; % Transparency of each surface
% (0=clear; 1=opaque)
% NOTE: Your system must be able to
% use the OpenGL Renderer.

IsosurfColors = strvcat('b','r'); % Colors for each surface.
IsosurfColors = strvcat('y'); % Colors for each surface.
29 changes: 14 additions & 15 deletions euler/shockbubble/3d/setrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,16 @@ def setrun(claw_pkg='amrclaw'):

# Lower and upper edge of computational domain:
clawdata.lower[0] = 0.000000e+00 # xlower
clawdata.upper[0] = 1.200000e+00 # xupper
clawdata.upper[0] = 2.000000e+00 # xupper
clawdata.lower[1] = 0.000000e+00 # ylower
clawdata.upper[1] = 0.500000e+00 # yupper
clawdata.lower[2] = 0.000000e+00 # zlower
clawdata.upper[2] = 0.500000e+00 # zupper

# Number of grid cells:
clawdata.num_cells[0] = 30 # mx
clawdata.num_cells[1] = 12 # my
clawdata.num_cells[2] = 12 # mz
clawdata.num_cells[0] = 40 # mx
clawdata.num_cells[1] = 10 # my
clawdata.num_cells[2] = 10 # mz


# ---------------
Expand Down Expand Up @@ -121,8 +121,8 @@ def setrun(claw_pkg='amrclaw'):
if clawdata.output_style==1:
# Output ntimes frames at equally spaced times up to tfinal:
# Can specify num_output_times = 0 for no output
clawdata.num_output_times = 4
clawdata.tfinal = .3
clawdata.num_output_times = 7
clawdata.tfinal = .7
clawdata.output_t0 = True # output at initial (or restart) time?

elif clawdata.output_style == 2:
Expand Down Expand Up @@ -165,7 +165,7 @@ def setrun(claw_pkg='amrclaw'):

# Initial time step for variable dt.
# (If dt_variable==0 then dt=dt_initial for all steps)
clawdata.dt_initial = 1.00000e-02
clawdata.dt_initial = 5e-3

# Max time step to be allowed if variable dt used:
clawdata.dt_max = 1.000000e+99
Expand All @@ -187,7 +187,7 @@ def setrun(claw_pkg='amrclaw'):
clawdata.order = 2

# Use dimensional splitting?
clawdata.dimensional_split = 'unsplit'
clawdata.dimensional_split = 'godunov'

# For unsplit method, transverse_waves can be
# 0 or 'none' ==> donor cell (only normal solver used)
Expand Down Expand Up @@ -276,14 +276,13 @@ def setrun(claw_pkg='amrclaw'):
amrdata = rundata.amrdata

# max number of refinement levels:
#amrdata.amr_levels_max = 3 #original 4.3 code had 3 levels, but too expensive for default
amrdata.amr_levels_max = 2
amrdata.amr_levels_max = 3

# List of refinement ratios at each level (length at least amr_level_max-1)
amrdata.refinement_ratios_x = [2, 4]
amrdata.refinement_ratios_y = [2, 4]
amrdata.refinement_ratios_z = [2, 4]
amrdata.refinement_ratios_t = [2, 4]
amrdata.refinement_ratios_x = [4, 2]
amrdata.refinement_ratios_y = [4, 2]
amrdata.refinement_ratios_z = [4, 2]
amrdata.refinement_ratios_t = [4, 2]


# Specify type of each aux variable in clawdata.auxtype.
Expand All @@ -298,7 +297,7 @@ def setrun(claw_pkg='amrclaw'):

# Flag for refinement using routine flag2refine:
amrdata.flag2refine = True # use this?
amrdata.flag2refine_tol = 0.12 # tolerance used in this routine
amrdata.flag2refine_tol = 0.2 # tolerance used in this routine
# User can modify flag2refine to change the criterion for flagging.
# Default: check maximum absolute difference of first component of q
# between a cell and each of its neighbors.
Expand Down

0 comments on commit c2b0f44

Please sign in to comment.