[cig-commits] r19695 - short/3D/PyLith/trunk/tests/2d/plasticity/cyclic

brad at geodynamics.org brad at geodynamics.org
Tue Feb 28 15:22:00 PST 2012


Author: brad
Date: 2012-02-28 15:22:00 -0800 (Tue, 28 Feb 2012)
New Revision: 19695

Added:
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/dynamic.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/plot_data.py
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/quasistatic.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_dynamic.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_quasistatic.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_dynamic.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_quasistatic.cfg
Removed:
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_3d.cfg
Modified:
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/README
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/pylithapp.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/run-models.sh
Log:
Refactored .cfg files. Created dynamic/quasi-static pairs for 2-D an 3-D plane strain for sinusoidal loading.

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/README	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/README	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,24 +1,28 @@
 The tests in this directory involve time-varying displacements applied to a
 model consisting of a single cell. The dof are all constrained, so there are
 no variables for which to solve.
-There are four models:
 
-Plane strain axial displacement problem, displacements either on or off:
-pylith planestrain_onecell_2d.cfg cycle_cont2d.cfg
+* Plane strain axial displacement problem
 
-3D simulated plane strain axial displacement problem, displacements either
-on or off:
-pylith planestrain_onecell_3d.cfg cycle_cont3d.cfg
+  + 2-D
+    pylith onecell_2d.cfg quasistatic.cfg cycle_cont2d.cfg
 
-Plane strain axial displacement problem, sinusoidal displacements over
-multiple cycles.
-pylith planestrain_onecell_2d.cfg cycle_sin2d.cfg
+  + 3-D with z displacements constrained
+    pylith onecell_3d.cfg quasistatic.cfg cycle_cont3d.cfg
 
-3D simulated plane strain axial displacement problem, sinusoidal
-displacements over multiple cycles.
-pylith planestrain_onecell_3d.cfg cycle_sin3d.cfg
 
-To run all of the simulations, use the run-models.sh script.
+* Plane strain axial displacement problem, sinusoidal displacements
+  over multiple cycles.
 
-The 2D and 3D problems should yield the same displacements, strains,
-stresses, and plastic strains when the appropriate components are compared.
+  + 2-D quasistatic
+    pylith onecell_2d.cfg quasistatic.cfg sin2d.cfg sin2d_quasistatic.cfg
+
+  + 2-D dynamic
+    pylith onecell_2d.cfg dynamic.cfg sin2d.cfg sin2d_dynamic.cfg
+
+  + 3-D quasistatic
+    pylith onecell_3d.cfg quasistatic.cfg sin3d.cfg sin3d_quasistatic.cfg
+
+  + 3-D dynamic
+    pylith onecell_3d.cfg dynamic.cfg sin3d.cfg sin3d_dynamic.cfg
+

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont2d.cfg	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont2d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,11 +1,6 @@
-# -*- Python -*-
-
-# To run this problem, type
-# "pylith planestrain_onecell_2d.cfg cycle_cont2d.cfg".
-# The settings in pylithapp.cfg will be read by default. See the README for
-# how to run other problems in this directory.
+[pylithapp]
+# See the README for problems in this directory.
 #
-#
 #  -> ----------------------- <-
 #     |                     |
 #  -> |                     | <-
@@ -20,34 +15,22 @@
 # All displacements in the vertical direction are fixed so there are no
 # unconstrained dof.
 
-[pylithapp]
 
 # ----------------------------------------------------------------------
-# problem
+# boundary conditions
 # ----------------------------------------------------------------------
-# Specify the problem settings.
 [pylithapp.timedependent]
-# Set bc to an array with 2 boundary conditions: 'x_neg', 'x_pos'
 bc = [x_neg,x_pos]
 
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-
 # BC for the left (-x) side of the domain.
 [pylithapp.timedependent.bc.x_neg]
-
-# Fix the 0 (x) degree of freedom.
 bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_neg'.
 label = x_neg
 
 db_change = spatialdata.spatialdb.UniformDB
 db_change.label = Amplitude of Dirichlet BC on -x
 db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [0.1*mm,0.00*cm,0.0*year]
