Periodical Boundary Condition
Hi,
I'm trying to use periodical BCs.
In the simple script below, are those PBCs defined the way they should?
This script is a slightly modified version of linearElastic.py I found with the source code. This script reproduces a simple shear problem.
Cheers,
Bastien Grandet
from esys.escript import *
from esys.escript.
from esys import finley
from esys.weipa import saveVTK
press0=1.
lamb=1.
nu=0.3
# this sets the hook tensor:
def setHookTensor(
C=Tensor4(0.,w)
for i in range(w.getDim()):
for j in range(w.getDim()):
return C
# generate mesh: here 10x20 mesh of order 2
domain=
# get handel to nodes and elements:
e=Function(domain)
fe=FunctionOnBo
n=ContinuousFun
v=Vector(0. , ContinuousFunct
#
# set a mask msk of type vector which is one for nodes and components set be a constraint:
#
msk=whereZero(
#
#Values of the displacement BC
#
v=v+whereZero(
# assemble the linear system:
mypde=LinearPDE
mypde.setValue(
mypde.setSymmet
mypde.getSolver
mypde.getSolver
# solve for the displacements:
u_d=mypde.
# get the gradient and calculate the stress:
g=grad(u_d)
stress=
#Update geometry
domain.
# write the hydrostatic pressure:
saveVTK(
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Bastien Grandet for more information if necessary.