[cig-commits] r20833 - seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102

surendra at geodynamics.org surendra at geodynamics.org
Fri Oct 12 17:43:38 PDT 2012


Author: surendra
Date: 2012-10-12 17:43:37 -0700 (Fri, 12 Oct 2012)
New Revision: 20833

Added:
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.jou
   seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.py
Log:
Added files for TPV102 & TPV103.  TPV101 & TPV104 can also be run using just these files

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.jou
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.jou	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.jou	2012-10-13 00:43:37 UTC (rev 20833)
@@ -0,0 +1,41 @@
+reset
+
+set echo off
+set journal off
+
+brick x 60000 y 60000 z 30000
+move volume 1 z -15000
+webcut volume 1 with plane yplane
+
+surface 12 7 merge off
+merge tolerance 1e-3
+
+imprint all
+merge all
+
+
+
+surface all size 400
+mesh volume all
+
+
+
+
+group "upp" add node in surface 12
+group "upp" remove node with x_coord = 30000
+group "upp" remove node with x_coord = -30000
+group "upp" remove node with z_coord = -30000
+nodeset 200 group upp
+nodeset 200 move 0.01 0 0
+
+group "lowr" add node in surface 7
+group "lowr" remove node with x_coord = 30000
+group "lowr" remove node with x_coord = -30000
+group "lowr" remove node with z_coord = -30000
+nodeset 201 group lowr
+nodeset 201 move -0.01 0 0
+
+
+
+
+

Added: seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.py
===================================================================
--- seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.py	                        (rev 0)
+++ seismo/3D/FAULT_SOURCE/branches/new_fault_db/EXAMPLES/tpv102/TPV102.py	2012-10-13 00:43:37 UTC (rev 20833)
@@ -0,0 +1,76 @@
+#!python
+#!python
+#!python
+#!/usr/bin/env python
+
+import cubit
+import cubit2specfem3d 
+
+import os
+import sys
+from save_fault_nodes_elements import *
+from absorbing_boundary import *
+
+cubit.cmd('playback "TPV102.jou" ') 
+
+os.system('mkdir -p MESH') 
+
+
+xmin = [9,16]
+xmax = [11,13]
+ymin = [3]
+ymax = [5]
+zmax = [8,15]
+zmin = [10,14]
+entities=['face']
+define_bc(entities,xmin,xmax,ymin,ymax,zmin,zmax)
+
+cubit.cmd('block 1 name "elastic 1" ') 
+cubit.cmd('block 1 attribute count 5')
+cubit.cmd('block 1 attribute index 1 1') 
+cubit.cmd('block 1 attribute index 2 6000')
+cubit.cmd('block 1 attribute index 3 3464')
+cubit.cmd('block 1 attribute index 4 2670')
+cubit.cmd('block 1 attribute index 5 13')  
+
+cubit.cmd('block 2 name "elastic 2" ')    
+cubit.cmd('block 2 attribute count 5') 
+cubit.cmd('block 2 attribute index 1 1') 
+cubit.cmd('block 2 attribute index 2 6000')
+cubit.cmd('block 2 attribute index 3 3464')
+cubit.cmd('block 2 attribute index 4 2670')
+cubit.cmd('block 2 attribute index 5 13')  
+ 
+#### Export to SESAME format using cubit2specfem3d.py of GEOCUBIT 
+ 
+cubit2specfem3d.export2SESAME('MESH')  
+
+
+
+
+
+Au = [8]   # A_up
+Ad = [3]  # 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'
+   
+save_elements_nodes(faultA.name,quads_Au,quads_Ad)
+
+
+
+
+
+
+
+
+



More information about the CIG-COMMITS mailing list