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

willic3 at geodynamics.org willic3 at geodynamics.org
Mon May 31 18:11:19 PDT 2010


Author: willic3
Date: 2010-05-31 18:11:19 -0700 (Mon, 31 May 2010)
New Revision: 16847

Added:
   short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg
Log:
Added gravity example problems.
The only problems right now are with the finite strain example (step17).
For this example I get DIVERGED_LS_FAILURE for the last three timesteps.
Also, I don't know what the solution should look like, so it's hard to
know if what we have is correct or not.



Added: short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg	2010-06-01 01:11:19 UTC (rev 16847)
@@ -0,0 +1,161 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+#
+# This problem demonstrates the use of gravitational body forces for an
+# elastic problem. The boundary conditions are extremely simple, and are
+# applied to the -x, +x, -y, +y, and -z faces. For each of these faces,
+# displacements are pinned in the direction normal to the face.
+# The gravity field is specified using spatialdata.spatialdb.GravityField,
+# which can be used for either Cartesian or projected coordinate systems.
+# For Cartesian coordinate systems, users can also specify gravity_dir
+# (the default is [0.0,0.0,-1.0]).
+# The resulting stress field should be rho*g*h for Stress_zz, and should
+# be rho*g*h*pr/(1-pr), for Stress_xx and Stress_yy, where pr is Poisson's
+# ratio.
+# We make the lower_crust material Maxwell viscoelastic, and allow the
+# stresses to relax for 200 years, so they begin approaching and isotropic
+# stress state in the lower crust.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step15.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step15.cfg
+#
+# Output will be directed to the directory step15.
+
+# ----------------------------------------------------------------------
+# 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
+
+# Change time stepping algorithm from uniform time step, to adaptive
+# time stepping.
+time_step = pylith.problems.TimeStepAdapt
+
+# Change the total simulation time to 200 years, and set the maximum time
+# step size to 10 years.
+[pylithapp.timedependent.implicit.time_step]
+total_time = 200.0*year
+max_dt = 10.0*year
+stability_factor = 1.0 ; use time step equal to stable value from materials
+
+# ----------------------------------------------------------------------
+# 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
+# ----------------------------------------------------------------------
+# We use the default ZeroDispDB for all boundaries, since we just want
+# zero displacements in the direction normal to each face.
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+
+[pylithapp.timedependent.bc.y_pos]
+bc_dof = [1]
+label = face_ypos
+db_initial.label = Dirichlet BC on +y
+
+[pylithapp.timedependent.bc.y_neg]
+bc_dof = [1]
+label = face_yneg
+db_initial.label = Dirichlet BC on -y
+
+[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 = step15/step15.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 = step15/step15-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 = step15/step15-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 = step15/step15-lower_crust.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year

Added: short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg	2010-06-01 01:11:19 UTC (rev 16847)
@@ -0,0 +1,177 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+#
+# This problem demonstrates the use of gravitational body forces for an
+# elastic problem. This problem is identical to example 15 except that
+# initial stresses corresponding to lithostatic stress (rho*g*h) are
+# applied for Stress_xx, Stress_yy, and Stress_zz. This accomplishes two
+# things:
+# 1. First, this means that the stress state is isotropic, which is an
+# appropriate stress state for many tectonic problems in the absence of
+# tectonic stresses (e.g., stresses are due purely to gravity).
+# 2. Using initial stresses to balance the gravitational stresses prevents
+# the large initial deformation that would otherwise occur when gravity is
+# suddenly 'turned on'.
+# As a consequence of balancing the stress field, there should be no
+# stress relaxation within the viscoelastic portion of the mesh, and there
+# should be essentially zero displacements throughout the simulation.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step16.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step16.cfg
+#
+# Output will be directed to the directory step16.
+
+# ----------------------------------------------------------------------
+# 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
+
+# Change time stepping algorithm from uniform time step, to adaptive
+# time stepping.
+time_step = pylith.problems.TimeStepAdapt
+
+# Change the total simulation time to 200 years, and set the maximum time
+# step size to 10 years.
+[pylithapp.timedependent.implicit.time_step]
+total_time = 200.0*year
+max_dt = 10.0*year
+stability_factor = 1.0 ; use time step equal to stable value from materials
+
+# ----------------------------------------------------------------------
+# 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]
+
+# ----------------------------------------------------------------------
+# initial stresses
+# ----------------------------------------------------------------------
+# We must specify initial stresses for each material.
+# We provide a filename for the spatial database that gives the stresses,
+# and we change the query_type from the default 'nearest' to 'linear'.
+[pylithapp.timedependent.materials.upper_crust]
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
+db_initial_stress.query_type = linear
+
+[pylithapp.timedependent.materials.lower_crust]
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
+db_initial_stress.query_type = linear
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# We use the default ZeroDispDB for all boundaries, since we just want
+# zero displacements in the direction normal to each face.
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+
+[pylithapp.timedependent.bc.y_pos]
+bc_dof = [1]
+label = face_ypos
+db_initial.label = Dirichlet BC on +y
+
+[pylithapp.timedependent.bc.y_neg]
+bc_dof = [1]
+label = face_yneg
+db_initial.label = Dirichlet BC on -y
+
+[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 = step16/step16.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 = step16/step16-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 = step16/step16-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 = step16/step16-lower_crust.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year

Added: short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg	2010-06-01 01:11:19 UTC (rev 16847)
@@ -0,0 +1,160 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+#
+# This problem demonstrates the use of gravitational body forces where we
+# allow for finite strain. The problem is identical to example 15 except
+# that we use the ImplicitLgDeform formulation rather than the default
+# infinitesimal (linear) strain approximation. Thus, the computed stresses
+# will reflect the changed geometry of the problem, resulting in slightly
+# different predicted stress values. Since we are using a nonlinear
+# formulation, we must also use the nonlinear solver.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step17.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step17.cfg
+#
+# Output will be directed to the directory step17.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+# Set the formulation for finite strain.
+formulation = pylith.problems.ImplicitLgDeform
+
+# Switch to nonlinear solver.
+formulation.solver = pylith.problems.SolverNonlinear
+
+# 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.formulation]
+# 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
+
+# Change time stepping algorithm from uniform time step, to adaptive
+# time stepping.
+time_step = pylith.problems.TimeStepAdapt
+
+# Change the total simulation time to 200 years, and set the maximum time
+# step size to 10 years.
+[pylithapp.timedependent.formulation.time_step]
+total_time = 200.0*year
+max_dt = 10.0*year
+stability_factor = 1.0 ; use time step equal to stable value from materials
+
+# ----------------------------------------------------------------------
+# 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
+# ----------------------------------------------------------------------
+# We use the default ZeroDispDB for all boundaries, since we just want
+# zero displacements in the direction normal to each face.
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+
+[pylithapp.timedependent.bc.y_pos]
+bc_dof = [1]
+label = face_ypos
+db_initial.label = Dirichlet BC on +y
+
+[pylithapp.timedependent.bc.y_neg]
+bc_dof = [1]
+label = face_yneg
+db_initial.label = Dirichlet BC on -y
+
+[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 = step17/step17.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 = step17/step17-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 = step17/step17-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 = step17/step17-lower_crust.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year



More information about the CIG-COMMITS mailing list