Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn =...

32
UNIVERSITY OF WARSAW Interdisciplinary Centre for Mathematical and Computational Modelling www.icm.edu.pl Advanced visualization with VisNow platform Data calculations This work is licensed under a Creative Commons Attribution- NonCommercial -NoDerivatives 4.0 International License.

Transcript of Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn =...

Page 1: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

Advanced visualization with VisNow platform Data calculations

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Page 2: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

• Data values = component

• Data values – scalar or vector numerical values in each gridnode

• Independently on field structure each component in a givenfield has the same number of entries (= number of nodes in the field)

• Therefore, in each grid node the same mathematicalcalculation can be performer on the existing values

• Simliarly to array operations e.g. in MATLAB

VisNow – data calculations

Page 3: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

• Module – component calculator• Performs mathematical operations on data components

• Base on evaluation of single-line mathematical expressions for the whole components (data arrays)

• Functionality:• Mathematical operators: + - * / ^

• Functions: sqrt, log, log10, exp, abs, sin, cos, tan, asin, acos, atan, signum

• Statistics: avg, stddev

• Vectors (concatenation): ,

• Parentheses: ( )

• Syntax: result_variable = expression

3VisNow – data calculations

Page 4: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

• Module – component calculator• Variables and constants:

• Variables = component names or aliases

• Field grid indices (structure)

• i, j, k or index.i, index.j, index.k for regular fields (respectively 1D, 2D and 3D)

• i or index.i for irregular fields

• Grid coordinates (geometry) – x, y, z or coords.x, coords.y, coords.z (for 1, 2 and 3-dimensional space)

• Subindices of vector components:

• name.x, name.y, name.z (respectively for vlen = 1, 2 and 3)

• Constants: E, PI

4VisNow – data calculations

Page 5: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

• Module – component calculator

• Example #1:• Input field has components:

• density (scalar)

• momentum (vector, vlen=3)

• Velocity vector calculation:

v = momentum / density

• X component of velocity vector calculation:

xv = momentum.x / density

• Velocity vector norm calculation:

v = momentum / density

vnorm = sqrt(v.x^2 + v.y^2 + v.z^2)

5VisNow – data calculations

Page 6: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

6

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

Page 7: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

7

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ‘component calculator’ module to the output field.

Page 8: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

8

v = momentum/density

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ‘component calculator’ module to the output field.

3. Calculate the velocity vector by dividing momentum vector by density.

Page 9: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

9

v = momentum/densityvn = sqrt(v.x^2 + v.y^2 + v.z^2)

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ‘component calculator’ module to the output field.

3. Calculate the velocity vector by dividing momentum vector by density.

4. Calculate velocity value (norm of velocity vector).

Page 10: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

10

v = momentum/densityvn = sqrt(v.x^2 + v.y^2 + v.z^2)vnn = (vn-avg(vn)) / stddev(vn)

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ‘component calculator’ module to the output field.

3. Calculate the velocity vector by dividing momentum vector by density.

4. Calculate velocity value (norm of velocity vector).

5. Normalize the velocity value with average and standard deviation.

Page 11: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ‘component calculator’ module to the output field.

3. Calculate the velocity vector by dividing momentum vector by density.

4. Calculate velocity value (norm of velocity vector).

5. Normalize the velocity value with average and standard deviation.

6. Run calculations with ’Evaluate’ buton.

11

Page 12: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

12

7. Connect ‘glyphs‘ module to the output from ‘component calculator ‘ module and choosecomponent v as glyph size component

Page 13: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

13

7. Connect ‘glyphs‘ module to the output from ‘component calculator ‘ module and choosecomponent v as glyph size component

8. In ‘glyphs‘ module set glyph scale and line thickness up to your choice

Page 14: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

7. Connect ‘glyphs‘ module to the output from ‘component calculator ‘ module and choosecomponent v as glyph size component

8. In ‘glyphs‘ module set glyph scale and line thickness up to your choice

9. Colour the glyphs with the calculated vnn component and using blue-white-red, colour map, with selected symmetrical option and upper range equal 3.0

