[cig-commits] r16930 - in short/3D/PyLith/trunk/tests/3d: . matprops
brad at geodynamics.org
brad at geodynamics.org
Tue Jun 8 09:12:17 PDT 2010
Author: brad
Date: 2010-06-08 09:12:17 -0700 (Tue, 08 Jun 2010)
New Revision: 16930
Added:
short/3D/PyLith/trunk/tests/3d/matprops/
short/3D/PyLith/trunk/tests/3d/matprops/README
short/3D/PyLith/trunk/tests/3d/matprops/finalslip.spatialdb
short/3D/PyLith/trunk/tests/3d/matprops/geometry.jou
short/3D/PyLith/trunk/tests/3d/matprops/mat_xvar.spatialdb
short/3D/PyLith/trunk/tests/3d/matprops/mesh_hex8_1000m.exo
short/3D/PyLith/trunk/tests/3d/matprops/mesh_hex8_1000m.jou
short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg
short/3D/PyLith/trunk/tests/3d/matprops/sliptime.spatialdb
Log:
Added spatial variation in physical properties test.
Added: short/3D/PyLith/trunk/tests/3d/matprops/README
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/README (rev 0)
+++ short/3D/PyLith/trunk/tests/3d/matprops/README 2010-06-08 16:12:17 UTC (rev 16930)
@@ -0,0 +1,7 @@
+This test focuses on verifying that PyLith correctly handles spatial
+variations in physical properties and updating state variables.
+
+Fault slip is imposed at time t=0 and then the domain undergoes
+viscoelastic relaxation with a short relaxation on one side of the
+fault (completely relaxes) and a longer relaxation time on the other
+side of the fault.
Added: short/3D/PyLith/trunk/tests/3d/matprops/finalslip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/finalslip.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/tests/3d/matprops/finalslip.spatialdb 2010-06-08 16:12:17 UTC (rev 16930)
@@ -0,0 +1,31 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of slip on the
+// fault surface. In this case we prescribe a piecewise linear, depth
+// dependent distribution of slip. The slip is 2.0 m right-lateral
+// with 0.25 m of reverse slip at the surface with a linear taper from
+// 2.0 m to 0.0 m from -2 km to -4 km.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = left-lateral-slip reverse-slip fault-opening
+ value-units = m m m
+ num-locs = 3
+ data-dim = 1 // Locations of data points form a line.
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0e+3 // Specify coordinates in km for convenience.
+ space-dim = 3
+ } // cs-data
+} // SimpleDB
+// Columns are
+// (1) x coordinate (km)
+// (2) y coordinate (km)
+// (3) z coordinate (km)
+// (4) left-lateral-slip (m) (right-lateral is negative)
+// (5) reverse-slip (m)
+// (6) fault-opening (m)
+0.0 0.0 0.0 -2.00 0.25 0.00
+0.0 0.0 -2.0 -2.00 0.00 0.00
+0.0 0.0 -4.0 0.00 0.00 0.00
Added: short/3D/PyLith/trunk/tests/3d/matprops/geometry.jou
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/geometry.jou (rev 0)
+++ short/3D/PyLith/trunk/tests/3d/matprops/geometry.jou 2010-06-08 16:12:17 UTC (rev 16930)
@@ -0,0 +1,47 @@
+## /tools/common/cubit-10.2/bin/clarox
+## Cubit Version 10.2
+## Cubit Build 24
+## Revised 12/15/2006 16:09:40 MST
+## Running 06/18/2007 10:26:50 AM
+## Command Options:
+## -warning = On
+## -information = On
+
+# ----------------------------------------------------------------------
+# Create block
+# ----------------------------------------------------------------------
+
+# Block is 6 km x 6 km x 4 km
+# -3 km <= x <= 3 km
+# -3 km <= y <= 3 km
+# -4 km <= z <= 0 km
+reset
+brick x 6000 y 6000 z 4000
+
+# Translate block so the top is at z=0
+volume 1 move x 0 y 0 z -2000
+
+# ----------------------------------------------------------------------
+# Create interface surfaces
+# ----------------------------------------------------------------------
+create planar surface with plane xplane offset 0
+surface 7 name "fault_surface"
+create planar surface with plane zplane offset -2000
+surface 8 name "material_interface"
+
+# ----------------------------------------------------------------------
+# Divide volumes using interface surfaces
+# ----------------------------------------------------------------------
+webcut volume 1 with plane surface fault_surface
+webcut volume 1 with plane surface material_interface
+webcut volume 4 with plane surface material_interface
+volume 1 name "elastic_xpos"
+volume 4 name "elastic_xneg"
+volume 5 name "visco_xpos"
+volume 6 name "visco_xneg"
+
+# ----------------------------------------------------------------------
+# Imprint all volumes, merging surfaces
+# ----------------------------------------------------------------------
+imprint all with volume all
+merge all
Added: short/3D/PyLith/trunk/tests/3d/matprops/mat_xvar.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/mat_xvar.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/tests/3d/matprops/mat_xvar.spatialdb 2010-06-08 16:12:17 UTC (rev 16930)
@@ -0,0 +1,27 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of material
+// properties for a Maxwell viscoelastic material. In this case,
+// the material properties are uniform.
+//
+// The viscosity corresponds to a Maxwell time of 100 years.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 4
+ value-names = density vs vp viscosity
+ value-units = kg/m**3 m/s m/s Pa*s // units
+ num-locs = 6
+ data-dim = 1
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+-2500.0 0.0 0.0 2500.0 3000.0 5291.502622129181 1.000000e+20
+-1500.0 0.0 0.0 2500.0 3000.0 5291.502622129181 1.000000e+20
+ -500.0 0.0 0.0 2500.0 3000.0 5291.502622129181 1.000000e+20
+ 500.0 0.0 0.0 1500.0 3000.0 5291.502622129181 1.000000e+18
+ 1500.0 0.0 0.0 1500.0 3000.0 5291.502622129181 1.000000e+18
+ 2500.0 0.0 0.0 1500.0 3000.0 5291.502622129181 1.000000e+18
Added: short/3D/PyLith/trunk/tests/3d/matprops/mesh_hex8_1000m.exo
===================================================================
(Binary files differ)
Property changes on: short/3D/PyLith/trunk/tests/3d/matprops/mesh_hex8_1000m.exo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: short/3D/PyLith/trunk/tests/3d/matprops/mesh_hex8_1000m.jou
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/mesh_hex8_1000m.jou (rev 0)
+++ short/3D/PyLith/trunk/tests/3d/matprops/mesh_hex8_1000m.jou 2010-06-08 16:12:17 UTC (rev 16930)
@@ -0,0 +1,93 @@
+# ----------------------------------------------------------------------
+# Generate geometry
+# ----------------------------------------------------------------------
+playback 'geometry.jou'
+
+# ----------------------------------------------------------------------
+# Set discretization size
+# ----------------------------------------------------------------------
+volume all size 1000
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+mesh volume all
+
+# ----------------------------------------------------------------------
+# Create blocks for materials
+# ----------------------------------------------------------------------
+block 1 volume 1 4 5 6
+block 1 name "viscoelastic"
+
+# ----------------------------------------------------------------------
+# Create nodeset for fault
+# ----------------------------------------------------------------------
+group "fault" add node in fault_surface
+group "fault" add node in fault_surface at A
+nodeset 10 group fault
+nodeset 10 name "fault"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +x face
+# ----------------------------------------------------------------------
+group "face_xpos" add node in surface 20
+group "face_xpos" add node in surface 28
+nodeset 11 group face_xpos
+nodeset 11 name "face_xpos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -x face
+# ----------------------------------------------------------------------
+group "face_xneg" add node in surface 30
+group "face_xneg" add node in surface 38
+nodeset 12 group face_xneg
+nodeset 12 name "face_xneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +y face
+# ----------------------------------------------------------------------
+group "face_ypos" add node in surface 21
+group "face_ypos" add node in surface 27
+group "face_ypos" add node in surface 33
+group "face_ypos" add node in surface 35
+nodeset 13 group face_ypos
+nodeset 13 name "face_ypos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -y face
+# ----------------------------------------------------------------------
+group "face_yneg" add node in surface 23
+group "face_yneg" add node in surface 25
+group "face_yneg" add node in surface 31
+group "face_yneg" add node in surface 37
+nodeset 14 group face_yneg
+nodeset 14 name "face_yneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -z face
+# ----------------------------------------------------------------------
+group "face_zneg" add node in surface 12
+group "face_zneg" add node in surface 16
+nodeset 15 group face_zneg
+nodeset 15 name "face_zneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -z face w/o fault
+# ----------------------------------------------------------------------
+group "face_zneg_nofault" add node in face_zneg
+group "face_zneg_nofault" remove node in fault
+nodeset 16 group face_zneg_nofault
+nodeset 16 name "face_zneg_nofault"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +z face
+# ----------------------------------------------------------------------
+group "face_zpos" add node in surface 10
+group "face_zpos" add node in surface 17
+nodeset 17 group face_zpos
+nodeset 17 name "face_zpos"
+
+# ----------------------------------------------------------------------
+# Export exodus file
+# ----------------------------------------------------------------------
+export mesh "mesh_hex8_1000m.exo" dimension 3 overwrite
Added: short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg 2010-06-08 16:12:17 UTC (rev 16930)
@@ -0,0 +1,163 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+# Turn on some journals to show progress.
+[pylithapp.journal.info]
+timedependent = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshiocubit = 1
+implicitelasticity = 1
+faultcohesivekin = 1
+fiatlagrange = 1
+pylithapp = 1
+materials = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+reorder_mesh = True
+
+# Change the default mesh reader to the CUBIT reader.
+reader = pylith.meshio.MeshIOCubit
+reader.filename = mesh_hex8_1000m.exo
+reader.use_nodeset_names = True
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+formulation = pylith.problems.Implicit
+
+[pylithapp.timedependent.formulation]
+time_step = pylith.problems.TimeStepUniform
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 100.0*year ; total time of simulation
+dt=0.25*year
+
+[pylithapp.timedependent]
+bc = [x_pos,x_neg,z_neg]
+
+interfaces = [fault]
+
+[pylithapp.timedependent.implicit]
+output = [domain,subdomain]
+
+output.subdomain = pylith.meshio.OutputSolnSubset
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+materials = [viscoelastic]
+
+materials.viscoelastic = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.viscoelastic]
+label = Viscoelastic material
+id = 1
+db_properties.iohandler.filename = mat_xvar.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0, 1]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0, 1]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+
+[pylithapp.timedependent.bc.z_neg]
+bc_dof = [2]
+label = face_zneg_nofault
+db_initial.label = Dirichlet BC on -z
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+label = fault
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+slip.iohandler.filename = finalslip.spatialdb
+slip_time.iohandler.filename = sliptime.spatialdb
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+# Set the solver options.
+
+[pylithapp.petsc]
+pc_type = asm
+
+sub_pc_factor_shift_type = nonzero
+
+ksp_rtol = 1.0e-8
+ksp_max_it = 500
+ksp_gmres_restart = 50
+
+ksp_monitor = true
+ksp_view = true
+ksp_converged_reason = true
+
+#log_summary = true
+# start_in_debugger = true
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.domain]
+output_freq = time_step
+time_step = 1.0*year
+
+[pylithapp.problem.formulation.output.domain.writer]
+filename = dislocation2.vtk
+time_constant = 1.0*year
+time_format = %05.0f
+
+[pylithapp.timedependent.interfaces.fault.output]
+output_freq = time_step
+time_step = 20.0*year
+writer.filename = dislocation2-fault.vtk
+writer.time_constant = 1.0*year
+writer.time_format = %05.0f
+
+[pylithapp.problem.formulation.output.subdomain]
+label = face_zpos
+output_freq = time_step
+time_step = 20.0*year
+writer.filename = dislocation2-groundsurf.vtk
+writer.time_constant = 1.0*year
+writer.time_format = %05.0f
+
+[pylithapp.timedependent.materials.viscoelastic.output]
+output_freq = time_step
+time_step = 5.0*year
+cell_info_fields = [mu,lambda,density,maxwell_time]
+cell_data_fields = [total_strain,viscous_strain,stress]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = dislocation2-statevars-viscoelastic.vtk
+writer.time_constant = 1.0*year
+writer.time_format = %05.0f
+
+
+# End of file
Added: short/3D/PyLith/trunk/tests/3d/matprops/sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/sliptime.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/tests/3d/matprops/sliptime.spatialdb 2010-06-08 16:12:17 UTC (rev 16930)
@@ -0,0 +1,26 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of the slip
+// initiation time over the fault surface for the kinematic fault
+// rupture. We specify a slip time of 0.0 s so that the slip occurs at
+// the origin time of the earthquake rupture.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = slip-time
+ value-units = s
+ num-locs = 1
+ data-dim = 0 // data is uniform (1 location)
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+// Columns are
+// (1) x coordinate (m)
+// (2) y coordinate (m)
+// (3) z coordinate (m)
+// (4) Slip initiation time (s)
+0.0 0.0 0.0 0.0
More information about the CIG-COMMITS
mailing list