discrepancy between numerical solution and analytical solution for linear elastic material
Dear All,
The following code is modified from https:/
My question is why there is a discrepancy between numerical solution and the analytical solution .
No matter how the parameters including n0, n1, order, integrationOrder are changed, there is always a discrepancy.
The ratio of numerical solution over analytical solution is about 1.067.
from esys.escript import *
from esys.escript.
from esys.finley import Rectangle
from esys.weipa import saveVTK
lam = 3.462e9
mu = 3.462e9
# E to be used in analytical expression
E = mu*(3*lam+
rho=1154.
lx = 0.1
ly = 1.0
dom = Rectangle(
C=Tensor4(
for i in range(dom.
for j in range(dom.
C[i,i,j,j] += lam
C[i,j,i,j] += mu
C[i,j,j,i] += mu
pde=LinearPDE(
pde.setValue(A=C)
stress=
stress[0,0]=-0.0e5
stress[1,1]=-0.0e5
x = dom.getX()
# Dirichlet BC positions, smooth at bottom and top, fixed at the center of bottom
Dbc = whereZero(
# Dirichlet BC values
vel = -0.0001
Vbc = whereZero(
u = Vector(
xInitial = dom.getX()
t = 1
tEnd = 3
while t<tEnd:
print "t= ",t
pde.setValue(
u = pde.getSolution()
g=grad(u)
sig=mu*
stress += sig
dom.setX(
print "Numerical stressYY ", stress[1,1]
#analytical expression
stressYY = E*vel*t/ly
print "Analytical stressYY " ,stressYY
print "Ratio : ", stress[
saveVTK(
t += 1
Waiting for your answer.
Best regards,
Jiadun
Question information
- Language:
- English Edit question
- Status:
- Solved
- Assignee:
- No assignee Edit question
- Solved by:
- Lutz Gross
- Solved:
- Last query:
- Last reply:
This question was reopened
- by Jiadun Liu