[cig-commits] r17120 - in short/3D/PyLith/branches/v1.5-stable: . examples/twocells examples/twocells/twohex27-cubit

willic3 at geodynamics.org willic3 at geodynamics.org
Wed Aug 25 20:51:00 PDT 2010


Author: willic3
Date: 2010-08-25 20:51:00 -0700 (Wed, 25 Aug 2010)
New Revision: 17120

Added:
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/Makefile.am
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/README
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.cfg
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.spatialdb
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation.cfg
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_slip.spatialdb
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_sliptime.spatialdb
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/geometry.jou
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/matprops.spatialdb
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/mesh_twohex27.jou
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/pylithapp.cfg
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.cfg
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.spatialdb
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/twohex27.exo
Modified:
   short/3D/PyLith/branches/v1.5-stable/configure.ac
   short/3D/PyLith/branches/v1.5-stable/examples/twocells/Makefile.am
Log:
Created a simple example to test quadratic elements in PyLith.
This example uses Cubit to generate 2 27-node elements.



Modified: short/3D/PyLith/branches/v1.5-stable/configure.ac
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/configure.ac	2010-08-25 20:08:55 UTC (rev 17119)
+++ short/3D/PyLith/branches/v1.5-stable/configure.ac	2010-08-26 03:51:00 UTC (rev 17120)
@@ -331,6 +331,7 @@
 		examples/greensfns/hex8/gfimpulses/Makefile
 		examples/greensfns/hex8/gfresponses/Makefile
 		examples/twocells/twohex8/Makefile
+		examples/twocells/twohex27-cubit/Makefile
 		examples/twocells/twoquad4/Makefile
 		examples/twocells/twotet4/Makefile
 		examples/twocells/twotet4-geoproj/Makefile

Modified: short/3D/PyLith/branches/v1.5-stable/examples/twocells/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/Makefile.am	2010-08-25 20:08:55 UTC (rev 17119)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/Makefile.am	2010-08-26 03:51:00 UTC (rev 17120)
@@ -18,6 +18,7 @@
 
 SUBDIRS = \
 	twohex8 \
