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

willic3 at geodynamics.org willic3 at geodynamics.org
Mon May 10 17:00:47 PDT 2010


Author: willic3
Date: 2010-05-10 17:00:46 -0700 (Mon, 10 May 2010)
New Revision: 16684

Added:
   short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_axial_shear.spatialdb
   short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg
Log:
Added example demonstrating Neumann BC, building on first example.



Added: short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_axial_shear.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_axial_shear.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_axial_shear.spatialdb	2010-05-11 00:00:46 UTC (rev 16684)
@@ -0,0 +1,27 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of the
+// tractions for Neumann boundary conditions associated
+// with shear in the xy plane and normal tractions on +x.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  traction-shear-horiz traction-shear-vert traction-normal
+  value-units =  Pa Pa Pa
+  num-locs = 1
+  data-dim = 0 // location is a single point
+  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) T-shear-horiz (Pa)
+// (5) T-shear-vert (Pa)
+// (6) T-normal (Pa)
+0.0  0.0  0.0    1.0e6  0.0  -1.0e6

Added: short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	2010-05-11 00:00:46 UTC (rev 16684)
@@ -0,0 +1,102 @@
+# -*- Python -*-
+[pylithapp]
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step02.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step02.cfg
+#
+# Output will be directed to directory step02.
+
+# ----------------------------------------------------------------------
+# 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_neg, we use the default Dirichlet boundary condition type along
+# with the default ZeroDispDB spatial database type. This will provide
+# zero displacements in the x and y directions for that boundary.
+# For x_pos, we change the boundary condition type to Neumann (traction),
+# and we specify shear and normal tractions using a SimpleDB.
+# For z_neg, we keep the default ZeroDispDB, since we just want zero
+# z-displacements on that boundary.
+
+# Change the BC type to Neumann for x_pos.
+[pylithapp.timedependent.bc]
+x_pos = pylith.bc.Neumann
+
+# Specify zero displacement (Dirichlet) BC for x_neg.
+# The label corresponds to the nodeset ID in CUBIT.
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0, 1]
+label = 12
+db_initial.label = Dirichlet BC on -x
+
+# Specify a spatial database (SimpleDB) to describe the Neumann BC on x_pos.
+# The label corresponds to the nodeset ID in CUBIT.
+[pylithapp.timedependent.bc.x_pos]
+label = 11
+db_initial = spatialdata.spatialdb.SimpleDB
+db_initial.label = Neumann BC on +x
+db_initial.iohandler.filename = spatialdb/tractions_axial_shear.spatialdb
+# We must specify quadrature information for the cell faces.
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
+
+[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 = step02/step02.vtk
+
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+label = 17 ; nodeset for subdomain
+writer.filename = step02/step02-groundsurf.vtk
+
+# Give basename for VTK output of elastic state variables.
+[pylithapp.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = step02/step02-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 = step02/step02-inelastic.vtk



More information about the CIG-COMMITS mailing list