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

willic3 at geodynamics.org willic3 at geodynamics.org
Sun Jun 14 19:45:53 PDT 2009


Author: willic3
Date: 2009-06-14 19:45:52 -0700 (Sun, 14 Jun 2009)
New Revision: 15249

Added:
   short/3D/PyLith/trunk/examples/3d/hex8/mat_maxwell.spatialdb
   short/3D/PyLith/trunk/examples/3d/hex8/mat_powerlaw.spatialdb
   short/3D/PyLith/trunk/examples/3d/hex8/planestrain.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/savageprescott-powerlaw.cfg
Removed:
   short/3D/PyLith/trunk/examples/3d/hex8/mat_viscoelastic.spatialdb
Modified:
   short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/gravity.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/gravity_istress.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/savageprescott.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg
Log:
Set things up to add Savage & Prescott model with power-law
viscoelasticity.
Also added a simple model to simulate a plane strain problem.
Power-law doesn't work yet.



Modified: short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg	2009-06-15 02:37:03 UTC (rev 15248)
+++ short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -28,6 +28,33 @@
 output.subdomain = pylith.meshio.OutputSolnSubset
 
 # ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# Set materials to an array of 2 materials:
+#   'elastic' and 'maxwell'
+materials = [elastic,maxwell]
+
+# Change from default material (elastic, isotropic, 3-D material) to
+# Maxwell viscoelastic, isotropic 3-D material.
+materials.maxwell = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = mat_elastic.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+[pylithapp.timedependent.materials.maxwell]
+label = Viscoelastic material
+id = 2
+db_properties.iohandler.filename = mat_maxwell.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
 
@@ -98,8 +125,8 @@
 cell_filter = pylith.meshio.CellFilterAvgMesh
 writer.filename = dislocation-statevars-elastic.vtk
 
-[pylithapp.timedependent.materials.viscoelastic.output]
+[pylithapp.timedependent.materials.maxwell.output]
 cell_info_fields = [density,mu,lambda,maxwell_time]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = dislocation-statevars-viscoelastic.vtk
+writer.filename = dislocation-statevars-maxwell.vtk
 

Modified: short/3D/PyLith/trunk/examples/3d/hex8/gravity.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/gravity.cfg	2009-06-15 02:37:03 UTC (rev 15248)
+++ short/3D/PyLith/trunk/examples/3d/hex8/gravity.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -30,6 +30,33 @@
 output.subdomain = pylith.meshio.OutputSolnSubset
 
 # ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# Set materials to an array of 2 materials:
+#   'elastic' and 'maxwell'
+materials = [elastic,maxwell]
+
+# Change from default material (elastic, isotropic, 3-D material) to
+# Maxwell viscoelastic, isotropic 3-D material.
+materials.maxwell = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = mat_elastic.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+[pylithapp.timedependent.materials.maxwell]
+label = Viscoelastic material
+id = 2
+db_properties.iohandler.filename = mat_maxwell.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
 # Use the default FixedDOFDB, which has a uniform spatial distribution.
@@ -86,7 +113,7 @@
 cell_filter = pylith.meshio.CellFilterAvgMesh
 writer.filename = gravity-statevars-elastic.vtk
 
-[pylithapp.timedependent.materials.viscoelastic.output]
+[pylithapp.timedependent.materials.maxwell.output]
 cell_info_fields = [density,mu,lambda,maxwell_time]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = gravity-statevars-viscoelastic.vtk
+writer.filename = gravity-statevars-maxwell.vtk

Modified: short/3D/PyLith/trunk/examples/3d/hex8/gravity_istress.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/gravity_istress.cfg	2009-06-15 02:37:03 UTC (rev 15248)
+++ short/3D/PyLith/trunk/examples/3d/hex8/gravity_istress.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -30,6 +30,33 @@
 output.subdomain = pylith.meshio.OutputSolnSubset
 
 # ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# Set materials to an array of 2 materials:
