Periodic cube mesh

More
6 years 6 months ago #521 by joachim
Replied by joachim on topic Periodic cube mesh
The preferred way is to use names instead of numbers.
If you don't have names, you can create a region from a BitArray, like

Region(mesh,BND, BitArray([True,False,False,True]))

This region is defined on the first and last boundary.
More
6 years 6 months ago - 6 years 6 months ago #522 by pschroe
Replied by pschroe on topic Periodic cube mesh
Thank you, Joachim!

How can I use this region in, for example, "definedon=mesh.Boundaries(...)"?
Is it possible to assign names to regions?

Best, Philipp
Last edit: 6 years 6 months ago by pschroe.
More
6 years 6 months ago - 6 years 6 months ago #523 by christopher
Replied by christopher on topic Periodic cube mesh
You can set boundary names on a Netgen mesh with
mesh.SetBCName(index, name)
BC indices are 1 based.
Last edit: 6 years 6 months ago by christopher.
More
6 years 6 months ago #524 by pschroe
Replied by pschroe on topic Periodic cube mesh
Thank you, Christopher!

In the attached script, I tried to do it this way.
However, I always get the following error:
Code:
illegal bc-number

Can you tell me what I am doing wrong?

Thanks for your help.

Best, Philipp
More
6 years 6 months ago #526 by christopher
Replied by christopher on topic Periodic cube mesh
This is a bit messy... A quickfix is to set names for all boundary conditions. I will discuss a nice solution with Joachim when he's back in Vienna.
Best
Christopher
The following user(s) said Thank You: pschroe
Time to create page: 0.104 seconds