-
Notifications
You must be signed in to change notification settings - Fork 3
/
visualiseLidDriven.cmgui
41 lines (30 loc) · 1.76 KB
/
visualiseLidDriven.cmgui
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
gfx read node TimeStep_0.part0.exnode;
gfx read elem TimeStep_0.part0.exelem;
gfx define faces egroup FluidRegion
gfx define field velocities component FluidDependent.1 FluidDependent.2
gfx define field pressure component FluidDependent.3
gfx define field magnitude_velocity magnitude field velocities
gfx create spectrum flow
gfx modify spectrum flow clear overwrite_colour
gfx modify spectrum flow linear reverse range 0.0 1.00 extend_above extend_below rainbow colour_range 0 1
gfx create spectrum pressure
gfx modify spectrum pressure clear overwrite_colour
gfx modify spectrum pressure linear reverse range -0.12 0.60 extend_above extend_below rainbow colour_range 0 1
gfx create window 1
gfx modify window 1 layout 2d ortho_axes z -y eye_spacing 0.25 width 1000 height 1000;
gfx modify window 1 view parallel eye_point 0.5 0.5 3.0 interest_point 0.5 0.5 0 up_vector -0 1 -0 view_angle 40 near_clipping_plane 0.144243 far_clipping_plane 6.0
gfx modify g_element FluidRegion node_points glyph arrow_solid general size "0.03*0.03*0.03" centre 0,0,0 font default orientation velocities select_on material default data magnitude_velocity scale_factors "0.1*0.05*0.05" selected_material default_selected spectrum flow
gfx modify g_element FluidRegion surfaces select_on material default data pressure spectrum pressure selected_material default_selected render_shaded;
#Read in the sequence of nodal positions.
for($i=0; $i < 501; $i=$i+1)
{
$filename = sprintf("./TimeStep_%d.part0.exnode", $i);
print "Reading $filename time $i\n";
gfx read node "$filename"
$filename = sprintf("./LidDriven_%d.jpg", $i);
gfx print window 1 jpg file "$filename" height 1000 width 1000
}
gfx edit scene
gfx edit spectrum
gfx timekeeper default play speed 10 skip;
gfx create time_editor