[cig-commits] r7410 - short/3D/PyLith/trunk/examples/twocells/twohex8

willic3 at geodynamics.org willic3 at geodynamics.org
Fri Jun 22 21:03:20 PDT 2007


Author: willic3
Date: 2007-06-22 21:03:20 -0700 (Fri, 22 Jun 2007)
New Revision: 7410

Added:
   short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_disp.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_slip.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliprate.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/matprops.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/shearxy.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/twohex8.mesh
Log:
Initial stab at hex8 example.
Both axial and shear tests run, but results are screwy.
The stresses are incredibly large.
Dislocation example has not been set up yet.



Added: short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,74 @@
+# -*- 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
+
+# This is a container for a boundary condition specified on six sides
+# of a rectangular solid domain.
+bc = pylith.bc.BCSixSides
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# Provide information on the 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.
+fixed_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'x_neg' in the mesh file.
+label = x_neg
+
+# We are assigning the label 'Dirichlet BC -x face' to the database.
+db.label = Dirichlet BC -x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.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.
+fixed_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'x_pos' in the mesh file.
+label = x_pos
+
+# We are assigning the label 'Dirichlet BC +x face' to the database.
+db.label = Dirichlet BC +x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.iohandler.filename = axialdisp.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# Give basename for vtk output.
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = axialdisp.vtk

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -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 (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 =  dof-0 dof-1 dof-2
+
+  // 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, dof-0, dof-1, dof-2.
+-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/trunk/examples/twocells/twohex8/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,120 @@
+# -*- 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]
+quadrature1d = 1
+faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# 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
+
+# This is a container for a boundary condition specified at a point.
+bc = pylith.bc.BCFourSides
+
+# This is a container for a single fault.
+interfaces = pylith.faults.SingleFault
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# Provide information on the boundary conditions.
+# ----------------------------------------------------------------------
+
+# Boundary conditions to be applied to the negative x-side of the mesh.
+[pylithapp.timedependent.bc.x_neg]
+
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
+fixed_dof = [0, 1]
+
+# The nodes associated with this boundary condition have the name
+# 'x_neg' in the mesh file.
+label = x_neg
+
+# We are assigning the label 'Dirichlet BC' to the database.
+db.label = Dirichlet BC -x edge
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.iohandler.filename = dislocation_disp.spatialdb
+db.query_type = linear
+
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
+fixed_dof = [0, 1]
+
+# The nodes associated with this boundary condition have the name
+# 'x_pos' in the mesh file.
+label = x_pos
+
+# We are assigning the label 'Dirichlet BC' to the database.
+db.label = Dirichlet BC +x edge
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.iohandler.filename = dislocation_disp.spatialdb
+db.query_type = linear
+# ----------------------------------------------------------------------
+# faults
+# Provide information on the fault (interface).
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+
+# This fault is a cohesive element fault with kinematically-specified slip.
+fault = pylith.faults.FaultCohesiveKin
+
+# Define fault properties.
+[pylithapp.timedependent.interfaces.fault]
+
+# The nodes associated with this fault have the name 'fault' in the mesh file.
+label = fault
+
+# We need the material database for the fault to properly condition the
+# system of equations.
+mat_db.iohandler.filename = matprops.spatialdb
+
+# The quadrature for a 2D fault is 1D with a linear shape.
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell.shape = line
+
+# Give the spatial databases specifying the fault slip.
+[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
+
+# Database specifying fault slip (0.01 m of left-lateral slip).
+slip.iohandler.filename = dislocation_slip.spatialdb
+
+# Database specifying fault slip rate (1.0e+6 m/s).
+slip_rate.iohandler.filename = dislocation_sliprate.spatialdb
+
+# Database specifying time at which fault slips (-1.0 s).
+slip_time.iohandler.filename = dislocation_sliptime.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# Give basename for vtk output.
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = dislocation.vtk

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_disp.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_disp.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,44 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the boundary conditions for the
+// dislocation (kinematic fault) example.
+
+// This follows the format for a Simple DB (the only type presently available).
+SimpleDB {
+
+  // There are two values specified in the database, corresponding to the
+  // constraint values for the x (dof-0) and y (dof-1) degrees of freedom.
+  num-values = 2
+  value-names =  dof-0 dof-1
+
+  // The constraint values (displacements) have units of meters.
+  value-units =  m  m
+
+  // The values are specified at two spatial locations.
+  num-locs = 2
+
+  // The dimension of the spatial distribution is 1, since the data
+  // is being specified at points.
+  data-dim = 1
+
+  // The spatial dimension of the database is 2.
+  space-dim = 2
+
+  // 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 2D Cartesian coordinate system.
+    space-dim = 2
+  }
+}
+
+// This is where the data is specified.
+// As described in dislocation.cfg, this database will be used to specify
+// data along an edge (pylith.bc.BCFourSides).
+// The entries are:
+// X-coord, Y-coord, dof-0 (x constraint), dof-1 (y constraint).
+-2.0  0.0     0.0  0.0
+ 2.0  0.0     0.0  0.0

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_slip.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_slip.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,41 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the fault slip for the
+// dislocation (kinematic fault) example.
+SimpleDB {
+
+  // There are two values specified in the database, corresponding to the
+  // slip values for the left-lateral and fault-opening components.
+  num-values = 2
+  value-names =  left-lateral-slip fault-opening
+
+  // The fault slip values have units of meters.
+  value-units =  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 2.
+  space-dim = 2
+
+  // 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 2D Cartesian coordinate system.
+    space-dim = 2
+  }
+}
+
+// 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, left-lateral slip, fault-opening slip
+0.0  0.0   0.01  0.0

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliprate.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliprate.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,41 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the fault slip rate for the
+// dislocation (kinematic fault) example.
+SimpleDB {
+
+  // There is one value specified in the database, corresponding to the
+  // slip rate.
+  num-values = 1
+  value-names =  slip-rate
+
+  // The fault slip rate has units of meters/second.
+  value-units =  m/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 2.
+  space-dim = 2
+
+  // 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 2D Cartesian coordinate system.
+    space-dim = 2
+  }
+}
+
+// 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, slip rate
+0.0  0.0  1.0e+6

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -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 2.
+  space-dim = 2
+
+  // 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 2D Cartesian coordinate system.
+    space-dim = 2
+  }
+}
+
+// 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, slip time
+0.0  0.0   -1.0

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/matprops.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/matprops.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -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, density, Vs, Vp viscosity.
+
+0.0  0.0   2700.0  3333.333333333333  5773.502691896258  1.0e18

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,96 @@
+# -*- 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
+
+# This component specification means we are using PyLith ASCII format,
+# and we then specify the filename and number of space dimensions for
+# the mesh.
+[pylithapp.mesh_generator.importer]
+filename = twohex8.mesh
+coordsys.space_dim = 3
+
+# ----------------------------------------------------------------------
+# 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]
+total_time = 1.0*year
+default_dt = 0.1*year
+dimension = 3
+
+# ----------------------------------------------------------------------
+# materials
+# Specify the material information for the problem.
+# ----------------------------------------------------------------------
+# The material type is isotropic elastic formulated for plane strain.
+[pylithapp.timedependent.materials]
+material = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.material]
+
+# We give a label of 'elastic material' to this material.
+label = elastic material
+
+# The cells associated with this material are given a material ID of 1
+# in the mesh file.
+id = 1
+
+# The properties for this material are given in the spatial database file
+# 'matprops.spatialdb'.
+db.iohandler.filename = matprops.spatialdb
+
+# We are doing 2D quadrature for a quad.
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+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 = jacobi
+# start_in_debugger = true
+# debugger_timeout = 100

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,73 @@
+# -*- 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
+
+# This is a container for a boundary condition specified on six sides
+# of a rectangular solid domain.
+bc = pylith.bc.BCSixSides
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# Provide information on the 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.
+fixed_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'x_neg' in the mesh file.
+label = x_neg
+
+# We are assigning the label 'Dirichlet BC -x face' to the database.
+db.label = Dirichlet BC -x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.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.
+fixed_dof = [0, 1, 2]
+
+# The nodes associated with this boundary condition have the name
+# 'x_pos' in the mesh file.
+label = x_pos
+
+# We are assigning the label 'Dirichlet BC +x face' to the database.
+db.label = Dirichlet BC +x face
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.iohandler.filename = sheardisp.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = sheardisp.vtk

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -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 =  dof-0 dof-1 dof-2
+
+  // 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, dof-0, dof-1, dof-2.
+-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/trunk/examples/twocells/twohex8/shearxy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/shearxy.spatialdb	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/shearxy.spatialdb	2007-06-23 04:03:20 UTC (rev 7410)
@@ -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 two values specified in the database, corresponding to the
+  // constraint values for the x (dof-0) and y (dof-1) degrees of freedom.
+  num-values = 2
+  value-names =  dof-0  dof-1
+
+  // The constraint values (displacements) have units of meters.
+  value-units =  m  m
+
+  // The values are specified at two spatial locations (two edges).
+  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 2.
+  space-dim = 2
+
+  // 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 2D Cartesian coordinate system.
+    space-dim = 2
+  }
+}
+
+// This is where the data is specified.
+// As described in sheardisp.cfg, this database will be used to specify
+// data along an edge (pylith.bc.BCFourSides).
+// The entries are:
+// X-coord, Y-coord, dof-0 (x constraint), dof-1 (y constraint).
+-2.0  0.0    0.0  -0.01
++2.0  0.0    0.0  +0.01

