Hi,
I am trying to impose periodic boundary conditions on the top and the bottom of a rotating object. Now, using a 360 degree rotation the periodic identification works pretty good. But when using only a 90 degree rotation, I have to create this trafo netgen.occ.gp_Trsf and use it as the fourth argument in the command as mentioned in the last post.
Here a short example, what I did so far:
from ngsolve import *
from netgen.occ import *
import math
import time
from ngsolve.internal import visoptions
from ngsolve.internal import viewoptions
from netgen.meshing import IdentificationType
origin = (0,0,0)
T = 1
desiredRad = 0.1
rotationAngle = pi/2
face1 = WorkPlane().Circle(0.25,0.25,desiredRad).Face()
spine = Segment(origin, (0,0,T))
cyl = Cylinder(origin, Z, r=0.5*desiredRad, h=T).faces[0]
heli = Edge(Segment((0,0), (rotationAngle, T)), cyl)
pipe1 = Pipe(spine, face1, auxspine=heli).mat("pipe1")
pipe1.faces.name="pipe_outer"
pipe1.faces.Min(Z).name ="bottom"
rot = Rotation(Axis((0,0,0), Z), 180)
pipe1.faces.Min(Z).Identify(pipe1.faces.Max(Z), "periodic", IdentificationType.PERIODIC, rot)
geoOCC = OCCGeometry(pipe1)
mesh = Mesh(geoOCC.GenerateMesh(maxh=0.1))
mesh.Curve(3)
Unfortunately, this does not work, after trying to adapt the rot object in several ways.
Thanks in advance for your help!
Best, Mario