+db_change.data = [0.1*mm,0.0*mm,0.0*year]
 
 th_change = spatialdata.spatialdb.TimeHistory
 th_change.label = Time history for Dirichlet BC on -x
@@ -55,18 +38,13 @@
 
 # Boundary conditions to be applied to the positive x-side of the mesh.
 [pylithapp.timedependent.bc.x_pos]
-
-# Fix the 0 (x) degree of freedom.
 bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_pos'.
 label = x_pos
 
 db_change = spatialdata.spatialdb.UniformDB
 db_change.label = Amplitude of Dirichlet BC on +x
 db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [-0.1*mm,0.00*cm,0.0*year]
+db_change.data = [-0.1*mm,0.0*mm,0.0*year]
 
 th_change = spatialdata.spatialdb.TimeHistory
 th_change.label = Time history for Dirichlet BC on +x
@@ -75,15 +53,8 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK output of solution over domain.
-[pylithapp.problem.formulation.output.output.writer]
-filename = output/cycle_cont2d.vtk
-time_format = %04.0f
-time_constant = 1.0*year
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/cycle_cont2d.h5
 
-# Give basename for VTK output of state variables.
 [pylithapp.timedependent.materials.material.output]
-cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = output/cycle_cont2d-statevars.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
+writer.filename = output/cycle_cont2d-statevars.h5

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont3d.cfg	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_cont3d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,9 +1,5 @@
-# -*- Python -*-
-
-# To run this problem, type
-# "pylith planestrain_onecell_3d.cfg cycle_cont3d.cfg".
-# The settings in pylithapp.cfg will be read by default. See the README for
-# how to run other problems in this directory.
+[pylithapp]
+# See the README for how to run other problems in this directory.
 #
 #
 #  -> ----------------------- <-
@@ -20,35 +16,22 @@
 # All displacements in the vertical direction are fixed, and all z-dof are
 # fixed to simulate plane strain conditions.
 
-[pylithapp]
-
 # ----------------------------------------------------------------------
-# problem
+# boundary conditions
 # ----------------------------------------------------------------------
-# Specify the problem settings.
 [pylithapp.timedependent]
-# Set bc to an array with 4 boundary conditions: 'x_neg', 'x_pos', 'z_neg'
-# and 'z_pos'
 bc = [x_neg,x_pos,z_neg,z_pos]
 
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
 
 # BC for the left (-x) side of the domain.
 [pylithapp.timedependent.bc.x_neg]
-
-# Fix the 0 (x) degree of freedom.
 bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_neg'.
 label = x_neg
 
 db_change = spatialdata.spatialdb.UniformDB
 db_change.label = Amplitude of Dirichlet BC on -x
 db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [0.1*mm,0.00*cm,0.0*year]
+db_change.data = [0.1*mm,0.0*mm,0.0*year]
 
 th_change = spatialdata.spatialdb.TimeHistory
 th_change.label = Time history for Dirichlet BC on -x
@@ -56,18 +39,13 @@
 
 # Boundary conditions to be applied to the positive x-side of the mesh.
 [pylithapp.timedependent.bc.x_pos]
-
-# Fix the 0 (x) degree of freedom.
 bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_pos'.
 label = x_pos
 
 db_change = spatialdata.spatialdb.UniformDB
 db_change.label = Amplitude of Dirichlet BC on +x
 db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [-0.1*mm,0.00*cm,0.0*year]
+db_change.data = [-0.1*mm,0.0*mm,0.0*year]
 
 th_change = spatialdata.spatialdb.TimeHistory
 th_change.label = Time history for Dirichlet BC on +x
@@ -88,15 +66,8 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK output of solution over domain.
-[pylithapp.problem.formulation.output.output.writer]
-filename = output/cycle_cont3d.vtk
-time_format = %04.0f
-time_constant = 1.0*year
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/cycle_cont3d.h5
 
-# Give basename for VTK output of state variables.
 [pylithapp.timedependent.materials.material.output]
-cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = output/cycle_cont3d-statevars.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year
+writer.filename = output/cycle_cont3d-statevars.h5

Deleted: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin2d.cfg	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin2d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,93 +0,0 @@
-# -*- Python -*-
-
-# To run this problem, type
-# "pylith planestrain_onecell_2d.cfg cycle_sin2d.cfg".
-# The settings in pylithapp.cfg will be read by default. See the README for
-# how to run other problems in this directory.
-#
-#
-#  -> ----------------------- <-
-#     |                     |
-#  -> |                     | <-
-#     |                     |
-#  -> |                     | <-
-#     |                     |
-#  -> ----------------------- <-
-#     ^          ^          ^
-#
-# Axial contraction is applied by pushing on the left and right boundaries
-# in the horizontal direction.
-# All displacements in the vertical direction are fixed so there are no
-# unconstrained dof.
-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-# Specify the problem settings.
-[pylithapp.timedependent]
-# Set bc to an array with 2 boundary conditions: 'x_neg', 'x_pos'
-bc = [x_neg,x_pos]
-
-[pylithapp.timedependent.formulation.time_step]
-total_time = 2880.0*year
-dt = 20.0*year
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-
-# BC for the left (-x) side of the domain.
-[pylithapp.timedependent.bc.x_neg]
-
-# Fix the 0 (x) degree of freedom.
-bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_neg'.
-label = x_neg
-
-db_change = spatialdata.spatialdb.UniformDB
-db_change.label = Amplitude of Dirichlet BC on -x
-db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [0.1*mm,0.00*cm,0.0*year]
-
-th_change = spatialdata.spatialdb.TimeHistory
-th_change.label = Time history for Dirichlet BC on -x
-th_change.filename = loadcycle_sin.timedb
-
-# Boundary conditions to be applied to the positive x-side of the mesh.
-[pylithapp.timedependent.bc.x_pos]
-
-# Fix the 0 (x) degree of freedom.
-bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_pos'.
-label = x_pos
-
-db_change = spatialdata.spatialdb.UniformDB
-db_change.label = Amplitude of Dirichlet BC on +x
-db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [-0.1*mm,0.00*cm,0.0*year]
-
-th_change = spatialdata.spatialdb.TimeHistory
-th_change.label = Time history for Dirichlet BC on +x
-th_change.filename = loadcycle_sin.timedb
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Give basename for VTK output of solution over domain.
-[pylithapp.problem.formulation.output.output.writer]
-filename = output/cycle_sin2d.vtk
-time_format = %04.0f
-time_constant = 1.0*year
-
-# Give basename for VTK output of state variables.
-[pylithapp.timedependent.materials.material.output]
-cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = output/cycle_sin2d-statevars.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year

