[cig-commits] r15812 - short/3D/PyLith/trunk/examples/3d/tet4
willic3 at geodynamics.org
willic3 at geodynamics.org
Thu Oct 15 15:37:27 PDT 2009
Author: willic3
Date: 2009-10-15 15:37:27 -0700 (Thu, 15 Oct 2009)
New Revision: 15812
Added:
short/3D/PyLith/trunk/examples/3d/tet4/gravity.cfg
short/3D/PyLith/trunk/examples/3d/tet4/gravity_istress.cfg
short/3D/PyLith/trunk/examples/3d/tet4/initial_stress.spatialdb
Modified:
short/3D/PyLith/trunk/examples/3d/tet4/Makefile.am
short/3D/PyLith/trunk/examples/3d/tet4/README
Log:
Added examples for gravity with and without initial stresses.
Modified: short/3D/PyLith/trunk/examples/3d/tet4/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/Makefile.am 2009-10-15 19:46:39 UTC (rev 15811)
+++ short/3D/PyLith/trunk/examples/3d/tet4/Makefile.am 2009-10-15 22:37:27 UTC (rev 15812)
@@ -16,6 +16,9 @@
dislocation.jpg \
finalslip.spatialdb \
fixeddisp_shear.spatialdb \
+ gravity.cfg \
+ gravity_istress.cfg \
+ initial_stress.spatialdb \
mat_elastic.spatialdb \
mat_viscoelastic.spatialdb \
mesh_tet4_1000m.lagrit \
Modified: short/3D/PyLith/trunk/examples/3d/tet4/README
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/README 2009-10-15 19:46:39 UTC (rev 15811)
+++ short/3D/PyLith/trunk/examples/3d/tet4/README 2009-10-15 22:37:27 UTC (rev 15812)
@@ -1,8 +1,9 @@
-The examples in this directory include (1) simple shearing of a box
-and (2) slip on a through-going, vertical, strike-slip fault in a
-box. In each problem the domain is 6 km x 6 km x 4 km and is
-discretized with linear tetrahedral cells that have edges nominally
-1.0 km long.
+The examples in this directory include (1) simple shearing of a box,
+(2) slip on a through-going, vertical, strike-slip fault in a
+box, (3) a box subjected to body forces, and (4) a box subjected to body
+forces where initial stresses are used to prevent deformation. In each
+problem the domain is 6 km x 6 km x 4 km and is discretized with linear
+tetrahedral cells that have edges nominally 1.0 km long.
The box spans the volume:
@@ -13,9 +14,10 @@
The mesh is generated using LaGrit. A LaGrit script is included and is
annotated to guide you through the process of generating the mesh.
-See the configuration files shearxy.cfg and dislocation.cfg on
-instructions on how to run these simulations. The configuration files
-also contain information about the simulation parameters.
+See the configuration files shearxy.cfg, dislocation.cfg, gravity.cfg, and
+gravity_istress.cfg for instructions on how to run these simulations. The
+configuration files also contain information about the simulation
+parameters.
DESCRIPTION OF FILES
@@ -28,6 +30,14 @@
the displacement field in the Dirichlet (prescribed displacement)
boundary conditions for the shear problem
+gravity.cfg - Simulation parameters for the gravity problem.
+
+gravity_istress.cfg - Simulation parameters for the gravity problem with
+initial stresses.
+
+initial_stress.spatialdb - Spatial database for spatial variation of the
+initial stresses. They just correspond to rho * g * h.
+
mat_elastic.spatialdb - Spatial database for spatial variation of the
elastic material properties
Added: short/3D/PyLith/trunk/examples/3d/tet4/gravity.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/gravity.cfg (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/tet4/gravity.cfg 2009-10-15 22:37:27 UTC (rev 15812)
@@ -0,0 +1,91 @@
+# -*- 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 gravity.cfg
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+# Set bc to an array of 5 boundary conditions: 'x_pos','x_neg', 'y_pos',
+# 'y_neg', and 'z_neg'.
+bc = [x_pos,x_neg,y_pos,y_neg,z_neg]
+
+# Set gravity field (default is None)
+gravity_field = spatialdata.spatialdb.GravityField
+
+[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
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Use the default FixedDOFDB, which has a uniform spatial distribution.
+
+# Set the parameters for Dirichlet boundary conditions applied on the
+# +x, -x, +y, -y, and -z faces of the box.
+
+# We fix the x degree of freedom on the +x and -x faces, the y degree of
+# freedom on the +y and -y faces, and the z degree of freedom on the
+# bottom face.
+
+# The label corresponds to the pset name in Lagrit.
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0]
+label = boundary_xp
+db_initial.label = Dirichlet BC on +x
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0]
+label = boundary_xm
+db_initial.label = Dirichlet BC on -x
+
+[pylithapp.timedependent.bc.y_pos]
+bc_dof = [1]
+label = boundary_yp
+db_initial.label = Dirichlet BC on +y
+
+[pylithapp.timedependent.bc.y_neg]
+bc_dof = [1]
+label = boundary_ym
+db_initial.label = Dirichlet BC on -y
+
+[pylithapp.timedependent.bc.z_neg]
+bc_dof = [2]
+label = boundary_zm
+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 = gravity.vtk
+
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+label = boundary_zp
+writer.filename = gravity-groundsurf.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = gravity-elastic.vtk
+
+[pylithapp.timedependent.materials.viscoelastic.output]
+cell_info_fields = [density,mu,lambda,maxwell_time]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = gravity-viscoelastic.vtk
Added: short/3D/PyLith/trunk/examples/3d/tet4/gravity_istress.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/gravity_istress.cfg (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/tet4/gravity_istress.cfg 2009-10-15 22:37:27 UTC (rev 15812)
@@ -0,0 +1,106 @@
+# -*- 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 gravity_istress.cfg
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+# Set bc to an array of 5 boundary conditions: 'x_pos','x_neg', 'y_pos',
+# 'y_neg', and 'z_neg'.
+bc = [x_pos,x_neg,y_pos,y_neg,z_neg]
+
+# Set gravity field (default is None)
+gravity_field = spatialdata.spatialdb.GravityField
+
+[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
+
+# ----------------------------------------------------------------------
+# initial stresses
+# ----------------------------------------------------------------------
+# To properly apply initial stresses for this problem, linear interpolation
+# should be used. For the equivalent hex problem, this will not work
+# because we want the values at the element centroid rather than the
+# integration points.
+[pylithapp.timedependent.materials.elastic]
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+db_initial_stress.iohandler.filename = initial_stress.spatialdb
+db_initial_stress.query_type =linear
+
+[pylithapp.timedependent.materials.viscoelastic]
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+db_initial_stress.iohandler.filename = initial_stress.spatialdb
+db_initial_stress.query_type =linear
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Set the parameters for Dirichlet boundary conditions applied on the
+# +x, -x, +y, -y, and -z faces of the box.
+
+# We fix the x degree of freedom on the +x and -x faces, the y degree of
+# freedom on the +y and -y faces, and the z degree of freedom on the
+# bottom face.
+
+# The label corresponds to the pset name in Lagrit.
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0]
+label = boundary_xp
+db_initial.label = Dirichlet BC on +x
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0]
+label = boundary_xm
+db_initial.label = Dirichlet BC on -x
+
+[pylithapp.timedependent.bc.y_pos]
+bc_dof = [1]
+label = boundary_yp
+db_initial.label = Dirichlet BC on +y
+
+[pylithapp.timedependent.bc.y_neg]
+bc_dof = [1]
+label = boundary_ym
+db_initial.label = Dirichlet BC on -y
+
+[pylithapp.timedependent.bc.z_neg]
+bc_dof = [2]
+label = boundary_zm
+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 = gravity_istress.vtk
+
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+label = boundary_zp
+writer.filename = gravity_istress-groundsurf.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = gravity_istress-elastic.vtk
+
+[pylithapp.timedependent.materials.viscoelastic.output]
+cell_info_fields = [density,mu,lambda,maxwell_time]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = gravity_istress-viscoelastic.vtk
Added: short/3D/PyLith/trunk/examples/3d/tet4/initial_stress.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/initial_stress.spatialdb (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/tet4/initial_stress.spatialdb 2009-10-15 22:37:27 UTC (rev 15812)
@@ -0,0 +1,36 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the initial stresses for the model
+// The stresses increase linearly with depth.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 6 // number of stress components
+
+ // names of the stress components
+ value-names = stress-xx stress-yy stress-zz stress-xy stress-yz stress-xz
+
+ value-units = Pa Pa Pa Pa Pa Pa // units
+
+ num-locs = 2 // number of locations: 1 value each at the upper and lower
+ // surfaces. Linear interpolation should be used.
+
+ data-dim = 1
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+// Columns are
+// (1) x coordinate (m)
+// (2) y coordinate (m)
+// (3) z coordinate (m)
+// (4) stress-xx (Pa)
+// (5) stress-yy (Pa)
+// (6) stress-zz (Pa)
+// (7) stress-xy (Pa)
+// (8) stress-yz (Pa)
+// (9) stress-xz (Pa)
+0.0 0.0 -4000.0 -98066500 -98066500 -98066500 0.0 0.0 0.0
+0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
More information about the CIG-COMMITS
mailing list