application of the mcmc method for the calibration of dsmc parameters

45
Application of the MCMC Method for the Calibration of DSMC Parameters James S. Strand and David B. Goldstein The University of Texas at Austin Sponsored by the Department of Energy through the PSAAP Program Predictive Engineering and Computational

Upload: thisbe

Post on 17-Feb-2016

38 views

Category:

Documents


0 download

DESCRIPTION

Application of the MCMC Method for the Calibration of DSMC Parameters. James S. Strand and David B. Goldstein The University of Texas at Austin. Sponsored by the Department of Energy through the PSAAP Program. Predictive Engineering and Computational Sciences. Introduction – DSMC Parameters. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Application of the MCMC Method for the Calibration of DSMC Parameters

Application of the MCMC Method for the Calibration

of DSMC Parameters

James S. Strand and David B. GoldsteinThe University of Texas at Austin

Sponsored by the Department of Energy through the PSAAP Program

Predictive Engineering and Computational Sciences

Page 2: Application of the MCMC Method for the Calibration of DSMC Parameters

Introduction – DSMC Parameters

• Direct Simulation Monte Carlo (DSMC) is a valuable method for the simulation of rarefied gas flows.• The DSMC model includes many parameters related to gas dynamics at the molecular level, such as: Elastic collision cross-sections Vibrational and rotational excitation cross-sections Reaction cross-sections Sticking coefficients and catalytic efficiencies for

gas-surface interactions. …etc.

Page 3: Application of the MCMC Method for the Calibration of DSMC Parameters

Introduction – DSMC Parameters

• In many cases the precise values of some of these parameters are not known.• Parameter values often cannot be directly measured, instead they must be inferred from experimental results.• By necessity, parameters must often be used in regimes far from where their values were determined.• More precise values for important parameters would lead to better simulation of the physics, and thus to better predictive capability for the DSMC method.

Page 4: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Overview

• Markov Chain Monte Carlo (MCMC) is a method which solves the statistical inverse problem in order to calibrate parameters with respect to a set or sets of experimental data.

Page 5: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC MethodEstablish

boundaries for parameter space

Select initial position

Run simulation at current position

Calculate probability for

current position

Select new candidate position

Run simulation for candidate position parameters, and

calculate probability

Accept or reject candidate

position based on a random number draw

Candidate position is accepted, and becomes

the current chain position

Candidate position becomes

current position

Current position remains

unchanged.

Candidate automatically

accepted

Candidate Accepted

Candidate Rejected

Probcandidate

< Probcurrent

Probcandidate

> Probcurrent

Page 6: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param2

Param1

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1• Simple example illustrates the MCMC method.

Page 7: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

Page 8: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1A point is randomly selected from within the parameter spaceto serve as the starting location for this chain.

Page 9: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1A point is randomly selected from within the parameter spaceto serve as the starting location for this chain.

Initial position for this chain

Page 10: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1 A simulation is run with this set of parameter valuesand the likelihood equation is used to calculate aprobabilty for this parameter set.

Initial position for this chainProb = 0.0765

𝑷𝒓𝒐𝒃= 𝒆ቀ−𝟏𝟐𝝈𝑬𝒓𝒓𝒐𝒓ቁ

Page 11: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1 A new candidate position is chosen based on a Gaussiandistribution in parameter space centered at the currentchain position.

Initial position for this chainProb = 0.0765

Candidate position

Page 12: Application of the MCMC Method for the Calibration of DSMC Parameters

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1 A simulation is run with the parameter values at the candidateposition, and a probability is calculated for this set of parametervalues.

Initial position for this chainProb = 0.0765

Candidate positionProb = 0.0715

MCMC Method - Steps

𝑷𝒓𝒐𝒃= 𝒆ቀ−𝟏𝟐𝝈𝑬𝒓𝒓𝒐𝒓ቁ

Page 13: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1If this probability is higher than the probability at the oldposition, the candidate position is accepted. If this probabilityis lower, the candidate position is accepted or rejected basedon a random number draw, with Probaccept = Probcandidate/Probold position

Initial position for this chainProb = 0.0765

Candidate positionProb = 0.0715

Page 14: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

In this case, the candidate position probability is slightly lowerthan the old position probability, but the candidate positionis accepted after the random number draw.Probaccept = Probcandidate/Probold position = 0.935

Initial position for this chainProb = 0.0765

Candidate positionProb = 0.0715

Page 15: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

