41
Real-time simulation and visualization techniques for combustion processes and general fluids Marek Gayer (supervisor Pavel Slavík) Computer Graphics Group Department of Computer Science and Engineering Faculty of Electrical Engineering Czech Technical University in Prague The defense of the PhD thesis April, 27, 2006 Prague, Czech Republic www.cgg.cvut.cz/~xgayer/

Real-time simulation and visualization techniques for combustion processes and general fluids

  • Upload
    bryant

  • View
    50

  • Download
    0

Embed Size (px)

DESCRIPTION

www.cgg.cvut.cz /~xgayer/. Real-time simulation and visualization techniques for combustion processes and general fluids. Marek Gayer (supervisor Pavel Slavík ) C omputer G raphics G roup Department of Computer Science and Engineering Faculty of Electrical Engineering - PowerPoint PPT Presentation

Citation preview

Page 1: Real-time simulation and visualization techniques  for combustion processes and general fluids

Real-time simulation and visualization techniques

for combustion processes and general fluids

Real-time simulation and visualization techniques

for combustion processes and general fluids

Marek Gayer (supervisor Pavel Slavík)

Computer Graphics GroupDepartment of Computer Science and Engineering

Faculty of Electrical Engineering Czech Technical University in Prague

The defense of the PhD thesis

April, 27, 2006 Prague, Czech Republic

www.cgg.cvut.cz/~xgayer/

Page 2: Real-time simulation and visualization techniques  for combustion processes and general fluids

2CTU 2006

www.cgg.cvut.cz/~xgayer/

Outline of the presentationOutline of the presentation Introduction and motivation for visualization of

dynamic processes and objectives of the thesis Presentation of major thesis contributions

– Acceleration of simulation– Higher quality of images achieved by the use of

GPU – Interactive visualization of dynamic processes

with tree based data structuresFluid Simulator States (FSS)FSS TreeUnsteady Data Sets (UDS) Tree

Conclusion and future work Live demonstration of the dynamic visualization

Page 3: Real-time simulation and visualization techniques  for combustion processes and general fluids

3CTU 2006

www.cgg.cvut.cz/~xgayer/

Thesis objectivesThesis objectives

Design and implement techniques that together could be used to form a solution allowing interactively visualize dynamic processes – namely for pulverized coal combustion processes in real time (2D, namely for education).

Contributions of the thesis should be reusable in general projects regarding fluids

No ambitions for reaching precision or compete professional combustion software

Page 4: Real-time simulation and visualization techniques  for combustion processes and general fluids

4CTU 2006

www.cgg.cvut.cz/~xgayer/Objective: Interactive visualization of dynamic processes (e.g. fluid processes)

Objective: Interactive visualization of dynamic processes (e.g. fluid processes)

Understanding of a dynamic process is possible only with a dynamic (real-time) and interactive visualization

Dynamic processes are described by complex differential equations (slow to compute)

Combustion processes which our thesis deals with is a use case of solving this problem

Page 5: Real-time simulation and visualization techniques  for combustion processes and general fluids

5CTU 2006

www.cgg.cvut.cz/~xgayer/Introduction and motivation to coal combustion modelling and visualization

Introduction and motivation to coal combustion modelling and visualization

Both for the ecological and economical reasons

Finding optimal boiler configurations– To reduce pollution– Combustion optimization– To find a way for optimal

fuel preparation How can visualization help

Page 6: Real-time simulation and visualization techniques  for combustion processes and general fluids

6CTU 2006

www.cgg.cvut.cz/~xgayer/Modelling and visualization of combustion by existing CFD software

Modelling and visualization of combustion by existing CFD software

Most often: solving complex differential equations (e.g. Navier-Stokes)

Coal combustion as a CFD application Current solutions and systems:

Precise, robustSlow, complex, expensive, non real-time => unsuitable e.g. for education (ANSYS, Fluent => 1 frame = several minutes - hours)

+-

Page 7: Real-time simulation and visualization techniques  for combustion processes and general fluids