Deleted: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin3d.cfg	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin3d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,106 +0,0 @@
-# -*- Python -*-
-
-# To run this problem, type
-# "pylith planestrain_onecell_3d.cfg cycle_sin3d.cfg".
-# The settings in pylithapp.cfg will be read by default. See the README for
-# how to run other problems in this directory.
-#
-#
-#  -> ----------------------- <-
-#     |                     |
-#  -> |                     | <-
-#     |                     |
-#  -> |                     | <-
-#     |                     |
-#  -> ----------------------- <-
-#     ^          ^          ^
-#
-# Axial contraction is applied by pushing on the left and right boundaries
-# in the horizontal direction.
-# All displacements in the vertical direction are fixed, and all z-dof are
-# fixed to simulate plane strain conditions.
-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-# Specify the problem settings.
-[pylithapp.timedependent]
-# Set bc to an array with 4 boundary conditions: 'x_neg', 'x_pos', 'z_neg'
-# and 'z_pos'
-bc = [x_neg,x_pos,z_neg,z_pos]
-
-[pylithapp.timedependent.formulation.time_step]
-total_time = 2880.0*year
-dt = 20.0*year
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-
-# BC for the left (-x) side of the domain.
-[pylithapp.timedependent.bc.x_neg]
-
-# Fix the 0 (x) degree of freedom.
-bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_neg'.
-label = x_neg
-
-db_change = spatialdata.spatialdb.UniformDB
-db_change.label = Amplitude of Dirichlet BC on -x
-db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [0.1*mm,0.00*cm,0.0*year]
-
-th_change = spatialdata.spatialdb.TimeHistory
-th_change.label = Time history for Dirichlet BC on -x
-th_change.filename = loadcycle_sin.timedb
-
-# Boundary conditions to be applied to the positive x-side of the mesh.
-[pylithapp.timedependent.bc.x_pos]
-
-# Fix the 0 (x) degree of freedom.
-bc_dof = [0,1]
-
-# The group of vertices in the mesh file associated with this boundary
-# condition have the name 'x_pos'.
-label = x_pos
-
-db_change = spatialdata.spatialdb.UniformDB
-db_change.label = Amplitude of Dirichlet BC on +x
-db_change.values = [displacement-x,displacement-y,change-start-time]
-db_change.data = [-0.1*mm,0.00*cm,0.0*year]
-
-th_change = spatialdata.spatialdb.TimeHistory
-th_change.label = Time history for Dirichlet BC on +x
-th_change.filename = loadcycle_sin.timedb
-
-# Boundary conditions to be applied to the negative z-side of the mesh.
-[pylithapp.timedependent.bc.z_neg]
-bc_dof = [2]
-label = z_neg
-db_initial.label = Dirichlet BC -z face
-
-# Boundary conditions to be applied to the positive z-side of the mesh.
-[pylithapp.timedependent.bc.z_pos]
-bc_dof = [2]
-label = z_pos
-db_initial.label = Dirichlet BC +z face
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Give basename for VTK output of solution over domain.
-[pylithapp.problem.formulation.output.output.writer]
-filename = output/cycle_sin3d.vtk
-time_format = %04.0f
-time_constant = 1.0*year
-
-# Give basename for VTK output of state variables.
-[pylithapp.timedependent.materials.material.output]
-cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = output/cycle_sin3d-statevars.vtk
-writer.time_format = %04.0f
-writer.time_constant = 1.0*year

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/dynamic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/dynamic.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/dynamic.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,7 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+formulation = pylith.problems.ExplicitLumped

Copied: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_2d.cfg (from rev 19685, short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_2d.cfg)
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_2d.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_2d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,26 @@
+[pylithapp]
+# The settings in this file define the setting specific to a 2D
+# (plane strain) problem.
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator.reader]
+filename = ../mesh/onequad4.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 2
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.DruckerPragerPlaneStrain
+material.quadrature.cell.dimension = 2
+
+
+# End of file

Copied: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_3d.cfg (from rev 19685, short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_3d.cfg)
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_3d.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/onecell_3d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,25 @@
+[pylithapp]
+# The settings in this file define the setting specific to a 3D problem.
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator.reader]
+filename = ../mesh/onehex8.mesh
+coordsys.space_dim = 3
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 3
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.DruckerPrager3D
+material.quadrature.cell.dimension = 3
+
+
+# End of file

Deleted: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_2d.cfg	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_2d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,34 +0,0 @@
-# -*- Python -*-
-
-# The settings in this file define the setting specific to a 2D
-# (plane strain) problem.
-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-# 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.reader]
-filename = ../mesh/onequad4.mesh
-coordsys.space_dim = 2
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-# We define this as a 2D problem.
-# All other problem settings are in pylithapp.cfg.
-[pylithapp.timedependent]
-dimension = 2
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-# Define a single material that is DruckerPragerPlaneStrain.
-# Other material settings are defined in pylithapp.cfg.
-[pylithapp.timedependent.materials]
-material = pylith.materials.DruckerPragerPlaneStrain
-# The cell dimension for this material is 2.
-material.quadrature.cell.dimension = 2

