- By
**obert** - Follow User

- 133 Views
- Uploaded on

Download Presentation
## PowerPoint Slideshow about ' Advection (Part 2)' - obert

**An Image/Link below is provided (as is) to download presentation**

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript

Announcements

- Bonus OH Mon 1-2
- Quiz on Weds
- Project #4 is out, due Mon.
- Today’s lecture:
- Review of advection
- Overview of project 4
- More particle advection usages

From lecture #1: What should you do if you run into trouble?

Start with Piazza

Office Hours

Email me: [email protected]

LERPing vectors

X = B-A

A

B

}

t

X

A

A+t*X

- LERP = Linear Interpolate
- Goal: interpolate vector between A and B.
- Consider vector X, where X = B-A
- A + t*(B-A) = A+t*X
- Takeaway:
- you can LERP the components individually
- the above provides motivation for why this works

Overview of advection process

- Place a massless particle at a seed location
- Displace the particle according to the vector field
- Result is an “integral curve” corresponding to the trajectory the particle travels
- Math gets tricky

Formal definition for particle advection

- Output is an integral curve, S, which follows trajectory of the advection
- S(t) = position of curve at time t
- S(t0) = p0
- t0: initial time
- p0: initial position

- S’(t) = v(t, S(t))
- v(t, p): velocity at time t and position p
- S’(t): derivative of the integral curve at time t

- S(t0) = p0

This is an ordinary differential equation (ODE).

The integral curve for particle advection is calculated iteratively

S(t0) = p0

while (ShouldContinue())

