Dear fellow FEM engineers,
I am trying to define a custom constraint using dequations for my optimization with optistruct. Sadly i am unable to get it running due to syntax errors.
The formula i am trying to use is the following:
m(xa,xb,ya,yb,za,zb,aa,ab,ba,bb,ca,cb) = (xa+xb)**2+(ya+yb)**2+(za+zb)**2-(xa+xb)*(ya+yb)-(xa+xb)*(za+zb)-(ya+yb)*(za+zb)+3*((aa+ab)**2+(ba+bb)**2+(ca+cb)**2)
I found out that apparently there is some character limit, which just cuts off my equations after approximately 52 characters resulting in open brackets etc.
So then i tried splitting the equation into multiple lines:
x(xa,xb) = xa+xb;
y(ya,yb) = ya+yb;
z(za,zb) = za+zb;
a(aa,ab) = aa+ab;
b(ba,bb) = ba+bb;
c(ca,cb) = ca+cb;
f(x,y,z,a,b,c)=x*x+y*y+z*z-x*y-x*z-y*z+3*(a*a+b*b+c*c)
but i get the following error:
*** ERROR # 1608 ***
Syntax error in DEQATN # 2.
Unknown function name "y".
Syntax error in expression # 2.
what am i doing wrong?