-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathvisualise.cmgui
More file actions
86 lines (71 loc) · 5.44 KB
/
visualise.cmgui
File metadata and controls
86 lines (71 loc) · 5.44 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
gfx read node Cantilever.part0.exnode
gfx read elem Cantilever.part0.exelem
gfx def faces egroup CantileverRegion
#Create the graphics window and set view angles
gfx create window 1 double_buffer;
gfx modify window 1 image add_light default;
gfx modify window 1 layout simple ortho_axes z -y eye_spacing 0.25 height 1000 width 1500;
gfx modify window 1 set current_pane 1;
gfx modify window 1 background colour 0 0 0 texture none;
gfx modify window 1 view parallel eye_point -45.0 20.0 45.0 interest_point 5.0 5.0 15.0 up_vector 0.30 0.95 -0.10 view_angle 40 near_clipping_plane 0.01 far_clipping_plane 150.0
gfx define field Deformed component ElasticityDependent.1 ElasticityDependent.2 ElasticityDependent.3
gfx define field Pressure component ElasticityDependent.4
gfx define field Traction component ElasticityTraction.1 ElasticityTraction.2 ElasticityTraction.3
gfx define field TractionMagnitude magnitude field Traction
gfx define field Stress11 component FittedStress.1
gfx define field Stress12 component FittedStress.2
gfx define field Stress13 component FittedStress.3
gfx define field Stress22 component FittedStress.4
gfx define field Stress23 component FittedStress.5
gfx define field Stress33 component FittedStress.6
gfx define field Stress1111 multiply_components fields Stress11.1 Stress11.1
gfx define field Stress2222 multiply_components fields Stress22.1 Stress22.1
gfx define field Stress3333 multiply_components fields Stress33.1 Stress33.1
gfx define field Stress1122 multiply_components fields Stress11.1 Stress22.1
gfx define field Stress1133 multiply_components fields Stress11.1 Stress33.1
gfx define field Stress2233 multiply_components fields Stress22.1 Stress33.1
gfx define field Stress1212 multiply_components fields Stress12.1 Stress12.1
gfx define field Stress1223 multiply_components fields Stress12.1 Stress23.1
gfx define field Stress2323 multiply_components fields Stress23.1 Stress23.1
gfx define field Stress3131 multiply_components fields Stress13.1 Stress13.1
gfx define field Stress112233 multiply_components fields Stress1122.1 Stress33.1
gfx define field Stress122331 multiply_components fields Stress1223.1 Stress13.1
gfx define field Stress112323 multiply_components fields Stress11.1 Stress2323.1
gfx define field Stress223131 multiply_components fields Stress22.1 Stress3131.1
gfx define field Stress331212 multiply_components fields Stress33.1 Stress1212.1
gfx define field StressI1tmp1 add fields Stress11 Stress22
gfx define field StressI2tmp1 add fields Stress1122 Stress2233
gfx define field StressI2tmp2 add fields Stress1212 Stress2323 scale_factors 1.0 -1.0
gfx define field StressI2tmp3 add fields Stress2323 Stress3131
gfx define field StressI2tmp4 add fields StressI2tmp1 StressI2tmp2
gfx define field StressI3tmp1 add fields Stress112233 Stress122331
gfx define field StressI3tmp2 add fields Stress112323 Stress331212
gfx define field StressI3tmp3 add fields StressI3tmp1 StressI3tmp2 scale_factors 1.0 -1.0
gfx define field StressI1 add fields StressI1tmp1 Stress33
gfx define field StressI2 add fields StressI2tmp4 StressI2tmp3 scale_factors 1.0 -1.0
gfx define field StressI3 add fields StressI3tmp3 Stress223131 scale_factors 1.0 -1.0
gfx create spectrum PressureSpectrum
gfx modify spectrum PressureSpectrum clear overwrite_colour
gfx modify spectrum PressureSpectrum linear reverse range -1.0 1.0 extend_above extend_below rainbow colour_range 0 1
gfx create spectrum StressSpectrum
gfx modify spectrum StressSpectrum clear overwrite_colour;
gfx modify spectrum StressSpectrum linear reverse range -1.75 1.75 extend_above extend_below rainbow colour_range 0 1
gfx create spectrum TractionSpectrum
gfx modify spectrum TractionSpectrum clear overwrite_colour;
gfx modify spectrum TractionSpectrum linear reverse range 0.0 25.0 extend_above extend_below rainbow colour_range 0 1
#Display axes
gfx modify g_element CantileverRegion point glyph axes_solid_xyz general size "5.0*5.0*5.0" centre 0,0,0 font default select_on material yellow selected_material default_selected
#Display undeformed solid lines
gfx modify g_element CantileverRegion lines coordinate Geometry tessellation default LOCAL native_discretization NONE select_on material default selected_material default_selected;
#Display undeformed solid nodes
gfx modify g_element CantileverRegion node_points coordinate Geometry LOCAL glyph sphere general size "0.1*0.1*0.1" centre 0,0,0 label cmiss_number font default select_on material default selected_material default_selected;
#Display deformed solid lines
gfx modify g_element CantileverRegion lines coordinate Deformed material red
#Display hydrostatic pressure
gfx modify g_element CantileverRegion surfaces coordinate Deformed exterior tessellation default LOCAL native_discretization NONE select_on data Pressure spectrum PressureSpectrum selected_material default_selected render_shaded;
#Display tractions
gfx modify g_element CantileverRegion node_points coordinate Deformed glyph arrow_solid general size "1.0*1.01*1.0" centre 0,0,0 font default orientation Traction select_on material default data TractionMagnitude scale_factors "0.05*0.01*0.00" selected_material default_selected spectrum TractionSpectrum
#Display stress field on deformed surface
gfx modify g_element CantileverRegion surfaces coordinate Deformed exterior tessellation default LOCAL native_discretization NONE select_on data StressI1 spectrum StressSpectrum selected_material default_selected render_shaded
#Write out image
gfx print window 1 jpg file "FittedStress.jpg" height 1000 width 1500