# Does the Neumann boundary condition work in the right way?

Hi PyLith developers and other users,

I am testing a simple 2D case in which the left side of a rectangle is pressed by a force, the right side is fixed in the horizontal direction, and the bottom side is fixed in the vertical direction. So, the Neumann boundary condition is applied to the left side. However, the output always gives me the solution for the case with an extension applied to the left side, even if compression is exerted on the left side.

In the spatialdb, “traction-shear” is 0, and “traction-normal” is non-zero (which is used to realize either compression or extension).

Did other users encounter a similar issue when using PyLith-2.2.1 and PyLith-2.2.2?

But the 3D case works (7.9.5.3 Step02.cfg Dirichlet and Neumann Boundary Conditions): by changing the sign of normal stress in the spatialdb, we can see the impacts from extension and compression.

Best,
SZ

PS:

The rectangle is 500 km long (x-axis) and 100 km wide (Y-axis). The left boundary is located at x-position of -250.0 km.

Here is the format of spatialdb of Neumann boundary condition

#SPATIAL.ascii 1
SimpleDB {
num-values = 2
value-names = traction-shear traction-normal
value-units = MPa MPa
num-locs = 2 // number of locations
data-dim = 1 // locations on a line
space-dim = 2
cs-data = cartesian {
to-meters = 1.0e+3 // specify coordinates in km
space-dim = 2
}
}
// Columns are
// (1) x coordinate (km)
// (2) y coordinate (km)
// (3) T-shear (MPa)
// (4) T-normal (MPa)
-250.0 -20.0 0.0 20.0
-250.0 -70.0 0.0 20.0

Here is part of the set in *.cfg file.

[pylithapp.timedependent.bc]
boundary_LC_xneg = pylith.bc.Neumann
[pylithapp.timedependent.bc.boundary_LC_xneg]
label = boundary_LC_xneg
db_initial = spatialdata.spatialdb.SimpleDB
db_initial.label = Neumann BC on -x
db_initial.iohandler.filename = spatialdb/tractions_pressure_LC.spatialdb
db_initial.query_type = nearest