Wildmeshing Toolkit
Loading...
Searching...
No Matches
Functions | Variables
make_disk2d Namespace Reference

Functions

 inside (t)
 

Variables

int M = int(sys.argv[1]) if len(sys.argv) > 1 else 60
 
int RIN = float(sys.argv[2]) if len(sys.argv) > 2 else 0.20
 
int RDOM = float(sys.argv[3]) if len(sys.argv) > 3 else 1.00
 
int out = sys.argv[4] if len(sys.argv) > 4 else "disk2d.msh"
 
int NT = 6 * M
 
list nodes = [(0.0, 0.0)]
 
list ring = []
 
int r = RDOM * k / M
 
list tags = []
 
float th = 2.0 * math.pi * a / NT
 
list tris = []
 
 lo
 
 hi
 
tuple b = (a + 1) % NT
 
list disk = [t for t in tris if inside(t)]
 
list amb = [t for t in tris if not inside(t)]
 
list L
 
 n = len(amb) + len(disk)
 
int tag = 1
 

Detailed Description

Write a MSH 4.1 ASCII mesh of a DISK domain with a concentric disk tagged tag_0.

The simplest possible 2D offset input: everything is radially symmetric, so the exact answer
is an annulus and the region area is pi*(R+d)^2 with no boundary effects to argue about.

    make_disk2d.py [rings] [R_inner] [R_domain] [out.msh]

Variable Documentation

◆ L

list make_disk2d.L
Initial value:
1= ["$MeshFormat\n4.1 0 8\n$EndMeshFormat",
2 '$PhysicalNames\n2\n2 1 "ambient"\n2 2 "tag_0"\n$EndPhysicalNames',
3 "$Entities\n0 0 2 0",
4 f"1 {-RDOM} {-RDOM} 0 {RDOM} {RDOM} 0 1 1 0",
5 f"2 {-RDOM} {-RDOM} 0 {RDOM} {RDOM} 0 1 2 0",
6 "$EndEntities",
7 f"$Nodes\n1 {len(nodes)} 1 {len(nodes)}",
8 f"2 1 0 {len(nodes)}"]