7CTU 2006

www.cgg.cvut.cz/~xgayer/Thesis contributions leading to dynamic, real-time visualization of dyn. processes

Thesis contributions leading to dynamic, real-time visualization of dyn. processes

1. Speeding up the computation of data for consecutive visualization

2. Use HW acceleration for quality yet fast visualization of the data

3. Pre-calculate parts of simulation, then run simulation accelerated so dynamic real-time visualization can be achieved

Page 8: Real-time simulation and visualization techniques  for combustion processes and general fluids

8CTU 2006

www.cgg.cvut.cz/~xgayer/Problem 1: The classical simulation of combustion by existing solvers is slow

Problem 1: The classical simulation of combustion by existing solvers is slow

Solution / contribution of the thesis:

– Fast fluid simulator based on Euler and continuity equation allowing real-time interactivity

– Original virtual coal particle system using simplified combustion model, suitable for both the simulation and visualization

Page 9: Real-time simulation and visualization techniques  for combustion processes and general fluids

9CTU 2006

www.cgg.cvut.cz/~xgayer/

The Fluid SimulatorThe Fluid Simulator

Dividing boiler area to structured grid cell arrays containing:– Velocities– Masses/Pressures

– O2 concentrations

– Temperatures State update Principle of local

simulation

Page 10: Real-time simulation and visualization techniques  for combustion processes and general fluids

10CTU 2006

www.cgg.cvut.cz/~xgayer/

Virtual coal particle systemVirtual coal particle system Used for both simulation

and visualization of the combustion process

Virtual particle system approach

Simplified combustion and heat transfer computation

Page 11: Real-time simulation and visualization techniques  for combustion processes and general fluids

11CTU 2006

www.cgg.cvut.cz/~xgayer/

Sample visualization - cell characteristicsSample visualization - cell characteristics

Page 12: Real-time simulation and visualization techniques  for combustion processes and general fluids

12CTU 2006

www.cgg.cvut.cz/~xgayer/

Sample visualization – coal particlesSample visualization – coal particles

Page 13: Real-time simulation and visualization techniques  for combustion processes and general fluids

13CTU 2006

www.cgg.cvut.cz/~xgayer/Problem 2: How to visualize simulated data fast and with good quality?

Problem 2: How to visualize simulated data fast and with good quality?

Solution / contribution of the thesis:

– High quality bicubic spline contours visualization

– Non-jagged isolines

– Computed parallel by pixel or vertex shaders on GPU’s of the current graphics accelerators

Page 14: Real-time simulation and visualization techniques  for combustion processes and general fluids

14CTU 2006

www.cgg.cvut.cz/~xgayer/Real-time Visualization with Bicubic Spline Patches Interpolation

Real-time Visualization with Bicubic Spline Patches Interpolation

Better quality then linearComplex computations with 4x4 and 4x1 vector matrices (2x)Non real-time when not accelerated – (graphics hardware natively supports only linear interpolation)Our contribution utilizing Modern GPU’s paralell processing gains real-time performance

+

--

+

Page 15: Real-time simulation and visualization techniques  for combustion processes and general fluids

15CTU 2006

www.cgg.cvut.cz/~xgayer/

Utilization of GPU shadersUtilization of GPU shaders

Vertex & fragment programs (shaders) Works on common current mainstream

graphics hardware Texture mapping interpolation core

running on GPU (high quality per-pixel / per-vertex)

Optional per-vertex subdivision - pixels between vertices are linear interpolated

Page 16: Real-time simulation and visualization techniques  for combustion processes and general fluids

16CTU 2006

www.cgg.cvut.cz/~xgayer/

Side by side comparison with linear texture interpolationSide by side comparison with linear texture interpolation

Page 17: Real-time simulation and visualization techniques  for combustion processes and general fluids

17CTU 2006

www.cgg.cvut.cz/~xgayer/

Non-Jagged Isolines (contour lines)Non-Jagged Isolines (contour lines)

Simple modification of mapping textures:

