Hi, when I run cbc.twist on the two file below, I get the following error..
Traceback (most recent call last):
File "twist2.py", line 38, in <module>
u = twist.solve()
File "/usr/local/
self.solver = StaticMomentumB
File "/usr/local/
vector)
File "/usr/local/
error("The number of Dirichlet values does not match the number of Dirichlet boundaries.")
File "/usr/lib/
return _cpp.error(*args)
RuntimeError: *** Error: The number of Dirichlet values does not match the number of Dirichlet boundaries.
file 1: twist1.py =======
from cbc.twist import *
class Twist(StaticHyp
def mesh (self):
n = 8
return UnitCube(n, n, n)
def dirichlet_
clamp = Expression(("0.0", "0.0", "0.0"))
twist = Expression(("0.0",
"y0+(
"z0+(
twist.y0 = 0.5
twist.z0 = 0.5
twist.theta = pi/3
return[clamp, twist]
def dirichlet_
return ["x[0] == 0.0", "x[0] == 1.0"]
def material_
mu = 3.8461
lmbda = Expression(
material = StVenantKirchho
return material
def __str__(self):
return "A cube twisted by 60 degrees"
# Setup and solve problem
twist = Twist()
u = twist.solve()
#plot(u, title="Twisted cube", mode="displacem
file 2: twist2.py =======
from cbc.twist import *
class Twist(StaticHyp
def mesh(self):
return UnitCube(8, 8, 8)
def dirichlet_
clamp = Expression(("0.0", "0.0", "0.0"))
twist = Expression(("0.0",
return clamp, twist
def dirichlet_
left = "x[0] == 0.0"
right = "x[0] == 1.0"
return left, right
def body_force(self):
B = Expression(("0.0", "0.0", "0.0"))
return B
def material_
mu = 3.8461
return material
def __str__(self):
return "Hyperelastic cube twisted 60 degrees"
# Setup and solve problem
twist = Twist()
u = twist.solve()
plot(u, title="Twisted cube", mode="displacem
=======
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- CBC.Solve Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Scott Richardson
- Solved:
- Last query:
- Last reply: