-
Notifications
You must be signed in to change notification settings - Fork 1
/
lec11.1-penalty_method.html
250 lines (209 loc) · 59.6 KB
/
lec11.1-penalty_method.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!DOCTYPE HTML>
<html lang="en" class="light" dir="ltr">
<head>
<!-- Book generated using mdBook -->
<meta charset="UTF-8">
<title>Penalty Method - Physics-Based Simulation</title>
<!-- Custom HTML head -->
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff">
<link rel="icon" href="favicon.svg">
<link rel="shortcut icon" href="favicon.png">
<link rel="stylesheet" href="css/variables.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/chrome.css">
<link rel="stylesheet" href="css/print.css" media="print">
<!-- Fonts -->
<link rel="stylesheet" href="FontAwesome/css/font-awesome.css">
<link rel="stylesheet" href="fonts/fonts.css">
<!-- Highlight.js Stylesheets -->
<link rel="stylesheet" href="highlight.css">
<link rel="stylesheet" href="tomorrow-night.css">
<link rel="stylesheet" href="ayu-highlight.css">
<!-- Custom theme stylesheets -->
<!-- MathJax -->
<script async src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
</head>
<body class="sidebar-visible no-js">
<div id="body-container">
<!-- Provide site root to javascript -->
<script>
var path_to_root = "";
var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "navy" : "light";
</script>
<!-- Work around some values being stored in localStorage wrapped in quotes -->
<script>
try {
var theme = localStorage.getItem('mdbook-theme');
var sidebar = localStorage.getItem('mdbook-sidebar');
if (theme.startsWith('"') && theme.endsWith('"')) {
localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
}
if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
}
} catch (e) { }
</script>
<!-- Set the theme before any content is loaded, prevents flash -->
<script>
var theme;
try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
if (theme === null || theme === undefined) { theme = default_theme; }
var html = document.querySelector('html');
html.classList.remove('light')
html.classList.add(theme);
var body = document.querySelector('body');
body.classList.remove('no-js')
body.classList.add('js');
</script>
<input type="checkbox" id="sidebar-toggle-anchor" class="hidden">
<!-- Hide / unhide sidebar before it is displayed -->
<script>
var body = document.querySelector('body');
var sidebar = null;
var sidebar_toggle = document.getElementById("sidebar-toggle-anchor");
if (document.body.clientWidth >= 1080) {
try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
sidebar = sidebar || 'visible';
} else {
sidebar = 'hidden';
}
sidebar_toggle.checked = sidebar === 'visible';
body.classList.remove('sidebar-visible');
body.classList.add("sidebar-" + sidebar);
</script>
<nav id="sidebar" class="sidebar" aria-label="Table of contents">
<div class="sidebar-scrollbox">
<ol class="chapter"><li class="chapter-item expanded affix "><a href="preface.html">Preface</a></li><li class="chapter-item expanded affix "><li class="part-title">Simulation with Optimization</li><li class="chapter-item expanded "><a href="lec1-discrete_space_time.html"><strong aria-hidden="true">1.</strong> Discrete Space and Time</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec1.1-solid_rep.html"><strong aria-hidden="true">1.1.</strong> Representations of a Solid Geometry</a></li><li class="chapter-item expanded "><a href="lec1.2-newton_2nd_law.html"><strong aria-hidden="true">1.2.</strong> Newton's Second Law</a></li><li class="chapter-item expanded "><a href="lec1.3-time_integration.html"><strong aria-hidden="true">1.3.</strong> Time Integration</a></li><li class="chapter-item expanded "><a href="lec1.4-explicit_time_integration.html"><strong aria-hidden="true">1.4.</strong> Explicit Time Integration</a></li><li class="chapter-item expanded "><a href="lec1.5-implicit_time_integration.html"><strong aria-hidden="true">1.5.</strong> Implicit Time integration</a></li><li class="chapter-item expanded "><a href="lec1.6-summary.html"><strong aria-hidden="true">1.6.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec2-opt_framework.html"><strong aria-hidden="true">2.</strong> Optimization Framework</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec2.1-opt_time_integration.html"><strong aria-hidden="true">2.1.</strong> Optimization Time Integrator</a></li><li class="chapter-item expanded "><a href="lec2.2-dirichlet_BC.html"><strong aria-hidden="true">2.2.</strong> Dirichlet Boundary Conditions</a></li><li class="chapter-item expanded "><a href="lec2.3-contact.html"><strong aria-hidden="true">2.3.</strong> Contact</a></li><li class="chapter-item expanded "><a href="lec2.4-friction.html"><strong aria-hidden="true">2.4.</strong> Friction</a></li><li class="chapter-item expanded "><a href="lec2.5-summary.html"><strong aria-hidden="true">2.5.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec3-projected_Newton.html"><strong aria-hidden="true">3.</strong> Projected Newton</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec3.1-conv_issue_Newton.html"><strong aria-hidden="true">3.1.</strong> Convergence of Newton's Method</a></li><li class="chapter-item expanded "><a href="lec3.2-line_search.html"><strong aria-hidden="true">3.2.</strong> Line Search</a></li><li class="chapter-item expanded "><a href="lec3.3-grad_based_opt.html"><strong aria-hidden="true">3.3.</strong> Gradient-Based Optimization</a></li><li class="chapter-item expanded "><a href="lec3.4-summary.html"><strong aria-hidden="true">3.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec4-2d_mass_spring.html"><strong aria-hidden="true">4.</strong> Case Study: 2D Mass-Spring*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec4.1-discretizations.html"><strong aria-hidden="true">4.1.</strong> Spatial and Temporal Discretizations</a></li><li class="chapter-item expanded "><a href="lec4.2-inertia.html"><strong aria-hidden="true">4.2.</strong> Inertia Term</a></li><li class="chapter-item expanded "><a href="lec4.3-mass_spring_energy.html"><strong aria-hidden="true">4.3.</strong> Mass-Spring Potential Energy</a></li><li class="chapter-item expanded "><a href="lec4.4-opt_time_integrator.html"><strong aria-hidden="true">4.4.</strong> Optimization Time Integrator</a></li><li class="chapter-item expanded "><a href="lec4.5-sim_with_vis.html"><strong aria-hidden="true">4.5.</strong> Simulation with Visualization</a></li><li class="chapter-item expanded "><a href="lec4.6-gpu_accel.html"><strong aria-hidden="true">4.6.</strong> GPU-Accelerated Simulation</a></li><li class="chapter-item expanded "><a href="lec4.6-summary.html"><strong aria-hidden="true">4.7.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Boundary Treatments</li><li class="chapter-item expanded "><a href="lec5-dirichlet_BC_solve.html"><strong aria-hidden="true">5.</strong> Dirichlet Boundary Conditions*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec5.1-equality_constraints.html"><strong aria-hidden="true">5.1.</strong> Equality Constraint Formulation</a></li><li class="chapter-item expanded "><a href="lec5.2-DOF_elimin.html"><strong aria-hidden="true">5.2.</strong> DOF Elimination Method</a></li><li class="chapter-item expanded "><a href="lec5.3-hanging_square.html"><strong aria-hidden="true">5.3.</strong> Case Study: Hanging Sqaure*</a></li><li class="chapter-item expanded "><a href="lec5.4-summary.html"><strong aria-hidden="true">5.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec6-slip_DBC.html"><strong aria-hidden="true">6.</strong> Slip Dirichlet Boundary Conditions</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec6.1-axis_aligned.html"><strong aria-hidden="true">6.1.</strong> Axis-Aligned Slip DBC</a></li><li class="chapter-item expanded "><a href="lec6.2-change_of_vars.html"><strong aria-hidden="true">6.2.</strong> Change of Variables</a></li><li class="chapter-item expanded "><a href="lec6.3-general_slip_DBC.html"><strong aria-hidden="true">6.3.</strong> General Slip DBC</a></li><li class="chapter-item expanded "><a href="lec6.4-summary.html"><strong aria-hidden="true">6.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec7-dist_barrier.html"><strong aria-hidden="true">7.</strong> Distance Barrier for Nonpenetration</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec7.1-signed_dists.html"><strong aria-hidden="true">7.1.</strong> Signed Distances</a></li><li class="chapter-item expanded "><a href="lec7.2-dist_barrier_formulation.html"><strong aria-hidden="true">7.2.</strong> Distance Barrier</a></li><li class="chapter-item expanded "><a href="lec7.3-sol_accuracy.html"><strong aria-hidden="true">7.3.</strong> Solution Accuracy</a></li><li class="chapter-item expanded "><a href="lec7.4-summary.html"><strong aria-hidden="true">7.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec8-filter_line_search.html"><strong aria-hidden="true">8.</strong> Filter Line Search*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec8.1-tunneling.html"><strong aria-hidden="true">8.1.</strong> Tunneling Issue</a></li><li class="chapter-item expanded "><a href="lec8.2-nonpenetration_traj.html"><strong aria-hidden="true">8.2.</strong> Penetration-free Trajectory</a></li><li class="chapter-item expanded "><a href="lec8.3-square_drop.html"><strong aria-hidden="true">8.3.</strong> Case Study: Square Drop*</a></li><li class="chapter-item expanded "><a href="lec8.4-summary.html"><strong aria-hidden="true">8.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec9-friction.html"><strong aria-hidden="true">9.</strong> Frictional Contact</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec9.1-smooth_fric.html"><strong aria-hidden="true">9.1.</strong> Smooth Dynamic-Static Transition</a></li><li class="chapter-item expanded "><a href="lec9.2-semi_imp_fric.html"><strong aria-hidden="true">9.2.</strong> Semi-Implicit Discretization</a></li><li class="chapter-item expanded "><a href="lec9.3-fixed_point_iter.html"><strong aria-hidden="true">9.3.</strong> Fixed-Point Iteration</a></li><li class="chapter-item expanded "><a href="lec9.4-summary.html"><strong aria-hidden="true">9.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec10-square_on_slope.html"><strong aria-hidden="true">10.</strong> Case Study: Square On Slope*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec10.1-ground_to_slope.html"><strong aria-hidden="true">10.1.</strong> From Ground To Slope</a></li><li class="chapter-item expanded "><a href="lec10.2-slope_fric.html"><strong aria-hidden="true">10.2.</strong> Slope Friction</a></li><li class="chapter-item expanded "><a href="lec10.3-summary.html"><strong aria-hidden="true">10.3.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec11-mov_DBC.html"><strong aria-hidden="true">11.</strong> Moving Boundary Conditions*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec11.1-penalty_method.html" class="active"><strong aria-hidden="true">11.1.</strong> Penalty Method</a></li><li class="chapter-item expanded "><a href="lec11.2-compress_square.html"><strong aria-hidden="true">11.2.</strong> Case Study: Compressing Square*</a></li><li class="chapter-item expanded "><a href="lec11.3-summary.html"><strong aria-hidden="true">11.3.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Hyperelasticity</li><li class="chapter-item expanded "><a href="lec12-kinematics.html"><strong aria-hidden="true">12.</strong> Kinematics Theory</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec12.1-continuum_motion.html"><strong aria-hidden="true">12.1.</strong> Continuum Motion</a></li><li class="chapter-item expanded "><a href="lec12.2-deformation.html"><strong aria-hidden="true">12.2.</strong> Deformation</a></li><li class="chapter-item expanded "><a href="lec12.3-summary.html"><strong aria-hidden="true">12.3.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec13-strain_energy.html"><strong aria-hidden="true">13.</strong> Strain Energy</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec13.1-rigid_null_rot_inv.html"><strong aria-hidden="true">13.1.</strong> Rigid Null Space and Rotation Invariance</a></li><li class="chapter-item expanded "><a href="lec13.2-polar_svd.html"><strong aria-hidden="true">13.2.</strong> Polar Singular Value Decomposition</a></li><li class="chapter-item expanded "><a href="lec13.3-simp_model_inversion.html"><strong aria-hidden="true">13.3.</strong> Simplified Models and Invertibility</a></li><li class="chapter-item expanded "><a href="lec13.4-summary.html"><strong aria-hidden="true">13.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec14-stress_and_derivatives.html"><strong aria-hidden="true">14.</strong> Stress and Its Derivatives</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec14.1-stress.html"><strong aria-hidden="true">14.1.</strong> Stress</a></li><li class="chapter-item expanded "><a href="lec14.2-compute_P.html"><strong aria-hidden="true">14.2.</strong> Computing Stress</a></li><li class="chapter-item expanded "><a href="lec14.3-compute_stress_deriv.html"><strong aria-hidden="true">14.3.</strong> Computing Stress Derivatives</a></li><li class="chapter-item expanded "><a href="lec14.4-summary.html"><strong aria-hidden="true">14.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec15-inv_free_elasticity.html"><strong aria-hidden="true">15.</strong> Case Study: Inversion-free Elasticity*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec15.1-linear_tri_elem.html"><strong aria-hidden="true">15.1.</strong> Linear Triangle Elements</a></li><li class="chapter-item expanded "><a href="lec15.2-energy_grad_hess.html"><strong aria-hidden="true">15.2.</strong> Computing Energy, Gradient, and Hessian</a></li><li class="chapter-item expanded "><a href="lec15.3-filter_line_search.html"><strong aria-hidden="true">15.3.</strong> Filter Line Search for Non-Inversion</a></li><li class="chapter-item expanded "><a href="lec15.4-summary.html"><strong aria-hidden="true">15.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Governing Equations</li><li class="chapter-item expanded "><a href="lec16-strong_and_weak_forms.html"><strong aria-hidden="true">16.</strong> Strong and Weak Forms</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec16.1-mass_conserv.html"><strong aria-hidden="true">16.1.</strong> Conservation of Mass</a></li><li class="chapter-item expanded "><a href="lec16.2-momentum_conserv.html"><strong aria-hidden="true">16.2.</strong> Conservation of Momentum</a></li><li class="chapter-item expanded "><a href="lec16.3-weak_form.html"><strong aria-hidden="true">16.3.</strong> Weak Form</a></li><li class="chapter-item expanded "><a href="lec16.4-summary.html"><strong aria-hidden="true">16.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec17-disc_weak_form.html"><strong aria-hidden="true">17.</strong> Discretization of Weak Forms</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec17.1-discrete_space.html"><strong aria-hidden="true">17.1.</strong> Discrete Space</a></li><li class="chapter-item expanded "><a href="lec17.2-discrete_time.html"><strong aria-hidden="true">17.2.</strong> Discrete Time</a></li><li class="chapter-item expanded "><a href="lec17.3-summary.html"><strong aria-hidden="true">17.3.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec18-BC_and_fric.html"><strong aria-hidden="true">18.</strong> Boundary Conditions and Frictional Contact</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec18.1-incorporate_BC.html"><strong aria-hidden="true">18.1.</strong> Incorporating Boundary Conditions</a></li><li class="chapter-item expanded "><a href="lec18.2-normal_contact.html"><strong aria-hidden="true">18.2.</strong> Normal Contact for Nonpenetration</a></li><li class="chapter-item expanded "><a href="lec18.3-barrier_potential.html"><strong aria-hidden="true">18.3.</strong> Barrier Potential</a></li><li class="chapter-item expanded "><a href="lec18.4-friction_force.html"><strong aria-hidden="true">18.4.</strong> Friction Force</a></li><li class="chapter-item expanded "><a href="lec18.5-summary.html"><strong aria-hidden="true">18.5.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><li class="part-title">Finite Element Method</li><li class="chapter-item expanded "><a href="lec19-linear_FEM.html"><strong aria-hidden="true">19.</strong> Linear Finite Elements</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec19.1-linear_disp_field.html"><strong aria-hidden="true">19.1.</strong> Piecewise Linear Displacement Field</a></li><li class="chapter-item expanded "><a href="lec19.2-mass_matrix.html"><strong aria-hidden="true">19.2.</strong> Mass Matrix and Lumping</a></li><li class="chapter-item expanded "><a href="lec19.3-elasticity_term.html"><strong aria-hidden="true">19.3.</strong> Elasticity Term</a></li><li class="chapter-item expanded "><a href="lec19.4-summary.html"><strong aria-hidden="true">19.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec20-pw_linear_boundary.html"><strong aria-hidden="true">20.</strong> Piecewise Linear Boundaries</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec20.1-boundary_conditions.html"><strong aria-hidden="true">20.1.</strong> Boundary Conditions</a></li><li class="chapter-item expanded "><a href="lec20.2-obstacle_contact.html"><strong aria-hidden="true">20.2.</strong> Solid-Obstacle Contact</a></li><li class="chapter-item expanded "><a href="lec20.3-self_contact.html"><strong aria-hidden="true">20.3.</strong> Self-Contact</a></li><li class="chapter-item expanded "><a href="lec20.4-summary.html"><strong aria-hidden="true">20.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec21-2d_self_contact.html"><strong aria-hidden="true">21.</strong> Case Study: 2D Self-Contact*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec21.1-scene_setup.html"><strong aria-hidden="true">21.1.</strong> Scene Setup and Boundary Element Collection</a></li><li class="chapter-item expanded "><a href="lec21.2-point_edge_dist.html"><strong aria-hidden="true">21.2.</strong> Point-Edge Distance</a></li><li class="chapter-item expanded "><a href="lec21.3-barrier_and_derivatives.html"><strong aria-hidden="true">21.3.</strong> Barrier Energy and Its Derivatives</a></li><li class="chapter-item expanded "><a href="lec21.4-ccd.html"><strong aria-hidden="true">21.4.</strong> Continuous Collision Detection</a></li><li class="chapter-item expanded "><a href="lec21.5-summary.html"><strong aria-hidden="true">21.5.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec22-2d_self_fric.html"><strong aria-hidden="true">22.</strong> 2D Frictional Self-Contact*</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec22.1-disc_and_approx.html"><strong aria-hidden="true">22.1.</strong> Discretization and Approximation</a></li><li class="chapter-item expanded "><a href="lec22.2-precompute.html"><strong aria-hidden="true">22.2.</strong> Precomputing Normal and Tangent Information</a></li><li class="chapter-item expanded "><a href="lec22.3-fric_and_derivatives.html"><strong aria-hidden="true">22.3.</strong> Friction Energy and Its Derivatives</a></li><li class="chapter-item expanded "><a href="lec22.4-summary.html"><strong aria-hidden="true">22.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec23-3d_elastodynamics.html"><strong aria-hidden="true">23.</strong> 3D Elastodynamics</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec23.1-kinematics.html"><strong aria-hidden="true">23.1.</strong> Kinematics</a></li><li class="chapter-item expanded "><a href="lec23.2-mass_matrix.html"><strong aria-hidden="true">23.2.</strong> Mass Matrix</a></li><li class="chapter-item expanded "><a href="lec23.3-elasticity.html"><strong aria-hidden="true">23.3.</strong> Elasticity</a></li><li class="chapter-item expanded "><a href="lec23.4-summary.html"><strong aria-hidden="true">23.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="lec24-3d_fric_self_contact.html"><strong aria-hidden="true">24.</strong> 3D Frictional Self-Contact</a></li><li><ol class="section"><li class="chapter-item expanded "><a href="lec24.1-barrier_and_dist.html"><strong aria-hidden="true">24.1.</strong> Barrier and Distances</a></li><li class="chapter-item expanded "><a href="lec24.2-collision_detection.html"><strong aria-hidden="true">24.2.</strong> Collision Detection</a></li><li class="chapter-item expanded "><a href="lec24.3-friction.html"><strong aria-hidden="true">24.3.</strong> Friction</a></li><li class="chapter-item expanded "><a href="lec24.4-summary.html"><strong aria-hidden="true">24.4.</strong> Summary</a></li></ol></li><li class="chapter-item expanded "><a href="bibliography.html">Bibliography</a></li></ol>
</div>
<div id="sidebar-resize-handle" class="sidebar-resize-handle">
<div class="sidebar-resize-indicator"></div>
</div>
</nav>
<!-- Track and set sidebar scroll position -->
<script>
var sidebarScrollbox = document.querySelector('#sidebar .sidebar-scrollbox');
sidebarScrollbox.addEventListener('click', function(e) {
if (e.target.tagName === 'A') {
sessionStorage.setItem('sidebar-scroll', sidebarScrollbox.scrollTop);
}
}, { passive: true });
var sidebarScrollTop = sessionStorage.getItem('sidebar-scroll');
sessionStorage.removeItem('sidebar-scroll');
if (sidebarScrollTop) {
// preserve sidebar scroll position when navigating via links within sidebar
sidebarScrollbox.scrollTop = sidebarScrollTop;
} else {
// scroll sidebar to current active section when navigating via "next/previous chapter" buttons
var activeSection = document.querySelector('#sidebar .active');
if (activeSection) {
activeSection.scrollIntoView({ block: 'center' });
}
}
</script>
<div id="page-wrapper" class="page-wrapper">
<div class="page">
<div id="menu-bar-hover-placeholder"></div>
<div id="menu-bar" class="menu-bar sticky">
<div class="left-buttons">
<label id="sidebar-toggle" class="icon-button" for="sidebar-toggle-anchor" title="Toggle Table of Contents" aria-label="Toggle Table of Contents" aria-controls="sidebar">
<i class="fa fa-bars"></i>
</label>
<button id="theme-toggle" class="icon-button" type="button" title="Change theme" aria-label="Change theme" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
<i class="fa fa-paint-brush"></i>
</button>
<ul id="theme-list" class="theme-popup" aria-label="Themes" role="menu">
<li role="none"><button role="menuitem" class="theme" id="light">Light</button></li>
<li role="none"><button role="menuitem" class="theme" id="rust">Rust</button></li>
<li role="none"><button role="menuitem" class="theme" id="coal">Coal</button></li>
<li role="none"><button role="menuitem" class="theme" id="navy">Navy</button></li>
<li role="none"><button role="menuitem" class="theme" id="ayu">Ayu</button></li>
</ul>
<button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
<i class="fa fa-search"></i>
</button>
</div>
<h1 class="menu-title">Physics-Based Simulation</h1>
<div class="right-buttons">
<a href="print.html" title="Print this book" aria-label="Print this book">
<i id="print-button" class="fa fa-print"></i>
</a>
</div>
</div>
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
<input type="search" id="searchbar" name="searchbar" placeholder="Search this book ..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
</form>
<div id="searchresults-outer" class="searchresults-outer hidden">
<div id="searchresults-header" class="searchresults-header"></div>
<ul id="searchresults">
</ul>
</div>
</div>
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
});
</script>
<div id="content" class="content">
<main>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css">
<h2 id="penalty-method"><a class="header" href="#penalty-method">Penalty Method</a></h2>
<p>At the beginning of each time step towards time <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6667em;vertical-align:-0.0833em;"></span><span class="mord mathnormal">n</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1</span></span></span></span>, we evaluate nodal position <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.1555em;vertical-align:-0.3013em;"></span><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7079em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord mathbf">x</span></span><span style="top:-3.0134em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2222em;"><span class="mord">^</span></span></span></span></span></span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8542em;"><span style="top:-2.3987em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span><span style="top:-3.1031em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">n</span><span class="mbin mtight">+</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.3013em;"><span></span></span></span></span></span></span></span></span></span> for each BC node <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.03148em;">k</span></span></span></span> based on their prescribed motions. During each Newton iteration <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6595em;"></span><span class="mord mathnormal">i</span></span></span></span>, for the iterate <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8247em;"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8247em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span></span></span></span></span></span></span></span>, we define a velocity residual to assess how close each BC node is to meeting its target:
<span class="katex-display"><span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.2578em;vertical-align:-0.3831em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8747em;"><span style="top:-2.453em;margin-left:-0.0278em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">BC</span></span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.3831em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:2.0074em;vertical-align:-0.686em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.3214em;"><span style="top:-2.314em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord mathnormal">h</span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.677em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord">1</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.686em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mord">∥</span><span class="mord"><span class="mord mathbf">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8747em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.1555em;vertical-align:-0.2914em;"></span><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7079em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord mathbf">x</span></span><span style="top:-3.0134em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2222em;"><span class="mord">^</span></span></span></span></span></span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.4086em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">n</span><span class="mbin mtight">+</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.2914em;"><span></span></span></span></span></span></span><span class="mord">∥.</span></span></span></span></span>
When <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.2439em;vertical-align:-0.4192em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8247em;"><span style="top:-2.4169em;margin-left:-0.0278em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">BC</span></span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.4192em;"><span></span></span></span></span></span></span></span></span></span> falls below a specific tolerance <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">ϵ</span></span></span></span> for any BC node <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.03148em;">k</span></span></span></span>, we can fix the node at its current location <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.1078em;vertical-align:-0.2831em;"></span><span class="mord"><span class="mord mathbf">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8247em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.2831em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≈</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.1555em;vertical-align:-0.3013em;"></span><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7079em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord mathbf">x</span></span><span style="top:-3.0134em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2222em;"><span class="mord">^</span></span></span></span></span></span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8542em;"><span style="top:-2.3987em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span><span style="top:-3.1031em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">n</span><span class="mbin mtight">+</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.3013em;"><span></span></span></span></span></span></span></span></span></span> and apply the <a href="lec5.2-DOF_elimin.html">DOF elimination method</a> in the subsequent iterations. This is particularly straightforward in scenes with only static BCs, where the DOF elimination method is directly applied.</p>
<p>For other BC nodes <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.03148em;">k</span></span></span></span> that are far from their target locations, we introduce new penalty terms to the Incremental Potential for each of these nodes:
<span class="katex-display"><span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.7936em;vertical-align:-0.686em;"></span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.1076em;"><span style="top:-2.314em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord">2</span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.677em;"><span class="pstrut" style="height:3em;"></span><span class="mord"><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.686em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mord"><span class="mord mathnormal">m</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3361em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mord">∥</span><span class="mord"><span class="mord mathbf">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3361em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">−</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.1555em;vertical-align:-0.2914em;"></span><span class="mord"><span class="mord accent"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7079em;"><span style="top:-3em;"><span class="pstrut" style="height:3em;"></span><span class="mord mathbf">x</span></span><span style="top:-3.0134em;"><span class="pstrut" style="height:3em;"></span><span class="accent-body" style="left:-0.2222em;"><span class="mord">^</span></span></span></span></span></span></span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.4086em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">n</span><span class="mbin mtight">+</span><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.2914em;"><span></span></span></span></span></span></span><span class="mord"><span class="mord">∥</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mord">.</span><span class="enclosing" id="eq:lec11:DBC_penalty"></span></span><span class="tag"><span class="strut" style="height:1.7936em;vertical-align:-0.686em;"></span><span class="mord text"><span class="mord">(</span><span class="mord"><span class="mord">11.1.1</span></span><span class="mord">)</span></span></span></span></span></span>
Here, <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">m</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3361em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> represents the nodal mass, allowing for intuitive setting of the penalty stiffness <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>, as the Hessian of the penalty term with respect to BC nodes is simply <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> times that of the inertia term.</p>
<blockquote>
<p><strong><a name="rm:lec11:CO_penalty"></a>
<em>Remark 11.1.1.</em></strong>
For collision obstacles (CO), precisely calculating node masses is challenging due to unknown factors like density. A practical approach is to assume a density similar to that of the simulated solids in the scene. This assumption makes the diagonal entries on the Hessian of the penalty terms roughly <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> times that of the inertia term.</p>
<p>For codimensional COs such as shells, rods, and particles, the key is to consider a reasonably large thickness when calculating their volumes. This helps in ensuring that their physical properties align more closely with those of the main simulation bodies.</p>
</blockquote>
<p>Setting the penalty stiffness <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> appropriately can be challenging. If <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> is set too low, it may not effectively move the BC node towards its target. Conversely, a too high <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> can lead to numerical issues. Thus, we initially set <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> to a reasonably large value and adaptively increase it as necessary.</p>
<p>During the Newton solve, if there are BC nodes <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.03148em;">k</span></span></span></span> where <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.2439em;vertical-align:-0.4192em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.02778em;">r</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8247em;"><span style="top:-2.4169em;margin-left:-0.0278em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">BC</span></span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">i</span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.4192em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">≥</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal">ϵ</span></span></span></span> at the point of Newton convergence, we double the penalty stiffness <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> to <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7278em;vertical-align:-0.0833em;"></span><span class="mord">2</span><span class="mord">×</span></span></span></span> its current value and continue the Newton solve. This process is repeated until all BCs are satisfactorily met at convergence.</p>
<blockquote>
<p><strong><a name="rm:lec11:numerical_issues"></a>
<em>Remark 11.1.2.</em></strong>
In practice, with double precision floating-point numbers, initializing <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> below <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord">1</span><span class="mord"><span class="mord">0</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">6</span></span></span></span></span></span></span></span></span></span></span> is typically sufficient, given that the Hessian of the stiff penalty terms is purely diagonal. However, if certain BCs remain unsatisfied even when <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">κ</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3283em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord text mtight"><span class="mord mtight">M</span></span></span></span></span><span class="vlist-s"></span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span> is increased to above <span class="katex"><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord">1</span><span class="mord"><span class="mord">0</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">10</span></span></span></span></span></span></span></span></span></span></span></span>, the optimization process may stall due to severe numerical errors. This stalling occurs because extremely stiff penalty terms are in conflict with the contact barriers. However, such a scenario would likely only occur under a rare CO/BC setting in a manner far more extreme than what is tested in <a href="lec2.3-contact.html#fig:lec2:contact_and_friction">Figure 2.3.1</a>.</p>
</blockquote>
</main>
<nav class="nav-wrapper" aria-label="Page navigation">
<!-- Mobile navigation buttons -->
<a rel="prev" href="lec11-mov_DBC.html" class="mobile-nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next prefetch" href="lec11.2-compress_square.html" class="mobile-nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
<div style="clear: both"></div>
</nav>
</div>
</div>
<nav class="nav-wide-wrapper" aria-label="Page navigation">
<a rel="prev" href="lec11-mov_DBC.html" class="nav-chapters previous" title="Previous chapter" aria-label="Previous chapter" aria-keyshortcuts="Left">
<i class="fa fa-angle-left"></i>
</a>
<a rel="next prefetch" href="lec11.2-compress_square.html" class="nav-chapters next" title="Next chapter" aria-label="Next chapter" aria-keyshortcuts="Right">
<i class="fa fa-angle-right"></i>
</a>
</nav>
</div>
<script>
window.playground_copyable = true;
</script>
<script src="elasticlunr.min.js"></script>
<script src="mark.min.js"></script>
<script src="searcher.js"></script>
<script src="clipboard.min.js"></script>
<script src="highlight.js"></script>
<script src="book.js"></script>
<!-- Custom JS scripts -->
</div>
</body>
</html>