Debian Codegraph @

packages/rol/example/PDE-OPT/dynamic/thermal-fluids/channel.jou

raw
1 reset
2 reset aprepro
3
4
5 #{rw = 60} # rectangle width
6 #{rh = 30} # rectangle height
7 #{cr = 0.5} # circle radius
8 #{frw = 0.0} # fraction of rectangle width to which to move circle left from center of rectangle
9 #{sz = 0.75} # mesh size, relative to some unknown nominal resolution; play with it!
10
11 create surface rectangle width {rw/2} height {rh} zplane
12 #{Rect = Id("surface")}
13 create surface circle radius {cr} zplane
14 #{Circ = Id("surface")}
15 move Surface {Circ} x {-frw*rw} include_merged
16 subtract volume {Circ} from volume {Rect}
17 #{CylinderChannel = Id("surface")}
18
19 surface {CylinderChannel} sizing function skeleton scale {sz} time_accuracy_level 3
20 surface {CylinderChannel} Scheme hole rad_intervals 32 bias -3
21 mesh surface {CylinderChannel}
22
23 #surface {CylinderChannel} smooth scheme laplacian
24 #smooth surface {CylinderChannel}
25
26 create surface rectangle width {rw/2} height {rh} zplane
27 #{RightChannel = Id("surface")}
28 move Surface {RightChannel} x {rw/2} include_merged
29
30 merge all
31 imprint all
32
33 surface {RightChannel} size auto factor 4
34 surface {RightChannel} Scheme map
35 mesh surface {RightChannel}
36
37 merge all
38 imprint all
39
40 block 1 surface {CylinderChannel} {RightChannel}
41 block 1 element type QUAD
42
43 Sideset 1 add curve 1,7 # top
44 Sideset 2 add curve 10 # right
45 Sideset 3 add curve 3,9 # bottom
46 Sideset 4 add curve 2 # left
47 Sideset 5 add curve 6 # circle