14

Page 15: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

• Module – component calculator

• Example #2:• Input image of 256x256 size with a single component :

• grayscaleData (scalar)

• Insert a spotlight at the selected point:

p = (i-128)^2+(j-128)^2

r = 100

spot = exp(-p/r)

result = spot * grayscaleData

15VisNow – data calculations

Page 16: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

16

1. Read the cameraman.png image with ‘image reader’ module.

Page 17: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

17

1. Read the cameraman.png image with ‘image reader’ module.

2. Disconnect data from viewer and connect ’component calculator’ module to the first output.

Page 18: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

18

p = (i-140)^2+(j-180)^2r = 2000spot = exp(-p/r)result = spot * gra

1. Read the cameraman.png image with ‘image reader’ module.

2. Disconnect data from viewer and connect ’component calculator’ module to the first output.

3. Run the calculations of spotlight insertion for the point i=140 j=180

Page 19: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

1. Read the cameraman.png image with ‘image reader’ module.

2. Disconnect data from viewer and connect ’component calculator’ module to the first output.

3. Run the calculations of spotlight insertion for the point i=140 j=180

4. Connect ‘field mapper’ module to the resulting field and change colour mapping settings up to your preference (e.g. with use of RGB mapping)

19

Page 20: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

• Module – multicomponent histogram

• Enables to create 1D, 2D and 3D histograms

• Binning based on data or geometry

• Provides calculations inside each bin for each data component:• Sum

• Minimum

• Maximum

• Mean

• Standard deviation

• Vector variance

20VisNow – data calculations

Page 21: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

21

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

Page 22: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

22

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ’modify components’ module to the first output port and disconnect both modules from the viewer.

Page 23: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ’modify components’ module to the first output port and disconnect both modules from the viewer.

3. Calculate momentum component norm.

23

Page 24: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

24

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ’modify components’ module to the first output port and disconnect both modules from the viewer.

3. Calculate momentum component norm.

4. Connect ‘multicomponent histogram’ module to the resulting field

Page 25: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

1. Read the bluntfin.vnf file with ‘VisNow field reader’ module.

2. Connect ’modify components’ module to the first output port and disconnect both modules from the viewer.

3. Calculate momentum component norm.

4. Connect ‘multicomponent histogram’ module to the resulting field

5. Generate a 1D histogram for density component (without logarithmic scale)

25

Page 26: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

26

6. Connect the resulting field to ’field viewer 1D’ module

Page 27: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

27

6. Connect the resulting field to ’field viewer 1D’ module

7. Generate 1D histogram for the momentum_norm component

Page 28: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

28

6. Connect the resulting field to ’field viewer 1D’ module

7. Generate 1D histogram for the momentum_norm component

8. Delete ’field viewer 1D’ module and generate 2D histogram for density and momentum_normcomponents

Page 29: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

6. Connect the resulting field to ’field viewer 1D’ module

7. Generate 1D histogram for the momentum_norm component

8. Delete ’field viewer 1D’ module and generate 2D histogram for density and momentum_normcomponents

9. Set colour mapping range to 0-40 and connect also ’axes 3D’ module to the viewer

29

Page 30: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

30

10. Generate 3D histogram for density, stagnation and momentum_norm components

Page 31: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

10. Generate 3D histogram for density, stagnation and momentum_norm components

11. Watch the 3D histogram using ’volume renderer’ module (set colour map and transparencyranges to 0-50)

31

Page 32: Advanced visualization with VisNow platform Data calculations · 9 v = momentum/density vn = sqrt(v.x^2 + v.y^2 + v.z^2) 1. Read the bluntfin.vnf file with ‘VisNow field reader’

UNIVERSITY OF WARSAW

Interdisciplinary Centre for Mathematical

and Computational Modellingwww.icm.edu.pl

visnow.icm.edu.pl

Contact:

[email protected]

Interdisciplinary Centre for Mathematical and Computational Modelling

University of Warsaw

Bartosz Borucki, Krzysztof Nowiński

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.