Cmfe Termproj
Cmfe Termproj
Due: 30/11/2023
Fall 2023
Computational Methods for Engineers Topis for Term Project
Notes:
• Select one of the following topics and choose your partner to make a group to work to-
gether. You have to register your topic and partner in 30/11/2023.
• One group has no more than two members. Group with only one member is appreciated.
• You are encouraged to solve your problem using several methods. You should make more
numerical experiments to convince readers.
• Submit your report (in PDF) and your codes (in Python) to my email before the deadline.
We do not allow you to submit files with other formats.
2. Perform all its calculations with your Python programs (instead of Excel. You can use
some reliable subroutine from scipy.)
3. Compare your numerical results with each other and with the one of this section. Do
your optimization results satisfy Karush-Kuhn-Tucker conditions? Show it.
4. Suppose that we are not able to calculate gradients exactly. Can you apply some technique
to approximate gradients? Richardson extrapolation method should be a good one to
consider. Repeat your calculations with this gradient approximation.
2. Perform all calculations with your Python programs. (You can apply some reliable sub-
routine from scipy). Your optimization results should satisfy Karush-Kuhn-Tucker con-
ditions. Verify it.
3. Given the range of diameters and thicknesses as in the problem. Repeat your computa-
tions with several values of compressive load P , e.g.
4. Suppose that we are not able to calculate gradients exactly. Can you apply some technique
to approximate gradients? Richardson extrapolation method should be a good one to
consider. Repeat your calculations with this gradient approximation.
1
Computational Methods for Engineers Topis for Term Project
4. Suppose that we are not able to calculate gradients exactly. Can you apply some technique
to approximate gradients? Richardson extrapolation method should be a good one to
consider. Repeat your calculations with this gradient approximation.
2
Computational Methods for Engineers Topis for Term Project
1. Read the case study and explain as many details as possible. You are encouraged to
explain how to obtain Eq. (24.5). What is f pzq?
2. Perform all its calculations using your Python programs. Compare your results with the
one of this section.
3. Can you apply Romberg’s method to calculate the integrals with given tolerance? Repeat
your calculations using this method with the tolerance ϵ “ 10´7 .
3. You are encouraged to apply other methods to perform the calculations of this case study.
If possible, do it. Assess and compare your results with the one in [Chapra et al., 2010].
3. You are encouraged to apply other methods to perform the calculations of this case study.
If possible, do it. Assess and compare your results with the one in [Chapra et al., 2010].
3. You are encouraged to apply other methods to perform the calculations of this case study.
If possible, do it. Assess and compare your results with the one in [Chapra et al., 2010].
3. You are encouraged to apply other methods to perform the calculations of this case study.
If possible, do it. Assess and compare your results with the one in [Chapra et al., 2010].
3
Computational Methods for Engineers Topis for Term Project
Topic 12: Develop an inhouse Python code to calculate multidimensional constrained opti-
mization problems using augmented Lagrange method with gradient-based search methods.
Hint:
1. For the problem with only equality contraints:
Minimize f pxq, x P RN ,
bj pxq “ 0, j “ 1, 2, . . . , J.
for N, J P N. We use the augmented Lagrange function
J
ÿ ÿ J
Apx, zk , ηk q “ f pxq ` zk,j bj pxq ` ηk b2j pxq (1)
j“1 j“1
looooomooooon
penalty
4
Computational Methods for Engineers Topis for Term Project
where ηk and zk,i are some parameters, k is index of iterative process. Or, we have another
form (read the previous item):
› ›2
› 1 ›
Apx, zk , ηk q “ f pxq ` ηk ›› zk ` b r k pxq› ,
2ηk ›
" *
1 zk,i
zk,i ` rbk,i pxq “ max 0, ai pxq ` .
2ηk 2ηk
To compute the gradient of A (with respect to x) we have the following note:
3. For the function
ϕpxq “ pmaxt0, xuqp , p ą 1,
we can see that
ϕ1 pxq “ ppmaxt0, xuqp´1 .
Indeed, by writing
"
p xp , x ě 0,
ϕpxq “ pmaxt0, xuq “ ,
0, x ă 0.
we have
x ą 0, ϕ1 pxq “ pxp´1 ,
x ă 0, ϕ1 pxq “ 0,
x “ 0, ϕ1 p0` q “ 0 “ ϕ1 p0´ q.
Therefore
ϕpbpxqq “ pmaxt0, bpxquqp , p ą 1, ϕ1 pbpxqq “ ppmaxt0, bpxquqp´1 b1 pxq.
Use the above suggestions to develop your code and make as many test cases as possible. Assess
your results.
Topic 13: Example 6.3, [Boyd et al., 2004, Section 6.3, p. 307].
1. Read the example and explain as much as possible. What is the purpose of calculation?
What are input, output of the problem? What are the regularization parameters? Clarify.
2. For the reference signal ydes :
$
’
’ 0, 0 ď t ă 50
1, 50 ď t ă 100
&
ydes ptq “ , t “ 0, 1, 2, . . . , 200
’
’ ´1, 100 ď t ă 150
0, t ě 150
%
and the impulse response as in the example, using your Python programs, perform the
calculations as shown in Figure 6.6. Plot your results.
3. Can you propose a better values of the regularization parameters? Explain your calcula-
tions and assess your results.
5
Computational Methods for Engineers Topis for Term Project
Topic 14: You can propose your term project topic. But it should relate to
• Optimization
• Least-Squares Regression
• Interpolation
• Numerical Integration
• Numerical Differentiation
In this case, make your proposal to be clear and worth considering, and send it (in PDF format)
to my email before 30/11/2023.
References
[Boyd et al., 2004] Boyd, S., Boyd, S. P., and Vandenberghe, L. (2004). Convex optimization.
Cambridge university press.
[Chapra et al., 2010] Chapra, S. C., Canale, R. P., et al. (2010). Numerical methods for engi-
neers. Boston: McGraw-Hill Higher Education,.