[cig-commits] r8971 - in short/3D/PyLith/trunk/examples/twocells: . twoquad4-tractions

willic3 at geodynamics.org willic3 at geodynamics.org
Wed Dec 26 14:13:50 PST 2007


Author: willic3
Date: 2007-12-26 14:13:49 -0800 (Wed, 26 Dec 2007)
New Revision: 8971

Added:
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/fixed_disp.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/matprops.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/twoquad4.mesh
Log:
Simple tractions example.
Something is wrong at present, because code bombs in integrateJacobian.



Added: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/fixed_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/fixed_disp.spatialdb	2007-12-23 13:27:33 UTC (rev 8970)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/fixed_disp.spatialdb	2007-12-26 22:13:49 UTC (rev 8971)
@@ -0,0 +1,43 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the boundary conditions for the
+// traction BC 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 one spatial location (one edge).
+  num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since data is being
+  // specified at a single point.
+  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 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).
+ 0.0 -1.0    0.0   0.0

Added: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg	2007-12-23 13:27:33 UTC (rev 8970)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg	2007-12-26 22:13:49 UTC (rev 8971)
@@ -0,0 +1,102 @@
+# -*- 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 four sides
+# of a rectangular domain.
+bc = pylith.bc.BCFourSides
+bc.y_neg = pylith.bc.Neumann
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Provide information on the boundary conditions.
+
+# Boundary conditions to be applied to the top (+y) of the mesh.
+[pylithapp.timedependent.bc.y_pos]
+
+# We are fixing the 1 (y) degree of freedom.
+fixed_dof = [1]
+
+# The nodes associated with this boundary condition have the name
+# 'all_top' in the mesh file.
+label = top_corners
+
+# We are assigning the label 'Dirichlet x BC +y edge' to the database.
+db.label = Dirichlet BC +y edge
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.iohandler.filename = fixed_disp.spatialdb
+db.query_type = nearest
+
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+# Note that this is a kludge -- this is really just a single node at
+# the top of the mesh that we are pinning in the x-direction.
+[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
+# 'mid_top' in the mesh file.
+label = mid_top
+
+# We are assigning the label 'Dirichlet x BC +y edge' to the database.
+db.label = Dirichlet x BC +y edge
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.iohandler.filename = fixed_disp.spatialdb
+db.query_type = nearest
+
+
+# Traction BC to be applied to the bottom of the mesh.
+[pylithapp.timedependent.bc.y_neg]
+
+# We are applying a normal traction.
+# fixed_dof = [1]
+
+# The nodes associated with this boundary condition have the name
+# 'all_bottom' in the mesh file.
+label = all_bottom
+
+# We are assigning the label 'Neumann BC -y edge' to the database.
+db.label = Neumann BC -y edge
+
+# The name of the file containing the spatial database for the BC
+# specification.
+db.iohandler.filename = lintractions.spatialdb
+db.query_type = linear
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for vtk output.
+[pylithapp.problem.formulation.output.output]
+filename = lintractions.vtk

Added: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb	2007-12-23 13:27:33 UTC (rev 8970)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb	2007-12-26 22:13:49 UTC (rev 8971)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 2
+  value-names =  shear-traction normal-traction
+  value-units =  Pa  Pa
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+-1.0  0.0    0.0  0.0
+ 1.0  0.0    0.0  1.0

Added: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/matprops.spatialdb	2007-12-23 13:27:33 UTC (rev 8970)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/matprops.spatialdb	2007-12-26 22:13:49 UTC (rev 8971)
@@ -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 3 values specified in the database, corresponding to density,
+  // S-velocity, and P-velocity (values for shear modulus and Lame's constant
+  // are computed from these values.
+  num-values = 3
+  value-names =  density vs vp
+
+  // These are the units used to specify density, vs, and vp.
+  value-units =  kg/m^3  m/s  m/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 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.
+// 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.
+
+0.0  0.0   2700.0  3333.333333333333  5773.502691896258

Added: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/pylithapp.cfg	2007-12-23 13:27:33 UTC (rev 8970)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/pylithapp.cfg	2007-12-26 22:13:49 UTC (rev 8971)
@@ -0,0 +1,98 @@
+# -*- 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
+quadrature2d = 1
+fiatlagrange = 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 = twoquad4.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# 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 sec, and a time step size of 1 sec, so we
+# are performing a single time step.
+# The spatial dimension for this problem is 2.
+# For an implicit formulation (using implicit.cfg), we will perform 1
+# implicit time step from t = -1.0 to t = 0.0 (elastic solution step).
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 2
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+# Specify the material information for the problem.
+# The material type is isotropic elastic formulated for plane strain.
+[pylithapp.timedependent.materials]
+material = pylith.materials.ElasticPlaneStrain
+
+[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 0
+# in the mesh file.
+id = 0
+
+# 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.Quadrature2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+# We are using all of the default settings for PETSc except for specifying
+# the block Jacobi preconditioner.
+# Additional PETSc command-line arguments may be found in the PETSc
+# documentation.
+[pylithapp.petsc]
+pc_type = bjacobi
+# start_in_debugger = true
+# debugger_timeout = 100

Added: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/twoquad4.mesh
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/twoquad4.mesh	2007-12-23 13:27:33 UTC (rev 8970)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/twoquad4.mesh	2007-12-26 22:13:49 UTC (rev 8971)
@@ -0,0 +1,68 @@
+// Original mesh
+//
+//  1 ----- 3 ----- 5
+//  |       |       |
+//  |   0   |   1   |
+//  |       |       |
+//  0 ----- 2 ----- 4
+//
+// Sieve mesh
+//
+//  3 ----- 5 ----- 7
+//  |       |       |
+//  |   0   |   1   |
+//  |       |       |
+//  2 ----- 4 ----- 6
+//
+mesh = {
+  dimension = 2
+  use-index-zero = true
+  vertices = {
+    dimension = 2
+    count = 6
+    coordinates = {
+             0     -1.0 -1.0
+             1     -1.0  1.0
+             2      0.0 -1.0
+             3      0.0  1.0
+             4      1.0 -1.0
+             5      1.0  1.0
+    }
+  }
+  cells = {
+    count = 2
+    num-corners = 4
+    simplices = {
+             0       0  2  3  1
+             1       2  4  5  3
+    }
+    material-ids = {
+             0   0
+             1   0
+    }
+  }
+  group = {
+    name = top_corners
+    type = vertices
+    count = 2
+    indices = {
+      1  5
+    }
+  }
+  group = {
+    name = all_bottom
+    type = vertices
+    count = 3
+    indices = {
+      0  2  4
+    }
+  }
+  group = {
+    name = mid_top
+    type = vertices
+    count = 1
+    indices = {
+      3
+    }
+  }
+}



More information about the cig-commits mailing list