[cig-commits] r21627 - in short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8: . spatialdb
willic3 at geodynamics.org
willic3 at geodynamics.org
Sun Mar 24 19:11:32 PDT 2013
Author: willic3
Date: 2013-03-24 19:11:32 -0700 (Sun, 24 Mar 2013)
New Revision: 21627
Added:
short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns.cfg
short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns_points.txt
short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb
short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/step21.cfg
Modified:
short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/README
short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/pylithapp.cfg
Log:
Added an example for Green's function generation.
I probably need to swap some things between greensfns.cfg and step21.cfg.
Modified: short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/README
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/README 2013-03-24 23:16:02 UTC (rev 21626)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/README 2013-03-25 02:11:32 UTC (rev 21627)
@@ -42,6 +42,9 @@
pylithapp.cfg - PyLith configuration file containing parameters common to
all simulations.
+greensfns.cfg - Green's function generation file that is only read for
+problem step21.
+
stepxx.cfg - PyLith configuration file containing parameters for a
particular example. The example problems are briefly described below:
@@ -69,6 +72,7 @@
step18: Axial traction surface load on top surface (static)
step19: Time dependent axial traction surface load on top surface (quasi-static)
step20: Dike opening via initial tractions and fault constitutive model
+step21: Generation of Green's functions for a strike-slip fault (static)
----------------------------------------
mesh directory
@@ -101,6 +105,11 @@
Spatial database defining fault rupture for examples step06, step07,
step08, and step09.
+impulse_amplitude.spatialdb
+
+ Spatial database defining impulses to be applied for GF generation
+ (step21).
+
initial_stress.spatialdb
Spatial database defining initial stresses for example step16.
Added: short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns.cfg (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns.cfg 2013-03-25 02:11:32 UTC (rev 21627)
@@ -0,0 +1,76 @@
+[greensfns]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+#
+# This simulation computes the Green's functions for slip impulses at
+# points on the fault surface.
+#
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+#
+# This is not a self-contained simulation configuration file. This
+# file specifies only the Green's function parameters for the
+# simulation. The general static and mesh parameters are specificed in
+# the pylithapp.cfg file which PyLith reads by default.
+#
+# NOTE: This file will be read automatically when the problem is
+# changed to "GreensFns" because the facility name is "greensfns", and
+# PyLith will look for a .cfg file matching the name of the facility.
+#
+# To run the simulation:
+# pylith step21.cfg --problem=pylith.problems.GreensFns
+#
+# Output will be directed to directory output.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[greensfns]
+fault_id = 10
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+# Set the type of fault interface condition.
+[greensfns.interfaces]
+fault = pylith.faults.FaultCohesiveImpulses
+
+# Set the parameters for the fault interface condition.
+[greensfns.interfaces.fault]
+# Generate impulses for lateral slip only, no fault opening.
+# Fault DOF 0 corresponds to left-lateral slip.
+impulse_dof = [0]
+
+# Set the amplitude of the slip impulses (amplitude is nonzero on only
+# a subset of the fault)
+db_impulse_amplitude.label = Amplitude of slip impulses
+db_impulse_amplitude.iohandler.filename = spatialdb/impulse_amplitude.spatialdb
+db_impulse_amplitude.query_type = nearest
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Domain
+[greensfns.formulation.output.domain]
+writer.filename = output/step21.h5
+
+# Points
+[greensfns.formulation.output.points]
+writer.filename = output/step21-points.h5
+
+# Fault
+[greensfns.interfaces.fault.output]
+writer.filename = output/step21-fault.h5
+vertex_info_fields = [area]
+
+# Materials
+[greensfns.materials.upper_crust.output]
+writer.filename = output/step21-upper_crust.h5
+
+[greensfns.materials.lower_crust.output]
+writer.filename = output/step21-lower_crust.h5
+
+# End of file
Added: short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns_points.txt
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns_points.txt (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/greensfns_points.txt 2013-03-25 02:11:32 UTC (rev 21627)
@@ -0,0 +1,30 @@
+# This file contains a list of points where we want the solution. The
+# solution will be interpolated to these points, so they need not
+# coincide with vertices of the mesh.
+#
+# We specify the coordinates in the default coordinate system (3-D
+# Cartesian). To specify points in another coordinate system, use the
+# coordsys component of the OutputSolnPoints object. The points will
+# be transformed into the coordinate system of the mesh before
+# interpolation.
+500.0 -1500.0 -0.2
+500.0 -1000.0 -0.2
+500.0 -500.0 -0.2
+500.0 0.0 -0.2
+500.0 500.0 -0.2
+500.0 1000.0 -0.2
+500.0 1500.0 -0.2
+1000.0 -1500.0 -0.2
+1000.0 -1000.0 -0.2
+1000.0 -500.0 -0.2
+1000.0 0.2 -0.2
+1000.0 500.0 -0.2
+1000.0 1000.0 -0.2
+1000.0 1500.0 -0.2
+1500.0 -1500.0 -0.2
+1500.0 -1000.2 -0.2
+1500.0 -500.0 -0.2
+1500.0 0.0 -0.2
+1500.0 500.0 -0.2
+1500.0 1000.0 -0.2
+1500.0 1500.0 -0.2
Modified: short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/pylithapp.cfg 2013-03-24 23:16:02 UTC (rev 21626)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/pylithapp.cfg 2013-03-25 02:11:32 UTC (rev 21627)
@@ -10,6 +10,7 @@
# Turn on some journals to show progress.
[pylithapp.journal.info]
timedependent = 1
+greensfns = 1
implicit = 1
petsc = 1
solverlinear = 1
@@ -40,13 +41,13 @@
# ----------------------------------------------------------------------
# materials
# ----------------------------------------------------------------------
-[pylithapp.timedependent]
+[pylithapp.problem]
# Set materials to an array of 2 materials:
# 'upper_crust' and 'lower_crust'
materials = [upper_crust,lower_crust]
-[pylithapp.timedependent.materials.upper_crust]
+[pylithapp.problem.materials.upper_crust]
label = Upper crust material
id = 1
db_properties.label = Properties for upper crust
@@ -54,7 +55,7 @@
quadrature.cell = pylith.feassemble.FIATLagrange
quadrature.cell.dimension = 3
-[pylithapp.timedependent.materials.lower_crust]
+[pylithapp.problem.materials.lower_crust]
label = Lower crust material
id = 2
db_properties.label = Properties for lower crust
Added: short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/spatialdb/impulse_amplitude.spatialdb 2013-03-25 02:11:32 UTC (rev 21627)
@@ -0,0 +1,58 @@
+// -*- C++ -*- (syntax highlighting)
+//
+// This spatial database specifies the distribution of slip on the
+// fault surface for the forward problem.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = slip
+ value-units = m
+ num-locs = 35
+ data-dim = 2 // Data is specified on a plane.
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0e+3 // Specify coordinates in km for convenience.
+ space-dim = 3
+ } // cs-data
+} // SimpleDB
+// Columns are
+// (1) x coordinate (km)
+// (2) y coordinate (km)
+// (3) z coordinate (km)
+// (4) slip (m)
+0.0 -2.0 0.0 -1.0
+0.0 -2.0 -1.0 -1.0
+0.0 -2.0 -2.0 -1.0
+0.0 -2.0 -3.0 -1.0
+0.0 -1.0 0.0 -1.0
+0.0 -1.0 -1.0 -1.0
+0.0 -1.0 -2.0 -1.0
+0.0 -1.0 -3.0 -1.0
+0.0 0.0 0.0 -1.0
+0.0 0.0 -1.0 -1.0
+0.0 0.0 -2.0 -1.0
+0.0 0.0 -3.0 -1.0
+0.0 1.0 0.0 -1.0
+0.0 1.0 -1.0 -1.0
+0.0 1.0 -2.0 -1.0
+0.0 1.0 -3.0 -1.0
+0.0 2.0 0.0 -1.0
+0.0 2.0 -1.0 -1.0
+0.0 2.0 -2.0 -1.0
+0.0 2.0 -3.0 -1.0
+0.0 -3.0 0.0 0.0
+0.0 -3.0 -1.0 0.0
+0.0 -3.0 -2.0 0.0
+0.0 -3.0 -3.0 0.0
+0.0 3.0 0.0 0.0
+0.0 3.0 -1.0 0.0
+0.0 3.0 -2.0 0.0
+0.0 3.0 -3.0 0.0
+0.0 -3.0 -4.0 0.0
+0.0 -2.0 -4.0 0.0
+0.0 -1.0 -4.0 0.0
+0.0 0.0 -4.0 0.0
+0.0 1.0 -4.0 0.0
+0.0 2.0 -4.0 0.0
+0.0 3.0 -4.0 0.0
Added: short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/step21.cfg
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/step21.cfg (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/step21.cfg 2013-03-25 02:11:32 UTC (rev 21627)
@@ -0,0 +1,141 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+#
+# This is a purely elastic static problem using Dirichlet (displacement)
+# boundary conditions and slip on a vertical fault. It is used for
+# Green's function generation.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step21.
+# It must also be run as a Green's function problem (it will read the
+# settings in pylithapp.cfg and greensfns.cfg by default.
+#
+# To run the simulation:
+# pylith step21.cfg --problem=pylith.problems.GreensFns
+#
+# Output will be directed to directory output.
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+distributor.write_partition = True
+distributor.data_writer = pylith.meshio.DataWriterHDF5Mesh
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.time_step]
+# Define the total time for the simulation and the default time step size.
+total_time = 0.0*s ; total time of simulation
+# Define an appropriat time step for simulations. Important for
+# nondimensionalization of velocities and slip rates.
+dt = 1.0*year
+
+[pylithapp.problem]
+# Set bc to an array of 3 boundary conditions: 'x_pos','x_neg', and 'z_neg'.
+bc = [x_pos,x_neg,z_neg]
+
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
+
+[pylithapp.problem.formulation]
+# Set the output to an array of 2 output managers.
+# We will output the solution over the domain and at specified points.
+output = [domain,points]
+
+# Set points component to OutputSolnPoints (set of points).
+output.points = pylith.meshio.OutputSolnPoints
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Set the parameters for Dirichlet boundary conditions applied on the
+# -x, +x, and -z faces of the box.
+#
+# We fix the x and y degrees of freedom on the -x and +x faces, and
+# fix the z degree of freedom on the bottom (-z) face.
+#
+# For all boundaries, we retain the default ZeroDispDB, which specifies
+# a zero value.
+#
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+# +x face
+[pylithapp.problem.bc.x_pos]
+bc_dof = [0, 1]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+
+# -x face
+[pylithapp.problem.bc.x_neg]
+bc_dof = [0, 1]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+
+# -z face
+[pylithapp.problem.bc.z_neg]
+bc_dof = [2]
+label = face_zneg_nofault
+db_initial.label = Dirichlet BC on -z
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+# Set label and ID for the fault.
+[pylithapp.problem.interfaces.fault]
+# The label corresponds to the name of the nodeset in CUBIT.
+id = 10
+label = fault
+
+# We must define the quadrature information for fault cells.
+# The fault cells are 2D (surface).
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Define output manager for domain output.
+[pylithapp.problem.formulation.output.domain]
+writer = pylith.meshio.DataWriterHDF5Mesh
+
+# Define output manager for points output.
+[pylithapp.problem.formulation.output.points]
+writer = pylith.meshio.DataWriterHDF5Mesh
+
+# Point coordinates will be read from greensfns_points.txt.
+reader.filename = greensfns_points.txt
+
+# Spatial dimension is 3 and we will output coordinates in m.
+coordsys.space_dim = 3
+coordsys.units = m
+
+# Define output manager for fault output.
+[pylithapp.problem.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+
+# We will not be writing any cell_info or cell_data fields for material
+# output.
+[pylithapp.problem.materials.upper_crust.output]
+cell_info_fields = []
+cell_data_fields = []
+writer = pylith.meshio.DataWriterHDF5Mesh
+
+[pylithapp.problem.materials.lower_crust.output]
+cell_info_fields = []
+cell_data_fields = []
+writer = pylith.meshio.DataWriterHDF5Mesh
+
+# Mesh partition information.
+[pylithapp.mesh_generator.distributor.data_writer]
+filename = output/step21-partition.h5
More information about the CIG-COMMITS
mailing list