Periodic Boundary Conditions with OCC and a Rotational Transformation
- philscher
- Topic Author
- New Member
Less
More
1 year 7 months ago - 1 year 7 months ago #4718
by philscher
Hello NGSolve folks,
I have following code:
from netgen.occ import *
from ngsolve import *
from netgen.meshing import IdentificationType
b = Box((-1.0, -0.5, 0), (0.0, 0.5, 1.0))
a = Box((0.0, -0.5, 0), (1.0, 0.5, 1.0))
a.faces.Max(Z).col = (1, 0, 0)
b.faces.Max(Z).col = (0, 0, 1)
trafo = Rotation(Axis((0, 0, 0), Y), 180)
a.faces.Max(Z).Identify(b.faces.Max(Z), "periodic", IdentificationType.PERIODIC, trafo)
geo_objects = Glue([a, b])
geo = OCCGeometry(geo_objects)
mesh = Mesh(geo.GenerateMesh(maxh=0.4))
Draw(mesh)
where I would like to specify rotational periodicity between the red and blue face.
Unfortunately it seems that the identifcation is not successful
(no Map face 1 -> 2 output; no identified points).
I have tried different configurations, e.g., a block between so that there is no shared
edge - but this did not help.
Any suggestions ? Thank you.
(likely related with ngsolve.org/forum/ngspy-forum/1683-openc...-boundary-conditions ?)
I have following code:
from netgen.occ import *
from ngsolve import *
from netgen.meshing import IdentificationType
b = Box((-1.0, -0.5, 0), (0.0, 0.5, 1.0))
a = Box((0.0, -0.5, 0), (1.0, 0.5, 1.0))
a.faces.Max(Z).col = (1, 0, 0)
b.faces.Max(Z).col = (0, 0, 1)
trafo = Rotation(Axis((0, 0, 0), Y), 180)
a.faces.Max(Z).Identify(b.faces.Max(Z), "periodic", IdentificationType.PERIODIC, trafo)
geo_objects = Glue([a, b])
geo = OCCGeometry(geo_objects)
mesh = Mesh(geo.GenerateMesh(maxh=0.4))
Draw(mesh)
where I would like to specify rotational periodicity between the red and blue face.
Unfortunately it seems that the identifcation is not successful
(no Map face 1 -> 2 output; no identified points).
I have tried different configurations, e.g., a block between so that there is no shared
edge - but this did not help.
Any suggestions ? Thank you.
(likely related with ngsolve.org/forum/ngspy-forum/1683-openc...-boundary-conditions ?)
Attachments:
Last edit: 1 year 7 months ago by philscher.
- acesarano
- New Member
Less
More
1 year 7 months ago #4751
by acesarano
Replied by acesarano on topic Periodic Boundary Conditions with OCC and a Rotational Transformation
Hi Phil,
I don't know if you check the forum regularly so I am writing to you in case you get a notification.
Professor Schöberl answered to the other post with the solution to this problem:
ngsolve.org/forum/ngspy-forum/1683-openc...dary-conditions#4737
We were not giving the correct transformation.
Best,
Alessio
I don't know if you check the forum regularly so I am writing to you in case you get a notification.
Professor Schöberl answered to the other post with the solution to this problem:
ngsolve.org/forum/ngspy-forum/1683-openc...dary-conditions#4737
We were not giving the correct transformation.
Best,
Alessio
Time to create page: 0.108 seconds