+#   'elastic' and 'maxwell'
+materials = [elastic,maxwell]
+
+# Change from default material (elastic, isotropic, 3-D material) to
+# Maxwell viscoelastic, isotropic 3-D material.
+materials.maxwell = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = mat_elastic.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+[pylithapp.timedependent.materials.maxwell]
+label = Viscoelastic material
+id = 2
+db_properties.iohandler.filename = mat_maxwell.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
 # initial stresses
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.materials.elastic]
@@ -37,7 +64,7 @@
 initial_state_db.iohandler.filename = initial_state.spatialdb
 # initial_state_db.query_type = linear
 
-[pylithapp.timedependent.materials.viscoelastic]
+[pylithapp.timedependent.materials.maxwell]
 use_initial_state = True
 initial_state_db.iohandler.filename = initial_state.spatialdb
 # initial_state_db.query_type = linear
@@ -99,10 +126,10 @@
 cell_filter = pylith.meshio.CellFilterAvg
 writer.filename = gravity_istress-statevars-elastic.vtk
 
-[pylithapp.timedependent.materials.viscoelastic.output]
+[pylithapp.timedependent.materials.maxwell.output]
 cell_info_fields = [density,mu,lambda,maxwell_time]
 cell_filter = pylith.meshio.CellFilterAvg
-writer.filename = gravity_istress-statevars-viscoelastic.vtk
+writer.filename = gravity_istress-statevars-maxwell.vtk
 
 [pylithapp.petsc]
 ksp_atol = 1.0e-12

Copied: short/3D/PyLith/trunk/examples/3d/hex8/mat_maxwell.spatialdb (from rev 15240, short/3D/PyLith/trunk/examples/3d/hex8/mat_viscoelastic.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/mat_maxwell.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/mat_maxwell.spatialdb	2009-06-15 02:45:52 UTC (rev 15249)
@@ -0,0 +1,30 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of material
+// properties for a Maxwell viscoelastic material. In this case,
+// the material properties are uniform.
+//
+// The viscosity corresponds to a Maxwell time of 100 years.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 4 // number of material property values
+  value-names =  density vs vp viscosity // names of the material property values
+  value-units =  kg/m**3  m/s  m/s Pa*s // units
+  num-locs = 1 // number of locations
+  data-dim = 0
+  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) density (kg/m^3)
+// (5) vs (m/s)
+// (6) vp (m/s)
+// (7) viscosity (Pa-s)
+0.0  0.0  0.0   2500.0  3000.0  5291.502622129181 7.10046e+19

Added: short/3D/PyLith/trunk/examples/3d/hex8/mat_powerlaw.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/mat_powerlaw.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/mat_powerlaw.spatialdb	2009-06-15 02:45:52 UTC (rev 15249)
@@ -0,0 +1,29 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of material
+// properties for a power-law viscoelastic material. In this case,
+// the material properties are uniform.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 5 // number of material property values
+  value-names =  density vs vp viscosity_coeff power_law_exponent // names of the material property values
+  value-units =  kg/m**3  m/s  m/s s**(1.0/3.0)*Pa None // units
+  num-locs = 1 // number of locations
+  data-dim = 0
+  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) density (kg/m^3)
+// (5) vs (m/s)
+// (6) vp (m/s)
+// (7) viscosity_coeff (s**(1.0/power_law_exponent) * Pa)
+// (8) power_law_exponent (no units)
+0.0  0.0  0.0   2500.0  3000.0  5291.502622129181 1.00e12  3.0

Deleted: short/3D/PyLith/trunk/examples/3d/hex8/mat_viscoelastic.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/mat_viscoelastic.spatialdb	2009-06-15 02:37:03 UTC (rev 15248)
+++ short/3D/PyLith/trunk/examples/3d/hex8/mat_viscoelastic.spatialdb	2009-06-15 02:45:52 UTC (rev 15249)
@@ -1,30 +0,0 @@
-// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
-//
-// This spatial database specifies the distribution of material
-// properties for a Maxwell viscoelastic material. In this case,
-// the material properties are uniform.
-//
-// The viscosity corresponds to a Maxwell time of 100 years.
-//
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 4 // number of material property values
-  value-names =  density vs vp viscosity // names of the material property values
-  value-units =  kg/m**3  m/s  m/s Pa*s // units
-  num-locs = 1 // number of locations
-  data-dim = 0
-  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) density (kg/m^3)
-// (5) vs (m/s)
-// (6) vp (m/s)
-// (7) viscosity (Pa-s)
-0.0  0.0  0.0   2500.0  3000.0  5291.502622129181 7.10046e+19