Deleted: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_3d.cfg	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/planestrain_onecell_3d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,33 +0,0 @@
-# -*- Python -*-
-
-# The settings in this file define the setting specific to a 3D problem.
-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-# 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.reader]
-filename = ../mesh/onehex8.mesh
-coordsys.space_dim = 3
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-# We define this as a 3D problem.
-# All other problem settings are in pylithapp.cfg.
-[pylithapp.timedependent]
-dimension = 3
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-# Define a single material that is DruckerPrager3D.
-# Other material settings are defined in pylithapp.cfg.
-[pylithapp.timedependent.materials]
-material = pylith.materials.DruckerPrager3D
-# The cell dimension for this material is 3.
-material.quadrature.cell.dimension = 3

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/plot_data.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/plot_data.py	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/plot_data.py	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,123 @@
+#!/usr/bin/env python
+import sys
+
+if len(sys.argv) != 2:
+    raise ValueError("usage: plot_data.py SIM")
+
+sim = sys.argv[1]
+
+if not sim in ['sin']:
+    raise ValueError("Unknown sim '%s'." % sim)
+
+
+# ======================================================================
+import tables
+import pylab
+import numpy
+
+# ----------------------------------------------------------------------
+def get_data(sim, dim, form):
+    h5 = tables.openFile("output/%s%dd_%s-statevars.h5" % (sim, dim, form), "r")
+    plasticStrain = h5.root.cell_fields.plastic_strain[:]
+    totalStrain = h5.root.cell_fields.total_strain[:]
+    stress = h5.root.cell_fields.stress[:]
+    timeStamps =  h5.root.time[:].ravel()
+
+    # Scales for time and stress
+    from pyre.units.time import year
+    timescale = 1.0*year
+    stressscale = 1.0e+6
+
+    h5.close()
+    return {'time': timeStamps/timescale.value,
+            'plastic_strain': plasticStrain,
+            'total_strain': totalStrain,
+            'stress': stress/stressscale}
+
+
+
+# ----------------------------------------------------------------------
+quasi2D = get_data(sim, dim=2, form='quasistatic')
+dyn2D = get_data(sim, dim=2, form='dynamic')
+quasi3D = get_data(sim, dim=3, form='quasistatic')
+dyn3D = get_data(sim, dim=3, form='dynamic')
+
+# Plot
+fig = pylab.Figure()
+
+# Total Strain
+ax = pylab.subplot(3, 3, 1)
+pylab.plot(quasi2D['time'], quasi2D['total_strain'][:,0,0], 'b-',
+           dyn2D['time'], dyn2D['total_strain'][:,0,0], 'r--',
+           quasi3D['time'], quasi3D['total_strain'][:,0,0], 'g-',
+           dyn3D['time'], dyn3D['total_strain'][:,0,0], 'm--',
+    )
+ax.set_title("Total Strain")
+
+ax = pylab.subplot(3, 3, 4)
+pylab.plot(quasi2D['time'], quasi2D['total_strain'][:,0,1], 'b-',
+           dyn2D['time'], dyn2D['total_strain'][:,0,1], 'r--',
+           quasi3D['time'], quasi3D['total_strain'][:,0,1], 'g-',
+           dyn3D['time'], dyn3D['total_strain'][:,0,1], 'm--',
+    )
+
+ax = pylab.subplot(3, 3, 7)
+pylab.plot(quasi2D['time'], quasi2D['total_strain'][:,0,2], 'b-',
+           dyn2D['time'], dyn2D['total_strain'][:,0,2], 'r--',
+           quasi3D['time'], quasi3D['total_strain'][:,0,2], 'g-',
+           dyn3D['time'], dyn3D['total_strain'][:,0,2], 'm--',
+    )
+ax.set_xlabel("Time (yr)")
+
+# Plastic Strain
+ax = pylab.subplot(3, 3, 2)
+pylab.plot(quasi2D['time'], quasi2D['plastic_strain'][:,0,0], 'b-',
+           dyn2D['time'], dyn2D['plastic_strain'][:,0,0], 'r--',
+           quasi3D['time'], quasi3D['plastic_strain'][:,0,0], 'g-',
+           dyn3D['time'], dyn3D['plastic_strain'][:,0,0], 'm--',
+    )
+ax.set_title("Plastic Strain")
+
+ax = pylab.subplot(3, 3, 5)
+pylab.plot(quasi2D['time'], quasi2D['plastic_strain'][:,0,1], 'b-',
+           dyn2D['time'], dyn2D['plastic_strain'][:,0,1], 'r--',
+           quasi3D['time'], quasi3D['plastic_strain'][:,0,1], 'g-',
+           dyn3D['time'], dyn3D['plastic_strain'][:,0,1], 'm--',
+    )
+
+ax = pylab.subplot(3, 3, 8)
+pylab.plot(quasi2D['time'], quasi2D['plastic_strain'][:,0,2], 'b-',
+           dyn2D['time'], dyn2D['plastic_strain'][:,0,2], 'r--',
+           quasi3D['time'], quasi3D['plastic_strain'][:,0,2], 'g-',
+           dyn3D['time'], dyn3D['plastic_strain'][:,0,2], 'm--',
+    )
+ax.set_xlabel("Time (yr)")
+
+
+# Stress
+ax = pylab.subplot(3, 3, 3)
+pylab.plot(quasi2D['time'], quasi2D['stress'][:,0,0], 'b-',
+           dyn2D['time'], dyn2D['stress'][:,0,0], 'r--',
+           quasi3D['time'], quasi3D['stress'][:,0,0], 'g-',
+           dyn3D['time'], dyn3D['stress'][:,0,0], 'm--',
+    )
+ax.set_title("Stress (MPa)")
+
+ax = pylab.subplot(3, 3, 6)
+pylab.plot(quasi2D['time'], quasi2D['stress'][:,0,1], 'b-',
+           dyn2D['time'], dyn2D['stress'][:,0,1], 'r--',
+           quasi3D['time'], quasi3D['stress'][:,0,1], 'b-',
+           dyn3D['time'], dyn3D['stress'][:,0,1], 'r--',
+    )
+
+ax = pylab.subplot(3, 3, 9)
+pylab.plot(quasi2D['time'], quasi2D['stress'][:,0,2], 'b-',
+           dyn2D['time'], dyn2D['stress'][:,0,2], 'r--',
+           quasi3D['time'], quasi3D['stress'][:,0,2], 'b-',
+           dyn3D['time'], dyn3D['stress'][:,0,2], 'r--',
+    )
+ax.set_xlabel("Time (yr)")
+
+
+
+pylab.show()