{

S(ti) = AdvanceStep(S(t(i-1))

}

ShouldContinue(): keep stepping as long as it returns true

How to do an advance?

AdvanceStep iteratively goal: to calculate Si from S(i-1)

S0

S1 = AdvanceStep(S0)

S4 = AdvanceStep(S3)

S5= AdvanceStep(S4)

S2 = AdvanceStep(S1)

S3= AdvanceStep(S2)

S1

S3

S4

S2

S5

This picture is misleading:

steps are typically much smaller.

AdvanceStep iteratively Overview

- Think of AdvanceStep as a function:
- Input arguments:
- S(i-1): Position, time

- Output arguments:
- Si: New position, new time (later than input time)

- Optional input arguments:
- More parameters to control the stepping process.

- Input arguments:

AdvanceStep iteratively Overview

- Different numerical methods for implementing AdvanceStep:
- Simplest version: Euler step
- Most common: Runge-Kutta-4 (RK4)
- Several others as well

Euler Method iteratively

- Most basic method for solving an ODE
- Idea:
- First, choose step size: h.
- Second,AdvanceStep(pi, ti) returns:
- New position: pi+1 = pi+h*v(ti, pi)
- New time: ti+1 = ti+h

Quiz Time: Euler Method iteratively

- Euler Method:
- New position: pi+1 = pi+h*v(ti, pi)
- New time: ti+1 = ti+h

- Let h=0.01s
- Let p0 = (1,2,1)
- Let t0 = 0s
- Let v(p0, t0) = (-1, -2, -1)
- What is (p1, t1) if you are using an Euler method?

Answer: ((0.99, 1.98, 0.99), 0.01)

Runge-Kutta iteratively Method (RK4)

- Most common method for solving an ODE
- Definition:
- First, choose step size, h.
- Second,AdvanceStep(pi, ti) returns:
- New position: pi+1 = pi+(1/6)*h*(k1+2k2+2k3+k4)
- k1 = v(ti, pi)
- k2 = v(ti + h/2, pi + h/2*k1)
- k3= v(ti + h/2, pi + h/2*k2)
- k4= v(ti + h, pi + h*k3)

- New time: ti+1 = ti+h

- New position: pi+1 = pi+(1/6)*h*(k1+2k2+2k3+k4)

Physical interpretation of RK4 iteratively

- New position: pi+1 = pi+(1/6)*h*(k1+2k2+2k3+k4)
- k1 = v(ti, pi)
- k2 = v(ti + h/2, pi + h/2*k1)
- k3= v(ti + h/2, pi + h/2*k2)
- k4= v(ti + h, pi + h*k3)

v(ti+h, pi+h*k3) = k4

pi

pi+ h/2*k2

pi+ h*k3

v(ti+h/2, pi+h/2*k2) = k3

v(ti, pi) = k1

pi+ h/2*k1

v(ti+h/2, pi+h/2*k1) = k2

Evaluate 4 velocities, use combination

to calculate pi+1

Reminder iteratively

- Omitting review of material in Lecture #5 on errors in advection step.

Termination causes iteratively

Quiz: which one is time and which one is distance?

- Criteria reached
- Time
- Distance
- Number of steps
- Same as time?

- Other advanced criteria, based on particle advection purpose

- Can’t meet criteria
- Exit the volume
- Advect into a sink

Distance

Time

Steady versus Unsteady State iteratively

- Unsteady state: the velocity field evolves over time
- Steady state: the velocity field has reached steady state and remains unchanged as time evolves

Most common particle advection technique: streamlines and iteratively pathlines

- Idea: plot the entire trajectory of the particle all at one time.

Streamlines in the “fish tank”

Streamline iteratively vsPathlines

- Streamlines: plot trajectory of a particle from a steady state field
- Pathlines: plot trajectory of a particle from an unsteady state field
- Quiz: most common configuration?
- Neither!!
- Pretend an unsteady state field is actually steady state and plot streamlines from one moment in time.

- Quiz: why would anyone want to do this?
- (answer: performance)

Pathlines iteratively in the real world

Lots more to talk about iteratively

- How do we pragmatically deal with unsteady state flow (velocities that change over time)?
- More operations based on particle advection
- Stability of results
- You all will figure this out (project 5)

Dealing with steady state velocities iteratively

- Euler Method (unsteady):
- New position: pi+1 = pi+h*v(ti, pi)
- New time: ti+1 = ti+h

- Euler Method (steady):
- New position: pi+1 = pi+h*v(t0, pi)
- New time: ti+1 = ti+h

Unsteady iteratively vs Steady: RK4

- Unsteady:
- New position: pi+1 = pi+(1/6)*h*(k1+2k2+2k3+k4)
- k1 = v(ti, pi)
- k2 = v(ti + h/2, pi + h/2*k1)
- k3= v(ti + h/2, pi + h/2*k2)
- k4= v(ti + h, pi + h*k3)
- New time: ti+1 = ti+h

- New position: pi+1 = pi+(1/6)*h*(k1+2k2+2k3+k4)

Unsteady iteratively vs Steady: RK4

- Steady:
- New position: pi+1 = pi+(1/6)*h*(k1+2k2+2k3+k4)
- k1 = v(t0, pi)
- k2 = v(t0, pi + h/2*k1)
- k3= v(t0, pi + h/2*k2)
- k4= v(t0, pi + h*k3)
- New time: ti+1 = ti+h

- New position: pi+1 = pi+(1/6)*h*(k1+2k2+2k3+k4)

Project 4 iteratively

- Assigned October 16th, prompt online
- Due October 21st, midnight ( October 22nd, 6am)
- Worth 7% of your grade
- Provide:
- Code skeleton online
- Correct answers provided

- You send me:
- source code
- screenshot with:
- text output on screen
- image of results

Project 4 in a nutshell iteratively

- Do some vector LERPing
- Do particle advection with Euler steps
- Examine results

Project 4 in a nutshell iteratively

- Implement 3 methods:
- EvaluateVectorFieldAtLocation
- LERP vector field. (Reuse code from before, but now multiple component)

- AdvectWithEulerStep
- You know how to do this

- CalculateArcLength
- What is the total length of the resulting trajectory?

- EvaluateVectorFieldAtLocation

Project 5 in a nutshell iteratively

- Implement Runge-Kutta 4
- Assess the quality of RK4 vs Euler
- Open ended project
- I don’t tell you how to do this assessment.
- You will need to figure it out.
- Multiple right answers

- I don’t tell you how to do this assessment.
- Deliverable: short report (~1 page) describing your conclusions and methodology.
- Pretend that your boss wants to know which method to use and you have to convince her which one is the best and why.

- Not everyone will receive full credit.

Additional Particle Advection Techniques iteratively

- This content courtesy of Christoph Garth, Kaiserslautern University.

Streamline, iteratively Pathline,Timeline, Streakline,

- Streamline: steady state velocity, plot trajectory of a curve
- Pathline: unsteady state velocity, plot trajectory of a curve
- Timeline: start with a line, advect that line and plot the line’s position at some future time

Time Surface iteratively

- Advect a surface and see where it goes
- “A sheet blowing in the wind”

Streamline, iteratively Pathline,Timeline, Streakline

- Streamline: steady state velocity, plot trajectory of a curve
- Pathline: unsteady state velocity, plot trajectory of a curve
- Timeline: start with a line, advect that line and plot the line’s position at some future time
- Streakline: unsteady state, introduce new particles at a location continuously

Streaklines iteratively

Will do an example on the board

Streaklines iteratively in real life

- Stream surface: iteratively
- Start with a seeding curve
- Advect the curve to form a surface

- Stream surface: iteratively
- Start with a seeding curve
- Advect the curve to form a surface

Stream Surface Computation iteratively

- Skeleton from Integral Curves + Timelines

Stream Surface Computation iteratively

- Skeleton from Integral Curves + Timelines
- Triangulation
Generation of Accurate Integral Surfaces in Time-Dependent Vector Fields. C. Garth, H. Krishnan, X. Tricoche, T. Bobach, K. I. Joy. In IEEE TVCG, 14(6):1404–1411, 2007

Stream Surface Example iteratively

Stream Surface Example iteratively

Stream Surface Example #2 iteratively

Vortex system behind ellipsoid

Lagrangian iteratively Methods

- Visualize manifolds of maximal stretching in a flow, as indicated by dense particles
- Finite-Time Lyapunov Exponent (FTLE)

www.vacet.org

Lagrangian iteratively Methods

- Visualize manifolds of maximal stretching in a flow, as indicated by dense particles
- forward in time: FTLE+ indicates divergence
- Backward in time: FTLE+ indicates convergence

www.vacet.org

Download Presentation

Connecting to Server..