[cig-commits] r21085 - in seismo/3D/FAULT_SOURCE/branches/new_fault_db: EXAMPLES/splay_faults/post EXAMPLES/tohoku EXAMPLES/tohoku/DATA Post-processing src
ampuero at geodynamics.org
ampuero at geodynamics.org
Wed Nov 28 14:24:57 PST 2012
Author: ampuero
Date: 2012-11-28 14:24:57 -0800 (Wed, 28 Nov 2012)
New Revision: 21085
Modified:
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/post/Plot_snapshot_splay_faults.m
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/DATA/Par_file_faults
seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/mesh_japan.py
seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/FSEM3D_snapshot.m
seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/plotclr.m
seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver_dynamic.f90
Log:
fixing tohoku example: decrease fault opening in mesh_japan.py, set compressive normal stress in Par_file_faults; other modifications are cosmetic
Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/post/Plot_snapshot_splay_faults.m
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/post/Plot_snapshot_splay_faults.m 2012-11-28 18:49:23 UTC (rev 21084)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/splay_faults/post/Plot_snapshot_splay_faults.m 2012-11-28 22:24:57 UTC (rev 21085)
@@ -6,8 +6,8 @@
XLIM = [0 120]; % range along-strike
SLIM = [-8 8]; % slip range
-dA = FSEM3D_snapshot(ITSNAP,1,'.',1);
-dBC = FSEM3D_snapshot(ITSNAP,1,'.',2);
+dA = FSEM3D_snapshot(ITSNAP,'.',1);
+dBC = FSEM3D_snapshot(ITSNAP,'.',2);
% along-dip slip is negative for thrust faulting
dA.Dz = -dA.Dz;
Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/DATA/Par_file_faults
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/DATA/Par_file_faults 2012-11-28 18:49:23 UTC (rev 21084)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/DATA/Par_file_faults 2012-11-28 22:24:57 UTC (rev 21085)
@@ -8,15 +8,19 @@
&BEGIN_FAULT /
-&INIT_STRESS S1=0.0e6,S2=40.0e6,S3=100.0e6,n1=0,n2=0,n3=0 /
+&INIT_STRESS S1=0.0e6,S2=40.0e6,S3=-100.0e6,n1=0,n2=0,n3=0 /
&SWF mus=1000.0e0,mud=1000.0e0,dc=4e0,nmus=2,nmud=1,ndc=19 /
+
! weak zone (us = 0.6 )
&DIST2D shape='cylinder', val = 0.6e0, xc = -75.0e3, yc =-425.0e3, zc= -19.27e3, r = 253.0e3, lz=100.0e3 /
+
! nucleation zone (us = 0.395)
&DIST2D shape='cylinder', val = 0.395e0, xc = -60.0e3, yc =-400.0e3, zc= -17.8e3, r = 15.0e3, lz=100.0e3 /
+
! Weak Zone (ud = 0.3 )
&DIST2D shape='cylinder', val = 0.3e0, xc = -75.0e3, yc =-425.0e3, zc= -19.27e3, r = 253.0e3, lz=100.0e3 /
+
! Big asperities dc = 2
! Asp 1
&DIST2D shape='cylinder', val = 2.0e0, xc = -65.0e3, yc =-410.0e3, zc= -18.25e3, r = 110.0e3, lz=100.0e3 /
@@ -26,6 +30,7 @@
&DIST2D shape='cylinder', val = 2.0e0, xc = -145.0e3, yc =-525.0e3, zc= -23.84e3, r = 49.5e3, lz=100.0e3 /
! Asp 4
&DIST2D shape='cylinder', val = 2.0e0, xc = -30.0e3, yc =-305.0e3, zc= -15.47e3, r = 49.5e3, lz=100.0e3 /
+
! Small ssperities dc =1
! Asp 5
&DIST2D shape='cylinder', val = 1.0e0, xc = -45.0e3, yc =-265.0e3, zc= -19.49e3, r = 13.75e3, lz=100.0e3 /
Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/mesh_japan.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/mesh_japan.py 2012-11-28 18:49:23 UTC (rev 21084)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tohoku/mesh_japan.py 2012-11-28 22:24:57 UTC (rev 21085)
@@ -30,9 +30,13 @@
os.system('mkdir -p MESH')
####### Fault opening #############################################
+# Open the fault by 0.2 m in Z direction.
+# This opening must be smaller than FAULT_GAP_TOLERANCE
+# defined in decompose_mesh_SCOTH/fault_scotch.f90 (usually FAULT_GAP_TOLERANCE=1.0d0)
+# and larger than SMALLVAL_TOL defined in constants.h (usually SMALLVAL_TOL=1.d-10*dabs(UTM_X_MAX - UTM_X_MIN))
cubit.cmd('set node constraint off')
-cubit.cmd('node in surf 42 move X 0 Y 0 Z 0.001') # delta = 2e-3 km. in Z direction.
-cubit.cmd('node in surf 36 move X 0 Y 0 Z -0.001') # In general the shift should be normal to the fault.
+cubit.cmd('node in surf 42 move X 0 Y 0 Z 0.0001')
+cubit.cmd('node in surf 36 move X 0 Y 0 Z -0.0001')
####################################################################
Au = [42] # A_up
@@ -213,10 +217,3 @@
### Changing nodes_coords_file to meters.
# all files needed by SCOTCH are now in directory MESH
-
-file_nodes_coord = 'MESH/nodes_coords_file'
-fault_file = 'MESH/fault_file_1.dat'
-name_out = 'MESH/nodes_coords_file_open_fault'
-fsideu = 'MESH/fault_sideu.dat'
-fsided = 'MESH/fault_sided.dat'
-nodes_coords_fault_open(file_nodes_coord,fault_file,name_out,fsideu,fsided,delta)
Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/FSEM3D_snapshot.m
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/FSEM3D_snapshot.m 2012-11-28 18:49:23 UTC (rev 21084)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/FSEM3D_snapshot.m 2012-11-28 22:24:57 UTC (rev 21085)
@@ -1,10 +1,8 @@
-%FSEM3D_SNAPSHOT reads and plots fault fields at a given time
+%FSEM3D_SNAPSHOT reads fault data at a given time
%
-% d = FSEM3D_snapshot(isnap, [fig, dir, fault])
+% d = FSEM3D_snapshot(isnap, [dir, fault])
%
% INPUTS isnap snapshot index, as in Snapshot*.bin file names
-% fig [1] plot horizontal slip rate or not
-% *** this option has been temporarily disabled, the value is ignored ***
% dir ["."] directory containing the SPECFEM3D output data Snapshot*.bin
% fault [1] fault id
%
@@ -21,16 +19,14 @@
% Jean-Paul Ampuero ampuero at erdw.ethz.ch modified by
% Percy Galvez percy.galvez at sed.ethz.ch 19/01/2011.
%
-% WARNING : This script only do snapshots of single precision files so far.
+% WARNING : Works only for single precision snapshot files.
-function d = FSEM3D_snapshot(isnap,fig,DATA_DIR,fault)
+function d = FSEM3D_snapshot(isnap,DATA_DIR,fault)
NDAT = 14;
-VM = 3; % saturate the color scale of the slip rate figure at VM m/s
-if nargin<2, fig=1; end
-if nargin<3, DATA_DIR = '.'; end
-if nargin<4, fault = 1; end
+if nargin<2, DATA_DIR = '.'; end
+if nargin<3, fault = 1; end
BinFile = sprintf('%s/Snapshot%u_F%u.bin',DATA_DIR,isnap,fault);
@@ -39,7 +35,7 @@
BinRead = fread(fid,[1,inf],'single')' ;
fclose(fid);
-BinRead = reshape( BinRead(:),length(BinRead)/(NDAT),NDAT);
+BinRead = reshape( BinRead(:),length(BinRead)/NDAT, NDAT);
BinRead = BinRead(2:end-1,:);
% Reorder fault nodes (lexicographic z,x)
@@ -61,7 +57,5 @@
d.Trup = BinRead(:,13);
d.Tpz = BinRead(:,14);
-clear BinRead
-
return
Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/plotclr.m
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/plotclr.m 2012-11-28 18:49:23 UTC (rev 21084)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/Post-processing/plotclr.m 2012-11-28 22:24:57 UTC (rev 21085)
@@ -60,4 +60,4 @@
end
set(h,'yticklabel',s);
grid on
-view(2)
\ No newline at end of file
+view(2)
Modified: seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver_dynamic.f90
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver_dynamic.f90 2012-11-28 18:49:23 UTC (rev 21084)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/src/fault_solver_dynamic.f90 2012-11-28 22:24:57 UTC (rev 21085)
@@ -1060,7 +1060,7 @@
allocate(dataXZ%tRUP(bc%nglob))
allocate(dataXZ%tPZ(bc%nglob))
- !Percy , setting up initial rupture time null for all faults.
+ !Percy, setting up initial rupture time null
dataXZ%tRUP = 0e0_CUSTOM_REAL
dataXZ%tPZ = 0e0_CUSTOM_REAL
@@ -1135,29 +1135,26 @@
integer :: i
- ! "stg" : strength .
-
dataXZ%stg = stg
do i = 1,size(stg)
- ! process zone time = first time when slip = dc (break down process).
+
+ ! process zone time = first time when slip = dc (break down process)
! with linear time interpolation
if (dataXZ%tPZ(i)==0e0_CUSTOM_REAL) then
if (dold(i)<=dc(i) .and. dnew(i) >= dc(i)) then
dataXZ%tPZ(i) = time-dt*(dnew(i)-dc(i))/(dnew(i)-dold(i))
endif
endif
- ! rupture time = first time when slip velocity = vc
- ! with linear time interpolation
- ! vc should be pre-defined as input data .
+ ! rupture time = first time when slip velocity = V_RUPT
+ ! with linear time interpolation
if (dataXZ%tRUP(i)==0e0_CUSTOM_REAL) then
if (vold(i)<=V_RUPT .and. vnew(i)>=V_RUPT) dataXZ%tRUP(i)= time-dt*(vnew(i)-V_RUPT)/(vnew(i)-vold(i))
endif
+
enddo
- ! To do : add stress criteria (firs time strength is reached).
-
! note: the other arrays in dataXZ are pointers to arrays in bc
! they do not need to be updated here
@@ -1172,12 +1169,7 @@
character(len=70) :: filename
write(filename,"('OUTPUT_FILES/Snapshot',I0,'_F',I0,'.bin')") itime,iflt
- ! open(unit=IOUT, file= trim(filename), status='replace', form='formatted',action='write')
- ! NOTE : It had to be adopted formatted output to avoid conflicts readings with different
- ! compilers.
- ! write(IOUT,"(5F24.15)") dataXZ%xcoord,dataXZ%ycoord,dataXZ%zcoord,dataXZ%v1,dataXZ%v2
-
open(unit=IOUT, file= trim(filename), status='replace', form='unformatted',action='write')
write(IOUT) dataXZ%xcoord
More information about the CIG-COMMITS
mailing list