Property changes on: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/plot_data.py
___________________________________________________________________
Name: svn:executable
   + *

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/pylithapp.cfg	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/pylithapp.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,22 +1,8 @@
-# -*- 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
 implicit = 1
@@ -28,21 +14,9 @@
 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
-
-# ----------------------------------------------------------------------
 # 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.
 [pylithapp.timedependent]
-implicit.solver = pylith.problems.SolverNonlinear
 normalizer.length_scale = 1.0*m
 
 [pylithapp.timedependent.formulation.time_step]
@@ -52,55 +26,30 @@
 # ----------------------------------------------------------------------
 # materials
 # ----------------------------------------------------------------------
-# Specify the material information for the problem.
 [pylithapp.timedependent.materials.material]
-
-# We give a label of 'Elastoplastic material' to this material.
 label = Elastoplastic material
-
-# The cells associated with this material are given a material ID of 0
-# in the mesh file.
 id = 1
 
-# We specify a uniform DB and give the properties in this file.
 db_properties = spatialdata.spatialdb.UniformDB
 db_properties.label = DP elastoplastic db
 db_properties.values = [vp,vs,density,friction-angle,cohesion,dilatation-angle]
-db_properties.data = [5291.502622129181*m/s,3000.0*m/s,2700.0*kg/m**3,20.0*degree,1.0*MPa,20.0*degree]
+db_properties.data = [5291.502622129181*m/s,3000.0*m/s,2700.0*kg/m**3,20.0*degree,1.0*MPa,0.0*degree]
+fit_mohr_coulomb = middle
 
-# Set cell type to FIAT Lagrange.
 quadrature.cell = pylith.feassemble.FIATLagrange
 