In this case, the candidate position probability is slightly lowerthan the old position probability, but the candidate positionis accepted after the random number draw.Probaccept = Probcandidate/Probold position = 0.935

Initial position for this chainProb = 0.0765

Candidate positionProb = 0.0715

Candidate position becomes the current chain position.

Accepted

Page 16: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1A new candidate position is chosen, and the process repeats.A simulation is run at the candidate position, and the calculatedprobability is compared to the probability at the current position.

Initial position for this chain Current positionProb = 0.0715

Page 17: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1The chain meanders in parameter space, making its waytoward regions where the simulation results more closelymatch the data, leading to lower error and thus higherprobability.

Initial position for this chain

Current position

Page 18: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

As the chain grows long, more and more of the parameterspace has been explored.

Page 19: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC Method - Steps

Param1

Param2

0 0.2 0.4 0.6 0.8 1

0

0.2

0.4

0.6

0.8

1

Chain positions become noticeably concentrated in thelow error/high probability region near the center.

Page 20: Application of the MCMC Method for the Calibration of DSMC Parameters

1D Shock Simulation

• Base flow is a 1D, unsteady shock, moving through the computational domain.• A set of sample cells moves with the shock. These sample cells continuously collect data on the shock profile.• This method allows for a smooth solution in an unsteady flow without the computational cost of ensemble averaging or using excessively large numbers of particles. • No prior knowledge of the post-shock conditions is required.

Page 21: Application of the MCMC Method for the Calibration of DSMC Parameters

1D Shock Simulation

Page 22: Application of the MCMC Method for the Calibration of DSMC Parameters

1D Shock Simulation – Measure of Error

Alsmeyer’s DataSample DSMC Results

Page 23: Application of the MCMC Method for the Calibration of DSMC Parameters

Parallelization

• DSMC: DSMC code is MPI parallel, with dynamic load

rebalancing periodically during each run. Allows very fast simulation of small problems. Super-linear speed-up due to better cache use. Simulations which took 20 minutes on 1 processor

take less than 20 seconds on 64 processors. Faster DSMC simulations allow for much longer

chains to be run in a practical amount of time.• MCMC:

Any given chain must be run in sequence. MCMC method can be parallelized by running

multiple chains simultaneously.

Page 24: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Page 25: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

Group 2

Group 5

Group 4

Group 6

Group 3

Page 26: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

MCMC Chain 3

Group 2

Group 5

Group 4

Group 6

Group 3

MCMC Chain 1

MCMC Chain 2

Page 27: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

MCMC Chain 3

Group 2

Group 5

Group 4

Group 6

Group 3

MCMC Chain 1

MCMC Chain 2

MCMC Chain 4

MCMC Chain 6

MCMC Chain 5

Page 28: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

MCMC Chain 3

Group 2

Group 5

Group 4

Group 6

Group 3

MCMC Chain 1

MCMC Chain 2

MCMC Chain 4

MCMC Chain 6

MCMC Chain 5

MCMC Chain 7 MCMC

Chain 8

Page 29: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

MCMC Chain 3

Group 2

Group 5

Group 4

Group 6

Group 3

MCMC Chain 1

MCMC Chain 2

MCMC Chain 4

MCMC Chain 6

MCMC Chain 5

MCMC Chain 7

Group 1

Group 2

MCMC Chain 8

Page 30: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

MCMC Chain 3

Group 2

Group 5

Group 4

Group 6

Group 3

MCMC Chain 1

MCMC Chain 2

MCMC Chain 4

MCMC Chain 6

MCMC Chain 5

MCMC Chain 7 MCMC

Chain 8

MCMC Chain 6

Page 31: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

MCMC Chain 3

Group 2

Group 5

Group 4

Group 6

Group 3

MCMC Chain 1

MCMC Chain 2

MCMC Chain 4

MCMC Chain 6

MCMC Chain 5

MCMC Chain 7

Group 4

MCMC Chain 8

MCMC Chain 6

Group 3

Group 1

Page 32: Application of the MCMC Method for the Calibration of DSMC Parameters

MCMC ParallelismAll Processors

Group 1

MCMC Chain 3

Group 2

Group 5

Group 4

Group 6

Group 3

MCMC Chain 1

MCMC Chain 2

MCMC Chain 4

MCMC Chain 6

MCMC Chain 5

MCMC Chain 7 MCMC

Chain 8

MCMC Chain 6

Page 33: Application of the MCMC Method for the Calibration of DSMC Parameters

