Automatic differentiation in C++ using expression templates and. application to a flow control problem

2001 ◽  
Vol 3 (4) ◽  
pp. 197-208 ◽  
Author(s):  
Pierre Aubert ◽  
Nicolas Di Césaré ◽  
Olivier Pironneau
Author(s):  
Yury Evtushenko ◽  
Vladimir Zubov ◽  
Anna Albu

The optimal control of the metal solidification process in casting is considered. Quality of the obtained detail greatly depends on how the crystallization process proceeds. It is known that to obtain a model of a good quality it is desirable that the phase interface would be as close as possible to a plane and that the speed of its motion would be close to prescribed. The proposed mathematical model of the crystallization process is based on a three dimensional two phase initial-boundary value problem of the Stefan type. The velocity of the mold in the furnace is used as the control. The control satisfying the technological requirements is determined by solving the posed optimal control problem. The optimal control problem was solved numerically using gradient optimization methods. The effective method is proposed for calculation of the cost functional gradient. It is based on the fast automatic differentiation technique and produces the exact gradient for the chosen approximation of the optimal control problem.


2013 ◽  
Vol 135 (10) ◽  
Author(s):  
Xingsi Han ◽  
Siniša Krajnović

The numerical study reported here deals with the passive flow control around a two-dimensional D-shaped bluff body at a Reynolds number of Re=3.6×104. A small circular control cylinder located in the near wake behind the main bluff body is employed as a local disturbance of the shear layer and the wake. 3D simulations are carried out using a newly developed very large eddy simulation (VLES) method, based on the standard k − ε turbulence model. The aim of this study is to validate the performance of this method for the complex flow control problem. Numerical results are compared with available experimental data, including global flow parameters and velocity profiles. Good agreements are observed. Numerical results suggest that the bubble recirculation length is increased by about 36% by the local disturbance of the small cylinder, which compares well to the experimental observations in which the length is increased by about 38%. A drag reduction of about 18% is observed in the VLES simulation, which is quite close to the experimental value of 17.5%. It is found that the VLES method is able to predict the flow control problem quite well.


1982 ◽  
Vol 9 (4) ◽  
pp. 265-278 ◽  
Author(s):  
M. Bielli ◽  
G. Calicchio ◽  
B. Nicoletti ◽  
S. Ricciardelli

2021 ◽  
Author(s):  
Yuxuan Jing ◽  
Rami M. Younis

Abstract Automatic differentiation software libraries augment arithmetic operations with their derivatives, thereby relieving the programmer of deriving, implementing, debugging, and maintaining derivative code. With this encapsulation however, the responsibility of code optimization relies more heavily on the AD system itself (as opposed to the programmer and the compiler). Moreover, given that there are multiple contexts in reservoir simulation software for which derivatives are required (e.g. property package and discrete operator evaluations), the AD infrastructure must also be adaptable. An Operator Overloading AD design is proposed and tested to provide scalability and computational efficiency seemlessly across memory- and compute-bound applications. This is achieved by 1) use of portable and standard programming language constructs (C++17 and OpenMP 4.5 standards), 2) adopting a vectorized programming interface, 3) lazy evaluation via expression templates, and 4) multiple memory alignment and layout policies. Empirical analysis is conducted on various kernels spanning various arithmetic intensity and working set sizes. Cache- aware roofline analysis results show that the performance and scalability attained are reliably ideal. In terms of floapting point operations executed per second, the performance of the AD system matches optimized hand-code. Finally, the implementation is benchmarked using the Automatically Differentiable Expression Templates Library (ADETL).


Sign in / Sign up

Export Citation Format

Share Document