-# Set cell info and output fields
 output.cell_info_fields = [density,mu,lambda,alpha_yield,beta,alpha_flow]
 output.cell_data_fields = [total_strain,stress,plastic_strain]
 
 # ----------------------------------------------------------------------
-# PETSc
+# output
 # ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = asm
+[pylithapp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
 
-# Change the preconditioner settings.
-sub_pc_factor_shift_type = nonzero
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer = pylith.meshio.DataWriterHDF5Mesh
 
-ksp_rtol = 1.0e-10
-ksp_atol = 1.0e-20
-ksp_max_it = 500
-ksp_gmres_restart = 50
 
-ksp_monitor = true
-ksp_view = true
-ksp_converged_reason = true
-
-snes_rtol = 1.0e-10
-snes_atol = 1.0e-16
-snes_max_it = 100
-snes_monitor = true
-snes_ls_monitor = true
-snes_view = true
-snes_converged_reason = true
-snes_max_linear_solve_fail = 4
-
-log_summary = true
-# start_in_debugger = true
+# End of file

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/quasistatic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/quasistatic.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/quasistatic.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,41 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# 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.
+[pylithapp.timedependent]
+formulation = pylith.problems.Implicit
+formulation.solver = pylith.problems.SolverNonlinear
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = asm
+
+# Change the preconditioner settings.
+sub_pc_factor_shift_type = nonzero
+
+ksp_rtol = 1.0e-10
+ksp_atol = 1.0e-20
+ksp_max_it = 500
+ksp_gmres_restart = 50
+
+ksp_monitor = true
+ksp_view = true
+ksp_converged_reason = true
+
+snes_rtol = 1.0e-10
+snes_atol = 1.0e-16
+snes_max_it = 100
+snes_monitor = true
+snes_ls_monitor = true
+snes_view = true
+snes_converged_reason = true
+snes_max_linear_solve_fail = 4
+
+log_summary = true
+# start_in_debugger = true

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/run-models.sh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/run-models.sh	2012-02-28 21:33:03 UTC (rev 19694)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/run-models.sh	2012-02-28 23:22:00 UTC (rev 19695)
@@ -1,4 +1,7 @@
-pylith planestrain_onecell_2d.cfg cycle_cont2d.cfg
-pylith planestrain_onecell_3d.cfg cycle_cont3d.cfg
-pylith planestrain_onecell_2d.cfg cycle_sin2d.cfg
-pylith planestrain_onecell_3d.cfg cycle_sin3d.cfg
+pylith onecell_2d.cfg quasistatic.cfg cycle_cont2d.cfg
+pylith onecell_3d.cfg quasistatic.cfg cycle_cont3d.cfg
+
+pylith onecell_2d.cfg quasistatic.cfg sin2d.cfg sin2d_quasistatic.cfg
+pylith onecell_2d.cfg dynamic.cfg sin2d.cfg sin2d_dynamic.cfg
+pylith onecell_3d.cfg quasistatic.cfg sin3d.cfg sin3d_quasistatic.cfg
+pylith onecell_3d.cfg dynamic.cfg sin3d.cfg sin3d_dynamic.cfg

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,59 @@
+[pylithapp]
+# See the README for how to run other problems in this directory.
+#
+#
+#  -> ----------------------- <-
+#     |                     |
+#  -> |                     | <-
+#     |                     |
+#  -> |                     | <-
+#     |                     |
+#  -> ----------------------- <-
+#     ^          ^          ^
+#
+# Axial contraction is applied by pushing on the left and right boundaries
+# in the horizontal direction.
+# All displacements in the vertical direction are fixed so there are no
+# unconstrained dof.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.formulation.time_step]
+total_time = 2880.0*year
+dt = 5.0*year
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+bc = [x_neg,x_pos]
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0,1]
+label = x_neg
+
+db_change = spatialdata.spatialdb.UniformDB
+db_change.label = Amplitude of Dirichlet BC on -x
+db_change.values = [displacement-x,displacement-y,change-start-time]
+db_change.data = [0.1*mm,0.0*mm,0.0*year]
+
+th_change = spatialdata.spatialdb.TimeHistory
+th_change.label = Time history for Dirichlet BC on -x
+th_change.filename = loadcycle_sin.timedb
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0,1]
+label = x_pos
+
+db_change = spatialdata.spatialdb.UniformDB
+db_change.label = Amplitude of Dirichlet BC on +x
+db_change.values = [displacement-x,displacement-y,change-start-time]
+db_change.data = [-0.1*mm,0.0*mm,0.0*year]
+
+th_change = spatialdata.spatialdb.TimeHistory
+th_change.label = Time history for Dirichlet BC on +x
+th_change.filename = loadcycle_sin.timedb
+
+
+# End of file

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_dynamic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_dynamic.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_dynamic.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,13 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/sin2d_dynamic.h5
+
+[pylithapp.timedependent.materials.material.output]
+writer.filename = output/sin2d_dynamic-statevars.h5
+
+
+# End of file

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_quasistatic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_quasistatic.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin2d_quasistatic.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,13 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/sin2d_quasistatic.h5
+
+[pylithapp.timedependent.materials.material.output]
+writer.filename = output/sin2d_quasistatic-statevars.h5
+
+
+# End of file

