Changeset 5596 for branches/1.3/examples/flow/flowtest.tcl
- Timestamp:
- May 21, 2015, 1:09:22 PM (9 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/trunk merged: 5536-5541,5568-5569,5577-5579,5581-5583,5591-5592
- Property svn:mergeinfo changed
-
branches/1.3/examples/flow/flowtest.tcl
r4727 r5596 1 1 2 # Example of using unirect2d meshes in a fieldobject in Rappture.2 # Example of using the flow object in Rappture. 3 3 4 4 package require Rappture 5 6 5 7 6 # Open an XML run file to write into 8 7 set driver [Rappture::library [lindex $argv 0]] 9 8 10 # Create 3 "field"objects to display the different flows.9 # Create 3 <mesh> and <field> objects to display the different flows. 11 10 11 set m1 output.mesh(jwire) 12 12 set f1 output.field(jwire) 13 14 set m2 output.mesh(half) 13 15 set f2 output.field(half) 14 set f3 output.field(si02) 16 17 set m3 output.mesh(sio2) 18 set f3 output.field(sio2) 15 19 16 20 set elements [subst { … … 52 56 $f1.component.flow.box(three).corner(1) "1000 -150 -100" 53 57 $f1.component.flow.box(three).corner(2) "2000 450 450" 54 $f1.component.extents 3 55 $f1.component.mesh unirect3d(jwire) 56 unirect3d(jwire).xaxis.min 0 57 unirect3d(jwire).xaxis.max 6300 58 unirect3d(jwire).xaxis.numpoints 126 59 unirect3d(jwire).yaxis.min 0 60 unirect3d(jwire).yaxis.max 1500 61 unirect3d(jwire).yaxis.numpoints 30 62 unirect3d(jwire).zaxis.min 0 63 unirect3d(jwire).zaxis.max 1519.05 64 unirect3d(jwire).zaxis.numpoints 22 58 $f1.component.elemtype vectors 59 $f1.component.elemsize 3 60 $f1.component.mesh $m1 61 $m1.about.label "JWire mesh" 62 $m1.dim 3 63 $m1.units "um" 64 $m1.hide yes 65 $m1.grid.xaxis.min 0 66 $m1.grid.xaxis.max 6300 67 $m1.grid.xaxis.numpoints 126 68 $m1.grid.yaxis.min 0 69 $m1.grid.yaxis.max 1500 70 $m1.grid.yaxis.numpoints 30 71 $m1.grid.zaxis.min 0 72 $m1.grid.zaxis.max 1519.05 73 $m1.grid.zaxis.numpoints 22 65 74 $f2.about.label "Flow 2d half" 66 75 $f2.component.flow.axis z … … 77 86 $f2.component.style "-color rainbow -levels 6" 78 87 $f2.camera.position { 79 qw 1 qx 0 qy 0 qz 0 pan-x 0 pan-y 0zoom 1.088 -qw 1 -qx 0 -qy 0 -qz 0 -xpan 0 -ypan 0 -zoom 1.0 80 89 } 81 $f2.component.extents 2 82 $f2.component.mesh unirect2d(half) 83 unirect2d(half).xaxis.min -0.5 84 unirect2d(half).xaxis.max 152 85 unirect2d(half).xaxis.numpoints 305 86 unirect2d(half).yaxis.min -22 87 unirect2d(half).yaxis.max 21.6 88 unirect2d(half).yaxis.numpoints 109 90 $f2.component.elemtype vectors 91 $f2.component.elemsize 3 92 $f2.component.mesh $m2 93 $m2.about.label "2D mesh" 94 $m2.dim 2 95 $m2.units "um" 96 $m2.hide yes 97 $m2.grid.xaxis.min -0.5 98 $m2.grid.xaxis.max 152 99 $m2.grid.xaxis.numpoints 305 100 $m2.grid.yaxis.min -22 101 $m2.grid.yaxis.max 21.6 102 $m2.grid.yaxis.numpoints 109 89 103 $f3.about.label "SiO2" 90 104 $f3.about.view "flowvis" … … 100 114 $f3.component.flow.particles(right).color khaki 101 115 $f3.component.flow.particles(right).position 90% 102 $f3.component.style 116 $f3.component.style "-color blue:red -levels 6" 103 117 $f3.component.elemtype vectors 104 118 $f3.component.elemsize 3 105 $f3.component.mesh output.mesh(sio2)106 output.mesh(sio2).about.label "SiO2"107 output.mesh(sio2).dim 3108 output.mesh(sio2).units "um"109 output.mesh(sio2).hide yes110 output.mesh(sio2).grid.xaxis.min 0111 output.mesh(sio2).grid.xaxis.max 29.75206608112 output.mesh(sio2).grid.xaxis.numpoints 121113 output.mesh(sio2).grid.yaxis.min -1.5114 output.mesh(sio2).grid.yaxis.max 2.82115 output.mesh(sio2).grid.yaxis.numpoints 25116 output.mesh(sio2).grid.zaxis.min -1117 output.mesh(sio2).grid.zaxis.max 4.304347828118 output.mesh(sio2).grid.zaxis.numpoints 23119 $f3.component.mesh $m3 120 $m3.about.label "SiO2 Mesh" 121 $m3.dim 3 122 $m3.units "um" 123 $m3.hide yes 124 $m3.grid.xaxis.min 0 125 $m3.grid.xaxis.max 29.75206608 126 $m3.grid.xaxis.numpoints 121 127 $m3.grid.yaxis.min -1.5 128 $m3.grid.yaxis.max 2.82 129 $m3.grid.yaxis.numpoints 25 130 $m3.grid.zaxis.min -1 131 $m3.grid.zaxis.max 4.304347828 132 $m3.grid.zaxis.numpoints 23 119 133 }] 120 134 … … 125 139 } 126 140 127 source demo1/data- unirect3d.tcl141 source demo1/data-demo1.tcl 128 142 $driver put $f1.component.values $values 129 143 130 source demo2/data- unirect2d.tcl144 source demo2/data-2dflow.tcl 131 145 $driver put $f2.component.values $values 132 133 #source demo3/data-dx.tcl134 #set data [Rappture::encoding::encode -as zb64 "<DX>$dx"]135 #$driver put $f3.component.dx $data136 146 137 147 source demo3/data-values.tcl … … 143 153 flush stdout 144 154 exit 0 145
Note: See TracChangeset
for help on using the changeset viewer.