Simple, fast(no additionalcomputations at all!)

Smooth, non jagged

Blurry on certainplaces with lowgradients

+

-

+

Page 18: Real-time simulation and visualization techniques  for combustion processes and general fluids

18CTU 2006

www.cgg.cvut.cz/~xgayer/Problem 3: How to gain real-time visualization even with slow simulation?

Problem 3: How to gain real-time visualization even with slow simulation?

Contribution / solution of the thesis:

– Fluid Simulator States

– Fluid Simulator States Tree

– Unsteady Data Sets Tree

Page 19: Real-time simulation and visualization techniques  for combustion processes and general fluids

19CTU 2006

www.cgg.cvut.cz/~xgayer/

Storing results for real-time replayingStoring results for real-time replaying

Used when computation is too slow for real-time simulation and visualization

Results are stored on hard disk, then real-time replayed– Data sets for selected

characteristics– AVI and MPEG files– Limited interaction

Our contribution:HIERARCHICAL TREES OF PRE-COMPUTED DATA STRUCTURES (FSS, UDS Trees)

Page 20: Real-time simulation and visualization techniques  for combustion processes and general fluids

20CTU 2006

www.cgg.cvut.cz/~xgayer/

Extending Fluid Simulator with Fluid Simulator States (FSS)Extending Fluid Simulator with Fluid Simulator States (FSS)

Simulation is divided into two phases:– Storing phase - fluid simulator states for

each time step are saved on HDD– Replaying phase - simulation runs

accelerated with pre-computed fluid simulator states; we can interactively set parameters of visualization

Except first frame, no other data are saved (e.g. particles, characteristics)

State files are stored in binary files

Page 21: Real-time simulation and visualization techniques  for combustion processes and general fluids

21CTU 2006

www.cgg.cvut.cz/~xgayer/

Simulation system architectureSimulation system architecture

VisualizationVisualization

InteractionInteraction

Store FullData Sets

Store FullData Sets

Fluid simulatorFluid simulator

Combustion &heat transfer

engine

Combustion &heat transfer

engineParticlesystem

ParticlesystemGrid cellsGrid cells

Store FSSextension

Store FSSextension

Page 22: Real-time simulation and visualization techniques  for combustion processes and general fluids

22CTU 2006

www.cgg.cvut.cz/~xgayer/

First frame (complete state)

Second Frame

.

.

Collection of cascadingFSS states for

accelerateddatasets generation.

.

.Frame N - 1

Last frame (complete state)

Page 23: Real-time simulation and visualization techniques  for combustion processes and general fluids

23CTU 2006

www.cgg.cvut.cz/~xgayer/

Unsteady simulation datasets (UDS)Unsteady simulation datasets (UDS)

Stores one or more characteristics for selected time part

Can allow real-time replaying of results Full interactivity in visualization part After storing, no interactivity in

simulation part possible No additional changes to already

computed data and configuration

Page 24: Real-time simulation and visualization techniques  for combustion processes and general fluids

24CTU 2006

www.cgg.cvut.cz/~xgayer/

Detailed comparison against data setsDetailed comparison against data sets

Store method /Grid size

FSS /20*40

FULL /20*40

FSS /50*100

FULL /50*100

Simulation time 1214s 1230s 5128s 5133s

Write [MB/s] 0.16 8.0 0.3 3.7

Replay time 627s 603s 816s 864s

Read [MB/s] 0.31 14.6 1.9 21.95

AVG Fps 19.1 19.9 16.3 15.4

Disk space GB 0.2 9.4 1.6 19.1

Total acceleration

x 1.9 x 2.0 x 6.2 x 5.9

Page 25: Real-time simulation and visualization techniques  for combustion processes and general fluids

25CTU 2006

www.cgg.cvut.cz/~xgayer/Feature comparison of FSS against common unsteady data sets (UDS)

Feature comparison of FSS against common unsteady data sets (UDS)

Much less disk requirements (only fluid simulator states are being saved)

