How to check the anti-periodic surface traction or node forces

Asked by Jiadun Liu

Dear Lutz Gross,

How to get all the node forces when using periodic boundary condition?
It seems that I only get half number of all node forces when using periodic boundary condition.

Some part of the Script.
dom = Rectangle(l0=lx,l1=ly,n0=1,n1=4,order=1,integrationOrder=1,periodic0=True,periodic1=False)
......
......
forcePDE = LinearPDESystem(dom)
forcePDE.setValue(X=NominalStress)
f_new=forcePDE.getRightHandSide()
for i in range(f_new.getNumberOfDataPoints()):
 print i,float(f_new.getTupleForDataPoint(i)[0]),float(f_new.getTupleForDataPoint(i)[1])
print "###########################"

Output during simulation:
0 3.39317746131e-10 2.60423051133e-10
1 5.56457450651e-17 4.01602002474e-17
2 -5.56457452719e-17 -4.01602005576e-17
3 -0.00701754872699 0.0475008467524
4 0.00701754838767 -0.0475008470128
###########################
0 3.40161965426e-10 2.60615154667e-10
1 -8.44163649192e-13 -1.92063374133e-13
2 -5.80166230128e-07 7.15808923762e-06
3 -0.0191544635537 0.0932827274571
4 0.0191550433807 -0.0932898858068
###########################

Good news is that the node displacements are periodic.
Initial node positions
#node_Id, X, Y
0.0 0.0 0.0
1.0 10.0 0.0
2.0 0.0 10.0
3.0 10.0 10.0
4.0 0.0 20.0
5.0 10.0 20.0
6.0 0.0 30.0
7.0 10.0 30.0
8.0 0.0 40.0
9.0 10.0 40.0
Current node positions
#node_Id,x,y
0.0 0.0 0.0
1.0 10.0 0.0
2.0 2.86342918708e-11 9.99999999947
3.0 10.0 9.99999999947
4.0 9.90600286102e-08 19.9999990598
5.0 10.0000000991 19.9999990598
6.0 0.0001567460768 29.9995015577
7.0 10.0001567461 29.9995015577
8.0 0.235114100917 40.0
9.0 10.2351141009 40.0

Best regards,
Jiadun

Question information

Language:
English Edit question
Status:
Expired
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Lutz Gross (l-gross) said :
#2

Periodic boundary conditions are one case (the other is MPI) where the difference of the Solution and ContinuousFunction attribute is relevant. Data objects with Solution attribute don't contain redundant values for the faces where periodic boundary conditions are applied. This is different for Data objects with ContinuousFunction attribute where values are replicated.

The following modification should solve your problem:

 f_new=interpolate(forcePDE.getRightHandSide(), ContinuousFunction(forcePDE.getDomain())

Hope it helps!

Revision history for this message
Jiadun Liu (liujiadun) said :
#3

Dear Lutz Gross,

Now, the f_new has the correct number of points.
However, the forces on the periodic boundaries are the same.

Some part of the Script.
dom = Rectangle(l0=lx,l1=ly,n0=1,n1=4,order=1,integrationOrder=1,periodic0=True,periodic1=False)

forcePDE = LinearPDESystem(dom)
forcePDE.setValue(X=NominalStress)
#f_new=forcePDE.getRightHandSide()
f_new=interpolate(forcePDE.getRightHandSide(),ContinuousFunction(forcePDE.getDomain()))
for i in range(f_new.getNumberOfDataPoints()):
 print i,float(f_new.getTupleForDataPoint(i)[0]),float(f_new.getTupleForDataPoint(i)[1])
print "###########################"

0 3.39317746131e-10 2.60423051133e-10
1 3.39317746131e-10 2.60423051133e-10
2 5.56457450651e-17 4.01602002474e-17
3 5.56457450651e-17 4.01602002474e-17
4 -5.56457452719e-17 -4.01602005576e-17
5 -5.56457452719e-17 -4.01602005576e-17
6 -0.00701754872699 0.0475008467524
7 -0.00701754872699 0.0475008467524
8 0.00701754838767 -0.0475008470128
9 0.00701754838767 -0.0475008470128
###########################
0 3.40161965426e-10 2.60615154667e-10
1 3.40161965426e-10 2.60615154667e-10
2 -8.44163649192e-13 -1.92063374133e-13
3 -8.44163649192e-13 -1.92063374133e-13
4 2.21884209898e-12 5.49404452877e-13
5 2.21884209898e-12 5.49404452877e-13
6 -0.00555794551417 0.0472294126881
7 -0.00555794551417 0.0472294126881
8 0.00555794517264 -0.0472294129491
9 0.00555794517264 -0.0472294129491
###########################

Best regards,
Jiadun

Revision history for this message
Jiadun Liu (liujiadun) said :
#4

Dear Lutz Gross,

I expect that the forces on the periodic boundaries would be anti-periodic.
However, as mentioned above, the forces on the periodic boundaries are the same.

Best regards,
Jiadun

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.