[cig-commits] r11323 - short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions

willic3 at geodynamics.org willic3 at geodynamics.org
Tue Mar 4 07:37:57 PST 2008


Author: willic3
Date: 2008-03-04 07:37:57 -0800 (Tue, 04 Mar 2008)
New Revision: 11323

Added:
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/README
Removed:
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb
Modified:
   short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/consttractions.cfg
Log:
Set up traction problem for constant tractions, using new methods for
setting up problems (without .odb files, etc.).



Added: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/README
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/README	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/README	2008-03-04 15:37:57 UTC (rev 11323)
@@ -0,0 +1,39 @@
+This directory contains a simple problem that demonstrate the usage
+of Neumann (traction) boundary conditions. The problem consists of two
+rectangular elements that form a square with opposing corners (-1,-1) and
+(1,1).  The y-displacement is fixed on y=1.  The vertex at (0,1) is also
+fixed in the x-direction.  Traction BC are applied on y=-1.
+
+A constant normal traction of 4.0e8 Pa is applied along y=-1.  This yields a
+constant stress field within the domain where the yy-component is equal to
+the applied traction.  The xx and xy components are both zero.  The
+corresponding strain field is:
+
+exx = -nu(1+nu)N/E
+eyy = (1-nu^2)N/E
+exy = 0
+
+where nu is Poisson's ratio (0.25 for this problem), E is Young's
+modulus (75 GPa for this problem), and N is the applied normal traction
+(400 MPa for this problem).  Integrating the strain-displacement
+relations and using the applied displacement BC, the corresponding
+displacement field is:
+
+u = -nu(1+nu)N*x/E
+v = (1-nu^2)N*y/E-(1-nu^2)N/E
+
+For the specified elastic properties and applied traction BC, this
+should give values of:
+
+u(-1) = 1.66667e-3 m
+u(0) = 0 m
+u(1) = -1.66667e-3 m
+v(1) = 0 m
+v(-1) = -0.01 m
+
+Note that I didn't give values for v(0) since there are no vertices
+there.
+
+To run this problem, just type:
+
+pylith consttractions.cfg

Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/consttractions.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/consttractions.cfg	2008-03-04 01:53:10 UTC (rev 11322)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/consttractions.cfg	2008-03-04 15:37:57 UTC (rev 11323)
@@ -22,39 +22,40 @@
 # We want an implicit formulation.
 formulation = pylith.problems.Implicit
 
-# This is a container for a boundary condition specified on four sides
-# of a rectangular domain.
-bc = pylith.bc.BCFourSides
-bc.y_neg = pylith.bc.Neumann
-
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
 # Provide information on the boundary conditions.
 
-# Boundary conditions to be applied to the top (+y) of the mesh.
-[pylithapp.timedependent.bc.y_pos]
+# Set BC to an array of 3 boundary conditions: 'top_corners', 'mid_top',
+# 'y_neg'
+bc = [top_corners,mid_top,y_neg]
 
+# Boundary conditions to be applied to the top corners of the mesh.
+[pylithapp.timedependent.bc.top_corners]
+
 # We are fixing the 1 (y) degree of freedom.
 fixed_dof = [1]
 
 # The nodes associated with this boundary condition have the name
-# 'all_top' in the mesh file.
+# 'top_corners' in the mesh file.
 label = top_corners
 
-# We are assigning the label 'Dirichlet x BC +y edge' to the database.
-db.label = Dirichlet BC +y edge
+# Use Simple DB.
+db = spatialdata.spatialdb.SimpleDB
 
+# We are assigning the label 'Dirichlet y BC +y corners' to the database.
+db.label = Dirichlet BC +y corners
+
 # The name of the file containing the spatial database for the BC
 # specification.
 db.iohandler.filename = fixed_disp.spatialdb
 db.query_type = nearest
 
 
-# Boundary conditions to be applied to the positive x-side of the mesh.
-# Note that this is a kludge -- this is really just a single node at
-# the top of the mesh that we are pinning in the x-direction.
-[pylithapp.timedependent.bc.x_pos]
+# Boundary conditions to be applied to the middle node at the top of
+# the mesh.
+[pylithapp.timedependent.bc.mid_top]
 
 # We are fixing the 0 (x) and 1 (y) degrees of freedom.
 fixed_dof = [0, 1]
@@ -63,9 +64,12 @@
 # 'mid_top' in the mesh file.
 label = mid_top
 