Added: short/3D/PyLith/trunk/examples/twocells/twohex8/twohex8.mesh
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/twohex8.mesh	2007-06-23 03:13:18 UTC (rev 7409)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/twohex8.mesh	2007-06-23 04:03:20 UTC (rev 7410)
@@ -0,0 +1,127 @@
+// Global mesh object.
+// This defines a brick-shaped mesh composed of two cubic elements.
+mesh = {
+
+  // This is a 3D mesh.is is a 3D mesh.
+  dimension = 3
+
+  // We are using zero-indexing (default) rather than one-indexing.
+  use-index-zero = true
+
+  // Describe the vertices (nodes) defining the mesh.
+  vertices = {
+
+    // The vertices are defined in a 3D coordinate system.
+    dimension = 3
+
+    // There are 12 vertices.
+    count = 12
+
+    // List the coordinates as:
+    // Vertex number (starting from zero), x-coord, y-coord, z-coord
+    // Use coordinate units that are consistent with the other units used.
+    coordinates = {
+             0     -1.0 -0.5 -0.5
+             1     -1.0  0.5 -0.5
+             2      0.0 -0.5 -0.5
+             3      0.0  0.5 -0.5
+             4      1.0 -0.5 -0.5
+             5      1.0  0.5 -0.5
+             6     -1.0 -0.5  0.5
+             7     -1.0  0.5  0.5
+             8      0.0 -0.5  0.5
+             9      0.0  0.5  0.5
+            10      1.0 -0.5  0.5
+            11      1.0  0.5  0.5
+    }
+  }
+
+  // Describe the cells (elements) composing the mesh.
+  cells = {
+
+    // There are 2 cells.
+    count = 2
+
+    // These are trilinear hexahedral cells, so there are 8 corners per cell.
+    num-corners = 8
+
+    // List the vertices composing each cell (see manual for ordering).
+    // List the information as:
+    // Cell number (starting from zero), vertex 0, vertex 1, etc.
+    simplices = {
+             0       0  2  3  1  6  8  9  7
+             1       2  4  5  3  8 10 11  9
+    }
+
+    // List the material ID's associated with each cell.
+    // Different ID's may be used to specify a different material type, or
+    // to use a different spatial database for each material ID.
+    // In this example, cells 0 and 1 both are associated with material ID 1.
+    material-ids = {
+             0   1
+             1   1
+    }
+  }
+
+  // Here we list different groups (cells or vertices) that we want to associate
+  // with a particular name (ID).
+
+  // This group of vertices may be used to define a fault.
+  // There are 4 vertices corresponding to indices 2, 3, 8, and 9.
+  group = {
+    name = fault
+    type = vertices
+    count = 4
+    indices = {
+      2
+      3
+      8
+      9
+    }
+  }
+
+
+  // This group of vertices may be used to specify boundary conditions.
+  // There are 4 vertices corresponding to indices 0, 1, 6, and 7.
+  group = {
+    name = x_neg
+    type = vertices
+    count = 4
+    indices = {
+      0  1  6  7
+    }
+  }
+
+  // This group of vertices may be used to specify boundary conditions.
+  // There are 4 vertices corresponding to indices 4, 5, 10, and 11.
+  group = {
+    name = x_pos
+    type = vertices
+    count = 4
+    indices = {
+      4  5  10  11
+    }
+  }
+
+  // This group of vertices may be used to specify boundary conditions.
+  // There are 6 vertices corresponding to indices 0, 2, 4, 6, 8, and 10.
+  group = {
+    name = y_neg
+    type = vertices
+    count = 6
+    indices = {
+      0  2  4  6  8 10
+    }
+  }
+
+  // This group of vertices may be used to specify boundary conditions.
+  // There are 6 vertices corresponding to indices 0, 1, 2, 3, 4, and 5.
+  group = {
+    name = z_neg
+    type = vertices
+    count = 6
+    indices = {
+      0  1  2  3  4  5
+    }
+  }
+}



More information about the cig-commits mailing list