Added: short/3D/PyLith/trunk/examples/3d/hex8/planestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/planestrain.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/planestrain.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -0,0 +1,157 @@
+# -*- 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 hex8_1000m.cfg shearxy.cfg
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+# Change initial guess for solution from vector of zeros to previous
+# solution.
+formulation.solver.initial_guess_zero = False
+
+# Set bc to an array of 5 boundary conditions.
+bc = [x_pos,x_neg,y_pos,y_neg,z_neg]
+
+# Change time stepping algorithm from uniform time step, to adaptive
+# time stepping.
+implicit.time_step = pylith.problems.TimeStepAdapt
+
+[pylithapp.timedependent.implicit.time_step]
+# Define the total time for the simulation and the default time step size.
+# Overwrite values in pylithapp.cfg
+total_time = 500.0*year ; total time of simulation
+max_dt = 50.0*year ; time step
+stability_factor = 1.0 ; use time step equal to stable value from materials
+
+[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
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# Set materials to an array of 2 materials:
+#   'maxwell_top' and 'maxwell_bottom'
+materials = [maxwell_top,maxwell_bottom]
+
+# Change from default material (elastic, isotropic, 3-D material) to
+# Maxwell viscoelastic, isotropic 3-D material.
+materials.maxwell_top = pylith.materials.MaxwellIsotropic3D
+materials.maxwell_bottom = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.maxwell_top]
+label = Upper Maxwell material
+id = 1
+db_properties.iohandler.filename = mat_maxwell.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+[pylithapp.timedependent.materials.maxwell_bottom]
+label = Lower Maxwell material
+id = 2
+db_properties.iohandler.filename = mat_maxwell.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# We change spatial database for initial value from FixedDOFDB (which has
+# a uniform spatial distribution) to SimpleDB (which uses a data file
+# to specify a spatial variation).
+
+# Set the parameters for Dirichlet boundary conditions applied on the
+# +x and -x faces of the box.
+
+# We fix the x degrees of freedom on the +x and -x faces, the y degrees of
+# freedom on the +y and -y faces, and fix the z degree of freedom on the
+# bottom face.
+
+# The label corresponds to the nodeset ID in CUBIT.
+
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0]
+label = 11
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC on +x
+db.iohandler.filename = fixeddisp_axial.spatialdb
+
+[pylithapp.timedependent.bc.x_neg]
+fixed_dof = [0]
+label = 12
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC on -x
+db.iohandler.filename = fixeddisp_axial.spatialdb
+
+[pylithapp.timedependent.bc.y_pos]
+fixed_dof = [1]
+label = 13
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC on +y
+db.iohandler.filename = fixeddisp_axial.spatialdb
+
+[pylithapp.timedependent.bc.y_neg]
+fixed_dof = [1]
+label = 14
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC on +y
+db.iohandler.filename = fixeddisp_axial.spatialdb
+
+[pylithapp.timedependent.bc.z_neg]
+fixed_dof = [2]
+label = 15
+db = spatialdata.spatialdb.SimpleDB
+db.label = Dirichlet BC on -z
+db.iohandler.filename = fixeddisp_axial.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.domain]
+skip = 0
+writer.filename = planestrain.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]
+label = 17 ; nodeset for subdomain
+skip = 0
+writer.filename = planestrain-groundsurf.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.maxwell_top.output]
+skip = 0
+cell_info_fields = [density,mu,lambda,maxwell_time]
+cell_data_fields = [total_strain,viscous_strain,stress]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = planestrain-statevars-maxwell_top.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+[pylithapp.timedependent.materials.maxwell_bottom.output]
+skip = 0
+cell_info_fields = [density,mu,lambda,maxwell_time]
+cell_data_fields = [total_strain,viscous_strain,stress]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = planestrain-statevars-maxwell_bottom.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year

Modified: short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg	2009-06-15 02:37:03 UTC (rev 15248)
+++ short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -40,33 +40,6 @@
 total_time = 0.0*s ; total time of simulation
 
 # ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-
