[cig-commits] r18713 - in seismo/3D/FAULT_SOURCE/branches/new_fault_db: CUBIT EXAMPLES/tpv15.crack EXAMPLES/tpv15.crack/DATA EXAMPLES/tpv15.crack/DATA/FAULT

percygalvez at geodynamics.org percygalvez at geodynamics.org
Fri Jul 8 02:05:12 PDT 2011


Author: percygalvez
Date: 2011-07-08 02:05:12 -0700 (Fri, 08 Jul 2011)
New Revision: 18713

Added:
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/CUBIT/save_fault_nodes_elements.py
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/CMTSOLUTION
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/FAULT_STATIONS
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/Par_file_faults
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/Par_file
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/STATIONS
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15.py
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15.tiff
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening.py
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening_base_chunk.py
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_inner.tiff
Log:
tpv15 crack

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/CUBIT/save_fault_nodes_elements.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/CUBIT/save_fault_nodes_elements.py	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/CUBIT/save_fault_nodes_elements.py	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,69 @@
+#!python
+# Opening fault cracks
+# Input : surface up and down.
+import cubit 
+
+class fault_input:
+   def __init__(self,id,surface_u,surface_d): 
+       self.id = id
+       self.surface_u = surface_u
+       self.surface_d = surface_d
+       self.name = 'MESH/fault_file_'+str(id)+'.dat'
+
+def save_cracks(name,list_surface_up,list_surface_down):
+   quads_fault_up = [] 
+   quads_fault_down = []
+   for surface in list_surface_up   :
+       quads_fault = cubit.get_surface_quads(surface)
+       quads_fault_up.append(quads_fault)
+   for surface in list_surface_down :
+       quads_fault = cubit.get_surface_quads(surface)
+       quads_fault_down.append(quads_fault)
+    # TO DO : stop python properly in case fault nodes at both sides
+    #         do not match.
+    #   if len(quads_fault_u) != len(quads_fault_d): stop
+    #
+    # SAVING FAULT ELEMENTS AND NODES
+   return quads_fault_up,quads_fault_down
+
+def unpack_list(fault_list):
+    list_fault = []
+    for i in range(0,len(fault_list)):
+        el=list(fault_list[i])
+        for j in el:
+            list_fault.append(j)
+    return list_fault 
+          
+def save_elements_nodes(name,quads_fault_u,quads_fault_d):
+   fault_file = open(name,'w')
+   txt =''
+   list_hex=cubit.parse_cubit_list('hex','all')
+   txt='%10i %10i\n' % (len(quads_fault_u),len(quads_fault_d))
+   fault_file.write(txt)
+   
+   dic_quads_fault_u = dict(zip(quads_fault_u,quads_fault_u)) 
+   dic_quads_fault_d = dict(zip(quads_fault_d,quads_fault_d)) 
+   
+   # FAULT SIDE DOWN
+   for h in list_hex: 
+       faces = cubit.get_sub_elements('hex',h,2)  
+       for f in faces:
+           if dic_quads_fault_d.has_key(f): 
+              nodes=cubit.get_connectivity('Face',f)
+   #           print 'h,fault nodes side down :',h,nodes[0],nodes[1],nodes[2],nodes[3]
+              txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\
+                                                nodes[1],nodes[2],nodes[3])
+              fault_file.write(txt)
+
+   # FAULT SIDE UP
+   for h in list_hex: 
+       faces = cubit.get_sub_elements('hex',h,2)  
+       for f in faces:
+           if dic_quads_fault_u.has_key(f): 
+              nodes=cubit.get_connectivity('Face',f)
+   #           print 'h,fault nodes side up :',h,nodes[0],nodes[1],nodes[2],nodes[3]
+              txt='%10i %10i %10i %10i %10i\n' % (h,nodes[0],\
+                                                nodes[1],nodes[2],nodes[3])
+              fault_file.write(txt)
+
+   fault_file.close()

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/CMTSOLUTION
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/CMTSOLUTION	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/CMTSOLUTION	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,13 @@
+PDE  1999 01 01 00 00 00.00  1000000 1000000 -1000000 1 1 dynamic_rupture
+event name:       dynamic_rupture
+time shift:       0.0000
+half duration:    1.0
+latitude:        1000000.0
+longitude:       1000000.0
+depth:          -1000000.0
+Mrr:       1.258900e+0
+Mtt:       1.258900e+0
+Mpp:       1.258900e+0
+Mrt:       0.000000e0
+Mrp:       0.000000e0
+Mtp:       0.000000e0

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/FAULT_STATIONS
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/FAULT_STATIONS	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/FAULT_STATIONS	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,16 @@
+15
+-2000.0  	0.0          0.0    faultst-020dp000 1
+ 2000.0  	0.0          0.0    faultst020dp000  1
+ 5000.0  	0.0          0.0    faultst050dp000  1
+ 9000.0  	0.0          0.0    faultst090dp000  1
+-2000.0  	0.0      -7500.0    faultst-020dp075 1
+ 2000.0  	0.0      -7500.0    faultst020dp075  1
+ 5000.0  	0.0      -7500.0    faultst050dp075  1
+ 9000.0  	0.0      -7500.0    faultst090dp075  1
+-8000.0         0.0      -7500.0    faultst080dp075  1
+1732.05081  -1050.0          0.0    branchst020dp000 2
+4330.12702  -2550.0          0.0    branchst050dp000 2
+7794.22863  -4550.0          0.0    branchst090dp000 2
+1732.05081  -1050.0      -7500.0    branchst020dp075 2   
+4330.12702  -2550.0      -7500.0    branchst050dp075 2
+7794.22863  -4550.0      -7500.0    branchst090dp075 2   

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/Par_file_faults
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/Par_file_faults	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/FAULT/Par_file_faults	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,27 @@
+2
+0.00134                 ! #tag #eta(damping) FAULT Main fault
+0.00134                 ! #tag #eta(damping) FAULT Branch
+1                       ! 1 = dyn 2=kin
+100						! NTOUT : Number of time steps
+1000                                            ! NTSNAP: time interation of snapshots
+-1e0                                            ! V_HEALING (-1 : Healing off)
+1e-3                                            ! V_RUPT
+
+&BEGIN_FAULT /
+
+&INIT_STRESS S1=0.0e6,S2=0.0e0,S3=-120.0e6,n1=2,n2=0,n3=0 / 
+&DIST2D	shape='rectangle',       val = -70.0e6,  xc = -2.0e3, yc =0.0e3, zc= -7.5e3, lx=14.0e3, ly=0.0e0, lz=15.0e3 /
+&DIST2D shape='rectangle',       val = -81.6e6,  xc = -8.0e3, yc =0.0e3, zc= -7.5e3, lx=3.0e3,  ly=0.0e0, lz=3.0e3 / 
+
+&SWF mus=1000.0e0,mud=1000.0e0,dc=0.4e0,nmus=1,nmud=1,ndc=0 /  
+&DIST2D	shape='rectangle', val = 0.677e0,  xc = -2.0e3, yc =0.0e3, zc= -7.5e3, lx=14.0e3, ly=0.0e0, lz=15.0e3 /
+&DIST2D	shape='rectangle', val = 0.525e0,  xc = -2.0e3, yc =0.0e3, zc= -7.5e3, lx=14.0e3, ly=0.0e0, lz=15.0e3 /
+
+&BEGIN_FAULT /
+
+&INIT_STRESS S1=0.0e6,S2=0.0e0,S3=-120.0e6,n1=1,n2=0,n3=0 / 
+&DIST2D	shape='rectangle',       val = -78.0e6,  xc = 5152.85115e0, yc =-3025.0e0, zc=-7.5e3, lx=10478.9074e0, ly=6050.0e0, lz=15.0e3 /
+
+&SWF mus=1000.e0,mud=1000.0e0,dc=0.5e0,nmus=1,nmud=1,ndc=0 / 
+&DIST2D	shape='rectangle',       val =  0.677e0, xc = 5152.85115e0, yc =-3025.0e0, zc=-7.5e3, lx=10478.9074e0, ly=6050.0e0, lz=15.0e3 /
+&DIST2D	shape='rectangle',       val =  0.525e0, xc = 5152.85115e0, yc =-3025.0e0, zc=-7.5e3, lx=10478.9074e0, ly=6050.0e0, lz=15.0e3 /

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/Par_file
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/Par_file	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/Par_file	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,53 @@
+
+# forward or adjoint simulation
+SIMULATION_TYPE                 = 1   # 1 = forward, 2 = adjoint, 3 = both simultaneously
+SAVE_FORWARD                    = .false.
+
+# UTM projection parameters
+UTM_PROJECTION_ZONE             = 11
+SUPPRESS_UTM_PROJECTION         = .true.
+
+# number of MPI processors 
+NPROC                           = 100 
+
+# time step parameters
+NSTEP                           = 62000
+DT                              = 0.00325d0
+
+# parameters describing the model
+OCEANS                          = .false.
+ATTENUATION                     = .false.
+USE_OLSEN_ATTENUATION           = .false.
+ANISOTROPY                      = .false.
+
+# absorbing boundary conditions for a regional simulation
+ABSORBING_CONDITIONS            = .true.
+ABSORB_FREE_SURFACE             = .false.
+# save AVS or OpenDX movies
+MOVIE_SURFACE                   = .true.
+MOVIE_VOLUME                    = .false.
+NTSTEP_BETWEEN_FRAMES           = 16500
+CREATE_SHAKEMAP                 = .false.
+SAVE_DISPLACEMENT               = .true.
+USE_HIGHRES_FOR_MOVIES          = .false.
+HDUR_MOVIE                      = 0.0
+
+# save AVS or OpenDX mesh files to check the mesh
+SAVE_MESH_FILES                 = .false.
+
+# path to store the local database file on each node
+LOCAL_PATH                      = /cluster/work/erdw/gpercy 
+
+# interval at which we output time step info and max of norm of displacement
+NTSTEP_BETWEEN_OUTPUT_INFO      = 500
+
+# interval in time steps for writing of seismograms
+NTSTEP_BETWEEN_OUTPUT_SEISMOS   = 10000
+
+# print source time function
+PRINT_SOURCE_TIME_FUNCTION      = .false.
+
+## Here defined tags that will be taken for faults.
+## which friction laws .
+
+

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/STATIONS
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/STATIONS	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/DATA/STATIONS	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,11 @@
+body030st-020dp000  SC  3000.0  -2000.00  0.0    0.0
+body-030st-020dp000 SC -3000.0  -2000.00  0.0    0.0
+body030st020dp000   SC  3000.0   2000.00  0.0    0.0
+body-006st020dp000  SC  -600.0   2000.00  0.0    0.0
+body-042st020dp000  SC -4200.0   2000.00  0.0    0.0
+body030st050dp000   SC  3000.0   5000.00  0.0    0.0
+body-014st050dp000  SC -1400.0   5000.00  0.0    0.0
+body-059st050dp000  SC -5900.0   5000.00  0.0    0.0
+body030st080dp000   SC  3000.0   8000.00  0.0    0.0
+body-023st080dp000  SC -2300.0   8000.00  0.0    0.0
+body-076st080dp000  SC -7600.0   8000.00  0.0    0.0

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15.py	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15.py	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,214 @@
+#!/usr/bin/env python
+
+import cubit
+import boundary_definition
+import cubit2specfem3d 
+import math
+import os
+import sys
+cubit.cmd('reset')
+
+km = 1000
+z_surf=0*km
+R = math.pi/180
+q = math.sqrt(3)
+h = 0.1 
+
+L = 64*km
+####  initializing coordinates x,y,z
+x=[]     # fault
+y=[]
+z=[]
+
+xbulk=[] # bulk
+ybulk=[]
+zbulk=[]
+
+xbulk.append(-L/2)   #x1
+xbulk.append(L/2)    #x2
+xbulk.append(L/2)    #x3
+xbulk.append(-L/2)   #x4
+
+ybulk.append(-L/2)  #y1
+ybulk.append(-L/2)  #y2
+ybulk.append(L/2)   #y3
+ybulk.append(L/2)   #y4
+
+zbulk=[z_surf]*4
+
+### Main Fault #######################
+
+x.append(-16*km) #x5
+x.append(-50/math.tan(R*30))   #x6
+x.append(L/2)  #x7
+x.append(-50/math.tan(R*30))   #x8
+
+y.append(0.0)    #y5
+y.append(h)      #y6
+y.append(0.0)    #y7
+y.append(-h)     #y8
+
+### Branch Fault ######################
+
+x.append(x[3])                        #x9 = x8  (triple joint)
+x.append((L/2/q)*math.cos(R*30))         #x10
+x.append((L/q)*math.cos(R*30))        #x11
+x.append((L/2/q)*math.cos(R*30))         #x12
+
+y.append(y[3])                         #y9 = y8 (triple joint)
+y.append(-50-(L/2/q)*math.sin(R*30)+h)   #y10
+y.append(-50-(L/q)*math.sin(R*30))    #y11
+y.append(-50-(L/2/q)*math.sin(R*30)-h)   #y12
+
+z=[z_surf]*12
+
+####################  bulk ###########################################
+for i in range(len(xbulk)): 
+   vert="create vertex x "+str(xbulk[i])+" y "+str(ybulk[i])+" z "+str(zbulk[i]) 
+   cubit.cmd(vert) 
+
+################  Loading fault points profile#############################
+for i in range(len(x)):
+  vert="create vertex x "+str(x[i])+" y "+str(y[i])+" z "+str(z[i])
+  cubit.cmd(vert)
+
+
+################ creating fault domains #################################
+bulk1="create curve vertex 1 2"   # c1
+bulk2="create curve vertex 2 11"  # c2
+bulk3="create curve vertex 11 7"  # c3
+bulk4="create curve vertex 7 3"   # c4
+bulk5="create curve vertex 3 4"   # c5
+bulk6="create curve vertex 4 1"   # c6
+
+cubit.cmd(bulk1)
+cubit.cmd(bulk2)
+cubit.cmd(bulk3)
+cubit.cmd(bulk4)
+cubit.cmd(bulk5)
+cubit.cmd(bulk6)
+
+#### Main Fault ############################## 
+fault_up_r="create curve spline vertex 5 6 "    #c7
+fault_up_l="create curve spline vertex 6 7"     #c8
+
+fault_down_r="create curve spline vertex 5 8"   #c9 
+fault_down_l="create curve spline vertex 8 7"   #c10
+
+
+cubit.cmd(fault_up_r) 
+cubit.cmd(fault_up_l) 
+cubit.cmd(fault_down_r)
+cubit.cmd(fault_down_l)
+ 
+
+#### Branch Fault ############################# 
+fault_up="create curve spline vertex 9 10 11"    #c11 
+fault_down="create curve spline vertex 9 12 11"  #c12
+
+cubit.cmd(fault_up) 
+cubit.cmd(fault_down) 
+###############################################
+
+surface1="create surface curve 2 1 6 5 4 7 8 9 12"
+
+cubit.cmd(surface1)
+surface2="create surface curve 3 10 11"
+cubit.cmd(surface2)
+
+cubit.cmd("sweep surface 1  vector 0  0 -1 distance "+str(21*km)) 
+cubit.cmd("sweep surface 2  vector 0  0 -1 distance "+str(21*km)) 
+
+#cubit.cmd("sweep curve 5 vector 0 0 -1 distance "+str(21*km)) 
+#cubit.cmd("sweep curve 6 vector 0 0 -1 distance "+str(21*km)) 
+
+#####################################################
+elementsize = 300
+cubit.cmd("imprint all")
+cubit.cmd("merge all")
+cubit.cmd("surface 1 2 size "+str(elementsize))
+cubit.cmd("volume 1 2 size "+str(elementsize))
+cubit.cmd("surface 1 2 scheme pave")
+cubit.cmd("mesh surface 1 2")
+cubit.cmd("mesh volume 1 2")
+
+########### Fault elements and nodes ###############
+
+## Main Fault ####################################################################
+os.system('mkdir -p MESH') 
+
+Au = [6,7]   # A_up
+Ad = [5,14]  # A_down
+
+faultA = fault_input(1,Au,Ad)
+quads_Aup,quads_Adp = save_cracks(faultA.name,faultA.surface_u,faultA.surface_d)
+#Unpacking list.
+quads_Au=unpack_list(quads_Aup)
+quads_Ad=unpack_list(quads_Adp)
+
+print 'len(Au):',len(quads_Au)
+print 'len(Ad):',len(quads_Ad)
+
+if not (len(quads_Au)==len(quads_Ad)):
+    print 'Number of elements for each fauld side up and down do not concide'
+    sys.exit('goodbye')
+   
+save_elements_nodes(faultA.name,quads_Au,quads_Ad)
+
+####### Branch Fault##############################################################################
+Bu = [4]   # B_up
+Bd = [15]  # B_down
+
+faultB = fault_input(2,Bu,Bd)
+quads_Bup,quads_Bdp = save_cracks(faultB.name,faultB.surface_u,faultB.surface_d)
+#Unpacking list.
+quads_Bu=unpack_list(quads_Bup)
+quads_Bd=unpack_list(quads_Bdp)
+
+print 'len(Au):',len(quads_Bu)
+print 'len(Ad):',len(quads_Bd)
+
+if not (len(quads_Bu)==len(quads_Bd)):
+    print 'Number of elements for each fauld side up and down do not concide'
+    sys.exit('goodbye')
+   
+save_elements_nodes(faultB.name,quads_Bu,quads_Bd)
+
+##  FOR THE BULK (Seismic wave propagation part for SESAME)
+
+####### This is boundary_definition.py of GEOCUBIT 
+##..... which extracts the bounding faces and defines them into blocks 
+boundary_definition.entities=['face'] 
+boundary_definition.define_bc(boundary_definition.entities,parallel=True) 
+ 
+#### Define material properties for the 2 volumes ################ 
+cubit.cmd('#### DEFINE MATERIAL PROPERTIES #######################') 
+ 
+# Material properties in concordance with tpv5 benchmark. 
+ 
+cubit.cmd('block 1 name "elastic 1" ')        # material region  
+cubit.cmd('block 1 attribute count 5') 
+cubit.cmd('block 1 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 1 attribute index 2 6000')   # vp 
+cubit.cmd('block 1 attribute index 3 3464')    # vs 
+cubit.cmd('block 1 attribute index 4 2670')   # rho 
+cubit.cmd('block 1 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... )
+
+
+# Material properties in concordance with tpv5 benchmark. 
+ 
+cubit.cmd('block 2 name "elastic 2" ')        # material region  
+cubit.cmd('block 2 attribute count 5') 
+cubit.cmd('block 2 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 2 attribute index 2 6000')   # vp 
+cubit.cmd('block 2 attribute index 3 3464')    # vs 
+cubit.cmd('block 2 attribute index 4 2670')   # rho 
+cubit.cmd('block 2 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+ 
+
+#### Export to SESAME format using cubit2specfem3d.py of GEOCUBIT 
+ 
+cubit2specfem3d.export2SESAME('MESH')  
+ 
+# all files needed by SCOTCH are now in directory MESH 
+

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15.tiff
===================================================================
(Binary files differ)


Property changes on: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15.tiff
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening.py	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening.py	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,332 @@
+#!/usr/bin/env python
+
+import cubit
+import boundary_definition
+import cubit2specfem3d 
+import math
+import os
+import sys
+from save_fault_nodes_elements import *
+
+cubit.cmd('reset')
+
+km = 1000
+z_surf=0*km
+R = math.pi/180
+h = 0.1 
+q = math.sqrt(3)
+####  initializing coordinates x,y,z
+x=[]     # fault
+y=[]
+z=[]
+
+xbulk=[] # bulk
+ybulk=[]
+zbulk=[]
+
+xbulk.append(-18*km)   #x1
+xbulk.append(12*km)    #x2
+xbulk.append(12*km)    #x3
+xbulk.append(-18*km)   #x4
+
+ybulk.append(-8*km)  #y1
+ybulk.append(-8*km)  #y2
+ybulk.append(8*km)   #y3
+ybulk.append(8*km)   #y4
+
+zbulk=[z_surf]*4
+
+### Main Fault #######################
+
+x.append(-16*km) #x5
+x.append(-50/math.tan(R*30))   #x6
+x.append(12*km)  #x7
+x.append(-50/math.tan(R*30))   #x8
+
+y.append(0.0)    #y5
+y.append(h)      #y6
+y.append(0.0)    #y7
+y.append(-h)     #y8
+
+### Branch Fault ######################
+
+x.append(x[3])                        #x9 = x8  (triple joint)
+x.append((12*km/q)*math.cos(R*30))         #x10
+x.append((24*km/q)*math.cos(R*30))        #x11
+x.append((12*km/q)*math.cos(R*30))         #x12
+
+y.append(y[3])                         #y9 = y8 (triple joint)
+y.append(-50-(12*km/q)*math.sin(R*30)+h)   #y10
+y.append(-50-(24*km/q)*math.sin(R*30))    #y11
+y.append(-50-(12*km/q)*math.sin(R*30)-h)   #y12
+
+z=[z_surf]*12
+
+####################  bulk ###########################################
+for i in range(len(xbulk)): 
+   vert="create vertex x "+str(xbulk[i])+" y "+str(ybulk[i])+" z "+str(zbulk[i]) 
+   cubit.cmd(vert) 
+
+################  Loading fault points profile#############################
+for i in range(len(x)):
+  vert="create vertex x "+str(x[i])+" y "+str(y[i])+" z "+str(z[i])
+  cubit.cmd(vert)
+
+
+################ creating fault domains #################################
+bulk1="create curve vertex 1 2"   # c1
+bulk2="create curve vertex 2 11"  # c2
+bulk3="create curve vertex 11 7"  # c3
+bulk4="create curve vertex 7 3"   # c4
+bulk5="create curve vertex 3 4"   # c5
+bulk6="create curve vertex 4 1"   # c6
+
+cubit.cmd(bulk1)
+cubit.cmd(bulk2)
+cubit.cmd(bulk3)
+cubit.cmd(bulk4)
+cubit.cmd(bulk5)
+cubit.cmd(bulk6)
+
+#### Main Fault ############################## 
+fault_up_r="create curve spline vertex 5 6 "    #c7
+fault_up_l="create curve spline vertex 6 7"     #c8
+
+fault_down_r="create curve spline vertex 5 8"   #c9 
+fault_down_l="create curve spline vertex 8 7"   #c10
+
+
+cubit.cmd(fault_up_r) 
+cubit.cmd(fault_up_l) 
+cubit.cmd(fault_down_r)
+cubit.cmd(fault_down_l)
+ 
+
+#### Branch Fault ############################# 
+fault_up="create curve spline vertex 9 10 11"    #c11 
+fault_down="create curve spline vertex 9 12 11"  #c12
+
+cubit.cmd(fault_up) 
+cubit.cmd(fault_down) 
+###############################################
+
+surface1="create surface curve 2 1 6 5 4 7 8 9 12"
+cubit.cmd(surface1)
+surface2="create surface curve 3 10 11"
+cubit.cmd(surface2)
+
+cubit.cmd("sweep surface 1  vector 0  0 -1 distance "+str(30*km)) 
+cubit.cmd("sweep surface 2  vector 0  0 -1 distance "+str(30*km)) 
+
+
+######## Chuncks ########################################
+L= 42*km
+
+xchunk = []
+ychunk = []
+zchunk = []
+
+xchunk.append(-L-6*km)   #x1..
+xchunk.append(L)    #x
+xchunk.append(L)    #x3
+xchunk.append(-L-6*km)   #x4
+
+ychunk.append(-L)  #y1
+ychunk.append(-L)  #y2
+ychunk.append(L)   #y3
+ychunk.append(L)   #y4
+
+zchunk=[z_surf]*4
+
+
+####################  chunck ###########################################
+for i in range(len(xchunk)): 
+   vert="create vertex x "+str(xchunk[i])+" y "+str(ychunk[i])+" z "+str(zchunk[i]) 
+   cubit.cmd(vert) 
+
+########### creating chuncks ############################################
+
+chunk1="create curve vertex 39 40"   # c1
+chunk2="create curve vertex 40 41"   # c2
+chunk3="create curve vertex 41 42"   # c3
+chunk4="create curve vertex 42 39"   # c4
+
+cubit.cmd(chunk1)
+cubit.cmd(chunk2)
+cubit.cmd(chunk3)
+cubit.cmd(chunk4)
+
+surface1="create surface curve 37 38 39 40"
+cubit.cmd(surface1)
+
+cubit.cmd("sweep surface 17  vector 0  0 -1 distance "+str(30*km)) 
+
+cubit.cmd('subtract volume 1 2 from 3 keep') 
+cubit.cmd('delete volume 3') 
+
+#######  lateral faces of chuncks  #### 
+cubit.cmd('create surface skin curve 15 90')   
+cubit.cmd('create surface skin curve 25 92')   
+cubit.cmd('create surface skin curve 27 93')   
+cubit.cmd('create surface skin curve 29 91')   
+
+### webcutting 4 chuncks ####
+cubit.cmd("create body loft surface 45 48")
+cubit.cmd("create body loft surface 48 47")
+cubit.cmd("create body loft surface 47 46")
+cubit.cmd("create body loft surface 46 45")
+
+#####################################################
+cubit.cmd('delete volume 4')
+
+cubit.cmd('imprint all') 
+cubit.cmd('merge all') 
+
+## meshing inner solids ###
+h_size = 300
+
+## forcing aristas to have 300 m ##
+
+cubit.cmd("surface 1 2 size "+str(h_size))
+cubit.cmd("volume 1 2 size "+str(h_size))
+cubit.cmd("surface 1 2 scheme pave")
+cubit.cmd("mesh surface 1 2")
+cubit.cmd("mesh volume 1 2")
+
+bia=1.03
+inter= 40
+
+## Meshing Aristas #####
+cubit.cmd('curve 95 97 99 101 103 105 107 109 interval '+str(inter))
+cubit.cmd('curve 95 97 99 101 103 105 107 109 scheme bias factor '+str(bia))
+cubit.cmd('mesh curve 95 97 99 101 103 105 107 109')
+
+### meshing chuncks #######
+### CHUNCK 1
+cubit.cmd('volume 12 scheme Sweep  source surface 8 13 3 target surface 71 rotate off')
+cubit.cmd('volume 12 sweep smooth Auto')
+cubit.cmd('mesh volume 12')
+#### CHUNCK 2
+cubit.cmd('volume 9 scheme Sweep  source surface 11 target surface 53 rotate off')
+cubit.cmd('volume 9 sweep smooth Auto')
+cubit.cmd('mesh volume 9')
+#### CHUNCK 3
+cubit.cmd('volume 10 scheme Sweep  source surface 10 target surface 59 rotate off')
+cubit.cmd('volume 10 sweep smooth Auto')
+cubit.cmd('mesh volume 10')
+#### CHUNCK 4
+cubit.cmd('volume 11 scheme Sweep  source surface 9 target surface 65 rotate off')
+cubit.cmd('volume 11 sweep smooth Auto')
+cubit.cmd('mesh volume 11')
+
+########### Fault elements and nodes ###############
+
+### Main Fault ####################################################################
+os.system('mkdir -p MESH') 
+
+Au = [6,7]   # A_up
+Ad = [5,14]  # A_down
+
+faultA = fault_input(1,Au,Ad)
+quads_Aup,quads_Adp = save_cracks(faultA.name,faultA.surface_u,faultA.surface_d)
+#Unpacking list.
+quads_Au=unpack_list(quads_Aup)
+quads_Ad=unpack_list(quads_Adp)
+
+print 'len(Au):',len(quads_Au)
+print 'len(Ad):',len(quads_Ad)
+
+if not (len(quads_Au)==len(quads_Ad)):
+    print 'Number of elements for each fauld side up and down do not concide'
+    sys.exit('goodbye')
+   
+save_elements_nodes(faultA.name,quads_Au,quads_Ad)
+
+####### Branch Fault##############################################################################
+Bu = [4]   # B_up
+Bd = [15]  # B_down
+
+faultB = fault_input(2,Bu,Bd)
+quads_Bup,quads_Bdp = save_cracks(faultB.name,faultB.surface_u,faultB.surface_d)
+#Unpacking list.
+quads_Bu=unpack_list(quads_Bup)
+quads_Bd=unpack_list(quads_Bdp)
+
+print 'len(Au):',len(quads_Bu)
+print 'len(Ad):',len(quads_Bd)
+
+if not (len(quads_Bu)==len(quads_Bd)):
+    print 'Number of elements for each fauld side up and down do not concide'
+    sys.exit('goodbye')
+   
+save_elements_nodes(faultB.name,quads_Bu,quads_Bd)
+
+##  FOR THE BULK (Seismic wave propagation part for SESAME)
+
+####### This is boundary_definition.py of GEOCUBIT 
+##..... which extracts the bounding faces and defines them into blocks 
+boundary_definition.entities=['face'] 
+boundary_definition.define_bc(boundary_definition.entities,parallel=True) 
+ 
+#### Define material properties for the 2 volumes ################ 
+cubit.cmd('#### DEFINE MATERIAL PROPERTIES #######################') 
+ 
+# Material properties in concordance with tpv14-15 benchmark. 
+ 
+cubit.cmd('block 1 name "elastic 1" ')        # material region  
+cubit.cmd('block 1 attribute count 5') 
+cubit.cmd('block 1 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 1 attribute index 2 6000')   # vp 
+cubit.cmd('block 1 attribute index 3 3464')    # vs 
+cubit.cmd('block 1 attribute index 4 2670')   # rho 
+cubit.cmd('block 1 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... )
+
+cubit.cmd('block 2 name "elastic 2" ')        # material region  
+cubit.cmd('block 2 attribute count 5') 
+cubit.cmd('block 2 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 2 attribute index 2 6000')   # vp 
+cubit.cmd('block 2 attribute index 3 3464')    # vs 
+cubit.cmd('block 2 attribute index 4 2670')   # rho 
+cubit.cmd('block 2 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+# Material properties in concordance with tpv14-15 benchmark chuncks. 
+ 
+ 
+cubit.cmd('block 3 name "elastic 3" ')        # material region  
+cubit.cmd('block 3 attribute count 5') 
+cubit.cmd('block 3 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 3 attribute index 2 6000')   # vp 
+cubit.cmd('block 3 attribute index 3 3464')    # vs 
+cubit.cmd('block 3 attribute index 4 2670')   # rho 
+cubit.cmd('block 3 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+cubit.cmd('block 4 name "elastic 4" ')        # material region  
+cubit.cmd('block 4 attribute count 5') 
+cubit.cmd('block 4 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 4 attribute index 2 6000')   # vp 
+cubit.cmd('block 4 attribute index 3 3464')    # vs 
+cubit.cmd('block 4 attribute index 4 2670')   # rho 
+cubit.cmd('block 4 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+cubit.cmd('block 5 name "elastic 5" ')        # material region  
+cubit.cmd('block 5 attribute count 5') 
+cubit.cmd('block 5 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 5 attribute index 2 6000')   # vp 
+cubit.cmd('block 5 attribute index 3 3464')    # vs 
+cubit.cmd('block 5 attribute index 4 2670')   # rho 
+cubit.cmd('block 5 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+cubit.cmd('block 6 name "elastic 6" ')        # material region  
+cubit.cmd('block 6 attribute count 5') 
+cubit.cmd('block 6 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 6 attribute index 2 6000')   # vp 
+cubit.cmd('block 6 attribute index 3 3464')    # vs 
+cubit.cmd('block 6 attribute index 4 2670')   # rho 
+cubit.cmd('block 6 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+#### Export to SESAME format using cubit2specfem3d.py of GEOCUBIT 
+ 
+cubit2specfem3d.export2SESAME('MESH')  
+ 
+# all files needed by SCOTCH are now in directory MESH 
+

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening_base_chunk.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening_base_chunk.py	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_coarsening_base_chunk.py	2011-07-08 09:05:12 UTC (rev 18713)
@@ -0,0 +1,347 @@
+#!/usr/bin/env python
+
+import cubit
+import boundary_definition
+import cubit2specfem3d 
+import math
+import os
+import sys
+from save_fault_nodes_elements import *
+
+cubit.cmd('reset')
+
+km = 1000
+z_surf=0*km
+R = math.pi/180
+h = 0.1 
+q = math.sqrt(3)
+####  initializing coordinates x,y,z
+x=[]     # fault
+y=[]
+z=[]
+
+xbulk=[] # bulk
+ybulk=[]
+zbulk=[]
+
+xbulk.append(-18*km)   #x1
+xbulk.append(12*km)    #x2
+xbulk.append(12*km)    #x3
+xbulk.append(-18*km)   #x4
+
+ybulk.append(-8*km)  #y1
+ybulk.append(-8*km)  #y2
+ybulk.append(8*km)   #y3
+ybulk.append(8*km)   #y4
+
+zbulk=[z_surf]*4
+
+### Main Fault #######################
+
+x.append(-16*km) #x5
+x.append(-50/math.tan(R*30))   #x6
+x.append(12*km)  #x7
+x.append(-50/math.tan(R*30))   #x8
+
+y.append(0.0)    #y5
+y.append(h)      #y6
+y.append(0.0)    #y7
+y.append(-h)     #y8
+
+### Branch Fault ######################
+
+x.append(x[3])                        #x9 = x8  (triple joint)
+x.append((12*km/q)*math.cos(R*30))         #x10
+x.append((24*km/q)*math.cos(R*30))        #x11
+x.append((12*km/q)*math.cos(R*30))         #x12
+
+y.append(y[3])                         #y9 = y8 (triple joint)
+y.append(-50-(12*km/q)*math.sin(R*30)+h)   #y10
+y.append(-50-(24*km/q)*math.sin(R*30))    #y11
+y.append(-50-(12*km/q)*math.sin(R*30)-h)   #y12
+
+z=[z_surf]*12
+
+####################  bulk ###########################################
+for i in range(len(xbulk)): 
+   vert="create vertex x "+str(xbulk[i])+" y "+str(ybulk[i])+" z "+str(zbulk[i]) 
+   cubit.cmd(vert) 
+
+################  Loading fault points profile#############################
+for i in range(len(x)):
+  vert="create vertex x "+str(x[i])+" y "+str(y[i])+" z "+str(z[i])
+  cubit.cmd(vert)
+
+
+################ creating fault domains #################################
+bulk1="create curve vertex 1 2"   # c1
+bulk2="create curve vertex 2 11"  # c2
+bulk3="create curve vertex 11 7"  # c3
+bulk4="create curve vertex 7 3"   # c4
+bulk5="create curve vertex 3 4"   # c5
+bulk6="create curve vertex 4 1"   # c6
+
+cubit.cmd(bulk1)
+cubit.cmd(bulk2)
+cubit.cmd(bulk3)
+cubit.cmd(bulk4)
+cubit.cmd(bulk5)
+cubit.cmd(bulk6)
+
+#### Main Fault ############################## 
+fault_up_r="create curve spline vertex 5 6 "    #c7
+fault_up_l="create curve spline vertex 6 7"     #c8
+
+fault_down_r="create curve spline vertex 5 8"   #c9 
+fault_down_l="create curve spline vertex 8 7"   #c10
+
+
+cubit.cmd(fault_up_r) 
+cubit.cmd(fault_up_l) 
+cubit.cmd(fault_down_r)
+cubit.cmd(fault_down_l)
+ 
+
+#### Branch Fault ############################# 
+fault_up="create curve spline vertex 9 10 11"    #c11 
+fault_down="create curve spline vertex 9 12 11"  #c12
+
+cubit.cmd(fault_up) 
+cubit.cmd(fault_down) 
+###############################################
+
+surface1="create surface curve 2 1 6 5 4 7 8 9 12"
+cubit.cmd(surface1)
+surface2="create surface curve 3 10 11"
+cubit.cmd(surface2)
+
+cubit.cmd("sweep surface 1  vector 0  0 -1 distance "+str(15*km)) 
+cubit.cmd("sweep surface 2  vector 0  0 -1 distance "+str(15*km)) 
+
+
+######## Chuncks ########################################
+L= 28*km
+
+xchunk = []
+ychunk = []
+zchunk = []
+
+xchunk.append(-L-6*km)   #x1..
+xchunk.append(L)    #x
+xchunk.append(L)    #x3
+xchunk.append(-L-6*km)   #x4
+
+ychunk.append(-L)  #y1
+ychunk.append(-L)  #y2
+ychunk.append(L)   #y3
+ychunk.append(L)   #y4
+
+zchunk=[z_surf]*4
+
+
+####################  chunck ###########################################
+for i in range(len(xchunk)): 
+   vert="create vertex x "+str(xchunk[i])+" y "+str(ychunk[i])+" z "+str(zchunk[i]) 
+   cubit.cmd(vert) 
+
+########### creating chuncks ############################################
+
+chunk1="create curve vertex 39 40"   # c1
+chunk2="create curve vertex 40 41"   # c2
+chunk3="create curve vertex 41 42"   # c3
+chunk4="create curve vertex 42 39"   # c4
+
+cubit.cmd(chunk1)
+cubit.cmd(chunk2)
+cubit.cmd(chunk3)
+cubit.cmd(chunk4)
+
+surface1="create surface curve 37 38 39 40"
+cubit.cmd(surface1)
+
+cubit.cmd("sweep surface 17  vector 0  0 -1 distance "+str(30*km)) 
+
+cubit.cmd('subtract volume 1 2 from 3 keep') 
+cubit.cmd('delete volume 3') 
+
+#######  lateral faces of chuncks  #### 
+cubit.cmd('create surface skin curve 15 87')   
+cubit.cmd('create surface skin curve 29 88')   
+cubit.cmd('create surface skin curve 27 92')   
+cubit.cmd('create surface skin curve 25 90')   
+
+### webcutting 4 chuncks ####
+cubit.cmd("create body loft surface 45 48")
+cubit.cmd("create body loft surface 48 47")
+cubit.cmd("create body loft surface 47 46")
+cubit.cmd("create body loft surface 46 45")
+
+#### base chunck ### (Not applicable , fault bottom is open)
+#cubit.cmd("create body loft surface 58 70")
+
+#####################################################
+cubit.cmd('delete volume 4')
+
+cubit.cmd('imprint all') 
+cubit.cmd('merge all') 
+
+### meshing inner solids ###
+h_size = 300
+
+### forcing aristas to have 300 m ##
+
+cubit.cmd("surface 1 2 size "+str(h_size))
+cubit.cmd("volume 1 2 size "+str(h_size))
+cubit.cmd("surface 1 2 scheme pave")
+cubit.cmd("mesh surface 1 2")
+cubit.cmd("mesh volume 1 2")
+ 
+bia=1.03
+inter=30
+
+## Meshing Aristas #####
+cubit.cmd('curve 95 97 99 101 103 105 107 109 interval '+str(inter))
+cubit.cmd('curve 95 97 99 101 103 105 107 109 scheme bias factor '+str(bia))
+cubit.cmd('mesh curve 95 97 99 101 103 105 107 109')
+
+### meshing chuncks #######
+### CHUNCK 1
+cubit.cmd('volume 12 scheme Sweep  source surface 11 target surface 71 rotate off')
+cubit.cmd('volume 12 sweep smooth Auto')
+cubit.cmd('mesh volume 12')
+### CHUNCK 2
+cubit.cmd('volume 9 scheme Sweep  source surface 8 13 3 target surface 53 rotate off')
+cubit.cmd('volume 9 sweep smooth Auto')
+cubit.cmd('mesh volume 9')
+### CHUNCK 3
+cubit.cmd('volume 10 scheme Sweep  source surface 9 target surface 59 rotate off')
+cubit.cmd('volume 10 sweep smooth Auto')
+cubit.cmd('mesh volume 10')
+### CHUNCK 4
+cubit.cmd('volume 11 scheme Sweep  source surface 10 target surface 65 rotate off')
+cubit.cmd('volume 11 sweep smooth Auto')
+cubit.cmd('mesh volume 11')
+### CHUNCK 5
+cubit.cmd('volume 13 scheme Sweep  source surface 1 2 target surface 76 rotate off')
+cubit.cmd('volume 13 sweep smooth Auto')
+cubit.cmd('mesh volume 13')
+
+########### Fault elements and nodes ###############
+
+### Main Fault ####################################################################
+os.system('mkdir -p MESH') 
+
+Au = [6,7]   # A_up
+Ad = [5,14]  # A_down
+
+faultA = fault_input(1,Au,Ad)
+quads_Aup,quads_Adp = save_cracks(faultA.name,faultA.surface_u,faultA.surface_d)
+#Unpacking list.
+quads_Au=unpack_list(quads_Aup)
+quads_Ad=unpack_list(quads_Adp)
+
+print 'len(Au):',len(quads_Au)
+print 'len(Ad):',len(quads_Ad)
+
+if not (len(quads_Au)==len(quads_Ad)):
+    print 'Number of elements for each fauld side up and down do not concide'
+    sys.exit('goodbye')
+   
+save_elements_nodes(faultA.name,quads_Au,quads_Ad)
+
+####### Branch Fault##############################################################################
+Bu = [4]   # B_up
+Bd = [15]  # B_down
+
+faultB = fault_input(2,Bu,Bd)
+quads_Bup,quads_Bdp = save_cracks(faultB.name,faultB.surface_u,faultB.surface_d)
+#Unpacking list.
+quads_Bu=unpack_list(quads_Bup)
+quads_Bd=unpack_list(quads_Bdp)
+
+print 'len(Au):',len(quads_Bu)
+print 'len(Ad):',len(quads_Bd)
+
+if not (len(quads_Bu)==len(quads_Bd)):
+    print 'Number of elements for each fauld side up and down do not concide'
+    sys.exit('goodbye')
+   
+save_elements_nodes(faultB.name,quads_Bu,quads_Bd)
+
+##  FOR THE BULK (Seismic wave propagation part for SESAME)
+
+####### This is boundary_definition.py of GEOCUBIT 
+##..... which extracts the bounding faces and defines them into blocks 
+boundary_definition.entities=['face'] 
+boundary_definition.define_bc(boundary_definition.entities,parallel=True) 
+ 
+#### Define material properties for the 2 volumes ################ 
+cubit.cmd('#### DEFINE MATERIAL PROPERTIES #######################') 
+ 
+# Material properties in concordance with tpv14-15 benchmark. 
+ 
+cubit.cmd('block 1 name "elastic 1" ')        # material region  
+cubit.cmd('block 1 attribute count 5') 
+cubit.cmd('block 1 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 1 attribute index 2 6000')   # vp 
+cubit.cmd('block 1 attribute index 3 3464')    # vs 
+cubit.cmd('block 1 attribute index 4 2670')   # rho 
+cubit.cmd('block 1 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... )
+
+cubit.cmd('block 2 name "elastic 2" ')        # material region  
+cubit.cmd('block 2 attribute count 5') 
+cubit.cmd('block 2 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 2 attribute index 2 6000')   # vp 
+cubit.cmd('block 2 attribute index 3 3464')    # vs 
+cubit.cmd('block 2 attribute index 4 2670')   # rho 
+cubit.cmd('block 2 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+# Material properties in concordance with tpv14-15 benchmark chuncks. 
+ 
+ 
+cubit.cmd('block 3 name "elastic 3" ')        # material region  
+cubit.cmd('block 3 attribute count 5') 
+cubit.cmd('block 3 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 3 attribute index 2 6000')   # vp 
+cubit.cmd('block 3 attribute index 3 3464')    # vs 
+cubit.cmd('block 3 attribute index 4 2670')   # rho 
+cubit.cmd('block 3 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+cubit.cmd('block 4 name "elastic 4" ')        # material region  
+cubit.cmd('block 4 attribute count 5') 
+cubit.cmd('block 4 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 4 attribute index 2 6000')   # vp 
+cubit.cmd('block 4 attribute index 3 3464')    # vs 
+cubit.cmd('block 4 attribute index 4 2670')   # rho 
+cubit.cmd('block 4 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+cubit.cmd('block 5 name "elastic 5" ')        # material region  
+cubit.cmd('block 5 attribute count 5') 
+cubit.cmd('block 5 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 5 attribute index 2 6000')   # vp 
+cubit.cmd('block 5 attribute index 3 3464')    # vs 
+cubit.cmd('block 5 attribute index 4 2670')   # rho 
+cubit.cmd('block 5 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+cubit.cmd('block 6 name "elastic 6" ')        # material region  
+cubit.cmd('block 6 attribute count 5') 
+cubit.cmd('block 6 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 6 attribute index 2 6000')   # vp 
+cubit.cmd('block 6 attribute index 3 3464')    # vs 
+cubit.cmd('block 6 attribute index 4 2670')   # rho 
+cubit.cmd('block 6 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+cubit.cmd('block 7 name "elastic 7" ')        # material region  
+cubit.cmd('block 7 attribute count 5') 
+cubit.cmd('block 7 attribute index 1 1')      # flag for fault side 1 
+cubit.cmd('block 7 attribute index 2 6000')   # vp 
+cubit.cmd('block 7 attribute index 3 3464')    # vs 
+cubit.cmd('block 7 attribute index 4 2670')   # rho 
+cubit.cmd('block 7 attribute index 5 13')     # Q flag (see constants.h: IATTENUATION_ ... ) 
+
+#### Export to SESAME format using cubit2specfem3d.py of GEOCUBIT 
+ 
+cubit2specfem3d.export2SESAME('MESH')  
+ 
+# all files needed by SCOTCH are now in directory MESH 
+

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_inner.tiff
===================================================================
(Binary files differ)


Property changes on: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv15.crack/tpv15_inner.tiff
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the CIG-COMMITS mailing list