| Version 14 (modified by , 4 years ago) ( diff ) |
|---|
12.06.2021
1. old data run revised
set box_7 to be 4000/8=500 instead of 750
! Physical bounds of boxes
box_0=64000*reshape((/-1,-1,-1,1,1,1/),(/3,2/))
box_4=4000*reshape((/-1,-1,-1,1,1,1/),(/3,2/))
!box_7=750*reshape((/-1,-1,-1,1,1,1/),(/3,2/))
box_7=500*reshape((/-1,-1,-1,1,1,1/),(/3,2/))
2. New Data lattice
large grid: 2.4e4/512=46.875; 1.4/299 = 46.8227424749 medium grid: 1e4/512=19.53125 small grid: 5e3/512 = 9.765625
9.21.2021 New Phantom data from Orsola
1. Dimensions
A small correction. The resolution of the three boxes is: Grid 1 (r+g+b): 512x512x299 Grid 2 (g+b): 512x512x512 Grid 3 (b): 512x512x512
Grid 1:
# SPLASH: A visualisation tool for SPH data (c)2004-2021 Daniel Price and contributors
# binary_08000_density_grid.dat produced using "splash to grid" on file binary_08000
#
# time:
# 2.0201106E+01
#
# xmin,xmax,ymin,ymax,zmin,zmax:
# -1.2000000E+04 1.2000000E+04 -1.2000000E+04 1.2000000E+04 -7.0000000E+03 7.0000000E+03
#
# file contains:
# density interpolated to 3D cartesian x,y,z grid
#
# written in the form:
# do k=1,nz
# do j=1,ny
# write(*,*) (dat(i,j,k),i=1,nx)
# enddo
# enddo
#
# grid dimensions:
# nx ny nz
512 512 299
Grid 2:
# SPLASH: A visualisation tool for SPH data (c)2004-2021 Daniel Price and contributors
# binary_08000_density_grid.dat produced using "splash to grid" on file binary_08000
#
# time:
# 2.0201106E+01
#
# xmin,xmax,ymin,ymax,zmin,zmax:
# -5.0000000E+03 5.0000000E+03 -5.0000000E+03 5.0000000E+03 -5.0000000E+03 5.0000000E+03
#
# file contains:
# density interpolated to 3D cartesian x,y,z grid
#
# written in the form:
# do k=1,nz
# do j=1,ny
# write(*,*) (dat(i,j,k),i=1,nx)
# enddo
# enddo
#
# grid dimensions:
# nx ny nz
512 512 512
Grid 3:
# SPLASH: A visualisation tool for SPH data (c)2004-2021 Daniel Price and contributors
# binary_08000_density_grid.dat produced using "splash to grid" on file binary_08000
#
# time:
# 2.0201106E+01
#
# xmin,xmax,ymin,ymax,zmin,zmax:
# -2.5000000E+03 2.5000000E+03 -2.5000000E+03 2.5000000E+03 -2.5000000E+03 2.5000000E+03
#
# file contains:
# density interpolated to 3D cartesian x,y,z grid
#
# written in the form:
# do k=1,nz
# do j=1,ny
# write(*,*) (dat(i,j,k),i=1,nx)
# enddo
# enddo
#
# grid dimensions:
# nx ny nz
512 512 512
2. scales
| Phantom units | Conversion factor |
| Length | 6.960E+10 cm |
| Mass | 1.989E+33 g |
| Density | 5.901E+00g/cm3 |
| Velocity | 4.367E+07 cm/s |
3. Figures
| |
|
9.13.2021 Old data mapping and Simulations
1. Phantom data
Large grid:
# SPLASH: A visualisation tool for SPH data (c)2004-2014 Daniel Price
# time:
# 1.5868375E+01
#
# file contains:
# density [g/cm\u3\d] interpolated to 3D grid
#
# written in the form:
# do k=1,nz
# do j=1,ny
# write(*,*) (dat(i,j,k),i=1,nx)
# enddo
# enddo
#
# grid dimensions:
# nx ny nz
128 128 128
Medium grid:
#
# grid dimensions:
# nx ny nz
128 128 128
Small grid
# grid dimensions:
# nx ny nz
192 192 192
| Details | density large grid | density medium grid | density small grid |
2. Parameters and Mapping code in Astrobear
!=============================================================================================
! Parameters Related to Space
!=============================================================================================
nDim = 3 ! number of dimensions for this problem (1-3)
GmX = 128,128,128 ! Base grid resolution [x,y,z]
MaxLevel = 7 ! Maximum level for this simulation (0 is fixed grid)
LastStaticLevel = 0 ! Use static AMR for levels through LastStaticLevel [-1]
GxBounds = -64000d0,-64000d0,-64000d0,64000d0,64000d0,64000d0 ! Problem boundaries in computational units,format:
! (xlower, ylower, zlower, xupper, yupper, zupper)
! For 2D problems, set zlower and zupper to 0.d0.
SUBROUTINE ProblemModuleInit()
INTEGER :: n,i,j,k,edge
real(KIND=qPREC) :: rhoambient,pambient,mass,xloc(3),vel(3),alpha,radiusw
integer :: grav_soft_rad
TYPE(ProjectionDef), POINTER :: Projection
NAMELIST/AmbientData/ rhoambient,pambient
NAMELIST /ParticleData/ mass,xloc,vel,alpha,radiusw,grav_soft_rad
NAMELIST/ProblemData/ outflowstarttime, outflowendtime, outflowdensity, mintracer
open(unit=problem_data_handle,file='problem.data',status='old')
read(problem_data_handle,nml=ProblemData)
! Make sure interpopts starts at zero for initial grid setup
if (.not. lRestart) then
InterpOpts=0
MinDensity=4d-6 ! << set mindensity higher to overwrite the odd spherical region, change to 1d-10 later in ProblemBeforeGlobalStep
MinTemp=20 ! << set mintemp higher for frame 0, change to 10 later in ProblemBeforeGlobalStep
end if
if (lRestart) then
particle=>SinkParticles%self ! handle to the particle
Call addtracer(particle%outflowobj%iTracer,'Outflow_Tracer') ! <<< tracers need to be added in the same order when the code is restarted, but don't re-creat the particle - or the outflow object
end if
! Physical bounds of boxes
box_0=64000*reshape((/-1,-1,-1,1,1,1/),(/3,2/))
box_4=4000*reshape((/-1,-1,-1,1,1,1/),(/3,2/))
box_7=750*reshape((/-1,-1,-1,1,1,1/),(/3,2/))
! index of boxes in each level's index space
ibox_0=nint(box_0-spread(GxBounds(:,1),2,2))/levels(0)%dx + spread((/1,0/),1,3)
if (maxlevel >= 4) then
ibox_4=nint(box_4-spread(GxBounds(:,1),2,2))/levels(4)%dx + spread((/1,0/),1,3)
if (maxlevel >= 7) then
ibox_7=nint(box_7-spread(GxBounds(:,1),2,2))/levels(7)%dx + spread((/1,0/),1,3)
end if
end if
CALL CreateRefinement(RefineJet)
CALL CreateShape(RefineJet%shape, RECTANGULAR_PRISM, (/750d0,750d0,0d0/)) !position defaults to 0,0,0
RefineJet%type=REFINE_INSIDE
nx=Info%mx(1)
ny=Info%mx(2)
nz=Info%mx(3)
IF (lRestart) RETURN
IF (.NOT. ANY(Info%level == (/0,4,7/))) RETURN
SELECT CASE(Info%level)
CASE(0)
open(unit=195,file='density_grid1.dat',status='old',form='formatted',action='read')
open(unit=196,file='v_x_grid1.dat',status='old',form='formatted',action='read')
open(unit=197,file='v_y_grid1.dat',status='old',form='formatted',action='read')
open(unit=198,file='v_z_grid1.dat',status='old',form='formatted',action='read')
open(unit=199,file='NewLargeGrid_u_erg_g_grid.dat',status='old',form='formatted',action='read')
ibox=ibox_0
CASE(4)
open(unit=195,file='density_grid2.dat',status='old',form='formatted',action='read')
open(unit=196,file='v_x_grid2.dat',status='old',form='formatted',action='read')
open(unit=197,file='v_y_grid2.dat',status='old',form='formatted',action='read')
open(unit=198,file='v_z_grid2.dat',status='old',form='formatted',action='read')
open(unit=199,file='NewMedGrid_u_erg_g_grid.dat',status='old',form='formatted',action='read')
ibox=ibox_4
CASE(7)
open(unit=195,file='density_grid3.dat',status='old',form='formatted',action='read')
open(unit=196,file='v_x_grid3.dat',status='old',form='formatted',action='read')
open(unit=197,file='v_y_grid3.dat',status='old',form='formatted',action='read')
open(unit=198,file='v_z_grid3.dat',status='old',form='formatted',action='read')
open(unit=199,file='NewSmallGrid_u_erg_g_grid.dat',status='old',form='formatted',action='read')
ibox=ibox_7
END SELECT
do i=1,19 !< Reads the first 19 lines from each file - presumably containing meta data
read(195,*)
read(196,*)
read(197,*)
read(198,*)
read(199,*)
end do
! Allocate space to store local box
allocate(a(ibox(1,1):ibox(1,2), ibox(2,1):ibox(2,2), ibox(3,1):ibox(3,2), 5))
! Read in data
read(195,*),a(:,:,:,1) !< must be density in g
read(196,*),a(:,:,:,2) !< x-velocity in cm/s
read(197,*),a(:,:,:,3) !< y-velocity in cm/s
read(198,*),a(:,:,:,4) !< z-velocity in cm/s
read(199,*),a(:,:,:,5) !< internal energy in erg/g
close(195)
close(196)
close(197)
close(198)
close(199)
a(:,:,:,5)=a(:,:,:,5)*a(:,:,:,1)*efact / pscale !< rescale internal energy for simulation gamma
a(:,:,:,1)=a(:,:,:,1)/rscale
a(:,:,:,2:4)=a(:,:,:,2:4)/velscale * spread(a(:,:,:,1),4,3)
a(:,:,:,5)=a(:,:,:,5)+.5*sum(a(:,:,:,2:4)**2,4)/a(:,:,:,1)
! Calculate overlap
mb(:,2)=min(ibox(:,2), info%mglobal(:,2))
mb(:,1)=max(ibox(:,1), info%mglobal(:,1))
mc=mb-spread(info%mglobal(:,1),2,2)+1
! Update Info%q
Info%q(mc(1,1):mc(1,2), mc(2,1):mc(2,2), mc(3,1):mc(3,2),1:5)=a(mb(1,1):mb(1,2), mb(2,1):mb(2,2), mb(3,1):mb(3,2), :)
deallocate(a)
| Details | problem.f90 | global.data | physics.data | problem.data |
3. output from AstroBear
| (z,x,y) |
|
Attachments (2)
- oldData.png (2.9 MB ) - added by 4 years ago.
-
new_AMR7_500.png
(1.2 MB
) - added by 4 years ago.
old data with new AMR7 as 500
Note:
See TracWiki
for help on using the wiki.