-# Set materials to an array of 2 materials:
-#   'elastic' and 'viscoelastic'
-materials = [elastic,viscoelastic]
-
-# Change from default material (elastic, isotropic, 3-D material) to
-# Maxwell viscoelastic, isotropic 3-D material.
-materials.viscoelastic = pylith.materials.MaxwellIsotropic3D
-
-[pylithapp.timedependent.materials.elastic]
-label = Elastic material
-id = 1
-db_properties.iohandler.filename = mat_elastic.spatialdb
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 3
-
-[pylithapp.timedependent.materials.viscoelastic]
-label = Viscoelastic material
-id = 2
-db_properties.iohandler.filename = mat_viscoelastic.spatialdb
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 3
-
-# ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
 # Set the solver options.

Added: short/3D/PyLith/trunk/examples/3d/hex8/savageprescott-powerlaw.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/savageprescott-powerlaw.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/savageprescott-powerlaw.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -0,0 +1,194 @@
+# -*- Python -*-
+[pylithapp]
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to the boundary and
+# interface conditions. The general parameters are specificed in the
+# pylithapp.cfg file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith savageprescott-powerlaw.cfg
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+# Set this up as a nonlinear problem.
+implicit.solver = pylith.problems.SolverNonlinear
+
+# Change initial guess for solution from vector of zeros to previous
+# solution.
+formulation.solver.initial_guess_zero = False
+
+# 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]
+
+# Change time stepping algorithm from uniform time step, to adaptive
+# time stepping.
+implicit.time_step = pylith.problems.TimeStepAdapt
+
+[pylithapp.timedependent.implicit.time_step]
+# Define the total time for the simulation and the default time step size.
+# Overwrite values in pylithapp.cfg
+total_time = 700.0*year ; total time of simulation
+max_dt = 50.0*year ; time step
+stability_factor = 1.0 ; use time step equal to stable value from materials
+
+[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
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# Set materials to an array of 2 materials:
+#   'elastic' and 'powerlaw'
+materials = [elastic,powerlaw]
+
+# Change from default material (elastic, isotropic, 3-D material) to
+# power-law viscoelastic, isotropic 3-D material.
+materials.powerlaw = pylith.materials.PowerLaw3D
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = mat_elastic.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+[pylithapp.timedependent.materials.powerlaw]
+label = Power-law material
+id = 2
+db_properties.iohandler.filename = mat_powerlaw.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+
+# We change spatial database for the rate of change from FixedDOFDB
+# (which has zero velocity) to UniformDB (which allows nonzero
+# velocities).
+
+# Set the parameters for the desired boundary conditions.
+#
+# The label corresponds to the nodeset ID in CUBIT.
+
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0, 1]
+label = 11
+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*cm/year]
+
+[pylithapp.timedependent.bc.x_neg]
+fixed_dof = [0, 1]
+label = 12
+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*cm/year]
+
+[pylithapp.timedependent.bc.z_neg]
+fixed_dof = [2]
+label = 16
+db_initial.label = Dirichlet BC on -z
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+
+# Set the parameters for the fault interface conditions.
+
+[pylithapp.timedependent.interfaces.fault]
+label = 10
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_creep,final_slip_one,final_slip_two,final_slip_three,slip_time_creep,slip_time_one,slip_time_two,slip_time_three]
+
+# Set earthquake ruptures
+eq_srcs = [creep,one,two,three]
+eq_srcs.creep.origin_time = 00.0*year
+eq_srcs.one.origin_time = 200.0*year
+eq_srcs.two.origin_time = 400.0*year
+eq_srcs.three.origin_time = 600.0*year
+
+# one
+[pylithapp.timedependent.interfaces.fault.eq_srcs.one.slip_function]
+slip.iohandler.filename = finalslip_rupture.spatialdb
+slip_time.iohandler.filename = sliptime.spatialdb
+
+# two
+[pylithapp.timedependent.interfaces.fault.eq_srcs.two.slip_function]
+slip.iohandler.filename = finalslip_rupture.spatialdb
+slip_time.iohandler.filename = sliptime.spatialdb
+
+# three
+[pylithapp.timedependent.interfaces.fault.eq_srcs.three.slip_function]
+slip.iohandler.filename = finalslip_rupture.spatialdb
+slip_time.iohandler.filename = sliptime.spatialdb
+
+# creep
+[pylithapp.timedependent.interfaces.fault.eq_srcs.creep]
+slip_function = pylith.faults.ConstRateSlipFn
+origin_time = 0.0*s
+slip_function.slip_rate.iohandler.filename = sliprate_creep.spatialdb
+slip_function.slip_time.iohandler.filename = sliptime.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.domain]
+skip = 9
+writer.filename = savageprescott-powerlaw.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]
+label = 17 ; nodeset for subdomain
+skip = 0
+writer.filename = savageprescott-powerlaw-groundsurf.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+# Give basename for vtk fault rupture output.
+[pylithapp.timedependent.interfaces.fault.output]
+skip = 0
+writer.filename = savageprescott-powerlaw-fault.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic.output]
+skip = 9
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = savageprescott-powerlaw-statevars-elastic.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
+
+[pylithapp.timedependent.materials.powerlaw.output]
+cell_info_fields = [density,mu,lambda,viscosity_coeff,power_law_exponent]
+# cell_data_fields = [total_strain,stress,viscous_strain]
+skip = 9
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = savageprescott-powerlaw-statevars-powerlaw.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year

