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

willic3 at geodynamics.org willic3 at geodynamics.org
Sun May 23 19:49:28 PDT 2010


Author: willic3
Date: 2010-05-23 19:49:28 -0700 (Sun, 23 May 2010)
New Revision: 16774

Added:
   short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg
Log:
Example showing a combination of time-dependent Dirichlet and Neumann BC.
The Dirichlet BC don't really do anything except translate the enitre
mesh in the y-direction, but maybe that's OK.



Added: short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg	2010-05-24 02:49:28 UTC (rev 16774)
@@ -0,0 +1,186 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+#
+# This is a time-dependent problem using a combination of constant
+# velocity Dirichlet boundary conditions and time-dependent Neumann
+# (traction) boundary conditions.
+
+# This problem is similar to example 4, with the following differences:
+# 1. The Dirichlet BC on -x in the y-direction include an initial
+# displacement (applied in the elastic solution) as well as a constant
+# velocity.
+# 2. Neumann (traction) BC are applied in the -x direction on the +x face.
+# An initial traction is applied in the elastic solution, and then at
+# t=100 years the traction reduces linearly until it reaches zero at
+# t=200 years (the end of the simulation).
+#
+# 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 step05.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step05.cfg
+#
+# Output will be directed to the directory step05.
+
+# ----------------------------------------------------------------------
+# 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 boundary conditions applied on the
+# +x, -x, and -z faces of the box.
+#
+# We fix the x degree of freedom on the -x face, and
+# fix the z degree of freedom on the bottom (-z) face. Constant velocities
+# in the +y direction are applied on -x, along with an initial displacement.
+# On the +x face, we apply compressional traction (Neumann) BC initially,
+# and then at t=100 years we begin reducing the magnitudes until they are
+# reduced to zero at t=200 years (the end of the simulation).
+#
+# For x_neg, we use a UniformDB for both initial displacements and
+# velocities.
+#
+# 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 -- first change bc type to Neumann
+[pylithapp.timedependent.bc]
+x_pos = pylith.bc.Neumann
+
+[pylithapp.timedependent.bc.x_pos]
+label = face_xpos
+# Give quadrature information for integration of tractions.
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
+
+# Fist specify a UniformDB for the initial tractions, along with the values.
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Neumann BC on +x
+db_initial.values = [traction-shear-horiz,traction-shear-vert,traction-normal]
+db_initial.data = [0.0*MPa,0.0*MPa,-1.0*MPa]
+# Provide information on traction rates.
+db_rate = spatialdata.spatialdb.UniformDB
+db_rate.label = Neumann rate BC on +x
+db_rate.values = [traction-rate-shear-horiz,traction-rate-shear-vert,traction-rate-normal,rate-start-time]
+db_rate.data = [0.0*MPa/year,0.0*MPa/year,0.01*MPa/year,100.0*year]
+
+# -x face
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0, 1]
+label = face_xneg
+# Initial displacements.
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Dirichlet BC on -x
+db_initial.values = [displacement-x,displacement-y]
+db_initial.data = [0.0*cm,0.5*cm]
+# Velocities.
+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 = step05/step05.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 = step05/step05-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 = step05/step05-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 = step05/step05-lower_crust.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year



More information about the CIG-COMMITS mailing list