Lower disk bandwidthBetter scalability for large grids and/or tasks

with many particlesSame or even better acceleration resulting in

better interactivityNo seeking and skip frame ability

+

++

-

+

Page 26: Real-time simulation and visualization techniques  for combustion processes and general fluids

26CTU 2006

www.cgg.cvut.cz/~xgayer/

Forming data to tree cluster structureForming data to tree cluster structure

Page 27: Real-time simulation and visualization techniques  for combustion processes and general fluids

27CTU 2006

www.cgg.cvut.cz/~xgayer/Changing simulation parameters in each of the tree node

Changing simulation parameters in each of the tree node

Page 28: Real-time simulation and visualization techniques  for combustion processes and general fluids

28CTU 2006

www.cgg.cvut.cz/~xgayer/Comparison of FSS and UDS tree advantages against direct simulation

Comparison of FSS and UDS tree advantages against direct simulation

Can run in orders fasterSeeking and skip frame ability (UDS)Creating hierarchy of replay-able resultsIncremental step-by-step solutionConstructing of paths of solutionInteractivity is allowed only in the nodes

of the treeUDS requires disk bandwidth and

capacity

+

++

-

-

+

+

Page 29: Real-time simulation and visualization techniques  for combustion processes and general fluids

29CTU 2006

www.cgg.cvut.cz/~xgayer/

Page 30: Real-time simulation and visualization techniques  for combustion processes and general fluids

30CTU 2006

www.cgg.cvut.cz/~xgayer/

Reusability - possible applicationsReusability - possible applications

Originally used for our fluid application for combustion processes

Parts can be reused for other simulation and visualization applications– Fluid simulator– Contours visualization

E.g.: simulation and animation of liquids, water and gaseous phenomena

Page 31: Real-time simulation and visualization techniques  for combustion processes and general fluids

31CTU 2006

www.cgg.cvut.cz/~xgayer/

Conclusion of major contributionsConclusion of major contributions

Fast data generator for dynamic visualization– Fast & simple real-time fluid simulator– Particle system with simplified combustion engine– Interactive changes to the model during run

Quality contours and contour lines visualization using pixel or vertex shaders on GPU

Real-time data based structures for interactive visualization and accelerated simulation– Fluid Simulator States– Fluid Simulator States Tree– Unsteady Data Sets Tree

Page 32: Real-time simulation and visualization techniques  for combustion processes and general fluids

32CTU 2006

www.cgg.cvut.cz/~xgayer/

In general, create a more precise computational model or enhance and extend current equations

Enhancements to the combustion and thermodynamics engine and fluid simulator

Convert the whole project to 3D Create 3D FSS and UDS Trees Create more user-friendly user interface Dynamic visualization of other phenomena's

Possible future research and workPossible future research and work

Page 33: Real-time simulation and visualization techniques  for combustion processes and general fluids

33CTU 2006

www.cgg.cvut.cz/~xgayer/The awards for the thesis contributions (fluid simulator, virtual particle system)

The awards for the thesis contributions (fluid simulator, virtual particle system)

2003, CTU FEE at PragueAward of Dean of the Faculty of Electrical Engineering of the Czech Technical University in Prague for work Simulation and Visualization of Combustion Powered by Fluid Simulator, presented at conference CTU Poster 2003

2003, Brno University of Technology, Faculty of Electrical Engineering and Communication (BUT FEEC) - Award of Dean for the best work in the International Competition of student creative projects Student EEICT 2003

2003, CTU in PraguePrice of the rector for placing between the best projects of PhD students, that were solved within scope of CTU internal grants and that were presented on conference CTU Workshop 2003

Page 34: Real-time simulation and visualization techniques  for combustion processes and general fluids

34CTU 2006

www.cgg.cvut.cz/~xgayer/

Thank you for your attention.Thank you for your attention.

???Do you have any questions ?

Page 35: Real-time simulation and visualization techniques  for combustion processes and general fluids

35CTU 2006

www.cgg.cvut.cz/~xgayer/