Modified: short/3D/PyLith/trunk/examples/3d/hex8/savageprescott.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/savageprescott.cfg	2009-06-15 02:37:03 UTC (rev 15248)
+++ short/3D/PyLith/trunk/examples/3d/hex8/savageprescott.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -43,6 +43,33 @@
 output.subdomain = pylith.meshio.OutputSolnSubset
 
 # ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# Set materials to an array of 2 materials:
+#   'elastic' and 'maxwell'
+materials = [elastic,maxwell]
+
+# Change from default material (elastic, isotropic, 3-D material) to
+# Maxwell viscoelastic, isotropic 3-D material.
+materials.maxwell = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = mat_elastic.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+[pylithapp.timedependent.materials.maxwell]
+label = Maxwell viscoelastic material
+id = 2
+db_properties.iohandler.filename = mat_maxwell.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
 
@@ -153,10 +180,10 @@
 writer.time_format = %04.0f
 writer.time_constant = 1.0*year
 
-[pylithapp.timedependent.materials.viscoelastic.output]
+[pylithapp.timedependent.materials.maxwell.output]
 cell_info_fields = [density,mu,lambda,maxwell_time]
 skip = 9
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = savageprescott-statevars-viscoelastic.vtk
+writer.filename = savageprescott-statevars-maxwell.vtk
 writer.time_format = %04.0f
 writer.time_constant = 1.0*year

Modified: short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg	2009-06-15 02:37:03 UTC (rev 15248)
+++ short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg	2009-06-15 02:45:52 UTC (rev 15249)
@@ -26,6 +26,33 @@
 output.subdomain = pylith.meshio.OutputSolnSubset
 
 # ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+
+# Set materials to an array of 2 materials:
+#   'elastic' and 'maxwell'
+materials = [elastic,maxwell]
+
+# Change from default material (elastic, isotropic, 3-D material) to
+# Maxwell viscoelastic, isotropic 3-D material.
+materials.maxwell = pylith.materials.MaxwellIsotropic3D
+
+[pylithapp.timedependent.materials.elastic]
+label = Elastic material
+id = 1
+db_properties.iohandler.filename = mat_elastic.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+[pylithapp.timedependent.materials.maxwell]
+label = Viscoelastic material
+id = 2
+db_properties.iohandler.filename = mat_maxwell.spatialdb
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+
+# ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
 # We change spatial database for initial value from FixedDOFDB (which has
@@ -78,7 +105,7 @@
 cell_filter = pylith.meshio.CellFilterAvgMesh
 writer.filename = shearxy-statevars-elastic.vtk
 
-[pylithapp.timedependent.materials.viscoelastic.output]
+[pylithapp.timedependent.materials.maxwell.output]
 cell_info_fields = [density,mu,lambda,maxwell_time]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = shearxy-statevars-viscoelastic.vtk
+writer.filename = shearxy-statevars-maxwell.vtk



More information about the CIG-COMMITS mailing list