Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

[Bug] Defining bcnames for 2D geometries

More
5 years 11 months ago #531 by niushi200
As shown in the following code, when I partially prescribed boundary conditions for the edge 3, the NGSPy marked both edge 1 and edge 3 as 1.

I think the correct way is to makr edge 3 only with id of 3.

So is this a bug? Is there any way to avoid this problem?

Code:
from netgen.geom2d import SplineGeometry geo = SplineGeometry() p1 = geo.AppendPoint (0,0) p2 = geo.AppendPoint (1,0) p3 = geo.AppendPoint (1,1) p4 = geo.AppendPoint (0,1) geo.Append (["line", p1, p2]) geo.Append (["line", p2, p3]) geo.Append (["line", p3, p4],bc="inlet") geo.Append (["line", p4, p1]) mesh = geo.GenerateMesh (maxh=0.8)
Code:
# surfid 0 p1 p2 trignum1 trignum2 domin/surfnr1 domout/surfnr2 ednr1 dist1 ednr2 dist2 edgesegmentsgi2 8 1 0 1 5 0 96898656 1 0 1 0 1 0.4999999999999944 1 0 5 2 0 96898656 1 0 1 0.4999999999999944 1 1 2 0 2 6 0 96898656 1 0 2 0 2 0.4999999999999944 2 0 6 3 0 96898656 1 0 2 0.4999999999999944 2 1 1 0 3 7 0 96898656 1 0 3 0 3 0.4999999999999944 1 0 7 4 0 96898656 1 0 3 0.4999999999999944 3 1 4 0 4 8 0 96898656 1 0 4 0 4 0.4999999999999944 4 0 8 1 0 96898656 1 0 4 0.4999999999999944 4 1 bcnames 5 1 wall 2 default 3 default 4 default 5 default


Thanks
Bin
More
5 years 11 months ago #534 by cwinters
Hi,

there seems to be a bug. I already created a merge request on that.

For now, if all your segments have a string as bc, everything works fine.

Best,
Christoph
The following user(s) said Thank You: niushi200
Time to create page: 0.108 seconds