-# We are assigning the label 'Dirichlet x BC +y edge' to the database.
-db.label = Dirichlet x BC +y edge
+# Use Simple DB.
+db = spatialdata.spatialdb.SimpleDB
 
+# We are assigning the label 'Dirichlet BC +y middle' to the database.
+db.label = Dirichlet BC +y middle
+
 # The name of the file containing the spatial database for the BC
 # specification.
 db.iohandler.filename = fixed_disp.spatialdb
@@ -73,10 +77,12 @@
 
 
 # Traction BC to be applied to the bottom of the mesh.
-[pylithapp.timedependent.bc.y_neg]
+[pylithapp.timedependent.bc]
+y_neg = pylith.bc.Neumann
 
 # The nodes associated with this boundary condition have the name
 # 'all_bottom' in the mesh file.
+[pylithapp.timedependent.bc.y_neg]
 label = all_bottom
 
 # We are assigning the label 'Neumann BC -y edge' to the database.

Deleted: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg	2008-03-04 01:53:10 UTC (rev 11322)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.cfg	2008-03-04 15:37:57 UTC (rev 11323)
@@ -1,99 +0,0 @@
-# -*- Python -*-
-
-# The settings in this file (axialdisp.cfg) will be read if it is
-# specified on the command line:
-# 'pylith axialdisp.cfg'
-
-# If this file is given, the settings in this file will override all
-# others except for parameters specified directly on the command line.
-
-# These setting define an implicit problem with Dirichlet (displacement)
-# boundary conditions extending the rectangular mesh along the x-axis.
-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-# Specify the problem settings.
-# This is a time-dependent problem so we use that facility.
-[pylithapp.timedependent]
-
-# We want an implicit formulation.
-formulation = pylith.problems.Implicit
-
-# This is a container for a boundary condition specified on four sides
-# of a rectangular domain.
-bc = pylith.bc.BCFourSides
-bc.y_neg = pylith.bc.Neumann
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-# Provide information on the boundary conditions.
-
-# Boundary conditions to be applied to the top (+y) of the mesh.
-[pylithapp.timedependent.bc.y_pos]
-
-# We are fixing the 1 (y) degree of freedom.
-fixed_dof = [1]
-
-# The nodes associated with this boundary condition have the name
-# 'all_top' in the mesh file.
-label = top_corners
-
-# We are assigning the label 'Dirichlet x BC +y edge' to the database.
-db.label = Dirichlet BC +y edge
-
-# The name of the file containing the spatial database for the BC
-# specification.
-db.iohandler.filename = fixed_disp.spatialdb
-db.query_type = nearest
-
-
-# Boundary conditions to be applied to the positive x-side of the mesh.
-# Note that this is a kludge -- this is really just a single node at
-# the top of the mesh that we are pinning in the x-direction.
-[pylithapp.timedependent.bc.x_pos]
-
-# We are fixing the 0 (x) and 1 (y) degrees of freedom.
-fixed_dof = [0, 1]
-
-# The nodes associated with this boundary condition have the name
-# 'mid_top' in the mesh file.
-label = mid_top
-
-# We are assigning the label 'Dirichlet x BC +y edge' to the database.
-db.label = Dirichlet x BC +y edge
-
-# The name of the file containing the spatial database for the BC
-# specification.
-db.iohandler.filename = fixed_disp.spatialdb
-db.query_type = nearest
-
-
-# Traction BC to be applied to the bottom of the mesh.
-[pylithapp.timedependent.bc.y_neg]
-
-# The nodes associated with this boundary condition have the name
-# 'all_bottom' in the mesh file.
-label = all_bottom
-
-# We are assigning the label 'Neumann BC -y edge' to the database.
-db.label = Neumann BC -y edge
-
-# The name of the file containing the spatial database for the BC
-# specification.
-db.iohandler.filename = lintractions.spatialdb
-db.query_type = linear
-quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 1
-quadrature.cell.quad_order = 2
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Give basename for vtk output.
-[pylithapp.problem.formulation.output.output.writer]
-filename = lintractions.vtk

Deleted: short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb	2008-03-04 01:53:10 UTC (rev 11322)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4-tractions/lintractions.spatialdb	2008-03-04 15:37:57 UTC (rev 11323)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 2
-  value-names =  shear-traction normal-traction
-  value-units =  Pa  Pa
-  num-locs = 2
-  data-dim = 1
-  space-dim = 2
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 2
-  }
-}
--1.0  0.0    0.0  0.0
- 1.0  0.0    0.0  4.0e8



More information about the cig-commits mailing list