[cig-commits] r9353 - in short/3D/PyLith/trunk: . examples/twocells/twoquad4
brad at geodynamics.org
brad at geodynamics.org
Thu Feb 14 15:16:56 PST 2008
Author: brad
Date: 2008-02-14 15:16:56 -0800 (Thu, 14 Feb 2008)
New Revision: 9353
Added:
short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg
short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.spatialdb
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg
Log:
Added traction test to examples/twocells/twoquad4.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2008-02-14 23:15:34 UTC (rev 9352)
+++ short/3D/PyLith/trunk/TODO 2008-02-14 23:16:56 UTC (rev 9353)
@@ -6,8 +6,6 @@
2. Reimplement SolutionIO [BRAD & MATT]
c. Implement output of Neumann information.
- d. Implement output of Dirichlet information.
- i. DirichletBoundary
e. Implement output of solution subset (ground surface).
i. OutputSubdomain
f. VertexFilterChangeCS
Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg 2008-02-14 23:15:34 UTC (rev 9352)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg 2008-02-14 23:16:56 UTC (rev 9353)
@@ -1,49 +1,54 @@
# -*- Python -*-
-# The settings in this file (axialdisp.cfg) will be read if it is
-# specified on the command line:
-# 'pylith axialdisp.cfg'
+# To run this problem, type "pylith axialtract.cfg". The settings in
+# pylithapp.cfg will be read by default. See the README for how to run
+# other problems in this directory.
+#
+#
+# <- ----------------------- ->
+# | |
+# <- | | ->
+# | |
+# <- | | ->
+# | |
+# <- ----------------------- ->
+# ^ ^ ^
+#
+# Axial tension is applied by pulling on the left and right boundaries
+# in the horizontal direction.
+# Bottom boundary is pinned in the vertical direction.
-# 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.
+# Select a boundary condition container with 4 BCs.
bc = pylith.bc.BCFourSides
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
-# Provide information on the boundary conditions.
-# Boundary conditions to be applied to the negative x-side of the mesh.
+# BC for the left (-x) side of the domain.
[pylithapp.timedependent.bc.x_neg]
# We are fixing the 0 (x) degree of freedom.
fixed_dof = [0]
-# The nodes associated with this boundary condition have the name
-# 'x_neg' in the mesh file.
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_neg'.
label = x_neg
-# Change spatial database for initial value from FixedDOFDB (which has
-# a uniform spatial distribution) to SimpleDB (which uses a data file
-# to specify a spatial variation).
+# Change the spatial database for the Dirichlet BC initial values from
+# FixedDOFDB (which has a uniform spatial distribution) to SimpleDB
+# (which uses a data file to specify a spatial variation).
db = spatialdata.spatialdb.SimpleDB
# We are assigning the label 'Dirichlet BC -x edge' to the database.
@@ -61,13 +66,13 @@
# We are fixing the 0 (x) degree of freedom.
fixed_dof = [0]
-# The nodes associated with this boundary condition have the name
-# 'x_pos' in the mesh file.
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_pos'.
label = x_pos
-# Change spatial database for initial value from FixedDOFDB (which has
-# a uniform spatial distribution) to SimpleDB (which uses a data file
-# to specify a spatial variation).
+# Change the spatial database for the Dirichlet BC initial values from
+# FixedDOFDB (which has a uniform spatial distribution) to SimpleDB
+# (which uses a data file to specify a spatial variation).
db = spatialdata.spatialdb.SimpleDB
# We are assigning the label 'Dirichlet BC +x edge' to the database.
@@ -79,14 +84,14 @@
db.query_type = linear
-# Boundary conditions to be applied to the bottom corners of the mesh.
+# Boundary conditions to be applied to the bottom boundary of the mesh.
[pylithapp.timedependent.bc.y_neg]
# We are fixing the 1 (y) degree of freedom.
fixed_dof = [1]
-# The nodes associated with this boundary condition have the name
-# 'y_neg' in the mesh file.
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'y_neg'.
label = y_neg
# Change spatial database for initial value from FixedDOFDB (which has
Added: short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg (rev 0)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg 2008-02-14 23:16:56 UTC (rev 9353)
@@ -0,0 +1,96 @@
+# -*- Python -*-
+
+# To run this problem, type "pylith axialtract.cfg". The settings in
+# pylithapp.cfg will be read by default. See the README for how to run
+# other problems in this directory.
+#
+#
+# >----------------------- ->
+# | |
+# | | ->
+# >| |
+# | | ->
+# | |
+# >----------------------- ->
+# ^ ^ ^
+#
+# Left boundary is pinned in the horizontal direction.
+# Bottom boundary is pinned in the vertical direction.
+# Right side has a uniform horizontal traction.
+
+[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
+
+# Select a boundary condition container with 4 BCs. The default BC for
+# each side is a Dirichlet (prescribed displacement) BC.
+bc = pylith.bc.BCFourSides
+
+# Change the BC on the +x side of the domain to a Neumann (traction) BC.
+bc.x_pos = pylith.bc.Neumann
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+
+# BC for the left (-x) side of the domain.
+[pylithapp.timedependent.bc.x_neg]
+
+# We are fixing the 0 (x) degree of freedom.
+fixed_dof = [0]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_neg'.
+label = x_neg
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_pos'.
+label = x_pos
+
+db = spatialdata.spatialdb.SimpleDB
+
+# We are assigning the label 'Dirichlet BC +x edge' 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 = axialtract.spatialdb
+db.query_type = nearest
+
+quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 1
+
+# Boundary conditions to be applied to the bottom boundary of the mesh.
+[pylithapp.timedependent.bc.y_neg]
+
+# We are fixing the 1 (y) degree of freedom.
+fixed_dof = [1]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'y_neg'.
+label = y_neg
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK output of solution over domain.
+[pylithapp.problem.formulation.output.output.writer]
+filename = axialtract.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = axialtract-statevars.vtk
Added: short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.spatialdb 2008-02-14 23:16:56 UTC (rev 9353)
@@ -0,0 +1,39 @@
+// This database is used to specify the Neumann BC for the axial
+// traction examples.
+#SPATIAL.ascii 1
+SimpleDB {
+
+ // There are two values specified in the database, corresponding to the
+ // two components of the traction vector.
+ num-values = 2
+ value-names = shear-traction normal-traction
+
+ // The tractions have units of Pa.
+ value-units = Pa Pa
+
+ // The values are specified at a single location.
+ num-locs = 1
+
+ // The topology of the data is a point, since the data is specified
+ // by a single location.
+ 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 axialtract.cfg, the normal-traction is positive.
+// The entries are:
+// X-coord, Y-coord, shear-traction, normal-traction
+0.0 0.0 0.0 4.0e+08
More information about the cig-commits
mailing list