Browsing by Author "Forth, Shaun A."
Now showing 1 - 20 of 20
Results Per Page
Sort Options
Item Open Access AD tools and prospects for optimal AD in CFD flux Jacobian calculations(2002-01-01T00:00:00Z) Tadjouddine, M.; Forth, Shaun A.; Pryce, J.We consider the problem of linearising the short (approximately 100 lines of) code that defines the numerical fluxes of mass, energy and momentum across a-cell face in a finite volume compressible flow calculation. Typical of such formulations is the numerical flux due to Roe, widely used in the numerical approximation of flow fields containing moderate to strong shocks. Roe's flux takes as input 10 variables describing the flow either side of a cell face and returns as output the 5 variables for the numerical flux. We present results concerning the efficiency of derivative calculations for Roe's flux using several currently available AD tools. We also present preliminary work on deriving near optimal differentiated code using the node elimination approach. We show that such techniques, within a source transformation approach, will yield substantial gains for application code such as the Roe flux.Item Open Access AD Tools and Prospects for Optimal AD in CFD Flux Jacobian Calculations.(2002-01-01T00:00:00Z) Tadjouddine, Mohamed; Forth, Shaun A.; Pryce, John D.We consider the problem of linearising the short (approximately 100 lines of) code that defines the numerical fluxes of mass, energy and momentum across a cell face in a finite volume compressible flow calculation. Typical of such formulations is the numerical flux due to Roe, widely used in the numerical approximation of flow fields containing moderate to strong shocks. Roe's flux takes as input 10 variables describing the flow either side of a cell face and returns as output the 5 variables for the numerical flux. We present results concerning the efficiency of derivative calculations for Roe's flux using several currently available AD tools. We also present preliminary work on deriving near optimal differentiated code using the node elimination approach. We show that such techniques, within a source transformation approach, will yield substantial gains for application code such as the Roe flux.Item Open Access An AD-enabled optimization toolbox in LabVIEW(TM)(2012-07-30T00:00:00Z) Gupta, Abhishek Kr.; Forth, Shaun A.LabVIEW(TM) is a visual programming environment for data acquisition, instrument control and industrial automation. This article presents LVAD, a graphically programmed implementation of forward mode Automatic Differentiation for LabVIEW. Our results show that the overhead of using overloaded AD in LabVIEW is sufficiently low as to warrant further investigation and that, within the graphical programming environment, AD may be made reasonably user friendly. We further introduce a prototype LabVIEW Optimization Toolbox which utilizes LVAD's derivative information. Our toolbox presently contains two main LabVIEW procedures fzero and fmin for calculating roots and minima respectively of an objective function in a single variable. Two algorithms, Newton and Secant, have been implemented in each case. Our optimization package may be applied to graphically coded objective functions, not the simple string definition of functions used by many of the optimizers of LabVIEW's own optimization package.Item Open Access Adjoint Differentiation of a Structural Dynamics Solver.(2006-12-01T00:00:00Z) Tadjouddine, Mohamed; Forth, Shaun A.; Keane, Andy J.The design of a satellite boom using passive vibration control by Keane [J. of Sound and Vibration, 1995, 185(3),441-453] has previously been carried out using an energy function of the design geometry aimed at minimising mechanical noise and vibrations. To minimise this cost function, a Genetic Algorithm (GA) was used, enabling modification of the initial geometry for a better design. To improve efficiency, it is proposed to couple the GA with a local search method involving the gradient of the cost function. In this paper, we detail the generation of an adjoint solver by automatic differentiation via ADIFOR. This has resulted in a gradient code that runs in 7.4 times the time of the function evaluation. This should reduce the rather time-consuming process (over 10 CPU days by using parallel processing) of the GA optimiser for this problem.Item Open Access Aerofoil Optimisation via AD of a Multigrid Cell-Vertex Euler Flow Solver.(2002-01-01T00:00:00Z) Forth, Shaun A.; Evans, Trevor P.We report preliminary results in the use of ADIFOR 2.0 to determine aerodynamic sensitivities of a 2-D airfoil with respect to geometrical variables. Meshes are produced with a hyperbolic interpolation technique. The flow field is calculated using the cell-vertex method of Hall, which incorporates local time-stepping, mesh sequencing and multigrid. We present results and timings using both Finite Differences (FD) and Automatic Differentiation (AD). We investigate the effect of starting the perturbed calculation for FD and the derivative calculation for AD from either the current or freestream conditions and highlight the need for careful implementation of convergence criteria. We attempt to make a comparative study of AD and FD gradients in an aerofoil optimisation, using the DERA CODAS method from the perspective of DERA's eventual aim, 3D viscous optimisation of wing-body configurations.Item Open Access Cranfield University centre of excellence in counter-terrorism(2018-10-04) Forth, Shaun A.; Johnson, Stephen; Burrows, Stephanie J.; Sheldon, Robert PhilipThe formation of Cranfield University’s Counterterrorism Centre of Excellence was announced in late summer 2017. It has been established in conjunction with Pool Re, a mutual reinsurer which underwrites over £2 trillion of exposure to terrorism risk in the UK. The centre will provide thought leadership in catastrophic and unconventional terrorism loss assessment and mitigation so as to improve the UK’s economic resilience. We introduce the reinsurance industry for a technical audience to explain the rationale for the Counterterrorism Centre of Excellence. The centre’s aims and some results from preliminary simulations on explosive blast in a complex city centre performed in collaboration with reinsurance broker Guy Carpenter are presented. The prospects for physics-based simulation, for terrorist insurance loss estimation and for encouraging mitigation in reinsurance are outlined.Item Open Access A Discrete Sensitivity Solver for an Industrial CFD Code via Automatic Differentiation.(2002-01-01T00:00:00Z) Standingford, David W. F.; Forth, Shaun A.We report on development and validation of a discrete sensitivity solver for the BAE SYSTEMS/Airbus UK CFD code FLITE-3D. We used the Odyssee automatic differentiation (AD) tool to create a discrete forward sensitivity version of FLITE-3D. Validation is via comparing sensitivities of integrated forces (lift, drag, side force) with respect to (w.r.t) angle-of-attack (AoA) , calculated using the sensitivity solver and central-differencing. Validation, w.r.t. changes in the surface and field mesh, is performed by setting sensitivities of all mesh related quantities as if rotated by an infinitesimal angle D alpha. Such sensitivities correspond to those calculated w.r.t AoA alpha. We investigate calculating discrete sensitivities under 2 approximations regarding so-called mesh sensitivities, concluding that they are not applicable to FLITE- 3D. We present results of a wing geometry optimisation using forward sensitivities.Item Open Access An Efficient overloaded implementation of forward mode automatic differentiation in MATLAB(ACM Association for Computing Machinery, 2006-06-01T00:00:00Z) Forth, Shaun A.The Mad package described here facilitates the evaluation of first derivatives of multi-dimensional functions that are defined by computer codes written in MATLAB. The underlying algorithm is the well-known forward mode of automatic differentiation implemented via operator overloading on variables of the class fmad. The main distinguishing feature of this MATLAB implementation is the separation of the linear combination of derivative vectors into a separate derivative vector class derivvec. This allows for the straightforward performance optimisation of the overall package. Additionally by internally using a matrix (two-dimensional) representation of arbitrary dimension directional derivatives we may utilise MATLAB"s sparse matrix class to propagate sparse directional derivatives for MATLAB code which uses arbitrary dimension arrays. On several examples the package is shown to be more efficient than Verma"s ADMAT package.© ACM, 2006. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in ACM Transactions on Mathematical Software (TOMS) Volume 32 , Issue 2 (June 2006) 195 - 222, 2006 ISSN:0098-3500 http://doi.acm.org/10.1145/1141885.1141888Item Open Access Hierarchical automatic differentiation by vertex elimination and source transformation.(Springer-verlag, 2003-01-01T00:00:00Z) Tadjouddine, Mohamed; Forth, Shaun A.; Pryce, John D.We present a hierarchical scheme to extend the applicability of automatic differentiation (AD) by vertex elimination from the basic block level to code with branches and subroutine calls. We introduce the ELIAD tool that implements our scheme. Results from computational fluid dynamics (CFD) flux linearisations show runtime speedup by a typical factor of two over both finite-differencing and traditional forward and reverse modes of AD.Item Open Access High-Level Interfaces for the MAD (Matlab Automatic Differentiation) Package.(2004-01-01T00:00:00Z) Forth, Shaun A.; Ketzscher, RobertPresently, the MAD Automatic Differentiation package for matlab comprises an overloaded implementation of forward mode AD via the fmad class. A key design feature of the fmad class is a separation of the storage and manipulation of directional derivatives into a separate derivvec class. Within the derivvec class, directional derivatives are stored as matrices (2-D arrays) allowing for the use of either full or sparse matrix storage. All manipulation of directional derivatives is performed using high-level matrix operations - thus assuring efficiency. In this paper: we briefly review implementation of the fmad class; we then present our implementation of high-level interfaces allowing users to utilise MAD in conjunction with stiff ODE solvers and numerical optimization routines; we then demonstrate the ease and utility of this approach via several examples; we conclude with a road-map for future developments.Item Open Access Improving the Performance of the Vertex Elimination Algorithm for Derivative Calculation.(2006-01-01T00:00:00Z) Tadjouddine, Mohamed; Bodman, Frances; Pryce, John D.; Forth, Shaun A.In previous work [TOMS, 2004, 30(3), 266--299], we used Markowitz-like heuristics aiming to find elimination sequences that minimise the number of floating-point operations (flops) for vertex elimination Jacobian code. We also used the depth-first traversal algorithm to reorder the statements of the Jacobian code with the aim of reducing the number of memory accesses. In this work, we study the effects of reducing flops or memory accesses within the vertex elimination algorithm for Jacobian calculation. On RISC processors, we observed that for data residing in registers, the number of flops gives a good estimate of the execution time, while for out-of-register data, the execution time is dominated by the time for memory access operations. We also present a statement reordering scheme based on a greedy-list scheduling algorithm using ranking functions. This statement reordering will enable us to trade-off the exploitation of the instruction level parallelism of such processors with the reduction in memory accesses.Item Open Access Jacobian Code Generated by Source Transformation and Vertex Elimination can be as Efficient as Hand-Coding(ACM Association for Computing Machinery, 2004-09-01T00:00:00Z) Forth, Shaun A.; Tadjouddine, Mohamed; Pryce, John D.; Reid, John K.This article presents the first extended set of results from ELIAD, a source- transformation implementation of the vertex-elimination Automatic Differentiation approach to calculating the Jacobians of functions defined by Fortran code (Griewank and Reese, Automatic Differentiation of Algorithms: Theory, Implementation, and Application, 1991, pp. 126-135). We introduce the necessary theory in terms of well known algorithms of numerical linear algebra applied to the linear, extended Jacobian system that prescribes the relationship between the derivatives of all variables in the function code. Using an example, we highlight the potential for numerical instability in vertex-elimination. We describe the source transformation implementation of our tool ELIAD and present results from five test cases, four of which are taken from the MINPACK- 2 collection (Averick et al, Report ANL/MCS-TM-150, 1692) and for which hand- coded Jacobian codes are available. On five computer/compiler platforms, we show that the Jacobian code obtained by ELIAD is as efficient as hand-coded Jacobian code. It is also between 2 to 20 times more efficient than that produced by current, state of the art, Automatic Differentiation tools even when such tools make use of sophisticated techniques such as sparse Jacobian compression. We demonstrate the effectiveness of reverse-ordered pre-elimination from the (successively updated) extended Jacobian system of all intermediate variables used once. Thereafter, the monotonic forward/reverse ordered eliminations of all other intermediates is shown to be very efficient. On only one test case were orderings determined by the Markowitz or related VLR heuristics found superior. A re-ordering of the statements of the Jacobian code, with the aim of reducing reads and writes of data from cache to registers, was found to have mixed effects but could be very beneficial.Item Open Access Partial validation of CFD blast simulation in a cityscape environment featuring structural failure(WIT Press, 2021-06-24) Burrows, Stephanie Jeanne; Forth, Shaun A.; Sheldon, Robert PhilipWe demonstrate the capabilities of computational fluid dynamics (CFD) and a pressure-impulse failure model to predict blast loading and structural damage in a geometrically complex cityscape. The simulated loading is compared against experimental results for 69 g PE4 in a 1/50th scale model with wood-framed and plywood-faced buildings; data were collected from 11 pressure gauges throughout. In the initial simulation, geometric features were modeled as perfectly rigid, whereas buildings in the experiment failed: the resulting differences between the model and experiment allowed us to evaluate CFD when failure occurs. Simulated peak pressures during the first positive phase were still within 20% of experiment at most pressure gauges. However, errors in first phase impulses were around 40%, suggesting that building-failure effects are greater toward the phase end. Then, to model building-failure effects, we attempted to fit pressure-impulse failure curves to the plywood-faces: this proved too simplistic to produce realistic blast wave behavior due to the various, complex failure modes. This work illustrates key limitations of available CFD software and the pressure-impulse fail- ure model – both industry-standard tools to determine structural response to blast. We conclude that stronger coupling between blast loading and structural response is needed where significant failure occurs.Item Open Access Performance Issues for Vertex Elimination Methods in Computing Jacobians using Automatic Differentiation.(Springer-Verlag, 2002) Tadjouddine, Mohamed; Forth, Shaun A.; Pryce, John D.; Reid, John K.In this paper, we present first results from EliAD, a new automatic differentiation tool. EliAD uses the Elimination approach for Automatic Differentation first advocated by Griewank and Reese (Automatic Differentiation of Algorithms, SIAM, 1991 p126-135). EliAD implements this technique via source-transformation, writing new Fortran code for the Jacobians of functions defined by existing Fortran code. Our results are from applying EliAD to the Roe flux routine commonly used in computational fluid dynamics. We show that we can produce code that calculates the associated flux Jacobian approaching or in excess of twice the speed of current state-of-the-art automatic differentiation tools. However, in order to do so we must take into account the architecture on which we are running our code. In particular, on processors that do not support out-of-order execution, we must reorder our derivative code so that values may be reused while in arithmetic registers in order that the floating point arithmetic pipeline may be kept full.Item Open Access Preface: Advances in algorithmic differentiation(Taylor and Francis, 2018-09-12) Christianson, Bruce; Forth, Shaun A.; Griewank, AndreasItem Open Access Robust aircraft conceptual design using automatic differentiation in Matlab(2008-08-17T00:00:00Z) Padulo, Mattia; Forth, Shaun A.; Guenov, Marin D.; Bischof, C. H.; Bücker, H. M.; Hovland, P.; Naumann, U.; Utke, J.The need for robust optimisation in aircraft conceptual design, for which the design parameters are assumed stochastic, is introduced. We highlight two approaches, first-order method of moments and Sigma-Point reduced quadrature, to estimate the mean and variance of the design’s outputs. The method of moments requires the design model’s differentiation and here, since the model is implemented in Matlab, is performed using the AD tool MAD. Gradient-based constrained optimisation of the stochastic model is shown to be more efficient using AD-obtained gradients than finite-differencing. A post-optimality analysis, performed using ADenabled third-order method of moments and Monte-Carlo analysis, confirms the attractiveness of the Sigma-Point technique for uncertainty propagation.Item Open Access Simplifying multivariate second-order response surfaces by fitting constrained models using automatic differentiation.(Asa American Statistical Association, 2005-08-01T00:00:00Z) Forth, Shaun A.; Ringrose, Trevor J.Multivariate regression models for second-order polynomial response surfaces are proposed. The fitted surfaces for each response variable are constrained so that when expressed in their canonical forms they have features in common, such as common stationary points or common sets of eigenvectors. This can greatly reduce the number of parameters required and make the set of surfaces easier to interpret together, at the cost of a greater computational burden. However, the use of automatic differentiation within the package Matlab is shown to be easy and to reduce this burden considerably. We describe the models and how to fit them and derive standard errors, and report a small simulation study and an application to a dataset.Item Open Access Source Transformation for MATLAB Automatic Differentiation.(Springer-Verlag, 2005-12) Kharche, Rahul V.; Forth, Shaun A.We present MSAD, a source transformation implementation of forward mode automatic differentiation for MATLAB. MSAD specialises and inlines operations from the fmad and derivvec classes of the MAD package. The operator overloading overheads inherent in MAD are eliminated while preserving the derivvec class's optimised derivative combination operations. Compared to MAD, results from several test cases demonstrate significant improvement in efficiency across all problem sizes.Item Open Access A sparse matrix approach to reverse mode automatic differentiation in Matlab(2010-04-12) Forth, Shaun A.; Sharma, N KWe review the extended Jacobian approach to automatic di erentiation of a user- supplied function and highlight the Schur complement form's forward and reverse variants. We detail a Matlab operator overloaded approach to construct the extended Jacobian that enables the function Jacobian to be computed using Matlab's sparse matrix operations. Memory and runtime costs are reduced using a variant of the hoisting technique of Bischof (Issues in Parallel Automatic Di erentiation, 1991). On ve of the six mesh-based gradient test problems from The MINPACK-2 Test Problem Collection (Averick et al, 1992) the reverse variant of our extended Jacobian technique with hoisting outperforms the sparse storage forward mode of the MAD package (Forth, ACM T. Math. Software. 32, 2006). For increasing problems size the ratio of gradient to function cpu time is seen to be bounded, if not decreasing, in line with Griewank and Walther's (Evaluating Derivatives, SIAM, 2008) cheap gradient principle.Item Open Access User Guide for MAD - A Matlab Automatic Differentiation Package, TOMLAB/MAD, Version 1.4 The Forward Mode.(2007-06-20T00:00:00Z) Forth, Shaun A.; Edvall, MarcusMAD is a Matlab library of functions and utilities for the automatic differentiation of Matlab functions/statements via operator and function overloading. Currently the forward mode of automatic differentiation is supported via the fmad class. For a single directional derivative objects of the fmad class use Matlab arrays of the same size for a variable's value and its directional derivative. Multiple directional derivatives are stored in objects of the derivvec class allowing for an internal 2-D, matrix storage so allowing the use of sparse matrix storage for derivatives and ensuring efficient linear combination of derivative vectors via high-level Matlab functions. This user guide covers: installation of MAD on UNIX and PC platforms using TOMLAB /MAD basic use of the forward mode for differentiating expressions and functions advanced use of the forward mode including: dynamic propagation of sparse derivatives, sparse derivatives via compression, differentiating implicitly defined functions, control of dependencies, use of high-level interfaces for solving ODEs and optimization problems outside of the TOMLAB framework, differentiating black-box functions for which derivatives are known.