Question 1 (doc. Pavel Zemčík)Question 1 (doc. Pavel Zemčík)

The presented thesis does contain description of a novel “simplified” fluid and combustion modeling/simulation method (Chapter 5); it also contains comparison of the results of the method with other simulation system and from that comparison it seems that the simulation results of the proposed method are not very precise (some of the global values are over 20% different). Given these facts, is the proposed modeling/simulation method still usable for investigation of e.g. the airflow?

Page 36: Real-time simulation and visualization techniques  for combustion processes and general fluids

36CTU 2006

www.cgg.cvut.cz/~xgayer/

Reply 1(Precision of the model)Reply 1(Precision of the model)

The level precision = weak part, because: Price for the interactive visualization; instead

of 1 picture / minutes => several pictures / seconds

Combustion experts from P.E. of faculty of M.E.CTU: for overview of dynamics is OK

Not for professional design By further improvement and adding some

equations could approach reality better. When using it for airflow only => less errors;

no dynamic combustion code

Page 37: Real-time simulation and visualization techniques  for combustion processes and general fluids

37CTU 2006

www.cgg.cvut.cz/~xgayer/

Question 2 (doc. Pavel Zemčík)Question 2 (doc. Pavel Zemčík)

Has the proposed combustion process visualization system been evaluated from the point of view of “accuracy” of perception of the process by humans? Do any visualization parameters (e.g. way of shading of the particles as shown in Figure 10-2 versus 10-3, color assignment, etc.) affect the “understandability” of the image by humans?

Page 38: Real-time simulation and visualization techniques  for combustion processes and general fluids

38CTU 2006

www.cgg.cvut.cz/~xgayer/

Reply 2 (Particle visualization)Reply 2 (Particle visualization)

For the grid, we use visualization methods, that are standard for other combustion systems (our offers better quality and performance)

Particles - we have many possibilities to display– Using various palettes and colors (with scales)– Size of the particle, particle tracks– We can even use same methods as for the cells– Statistics

Moving particles and particle tracks display important visualization parameter – the dynamics

No tests of accuracy of perception of the users No user complaints regarding understandability Possitive feedback from student users

Page 39: Real-time simulation and visualization techniques  for combustion processes and general fluids

39CTU 2006

www.cgg.cvut.cz/~xgayer/

Question 3 (doc. Pavel Zemčík)Question 3 (doc. Pavel Zemčík)

The precision of the simulation process generally depends on the integration (simulation) time step. Does the proposed real-time simulation in general achieve optimum precision from this point of view? If not, does the system have any information about the precision of simulation (e.g. “now the simulation is too complex and to achieve real-time performance, the precision has been given up…”)?

Page 40: Real-time simulation and visualization techniques  for combustion processes and general fluids

40CTU 2006

www.cgg.cvut.cz/~xgayer/

Reply 3 (Time steps and precision)Reply 3 (Time steps and precision)

To achieve fast performance, we are always choosing the lowest time steps as possible

The timestep is set manually Increased timestep, the results slightly more

precise in most characteristics, but still the difference between the Fluent not consid. better

The greater precision should be achieved by enhancing combustion and heat transfer equations, or replace fluid simulator with another one and use our proposed accelerating structures to keep it real-time.

Or use some precise simulator as data source

Page 41: Real-time simulation and visualization techniques  for combustion processes and general fluids

41CTU 2006

www.cgg.cvut.cz/~xgayer/Q4 - How the 2d results can be composed into a 3d visualization system ? (doc. Andrej Ferko)

Q4 - How the 2d results can be composed into a 3d visualization system ? (doc. Andrej Ferko)

The 2D results represent the 3D boiler slice with selectable depth of the slice

By linear interpolation, we can divide the voxels & convert it to another grid

Alternatively, values of several slices of boiler could be computed and composed to display

We can use existing visualization systems and methods for visualization (e.g. volume rendering, flow visualization methods spot noise, LIC)

Last possibility – re-implement to 3D