+	twohex27-cubit \
 	twoquad4 \
 	twotet4 \
 	twotet4-geoproj \

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/Makefile.am	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/Makefile.am	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,35 @@
+# -*- Makefile -*-
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+
+dist_noinst_DATA = \
+	README \
+	axialdisp.cfg \
+	axialdisp.jpg \
+	axialdisp.spatialdb \
+	dislocation.cfg \
+	dislocation_slip.spatialdb \
+	dislocation_sliptime.spatialdb \
+	geometry.jou \
+	matprops.spatialdb \
+	mesh_twohex27.jou
+	pylithapp.cfg \
+	sheardisp.cfg \
+	sheardisp.spatialdb \
+	twohex27.exo
+
+# End of file 

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/README
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/README	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/README	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,55 @@
+This directory contains a set of 3 3D viscoelastic example problems.
+All problems share the same mesh and material properties, with the
+only differences being in the boundary conditions.  The mesh consists
+of two quadratic hexahedral elements.  This set of examples is exactly
+analogous to the twohex8 examples except that the elements are 27-node
+hexes.
+
+All of these examples are run for 10 time steps (0.1 year steps), plus the
+elastic solution.  The information describing the examples may be divided
+into five groups:
+
+1.  Mesh generation files used by Cubit: geometry.jou and mesh_twohex27.jou.
+
+2.  Mesh produced by Cubit, including blocks and nodesets: twohex27.exo.
+
+3.  Parameter settings common to all examples:  described in file
+pylithapp.cfg.
+
+4.  Material properties common to all examples:  described in the
+database file matprops.spatialdb.
+
+5.  Example-specific parameters and boundary condition specifications.
+
+The examples and associated files are:
+
+1.  axialdisp:  Axial displacements are applied to the left and right
+sides of the mesh.
+  a.  axialdisp.cfg:  Parameter settings for this problem.
+  b.  axialdisp.spatialdb:  Boundary condition database for this
+      problem.
+
+2.  sheardisp:  Shear displacements are applied to the left and right
+sides of the mesh.
+  a.  sheardisp.cfg:  Parameter settings for this problem.
+  b.  sheardisp.spatialdb:  Boundary condition database for this
+      problem.
+
+3.  dislocation:  Fault displacements are applied between the two
+elements, while the left and right corners are fixed in x, y, and z.
+  a.  dislocation.cfg:  Parameter settings for this problem.
+  b.  dislocation_slip.spatialdb:  Fault slip database for this problem.
+  d.  dislocation_sliptime.spatialdb:  Fault slip time database for this
+      problem.
+
+All of the files are documented.  The 'pylithapp.cfg' file is read
+automatically when running PyLith.  To add to or override these
+settings, you may place an additional .cfg file on the command line.
+To run the examples, you can type:
+pylith axialdisp.cfg
+pylith sheardisp.cfg
+pylith dislocation.cfg
+
+Each of these commands will produce a set of VTK files (including some that
+will be produced for each time step), which may be viewed with visualization
+packages such as ParaView or Mayavi.

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.cfg	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,93 @@
+# -*- Python -*-
+
+# The settings in this file (axialdisp.cfg) will be read if it is
+# specified on the command line:
+# 'pylith axialdisp.cfg'
+
+# If this file is given, the settings in this file will override all
+# others except for parameters specified directly on the command line.
+
+# These setting define an implicit problem with Dirichlet (displacement)
+# boundary conditions extending the rectangular mesh along the x-axis.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# Specify the problem settings.
+# This is a time-dependent problem so we use that facility.
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# We want an implicit formulation.
+formulation = pylith.problems.Implicit
+
+# Set bc to an array of 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+
+# Boundary conditions to be applied to the negative x-side of the mesh.
+[pylithapp.timedependent.bc.x_neg]
+
+# We are fixing all 3 degrees of freedom.
+bc_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'face_xneg' in the Cubit file.
+label = face_xneg
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform spatial distribution) to SimpleDB (which uses a data file
+# to specify a spatial variation).
+db_initial = spatialdata.spatialdb.SimpleDB
+
+# We are assigning the label 'Dirichlet BC -x face' to the database.
+db_initial.label = Dirichlet BC -x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db_initial.iohandler.filename = axialdisp.spatialdb
+
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# We are fixing all 3 degrees of freedom.
+bc_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'face_xpos' in the Cubit file.
+label = face_xpos
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform spatial distribution) to SimpleDB (which uses a data file
+# to specify a spatial variation).
+db_initial = spatialdata.spatialdb.SimpleDB
+
+# We are assigning the label 'Dirichlet BC +x face' to the database.
+db_initial.label = Dirichlet BC +x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db_initial.iohandler.filename = axialdisp.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK output of solution over domain.
+[pylithapp.problem.formulation.output.output.writer]
+filename = axialdisp.vtk
+time_format = %04.1f ; Time stamp will be xxx.x with the "." removed.
+time_constant = 1.0*year ; Normalize time stamp by years
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_data_fields = [total_strain,viscous_strain,stress]
+cell_info_fields = [mu,lambda,density,maxwell_time]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = axialdisp-statevars.vtk
+writer.time_format = %04.1f ; Time stamp will be xxx.x with the "." removed.
+writer.time_constant = 1.0*year ; Normalize time stamp by years

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/axialdisp.spatialdb	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,44 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the boundary conditions for the axial
+// displacement example.
+
+// This follows the format for a Simple DB.
+SimpleDB {
+
+  // There are 3 values specified in the database, corresponding to the
+  // constraint values for the x, y, and z degrees of freedom.
+  num-values = 3
+  value-names =  displacement-x  displacement-y  displacement-z
+
+  // The constraint values (displacements) have units of meters.
+  value-units =  m  m  m
+
+  // The values are specified at 2 spatial locations.
+  num-locs = 2
+
+  // The dimension of the spatial distribution is 1, since data is being
+  // specified at points.
+  data-dim = 1
+
+  // The spatial dimension of the database is 3.
+  space-dim = 3
+
+  // We are specifying the data in a Cartesian coordinate system.
+  cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
+    to-meters = 1.0
+
+    // We are using a 3D Cartesian coordinate system.
+    space-dim = 3
+  }
+}
+
+// This is where the data is specified.
+// As described in axialdisp.cfg, this database will be used to specify
+// data along edges.
+// The entries are:
+// X-coord, Y-coord, Z-coord, disp-x  disp-y  disp-z
+-1.0  0.0  0.0  -0.01  0.0  0.0
+ 1.0  0.0  0.0   0.01  0.0  0.0

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation.cfg	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,117 @@
+# -*- Python -*-
+
+# The settings in this file (dislocation.cfg) will be read if it is
+# specified on the command line:
+# 'pylith dislocation.cfg'
+
+# If this file is given, the settings in this file will override all
+# others except for parameters specified directly on the command line.
+
+# These settings define an implicit problem using a fault with
+# kinematically-specified slip.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# Journal settings in addition to those given in 'pylithapp.cfg'
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+quadrature2d = 1
+faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# We want an implicit formulation.
+formulation = pylith.problems.Implicit
+
+# Set bc to an array of 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
+
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# Provide information on the boundary conditions.
+# ----------------------------------------------------------------------
+
+# We use the default spatial database for the Dirichlet BC which sets
+# the displacements to zero for all time.
+
+# Boundary conditions to be applied to the negative x-side of the mesh.
+[pylithapp.timedependent.bc.x_neg]
+
+# We are fixing all 3 degrees of freedom.
+bc_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'face_xneg' in the Cubit file.
+label = face_xneg
+
+# We are assigning the label 'Dirichlet BC -x face' to the database.
+db_initial.label = Dirichlet BC -x face
+
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# We are fixing all 3 degrees of freedom.
+bc_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'face_xpos' in the Cubit file.
+label = face_xpos
+
+# We are assigning the label 'Dirichlet BC +x face' to the database.
+db_initial.label = Dirichlet BC +x face
+
+# ----------------------------------------------------------------------
+# faults
+# Provide information on the fault (interface).
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+
+# Define fault properties.
+[pylithapp.timedependent.interfaces.fault]
+
+# The nodes associated with this fault have the name 'fault' in the Cubit file.
+label = fault
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+# Give the spatial databases specifying the fault slip.
+[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+
+# Database specifying fault slip (0.01 m of left-lateral slip).
+slip.iohandler.filename = dislocation_slip.spatialdb
+
+# Database specifying time at which fault slips (0.0 s).
+slip_time.iohandler.filename = dislocation_sliptime.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# Give basename for vtk output.
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output.writer]
+filename = dislocation.vtk
+time_format = %04.1f ; Time stamp will be xxx.x with the "." removed.
+time_constant = 1.0*year ; Normalize time stamp by years
+
+# Give basename for vtk fault output.
+[pylithapp.timedependent.interfaces.fault.output.writer]
+filename = dislocation-fault.vtk
+time_format = %04.1f ; Time stamp will be xxx.x with the "." removed.
+time_constant = 1.0*year ; Normalize time stamp by years
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_data_fields = [total_strain,viscous_strain,stress]
+cell_info_fields = [mu,lambda,density,maxwell_time]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = dislocation-statevars.vtk
+writer.time_format = %04.1f ; Time stamp will be xxx.x with the "." removed.
+writer.time_constant = 1.0*year ; Normalize time stamp by years

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_slip.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_slip.spatialdb	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,42 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the fault slip for the
+// dislocation (kinematic fault) example.
+SimpleDB {
+
+  // There are 3 values specified in the database, corresponding to the
+  // slip values for the left-lateral, reverse-slip, and fault-opening
+  // components.
+  num-values = 3
+  value-names =  left-lateral-slip  reverse-slip  fault-opening
+
+  // The fault slip values have units of meters.
+  value-units =  m  m  m
+
+  // The values are specified at one spatial location.
+  num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since the same data
+  // is specified for all points in the set.
+  data-dim = 0
+
+  // The spatial dimension of the database is 3.
+  space-dim = 3
+
+  // We are specifying the data in a Cartesian coordinate system.
+  cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
+    to-meters = 1.0
+
+    // We are using a 3D Cartesian coordinate system.
+    space-dim = 3
+  }
+}
+
+// This is where the data is specified.
+// As described in dislocation.cfg, this database will be used to specify
+// uniform data for a fault (pylith.faults.SingleFault).
+// The entries are:
+// X-Coord, Y-Coord, X-Coord, left-lateral slip, reverse slip, fault-opening slip
+0.0  0.0  0.0   0.01  0.0  0.0

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_sliptime.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/dislocation_sliptime.spatialdb	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,41 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the fault slip time for the
+// dislocation (kinematic fault) example.
+SimpleDB {
+
+  // There is one value specified in the database, corresponding to the
+  // time at which fault slip begins.
+  num-values = 1
+  value-names =  slip-time
+
+  // The fault slip time has units of meters.
+  value-units =  s
+
+  // The value is specified at one spatial location.
+  num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since the same data
+  // is specified for all points in the set.
+  data-dim = 0
+
+  // The spatial dimension of the database is 3.
+  space-dim = 3
+
+  // We are specifying the data in a Cartesian coordinate system.
+  cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
+    to-meters = 1.0
+
+    // We are using a 3D Cartesian coordinate system.
+    space-dim = 3
+  }
+}
+
+// This is where the data is specified.
+// As described in dislocation.cfg, this database will be used to specify
+// uniform data for a fault (pylith.faults.SingleFault).
+// The entries are:
+// X-Coord, Y-Coord, Z-Coord, slip time
+0.0  0.0  0.0   0.0

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/geometry.jou
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/geometry.jou	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/geometry.jou	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,44 @@
+## /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 2 m x 1 m x 1 m
+# -1.0 m <= x <= 1.0 m
+# -0.5 m <= y <= 0.5 m
+# -0.5 m <= z <= 0.5 m
+reset
+brick x 2 y 1 z 1
+
+# ----------------------------------------------------------------------
+# Create interface surface
+# ----------------------------------------------------------------------
+create planar surface with plane xplane offset 0
+surface 7 name "fault_surface"
+
+# ----------------------------------------------------------------------
+# Divide volume using interface surface
+# ----------------------------------------------------------------------
+webcut volume 1 with plane surface fault_surface
+volume 1 name "xpos"
+volume 3 name "xneg"
+
+# ----------------------------------------------------------------------
+# Delete sheet body
+# ----------------------------------------------------------------------
+delete body 2
+
+# ----------------------------------------------------------------------
+# Imprint all volumes, merging surfaces
+# ----------------------------------------------------------------------
+imprint all with volume all
+merge all
+

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/matprops.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/matprops.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/matprops.spatialdb	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,46 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the material properties for all of the
+// examples in this directory.
+
+// This follows the format for a Simple DB (the only type presently available).
+SimpleDB {
+
+  // There are 4 values specified in the database, corresponding to density,
+  // S-velocity, P-velocity, and viscosity (values for shear modulus and Lame's
+  // constant are computed from the density and seismic velocities).
+  num-values = 4
+  value-names =  density vs vp viscosity
+
+  // These are the units used to specify density, vs, and vp.
+  value-units =  kg/m**3  m/s  m/s  Pa*s
+
+  // Values are only specified at a single point since they are constant
+  // throughout the mesh.
+  num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since it is constant
+  // throughout the mesh.
+  data-dim = 0
+
+  // The spatial dimension of the database is 3.
+  space-dim = 3
+
+  // We are specifying the data in a Cartesian coordinate system.
+  cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
+    to-meters = 1.0
+
+    // We are using a 3D Cartesian coordinate system.
+    space-dim = 3
+  }
+}
+// This is where the data is specified.
+// We only need to specify a single point, since the properties are uniform.
+// The values given here will give a shear modulus and Lame's constant both
+// equal to 30 GPa (Poisson's ratio = 0.25).
+// The entries are:
+// X-coord, Y-coord, Z-coord, density, Vs, Vp viscosity.
+
+0.0  0.0  0.0   2700.0  3333.333333333333  5773.502691896258  1.0e18

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/mesh_twohex27.jou
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/mesh_twohex27.jou	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/mesh_twohex27.jou	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,97 @@
+## /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
+
+# ----------------------------------------------------------------------
+# Generate geometry
+# ----------------------------------------------------------------------
+playback 'geometry.jou'
+
+# ----------------------------------------------------------------------
+# Set discretization size
+# ----------------------------------------------------------------------
+volume all size 1
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+mesh volume all
+
+# ----------------------------------------------------------------------
+# Create block for material and define cells as HEX27
+# ----------------------------------------------------------------------
+block 1 volume 1 3
+block 1 name "elastic"
+block 1 element type HEX27
+
+# ----------------------------------------------------------------------
+# Create nodeset for fault
+# ----------------------------------------------------------------------
+group "fault" add node in surface 8
+nodeset 10 group fault
+nodeset 10 name "fault"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +x face
+# ----------------------------------------------------------------------
+group "face_xpos" add node in surface 6
+nodeset 11 group face_xpos
+nodeset 11 name "face_xpos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -x face
+# ----------------------------------------------------------------------
+group "face_xneg" add node in surface 4
+nodeset 12 group face_xneg
+nodeset 12 name "face_xneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +y face
+# ----------------------------------------------------------------------
+group "face_ypos" add node in surface 12
+group "face_ypos" add node in surface 14
+nodeset 13 group face_ypos
+nodeset 13 name "face_ypos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -y face
+# ----------------------------------------------------------------------
+group "face_yneg" add node in surface 10
+group "face_yneg" add node in surface 17
+nodeset 14 group face_yneg
+nodeset 14 name "face_yneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -z face
+# ----------------------------------------------------------------------
+group "face_zneg" add node in surface 11
+group "face_zneg" add node in surface 15
+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 9
+group "face_zpos" add node in surface 16
+nodeset 17 group face_zpos
+nodeset 17 name "face_zpos"
+
+# ----------------------------------------------------------------------
+# Export exodus file
+# ----------------------------------------------------------------------
+export mesh "twohex27.exo" dimension 3 overwrite
+

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/pylithapp.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/pylithapp.cfg	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,119 @@
+# -*- Python -*-
+
+# The settings in this file (pylithapp.cfg) will be read automatically
+# by pylith, as long as the file is placed in the run directory.
+
+# The settings in this file will override any settings in:
+# PREFIX/etc/pylithapp.cfg
+# $HOME/.pyre/pylithapp/pylithapp.cfg
+
+# The settings in this file will be overridden by any .cfg file given
+# on the command line or by any command line settings.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# The settings below turn on journal info for the specified components.
+# If you want less output to stdout, you can turn these off.
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+implicitelasticity = 1
+quadrature3d = 1
+fiatsimplex = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# The settings below control the mesh generation (importing mesh info).
+# ----------------------------------------------------------------------
+# Turn on debugging output for mesh generation.
+[pylithapp.mesh_generator]
+debug = 1
+
+# Change the default mesh reader to the CUBIT reader.
+reader = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.reader]
+filename = twohex27.exo
+
+# ----------------------------------------------------------------------
+# problem
+# Specify the problem settings.
+# This is a time-dependent problem, so we select this as our problem type.
+# We select a total time of 1 year, and a time step size of 0.1 year, so we
+# are performing 10 time steps plus the elastic solution.
+# The spatial dimension for this problem is 3.
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 3
+normalizer.length_scale = 1.0*m
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 1.0*year
+dt = 0.1*year
+
+# ----------------------------------------------------------------------
+# materials
+# Specify the material information for the problem.
+# ----------------------------------------------------------------------
+# Change the material type to linear Maxwell viscoelastic.
+[pylithapp.timedependent.materials]
+material = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.material]
+
+# We give a label of 'viscoelastic material' to this material.
+label = viscoelastic material
+
+# The cells associated with this material are given a material ID of 1
+# in the mesh file.
+id = 1
+
+# We define uniform material properties for this problem rather than
+# using a spatial database file.
+db_properties = spatialdata.spatialdb.UniformDB
+db_properties.values = [vp,vs,density,viscosity]
+db_properties.data = [5291.502622129181*m/s,3000.0*m/s,2700.0*kg/m**3,7.10046e19*Pa*s]
+
+# If we instead wanted to used the 'matprops.spatialdb' file to define
+# material properties we would comment out the three 'db' lines above
+# and uncomment the line below:
+# db.iohandler.filename = matprops.spatialdb
+
+# We are doing 2D quadrature for a quad.
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
+# PETSc
+# We are using all of the default settings for PETSc except for
+# specifying the Jacobi preconditioner.  Additional PETSc command-line
+# arguments may be found in the PETSc documentation.
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = asm
+
+# Change the preconditioner settings.
+sub_pc_factor_shift_type = none
+
+ksp_rtol = 1.0e-8
+ksp_max_it = 100
+ksp_gmres_restart = 50
+
+ksp_monitor = true
+ksp_view = true
+ksp_converged_reason = true
+
+snes_monitor = true
+snes_view = true
+snes_converged_reason = true
+
+log_summary = true
+# start_in_debugger = true

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.cfg	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,92 @@
+# -*- Python -*-
+
+# The settings in this file (sheardisp.cfg) will be read if it is
+# specified on the command line:
+# 'pylith sheardisp.cfg'
+
+# If this file is given, the settings in this file will override all
+# others except for parameters specified directly on the command line.
+
+# These setting define an implicit problem with Dirichlet (displacement)
+# boundary conditions that shear the mesh.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# Specify the problem settings.
+# This is a time-dependent problem so we use that facility.
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# We want an implicit formulation.
+formulation = pylith.problems.Implicit
+
+# Set bc to an array of 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+
+# Boundary conditions to be applied to the negative x-side of the mesh.
+[pylithapp.timedependent.bc.x_neg]
+
+# We are fixing all 3 degrees of freedom.
+bc_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'face_xneg' in the Cubit file.
+label = face_xneg
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform spatial distribution) to SimpleDB (which uses a data file
+# to specify a spatial variation).
+db_initial = spatialdata.spatialdb.SimpleDB
+
+# We are assigning the label 'Dirichlet BC -x face' to the database.
+db_initial.label = Dirichlet BC -x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db_initial.iohandler.filename = sheardisp.spatialdb
+
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# We are fixing all 3 degrees of freedom.
+bc_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'face_xpos' in the mesh file.
+label = face_xpos
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform spatial distribution) to SimpleDB (which uses a data file
+# to specify a spatial variation).
+db_initial = spatialdata.spatialdb.SimpleDB
+
+# We are assigning the label 'Dirichlet BC +x face' to the database.
+db_initial.label = Dirichlet BC +x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db_initial.iohandler.filename = sheardisp.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output.writer]
+filename = sheardisp.vtk
+time_format = %04.1f ; Time stamp will be xxx.x with the "." removed.
+time_constant = 1.0*year ; Normalize time stamp by years
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_data_fields = [total_strain,viscous_strain,stress]
+cell_info_fields = [mu,lambda,density,maxwell_time]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = sheardisp-statevars.vtk
+writer.time_format = %04.1f ; Time stamp will be xxx.x with the "." removed.
+writer.time_constant = 1.0*year ; Normalize time stamp by years

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/sheardisp.spatialdb	2010-08-26 03:51:00 UTC (rev 17120)
@@ -0,0 +1,44 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the boundary conditions for the shear
+// displacement example.
+
+// This follows the format for a Simple DB (the only type presently available).
+SimpleDB {
+
+  // There are 3 values specified in the database, corresponding to the
+  // constraint values for the x, y, and z degrees of freedom.
+  num-values = 3
+  value-names =  displacement-x displacement-y displacement-z
+
+  // The constraint values (displacements) have units of meters.
+  value-units =  m  m  m
+
+  // The values are specified at 2 spatial locations.
+  num-locs = 2
+
+  // The dimension of the spatial distribution is 1, since data is being
+  // specified at points.
+  data-dim = 1
+
+  // The spatial dimension of the database is 3.
+  space-dim = 3
+
+  // We are specifying the data in a Cartesian coordinate system.
+  cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
+    to-meters = 1.0
+
+    // We are using a 3D Cartesian coordinate system.
+    space-dim = 3
+  }
+}
+
+// This is where the data is specified.
+// As described in axialdisp.cfg, this database will be used to specify
+// data along edges (pylith.bc.BCSixSides).
+// The entries are:
+// X-coord, Y-coord, Z-coord, disp-x, disp-y, disp-z.
+-1.0  0.0  0.0   0.0 -0.01  0.0
+ 1.0  0.0  0.0   0.0  0.01  0.0

Added: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/twohex27.exo
===================================================================
(Binary files differ)


Property changes on: short/3D/PyLith/branches/v1.5-stable/examples/twocells/twohex27-cubit/twohex27.exo
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream



More information about the CIG-COMMITS mailing list