[cig-commits] r16734 - short/3D/PyLith/trunk/examples/3d/hex8

willic3 at geodynamics.org willic3 at geodynamics.org
Mon May 17 02:07:26 PDT 2010


Author: willic3
Date: 2010-05-17 02:07:25 -0700 (Mon, 17 May 2010)
New Revision: 16734

Added:
   short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg
Modified:
   short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg
Log:
Minor fixes to examples 1-3.
Created new example demonstrating velocity BC, a time-dependent problem,
and Maxwell viscoelastic rheology.



Modified: short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg	2010-05-17 03:44:00 UTC (rev 16733)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg	2010-05-17 09:07:25 UTC (rev 16734)
@@ -6,11 +6,12 @@
 # ----------------------------------------------------------------------
 
 #
-# This is a purely elastic static problem using only Dirichlet (displacement)
-# boundary conditions. The lower (minimum z) boundary is held fixed in the
-# z-direction. On the positive and negative x-boundaries, displacements are
-# applied corresponding to 1 m of shear displacement in the positive and
-# negative y-directions, and 1 m of axial (x) compression on each side.
+# This is a purely elastic static problem using only Dirichlet
+# (displacement) boundary conditions. The lower (minimum z) boundary is
+# held fixed in the z-direction. On the positive and negative x-boundaries,
+# displacements are applied corresponding to 1 m of shear displacement in
+# the positive and negative y-directions, and 1 m of axial (x) compression
+# on each side.
 
 # ----------------------------------------------------------------------
 # RUNNING THE SIMULATON

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	2010-05-17 03:44:00 UTC (rev 16733)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	2010-05-17 09:07:25 UTC (rev 16734)
@@ -6,13 +6,13 @@
 # ----------------------------------------------------------------------
 
 #
-# This is a purely elastic static problem using both Dirichlet (displacement)
-# boundary conditions and Neumann (traction) boundary conditions. The lower
-# (minimum z) boundary is held fixed in the z-direction. On the negative
-# x-boundary, displacements are held fixed in the x and y-directions.
-# On the positive x-boundary, tractions corresponding to 1 MPa of shear in
-# the +y direction and 1 MPa of normal stress in the -x direction are
-# applied.
+# This is a purely elastic static problem using both Dirichlet
+# (displacement) boundary conditions and Neumann (traction) boundary
+# conditions. The lower (minimum z) boundary is held fixed in the
+# z-direction. On the negative x-boundary, displacements are held fixed in
+# the x and y-directions.  On the positive x-boundary, tractions
+# corresponding to 1 MPa of shear in the +y direction and 1 MPa of normal
+# stress in the -x direction are applied.
 
 # ----------------------------------------------------------------------
 # RUNNING THE SIMULATON

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg	2010-05-17 03:44:00 UTC (rev 16733)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg	2010-05-17 09:07:25 UTC (rev 16734)
@@ -116,7 +116,7 @@
 writer.filename = step03/step03-groundsurf.vtk
 
 # Give basename for VTK fault output.
-[pylithapp.problem.interfaces.fault.output.writer]
+[pylithapp.problem.interfaces.fault.output]
 writer.filename = step03/step03-fault.vtk
 
 # Give basename for VTK output of upper_crust state variables.

Added: short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg	2010-05-17 09:07:25 UTC (rev 16734)
@@ -0,0 +1,160 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+#
+# This is a time-dependent problem with velocity boundary conditions.
+# Velocities in the + and - y-directions are applied on the - and +
+# x-faces, and the x-displacements are held fixed on those boundaries.
+# The z-displacements are held fixed on the -z face.
+# Two materials are used:
+# 1. Elastic upper crust.
+# 2. Viscoelastic (Maxwell) lower crust.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step04.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step04.cfg
+#
+# Output will be directed to the directory step04.
+
+# ----------------------------------------------------------------------
+# 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 (boundary of the domain).
+output.subdomain = pylith.meshio.OutputSolnSubset
+
+# Change the total simulation time to 200 years, and use a constant time
+# step size of 20 years.
+[pylithapp.timedependent.implicit.time_step]
+total_time = 200.0*year
+dt = 20.0*year
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+# Change material type of lower crust to Maxwell viscoelastic.
+[pylithapp.timedependent]
+materials.lower_crust = pylith.materials.MaxwellIsotropic3D
+
+# Provide a spatial database from which to obtain property values.
+# Since there are additional properties and state variables for the Maxwell
+# model, we explicitly request that they be output. Properties are named in
+# cell_info_fields and state variables are named in cell_data_fields.
+[pylithapp.timedependent.materials.lower_crust]
+db_properties.iohandler.filename = spatialdb/mat_maxwell.spatialdb
+output.cell_info_fields = [density,mu,lambda,maxwell_time]
+output.cell_data_fields = [total_strain,stress,viscous_strain]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Set the parameters for Dirichlet boundary conditions applied on the
+# +x, -x, and -z faces of the box.
+#
+# We fix the x degree of freedom on the +x and -x faces, and
+# fix the z degree of freedom on the bottom (-z) face. Constant velocities
+# in the +y and -y directions are applied on -x and +x.
+#
+# For x_pos and x_neg, we retain the default ZeroDispDB for displacements
+# (db_initial), since we do not want initial displacements. We change the
+# default database for velocities (db_rate) to UniformDB, which allows
+# nonzero velocities. Using UniformDB, we also specify the velocity values
+# in this .cfg file, rather than using a spatialdb file.
+#
+# For z_neg, we keep the default ZeroDispDB, since we just want zero
+# z-displacements on that boundary.
+#
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+# +x face
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0, 1]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+db_rate = spatialdata.spatialdb.UniformDB
+db_rate.label = Dirichlet rate BC on +x
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+
+# -x face
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0, 1]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+db_rate = spatialdata.spatialdb.UniformDB
+db_rate.label = Dirichlet rate BC on +x
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
+
+# -z face
+[pylithapp.timedependent.bc.z_neg]
+bc_dof = [2]
+label = face_zneg
+db_initial.label = Dirichlet BC on -z
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.domain]
+# We specify that output occurs in terms of a given time frequency, and
+# ask for output every 40 years. The time stamps of the output files are
+# in years (rather than the default of seconds), and we give a format for
+# the time stamp.
+output_freq = time_step
+time_step = 40.0*year
+writer.filename = step04/step04.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+# Name of nodeset for ground surface.
+label = face_zpos
+# We keep the default output frequency behavior (skip every n steps), and
+# ask to skip 0 steps between output, so that we get output every time step.
+skip = 0
+writer.filename = step04/step04-groundsurf.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+# Give basename for VTK output of upper_crust state variables.
+[pylithapp.timedependent.materials.upper_crust.output]
+# Average values over quadrature points.
+cell_filter = pylith.meshio.CellFilterAvgMesh
+output_freq = time_step
+time_step = 40.0*year
+writer.filename = step04/step04-upper_crust.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+# Give basename for VTK output of lower_crust state variables.
+[pylithapp.timedependent.materials.lower_crust.output]
+# Average values over quadrature points.
+cell_filter = pylith.meshio.CellFilterAvgMesh
+output_freq = time_step
+time_step = 40.0*year
+writer.filename = step04/step04-lower_crust.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year



More information about the CIG-COMMITS mailing list