Using Hyper-Dual Numbers To Construct Parameterized Reduced...
Transcript of Using Hyper-Dual Numbers To Construct Parameterized Reduced...
Unlimited Release
Using Hyper-Dual Numbers To Construct
Parameterized Reduced-Order ModelsMatthew R. Brake, Sandia National Laboratories
Jeffrey A. Fike, Stanford University
Sean D. Topping, University of ArizonaNovember 19, 2014
Sandia National Laboratories is a multi-program laboratory managed and operated by Sandia Corporation, a wholly owned subsidiary of Lockheed MartinCorporation, for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-AC04-94AL85000. SAND NO. 2014-19346 C
Unlimited Release
Unlimited Release
Motivation
Real manufactured systems differ from the idealized systems that are
analyzed using computational analysis tools.
Random variations in geometry and material properties
Uncertainty Quantification (UQ) techniques typically require very
many samples to assess the effects of these random variations.
Analysis of very many, slightly different systems
Analyzing geometric variations would require the generation of
very many, slightly different meshes
Creating one good quality mesh can dominate the analysis time
Creating very many meshes can be prohibitive
Parameterized Reduced-Order Models (PROMs) reduce the cost of
sampling compared to using high-fidelity, Full-Order Model.
Unlimited Release
November 19, 2014 2
Unlimited Release
Parameterized Reduced-Order Models (PROMs)
Create parameterized models using a Taylor series expansion about
the nominal design:
f̄(x +∆x) = f(x) + (∆x)f ′(x) +(∆x)2
2f ′′(x) +
(∆x)3
6f ′′′(x) + . . . .
Quantity of interest f(x):
Mass and stiffness matrices from Finite-Element Analysis (FEA)
Outputs of FEA, such as displacements or natural frequencies
Perturbations∆x: variations in geometry or material properties
Terminology:
Parameterized Full-Order Model if applied to FEA quantities
Parameterized Reduced-Order Model (PROM) if applied to a
Reduced-Order Model (ROM)
Craig-Bampton (C-B) Component Mode Synthesis (CMS)
approach [Craig and Bampton 1968]
Unlimited Release
November 19, 2014 3
Unlimited Release
Parameterization Strategies
For a system composed of multiple components, parameterization
can be introduced at several possible levels.
Component Matrices
Construct CMS Matrices
Assemble CMS System
Analyze CMS System
Assemble FE System
Analyze FE System
Parameterize Component Matrices
Parameterize FE System Matrices Parameterize CMS System Matrices
Parameterize CMS Component Matrices
Parameterize Eigenvalues Parameterize Eigenvalues
Finite Element Branch Component Mode Synthesis Branch
Parameterize Component Matrices
Evaluate effectiveness of creating PROMs at each level
Unlimited Release
November 19, 2014 4
Unlimited Release
Parameterization Strategies
For a system composed of multiple components, parameterization
can be introduced at several possible levels.
Component Matrices
Construct CMS Matrices
Assemble CMS System
Analyze CMS System
Assemble FE System
Analyze FE System
Parameterize Component Matrices
Parameterize FE System Matrices Parameterize CMS System Matrices
Parameterize CMS Component Matrices
Parameterize Eigenvalues Parameterize Eigenvalues
Finite Element Branch Component Mode Synthesis Branch
Parameterize Component Matrices
Evaluate effectiveness of creating PROMs at each level
Unlimited Release
November 19, 2014 4
Unlimited Release
Derivative Calculation Methods
Finite-Difference Formulas:
Accuracy depends on particular formula used
Require several evaluations of perturbed systems
For geometric variations this requires several meshes
Captures actual behavior away from nominal design
May enable accurate representation of large perturbations
Hyper-Dual Numbers [Fike and Alonso 2011]:
Derivative calculations are exact to machine precision
Perturbations applied to non-real part of the number
Real part contains nominal design and is unperturbed
Requires only one mesh for the nominal design, and information
on how mesh would change with geometric variations
Derivatives produced using information at a single point, may
only be valid for small perturbations from nominal
Unlimited Release
November 19, 2014 5
Unlimited Release
Hyper-Dual Numbers
Complex Numbers:
a+ bi
i2 = −1
Dual Numbers: [Study 1903]
a+ bε
ε2 = 0, ε 6= 0
Quaternions: [Hamilton 1843]
a+ bi + cj + dk
i2 = j2 = k2 = −1
ij = −ji = k
Hyper-Dual Numbers: [Fike and Alonso 2011]
a+ bε1 + cε2 + dε1ε2
ε21 = ε22 = (ε1ε2)2 = 0
ε1 6= ε2 6= ε1ε2 6= 0
ε1ε2 = ε2ε1
Unlimited Release
November 19, 2014 6
Unlimited Release
Hyper-Dual Numbers
Complex Numbers:
a+ bi
i2 = −1
Dual Numbers: [Study 1903]
a+ bε
ε2 = 0, ε 6= 0
Quaternions: [Hamilton 1843]
a+ bi + cj + dk
i2 = j2 = k2 = −1
ij = −ji = k
Hyper-Dual Numbers: [Fike and Alonso 2011]
a+ bε1 + cε2 + dε1ε2
ε21 = ε22 = (ε1ε2)2 = 0
ε1 6= ε2 6= ε1ε2 6= 0
ε1ε2 = ε2ε1
Unlimited Release
November 19, 2014 6
Unlimited Release
Hyper-Dual Numbers
Complex Numbers:
a+ bi
i2 = −1
Dual Numbers: [Study 1903]
a+ bε
ε2 = 0, ε 6= 0
Quaternions: [Hamilton 1843]
a+ bi + cj + dk
i2 = j2 = k2 = −1
ij = −ji = k
Hyper-Dual Numbers: [Fike and Alonso 2011]
a+ bε1 + cε2 + dε1ε2
ε21 = ε22 = (ε1ε2)2 = 0
ε1 6= ε2 6= ε1ε2 6= 0
ε1ε2 = ε2ε1
Unlimited Release
November 19, 2014 6
Unlimited Release
Hyper-Dual Numbers
Complex Numbers:
a+ bi
i2 = −1
Dual Numbers: [Study 1903]
a+ bε
ε2 = 0, ε 6= 0
Quaternions: [Hamilton 1843]
a+ bi + cj + dk
i2 = j2 = k2 = −1
ij = −ji = k
Hyper-Dual Numbers: [Fike and Alonso 2011]
a+ bε1 + cε2 + dε1ε2
ε21 = ε22 = (ε1ε2)2 = 0
ε1 6= ε2 6= ε1ε2 6= 0
ε1ε2 = ε2ε1
Unlimited Release
November 19, 2014 6
Unlimited Release
Derivative Calculations using Complex Numbers
Taylor series for a real valued function subject to a perturbation in
the imaginary direction:
f(x + hi) = f(x) + hf ′(x)i − 1
2!h2f ′′(x)− h3f ′′′(x)
3!i + ...
f(x+hi) =
(f(x)− 1
2!h2f ′′(x) + ...
)︸ ︷︷ ︸
real
+ h
(f ′(x)− 1
3!h2f ′′′(x) + ...
)i︸ ︷︷ ︸
imaginary
First-Derivative Complex-Step Approximation: [Martins, Kroo, and Alonso 2000 and
Martins, Sturdza, and Alonso 2003]
f ′(x) =Im [f(x + hi)]
h+O(h2)
Unlimited Release
November 19, 2014 7
Unlimited Release
Derivative Calculations using Complex Numbers
Taylor series for a real valued function subject to a perturbation in
the imaginary direction:
f(x + hi) = f(x) + hf ′(x)i − 1
2!h2f ′′(x)− h3f ′′′(x)
3!i + ...
f(x+hi) =
(f(x)− 1
2!h2f ′′(x) + ...
)︸ ︷︷ ︸
real
+ h
(f ′(x)− 1
3!h2f ′′′(x) + ...
)i︸ ︷︷ ︸
imaginary
First-Derivative Complex-Step Approximation: [Martins, Kroo, and Alonso 2000 and
Martins, Sturdza, and Alonso 2003]
f ′(x) =Im [f(x + hi)]
h+O(h2)
Unlimited Release
November 19, 2014 7
Unlimited Release
Derivative Calculations using Complex Numbers
Taylor series for a real valued function subject to a perturbation in
the imaginary direction:
f(x + hi) = f(x) + hf ′(x)i − 1
2!h2f ′′(x)− h3f ′′′(x)
3!i + ...
f(x+hi) =
(f(x)− 1
2!h2f ′′(x) + ...
)︸ ︷︷ ︸
real
+ h
(f ′(x)− 1
3!h2f ′′′(x) + ...
)i︸ ︷︷ ︸
imaginary
First-Derivative Complex-Step Approximation: [Martins, Kroo, and Alonso 2000 and
Martins, Sturdza, and Alonso 2003]
f ′(x) =Im [f(x + hi)]
h+O(h2)
Unlimited Release
November 19, 2014 7
Unlimited Release
Derivative Calculations using Hyper-Dual Numbers
Taylor series with a dual number perturbation:
f(x + hε) = f(x)︸︷︷︸real
+ hf ′(x)ε︸ ︷︷ ︸non-real
Taylor series with a hyper-dual perturbation:
f(x+h1ε1+h2ε2+0ε1ε2) = f(x)+h1f′(x)ε1+h2f
′(x)ε2+h1h2f′′(x)ε1ε2
Taylor series when including an ε3 perturbation:
f(x + h1ε1 + h2ε2 + h3ε3 + 0ε1ε2 + 0ε1ε3 + 0ε2ε3 + 0ε1ε2ε3)
= f(x) + h1f′(x)ε1 + h2f
′(x)ε2 + h3f′(x)ε3 + h1h2f
′′(x)ε1ε2
+ h1h3f′′(x)ε1ε3 + h2h3f
′′(x)ε2ε3 + h1h2h3f′′′(x)ε1ε2ε3
Unlimited Release
November 19, 2014 8
Unlimited Release
Derivative Calculations using Hyper-Dual Numbers
Taylor series with a dual number perturbation:
f(x + hε) = f(x)︸︷︷︸real
+ hf ′(x)ε︸ ︷︷ ︸non-real
Taylor series with a hyper-dual perturbation:
f(x+h1ε1+h2ε2+0ε1ε2) = f(x)+h1f′(x)ε1+h2f
′(x)ε2+h1h2f′′(x)ε1ε2
Taylor series when including an ε3 perturbation:
f(x + h1ε1 + h2ε2 + h3ε3 + 0ε1ε2 + 0ε1ε3 + 0ε2ε3 + 0ε1ε2ε3)
= f(x) + h1f′(x)ε1 + h2f
′(x)ε2 + h3f′(x)ε3 + h1h2f
′′(x)ε1ε2
+ h1h3f′′(x)ε1ε3 + h2h3f
′′(x)ε2ε3 + h1h2h3f′′′(x)ε1ε2ε3
Unlimited Release
November 19, 2014 8
Unlimited Release
Derivative Calculations using Hyper-Dual Numbers
Taylor series with a dual number perturbation:
f(x + hε) = f(x)︸︷︷︸real
+ hf ′(x)ε︸ ︷︷ ︸non-real
Taylor series with a hyper-dual perturbation:
f(x+h1ε1+h2ε2+0ε1ε2) = f(x)+h1f′(x)ε1+h2f
′(x)ε2+h1h2f′′(x)ε1ε2
Taylor series when including an ε3 perturbation:
f(x + h1ε1 + h2ε2 + h3ε3 + 0ε1ε2 + 0ε1ε3 + 0ε2ε3 + 0ε1ε2ε3)
= f(x) + h1f′(x)ε1 + h2f
′(x)ε2 + h3f′(x)ε3 + h1h2f
′′(x)ε1ε2
+ h1h3f′′(x)ε1ε3 + h2h3f
′′(x)ε2ε3 + h1h2h3f′′′(x)ε1ε2ε3
Unlimited Release
November 19, 2014 8
Unlimited Release
Accuracy of Derivative Calculation Methods
10−20
10−10
100
1010
10−20
100
1020
Step Size
Err
or
10−30
10−20
10−10
100
(a)
(b)
Plots:
(a) First-Derivative
Calculations
(b) Second-Derivative
Calculations
Legend:
• Forward-Difference
Formula
∗ Complex-Step
Approximation
◦ Hyper-Dual Numbers
Unlimited Release
November 19, 2014 9
Unlimited Release
Stepped Beam Example
L
W
lHH2
x
Consider variations in geometry and material properties of
middle section
Create parameterized models for various quantities:
Eigenvalues, mass and stiffness matrices, etc.
Vary order of Taylor series and derivative calculation method:
Expansion includes up to: second, third, or fourth derivatives
Derivatives computed using finite differences or hyper-dual
numbers
Fourth-Order Finite-Difference Parameterization (FDP)
Third-Order Hyper-Dual Parameterization (HDP)
Unlimited Release
November 19, 2014 10
Unlimited Release
Varying Young’s Modulus of Middle Section
40 70
0
1
1.5
Na
tura
l F
req
ue
ncy,
kH
z
Elastic Modulus of Middle Section, GPA
100
0.5
Legend:
∗ Analytical Solution
• FDP, 4th Order,
CMS matrices
◦ FDP, 4th Order,
eigenvalues
· · · HDP, 3rd Order, FE
matrices
– · – HDP, 3rd Order, FE
eigenvalues
— HDP, 3rd Order,
CMS matrices
– – HDP, 3rd Order,
CMS eigenvalues
Unlimited Release
November 19, 2014 11
Unlimited Release
Varying Material Density of Middle Section
1500 2750
0
1
1.5
Na
tura
l F
req
ue
ncy,
kH
z
3Density of Middle Section, kg/m
4000
0.5
Legend:
∗ Analytical Solution
• FDP, 4th Order,
CMS matrices
◦ FDP, 4th Order,
eigenvalues
· · · HDP, 3rd Order, FE
matrices
– · – HDP, 3rd Order, FE
eigenvalues
— HDP, 3rd Order,
CMS matrices
– – HDP, 3rd Order,
CMS eigenvalues
Unlimited Release
November 19, 2014 12
Unlimited Release
Varying Cross-Sectional Height of Middle Section
0.02 0.03
0
1
1.5
Na
tura
l F
req
ue
ncy,
kH
z
Cross-Sectional Height of Middle Section, m
0.04
0.5
Legend:
∗ Analytical Solution
• FDP, 4th Order,
CMS matrices
◦ FDP, 4th Order,
eigenvalues
· · · HDP, 3rd Order, FE
matrices
– · – HDP, 3rd Order, FE
eigenvalues
— HDP, 3rd Order,
CMS matrices
– – HDP, 3rd Order,
CMS eigenvalues
Unlimited Release
November 19, 2014 13
Unlimited Release
Varying Cross-Sectional Width of Middle Section
0.02 0.03
0
1
1.5
Na
tura
l F
req
ue
ncy,
kH
z
Cross-Sectional Width of Middle Section, m
0.04
0.5
Legend:
∗ Analytical Solution
• FDP, 4th Order,
CMS matrices
◦ FDP, 4th Order,
eigenvalues
· · · HDP, 3rd Order, FE
matrices
– · – HDP, 3rd Order, FE
eigenvalues
— HDP, 3rd Order,
CMS matrices
– – HDP, 3rd Order,
CMS eigenvalues
Unlimited Release
November 19, 2014 14
Unlimited Release
Varying Length of Middle Section
0.15 0.3
0
1
2
Na
tura
l F
req
ue
ncy,
kH
z
Length of Middle Section, m
0.45
Legend:
∗ Analytical Solution
• FDP, 4th Order,
CMS matrices
◦ FDP, 4th Order,
eigenvalues
· · · HDP, 3rd Order, FE
matrices
– · – HDP, 3rd Order, FE
eigenvalues
— HDP, 3rd Order,
CMS matrices
– – HDP, 3rd Order,
CMS eigenvalues
Unlimited Release
November 19, 2014 15
Unlimited Release
Varying Location of Middle Section’s Center
0.25 0.45
0
1
2
Na
tura
l F
req
ue
ncy,
kH
z
Location of Middle Section’s Center, m
0.65
Legend:
∗ Analytical Solution
• FDP, 4th Order,
CMS matrices
◦ FDP, 4th Order,
eigenvalues
· · · HDP, 3rd Order, FE
matrices
– · – HDP, 3rd Order, FE
eigenvalues
— HDP, 3rd Order,
CMS matrices
– – HDP, 3rd Order,
CMS eigenvalues
Unlimited Release
November 19, 2014 16
Unlimited Release
Summary, Part 1
Range of perturbations with < 1% error in 5th natural frequency:
Middle Section’s Middle Section’s Middle Section’s
Method Width, B2 Height, H2 Modulus, E2
FDP, 2nd Order CMS [-85%, 327%] [-32%, >1000%] [<-99%, >1000%]
FDP, 2nd Order Eigenvalues [-95%, 152%] [-38%, 70%] [-50%, 74%]
FDP, 4th Order CMS [-91%, 228%] [-69%, 844%] [-99%, >1000%]
FDP, 4th Order Eigenvalues [-93%, 231%] [-56%, 51%] [-66%, 92%]
HDP, 2nd Order FE [<-99%, >1000%] [-29%, >1000%] [<-99%, >1000%]
HDP, 2nd Order Full CMS [-5%, 327%] [-5%, 799%] [<-99%, >1000%]
HDP, 2nd Order Reduced CMS [-19%, 800%] [-19%, 800%] [<-99%, >1000%]
HDP, 2nd Order Eigenvalues [<-99%, 153%] [-40%, 57%] [-52%, 83%]
HDP, 3rd Order FE [<-99%, >1000%] [<-99%, >1000%] [<-99%, >1000%]
HDP, 3rd Order Full CMS [-13%, 14%] [-13%, 14%] [<-99%, >1000%]
HDP, 3rd Order Reduced CMS [-32%, 35%] [-32%, 35%] [<-99%, >1000%]
HDP, 3rd Order Eigenvalues [<-99%, 182%] [-42%, 52%] [-61%, 95%]
Unlimited Release
November 19, 2014 17
Unlimited Release
Summary, Part 2
Range of perturbations with < 1% error in 5th natural frequency:
Middle Section’s Middle Section’s Middle Section’s
Method Density, ρ2 Location, ` Length,W
FDP, 2nd Order CMS [-72%, 67%] [-15%, 12%] [-34%, 21%]
FDP, 2nd Order Eigenvalues [-54%, 69%] [-15%, 17%] [-85%, 30%]
FDP, 4th Order CMS [-87%, 78%] [-21%, 17%] [-48%, 28%]
FDP, 4th Order Eigenvalues [-73%, 94%] [-18%, 26%] [-51%, 35%]
HDP, 2nd Order FE [<-99%, >1000%] [-5%, 3%] [-3%, 3%]
HDP, 2nd Order Full CMS [-6%, 67%] [-2%, 2%] [-33%, 2%]
HDP, 2nd Order Reduced CMS [-19%, 68%] [-9%, 8%] [-33%, 10%]
HDP, 2nd Order Eigenvalues [<-99%, 154%] [-12%, 14%] [-82%, 29%]
HDP, 3rd Order FE [<-99%, >1000%] [-4%, 4%] [-6%, 6%]
HDP, 3rd Order Full CMS [-13%, 14%] [-5%, 4%] [-5%, 5%]
HDP, 3rd Order Reduced CMS [-32%, 36%] [-13%, 12%] [-30%, 21%]
HDP, 3rd Order Eigenvalues [-64%, 78%] [-20%, 17%] [-32% 45%]
Unlimited Release
November 19, 2014 18
Unlimited Release
Conclusions
Explored multiple ways of creating parameterized models:
Parameterization introduced at several points in the analysis
process, accuracy depends on type of variation:
Cross-section or material properties: parameterize FE matrices
Location or length of middle section: parameterize eigenvalues
Taylor series truncated at second-, third-, or fourth-derivative
terms
Increasing the order of the Taylor series results in more accurate
parameterized models
Derivatives computed using finite differences and hyper-dual
numbers
Finite-difference calculations tend to be more accurate for a
larger range of perturbations
For geometric perturbations, finite differences require several
meshes whereas hyper-dual numbers only require a single mesh
Unlimited Release
November 19, 2014 19
Unlimited Release
Questions?
This work was funded in part by the U.S. Department of Energy’s Predictive
Science Academic Alliance Program (PSAAP) Center at Stanford University.
Hyper-dual number implementations can be downloaded from:
http://adl.stanford.edu/hyperdual
Unlimited Release
November 19, 2014 20