Copied: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d.cfg (from rev 19694, short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/cycle_sin3d.cfg)
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,71 @@
+[pylithapp]
+# See the README for how to run other problems in this directory.
+#
+#  -> ----------------------- <-
+#     |                     |
+#  -> |                     | <-
+#     |                     |
+#  -> |                     | <-
+#     |                     |
+#  -> ----------------------- <-
+#     ^          ^          ^
+#
+# Axial contraction is applied by pushing on the left and right boundaries
+# in the horizontal direction.
+# All displacements in the vertical direction are fixed, and all z-dof are
+# fixed to simulate plane strain conditions.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.formulation.time_step]
+total_time = 2880.0*year
+dt = 20.0*year
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+bc = [x_neg,x_pos,z_neg,z_pos]
+
+# BC for the left (-x) side of the domain.
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0,1]
+label = x_neg
+
+db_change = spatialdata.spatialdb.UniformDB
+db_change.label = Amplitude of Dirichlet BC on -x
+db_change.values = [displacement-x,displacement-y,change-start-time]
+db_change.data = [0.1*mm,0.0*mm,0.0*year]
+
+th_change = spatialdata.spatialdb.TimeHistory
+th_change.label = Time history for Dirichlet BC on -x
+th_change.filename = loadcycle_sin.timedb
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0,1]
+label = x_pos
+
+db_change = spatialdata.spatialdb.UniformDB
+db_change.label = Amplitude of Dirichlet BC on +x
+db_change.values = [displacement-x,displacement-y,change-start-time]
+db_change.data = [-0.1*mm,0.0*mm,0.0*year]
+
+th_change = spatialdata.spatialdb.TimeHistory
+th_change.label = Time history for Dirichlet BC on +x
+th_change.filename = loadcycle_sin.timedb
+
+# Boundary conditions to be applied to the negative z-side of the mesh.
+[pylithapp.timedependent.bc.z_neg]
+bc_dof = [2]
+label = z_neg
+db_initial.label = Dirichlet BC -z face
+
+[pylithapp.timedependent.bc.z_pos]
+bc_dof = [2]
+label = z_pos
+db_initial.label = Dirichlet BC +z face
+
+
+# End of file
\ No newline at end of file

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_dynamic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_dynamic.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_dynamic.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,13 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/sin3d_dynamic.h5
+
+[pylithapp.timedependent.materials.material.output]
+writer.filename = output/sin3d_dynamic-statevars.h5
+
+
+# End of file

Added: short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_quasistatic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_quasistatic.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/cyclic/sin3d_quasistatic.cfg	2012-02-28 23:22:00 UTC (rev 19695)
@@ -0,0 +1,13 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/sin3d_quasistatic.h5
+
+[pylithapp.timedependent.materials.material.output]
+writer.filename = output/sin3d_quasistatic-statevars.h5
+
+
+# End of file



More information about the CIG-COMMITS mailing list