First Calibration - Hard-Sphere Model

• Parameter to be calibrated is dHS, the hard-sphere diameter for argon. Normalized density profile for a Mach 3.38 shock in argon from Alsmeyer (1976) used for calibration.• Uniform sampling method used to explore the parameter space.• Metropolis-Hastings MCMC algorithm used to solve inverse problem.

Page 34: Application of the MCMC Method for the Calibration of DSMC Parameters

Second Calibration - VHS Model

• Parameters to be calibrated are dref and ω, the reference diameter and the temperature-viscosity exponent for argon. Normalized density profile for a Mach 3.38 shock in argon from Alsmeyer (1976) once again used for calibration.

Page 35: Application of the MCMC Method for the Calibration of DSMC Parameters

Second Calibration - VHS Model

Omega

Dref(inmeters)

0.5 0.6 0.7 0.8 0.9 13E-10

3.5E-10

4E-10

4.5E-10

5E-10

5.5E-10

6E-10

• For two parameter case, uniform sampling could still be used to explore parameter space. Simulation was run for each set of parameters on a 100×100 grid in parameter space, and a probability was calculated for each based on the error and the likelihood equation. A total of 10,000 shocks were simulated for the uniform sample.

Page 36: Application of the MCMC Method for the Calibration of DSMC Parameters

Second Calibration - VHS Model

• Band structure seen here indicates that this single dataset does not provide enough information to allow unique values to be determined for both dref and ω.

Page 37: Application of the MCMC Method for the Calibration of DSMC Parameters

Second Calibration - VHS Model

• MCMC calibration was also performed for this case. 64 chains were run, each with 4000 positions, for a total of 256,000 shocks. Full MCMC run took 20 hours on 4096 processors.• MCMC is overkill for this two-parameter system.

Page 38: Application of the MCMC Method for the Calibration of DSMC Parameters

Second Calibration - VHS Model

• Individual MCMC chains also show the band structure.

Page 39: Application of the MCMC Method for the Calibration of DSMC Parameters

Second Calibration - VHS Model

• The same band structure is seen in a scatterplot of MCMC chain positions and in a contour plot showing the number of MCMC chain positions in any given region.

Page 40: Application of the MCMC Method for the Calibration of DSMC Parameters

Second Calibration - VHS Model

• We can also see the band structure by directly viewing the probabilities at each MCMC chain position.

Omega

Dref(in

meters)

0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 13E-10

3.5E-10

4E-10

4.5E-10

5E-10

5.5E-10

6E-10

Page 41: Application of the MCMC Method for the Calibration of DSMC Parameters

Alsmeyer’s Data – Multiple Mach Numbers

Page 42: Application of the MCMC Method for the Calibration of DSMC Parameters

Alsmeyer’s Data – Multiple Mach Numbers

Omega

Dref(in

meters)

0.5 0.6 0.7 0.8 0.9 13E-10

3.5E-10

4E-10

4.5E-10

5E-10

5.5E-10

6E-10

Page 43: Application of the MCMC Method for the Calibration of DSMC Parameters

MD Data - Valentini and Schwartzentruber (2009)

Page 44: Application of the MCMC Method for the Calibration of DSMC Parameters

MD Data - Valentini and Schwartzentruber (2009)

Omega

Dref(in

meters)

0.5 0.6 0.7 0.8 0.9 13E-10

3.5E-10

4E-10

4.5E-10

5E-10

5.5E-10

6E-10

Omega

Dref(in

meters)

0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 13E-10

3.5E-10

4E-10

4.5E-10

5E-10

5.5E-10

6E-10

Omega

Dref(in

meters)

0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 13E-10

3.5E-10

4E-10

4.5E-10

5E-10

5.5E-10

6E-10

Omega

Dref(in

meters)

0.5 0.55 0.6 0.65 0.7 0.75 0.8 0.85 0.9 0.95 13E-10

3.5E-10

4E-10

4.5E-10

5E-10

5.5E-10

6E-10

Page 45: Application of the MCMC Method for the Calibration of DSMC Parameters

Conclusions/Future Work

• MCMC successfully reproduces the results from a brute-force uniform sampling technique for the calibration of the parameters for the hard-sphere and VHS methods.• The normalized density profile from a single shock is insufficient to uniquely calibrate both parameters of the VHS method.• Temperature and velocity distribution function data provide better calibration for the VHS parameters.• The addition of internal energy modes and chemistry will increase both the number of parameters and the volume of available calibration data.