[cig-commits] r16678 - in short/3D/PyLith/trunk/examples/3d/hex8: . spatialdb

willic3 at geodynamics.org willic3 at geodynamics.org
Sun May 9 19:39:39 PDT 2010


Author: willic3
Date: 2010-05-09 19:39:39 -0700 (Sun, 09 May 2010)
New Revision: 16678

Added:
   short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/fixeddisp_axial_shear.spatialdb
   short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg
Removed:
   short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg
Log:
Created first example using new file layout.
Additional examples will be based on this one.



Deleted: short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg	2010-05-10 01:47:09 UTC (rev 16677)
+++ short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg	2010-05-10 02:39:39 UTC (rev 16678)
@@ -1,95 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies parameters specific to the boundary
-# conditions. The general parameters are specificed in the pylithapp.cfg
-# file which PyLith reads by default.
-#
-# To run the simulation:
-# pylith hex8_1000m.cfg shearxy.cfg
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-# Set bc to an array of 3 boundary conditions: 'x_pos','x_neg', and 'z_neg'.
-bc = [x_pos,x_neg,z_neg]
-
-[pylithapp.timedependent.implicit]
-# Set the output to an array of 2 output managers.
-# We will output the solution over the domain and the ground surface.
-output = [domain,subdomain]
-
-# Set subdomain component to OutputSolnSubset (subset of domain).
-output.subdomain = pylith.meshio.OutputSolnSubset
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-
-# We specifically define the database info for the viscoelastic material
-# for each model, since the type of spatialdb can be different.
-
-[pylithapp.timedependent.materials.viscoelastic]
-db_properties.iohandler.filename = mat_maxwell.spatialdb
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-# We 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).
-
-# Set the parameters for Dirichlet boundary conditions applied on the
-# +x and -x faces of the box.
-
-# We fix the x and y degrees of freedom on the +x and -x faces, and
-# fix the z degree of freedom on the bottom face.
-
-# The label corresponds to the nodeset ID in CUBIT.
-
-[pylithapp.timedependent.bc.x_pos]
-bc_dof = [0, 1]
-label = 11
-db_initial = spatialdata.spatialdb.SimpleDB
-db_initial.label = Dirichlet BC on +x
-db_initial.iohandler.filename = fixeddisp_shear.spatialdb
-
-[pylithapp.timedependent.bc.x_neg]
-bc_dof = [0, 1]
-label = 12
-db_initial = spatialdata.spatialdb.SimpleDB
-db_initial.label = Dirichlet BC on -x
-db_initial.iohandler.filename = fixeddisp_shear.spatialdb
-
-[pylithapp.timedependent.bc.z_neg]
-bc_dof = [2]
-label = 15
-db_initial = spatialdata.spatialdb.SimpleDB
-db_initial.label = Dirichlet BC on -z
-db_initial.iohandler.filename = fixeddisp_shear.spatialdb
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[pylithapp.problem.formulation.output.domain.writer]
-filename = shearxy.vtk
-
-# Give basename for VTK domain output of solution over ground surface.
-[pylithapp.problem.formulation.output.subdomain]
-label = 17 ; nodeset for subdomain
-writer.filename = shearxy-groundsurf.vtk
-
-# Give basename for VTK output of state variables.
-[pylithapp.timedependent.materials.elastic.output]
-cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = shearxy-elastic.vtk
-
-[pylithapp.timedependent.materials.viscoelastic.output]
-cell_info_fields = [density,mu,lambda,maxwell_time]
-cell_data_fields = [total_strain,stress,viscous_strain]
-cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = shearxy-viscoelastic.vtk

Added: short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/fixeddisp_axial_shear.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/fixeddisp_axial_shear.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/fixeddisp_axial_shear.spatialdb	2010-05-10 02:39:39 UTC (rev 16678)
@@ -0,0 +1,32 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of the
+// displacement field for Dirichlet boundary conditions associated
+// with shear in the xy plane and axial displacements on -x and +x.
+//
+// dof-0: Ux(x) = 0
+// dof-1: Uy(x) = 1.0 m * x / 3 km
+// dof-2: Uz(x) = 0
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  displacement-x  displacement-y  displacement-z
+  value-units =  m  m  m
+  num-locs = 2
+  data-dim = 1 // locations form a line
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0e+3 // specify coordinates in km
+    space-dim = 3
+  }
+}
+// Columns are
+// (1) x coordinate (km)
+// (2) y coordinate (km)
+// (3) z coordinate (km)
+// (4) Ux (m)
+// (5) Uy (m)
+// (6) Uz (m)
+-3.0  0.0  0.0    1.0  -1.0  0.0
++3.0  0.0  0.0   -1.0  +1.0  0.0

Added: short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg	2010-05-10 02:39:39 UTC (rev 16678)
@@ -0,0 +1,99 @@
+# -*- Python -*-
+[pylithapp]
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step01.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step01.cfg
+#
+# Output will be directed to directory step01.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+# Set bc to an array of 3 boundary conditions: 'x_pos','x_neg', and 'z_neg'.
+bc = [x_pos,x_neg,z_neg]
+
+[pylithapp.timedependent.implicit]
+# Set the output to an array of 2 output managers.
+# We will output the solution over the domain and the ground surface.
+output = [domain,subdomain]
+
+# Set subdomain component to OutputSolnSubset (subset of domain).
+output.subdomain = pylith.meshio.OutputSolnSubset
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+
+# We specifically define the database info for the inelastic material
+# for each model, since the type of spatialdb can be different.
+
+[pylithapp.timedependent.materials.inelastic]
+db_properties.iohandler.filename = spatialdb/mat_maxwell.spatialdb
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# For x_pos and x_neg, we change the database from ZeroDispDB (which
+# specifies a zero value everywhere) to SimpleDB (which uses a data file
+# to specify a spatial variation).
+# For z_neg, we keep the default ZeroDispDB, since we just want zero
+# z-displacements on that boundary.
+
+# Set the parameters for Dirichlet boundary conditions applied on the
+# +x and -x faces of the box.
+
+# We fix the x and y degrees of freedom on the +x and -x faces, and
+# fix the z degree of freedom on the bottom face.
+
+# The label corresponds to the nodeset ID in CUBIT.
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0, 1]
+label = 11
+db_initial = spatialdata.spatialdb.SimpleDB
+db_initial.label = Dirichlet BC on +x
+db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0, 1]
+label = 12
+db_initial = spatialdata.spatialdb.SimpleDB
+db_initial.label = Dirichlet BC on -x
+db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
+
+[pylithapp.timedependent.bc.z_neg]
+bc_dof = [2]
+label = 15
+db_initial.label = Dirichlet BC on -z
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.domain.writer]
+filename = step01/step01.vtk
+
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+label = 17 ; nodeset for subdomain
+writer.filename = step01/step01-groundsurf.vtk
+
+# Give basename for VTK output of elastic state variables.
+[pylithapp.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = step01/step01-elastic.vtk
+
+# Give basename for VTK output of inelastic state variables.
+[pylithapp.timedependent.materials.inelastic.output]
+# Default (elastic) info and data fields do not include viscoelastic
+# information, so we include it here.
+cell_info_fields = [density,mu,lambda,maxwell_time]
+cell_data_fields = [total_strain,stress,viscous_strain]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = step01/step01-inelastic.vtk



More information about the CIG-COMMITS mailing list