Browsing by Author "Forth, Shaun A."
Now showing 1 - 20 of 25
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, 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 Blast wave ingress into a room through an opening – review of past research and US DoD UFC 3-340-02(SAGE Publications, 2024-10-19) Eytan, Alex; Forth, Shaun A.; Pickering, Erik G.; Hazael, Rachael; Burrows, Stephanie J.Blast wave ingress into a room through a facade opening results in complex pressure-time loadings on interior surfaces due to shock diffraction and interior reflections. The U.S. DoD UFC 3-340-02 Structures to Resist the Effects of Accidental Explosions includes a method to predict internal loading for such cases. Parameters such as the opening size, room dimensions and the external pressure wave characteristics influence the interior loading. Recent work suggests that the UFC methodology might overpredict the interior loading by some 600%. Such conservatism can result in over-engineered or prohibitively expensive protective solutions. In this paper we critically review the methodology of the UFC, that of Kaplan’s preceding work (on which the UFC relies), and the experimental data that informed both these works. Through a series of 45 case-studies we compare the UFC and Kaplan’s predictions with those of a computational fluid dynamics (CFD) model. The UFC consistently overpredicts the CFD area-averaged peak pressure of the back wall by up to 290% and the side-wall by up to 425%. Similarly, the UFC overpredicted the CFD side wall positive phase impulse by up to 565%. By contrast, the UFC predicted back wall positive phase impulse was similar to the CFD results. As our CFD results for side and back walls are area averaged, and not solely for the wall centre-point, as in other recent work, our paper gives support for the use of CFD prediction over the UFC for cost-effective design of structures to resist blast ingress.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 Data supporting: 'Partial validation of CFD blast simulation in a cityscape environment featuring structural failure'(Cranfield University, 2022-08-31 16:57) Burrows, Stephanie; Forth, Shaun A.; Sheldon, RobertData for "Partial validation of CFD blast simulation in a cityscape environment featuring structural failure" by Stephanie J Burrows, Shaun A Forth & Robert Sheldon. Submitted for publication. Contents: - Description of algorithm, which extracts bulk phase quantities from an experimental time series. - Matlab functions necessary to extract bulk phase quantities from an experimental time series. - Experimental output from pressure gauges from the experiment described in the attached paper.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(Association for Computing Machinery (ACM), 2006-06-01) Forth, Shaun A.The Mad package described here facilitates the evaluation of first derivatives of multidimensional 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 optimization of the overall package. Additionally, by internally using a matrix (two-dimensional) representation of arbitrary dimension directional derivatives, we may utilize 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 [Verma 1998a].Item Open Access Hierarchical automatic differentiation by vertex elimination and source transformation(Springer, 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 Indirect boundary element methods for modelling bubbles under three dimensional deformation(2009-01-22T16:40:48Z) Lindkvist, Gaute; Forth, Shaun A.The nonlinear behaviour of gas and vapour bubbles is a complex phenomenon which plays a signi cant role in many natural and man-made processes. For example, bubbles excited by an acoustic eld play important roles in lithotripsy, drug delivery, ultrasonic imaging, surface cleaning and give rise to the phenomenon of sonoluminescence (light emission from a bubble excited by sound). In such contexts, the oscillation of even a single bubble is not yet fully understood, let alone the behaviour of multiple bubbles interacting with each other. An essential part of understanding such problems is un- derstanding the complex and sometimes unpredictable coupling between the oscillation of the bubble volume and the bubble shape, a problem requiring experimental research, theoretical work and numerical studies. In this Thesis we focus on numerical simulation of a single gas bubble oscillating in a free liquid. Previously, such numerical simulations have al- most exclusively assumed axisymmetry and small amplitude oscillations. To avoid these assumptions we build upon and extend previous boundary ele- ment methods used for three dimensional simulations of other bubble prob- lems. We use high order elements and parallel processing to yield an indirect boundary element method capable of capturing ne surface e ects on three dimensional bubbles subjected to surface tension, over extended periods of time. We validate the method against the classical Rayleigh-Plesset equation for spherical oscillation problems before validating the indirect boundary el- ement method and the method used by Shaw (2006), against each other, on several small amplitude axisymmetric oscillation problems. We then proceed to study near-resonant non-axisymmetric shape oscillations of order 2 and 4 and the e ect these oscillations have on higher order modes, with a level of detail we believe has not been achieved in a non-axisymmetric study before. We also con rm some predictions made by Pozrikidis' on resonant interac- tions between the second order modes and the volume mode in addition. Finally we study the spherical instability of a bubble trapped in a uniform acoustic eld, demonstrating, as expected, that instabilities show up in all resonant shape modes, including non-axisymmetric ones.Item Open Access Jacobian Code Generated by Source Transformation and Vertex Elimination can be as Efficient as Hand-Coding(Association for Computing Machinery (ACM), 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 Mathematical and numerical modelling of shock initiation in heterogeneous solid explosives(Cranfield University, 2008-07-17T10:27:51Z) Whitworth, N.; Forth, Shaun A.In the field of explosive science, the existence of the ‘hot-spot’ is generally accepted as essential to any theory on shock initiation. Continuum-based shock initiation models only account for ‘hot-spots’ implicitly, and the majority of these models use pressure-dependent reaction rates. The development of a simple but physically realistic model to predict desensitisation (double shock) effects within the confines of an existing pressure-based model is described and simulations compared with experimental data with mixed results. The need to invoke a separate desensitisation model for double shocks demonstrates that reaction rates are not substantially dependent on local pressure. The newly developed continuum, entropy-dependent, CREST model has been implemented and validated in a number of hydrocodes. However, the move to entropy-based reaction rates introduces a number of computational problems not associated with pressure-based models. These problems are described, in particular, an entropy-dependent model over-predicts the rate of energy release in an explosive adjacent an impact surface, and requires a finer mesh than a pressure-dependent model to achieve mesh converged results. The CREST model, fitted only to onedimensional data of the shock to detonation transition, is shown to be able to accurately simulate two-dimensional detonation propagation data. This gives confidence in the predictive capability of the model. To account for ‘hot-spots’ explicitly, a simple model to describe ‘hot-spot’ initiation has been developed. The simple model is presented where ‘hot-spots’ are formed as a result of elastic-viscoplastic stresses generated in the solid explosive during pore collapse. Results from the model compare well with corresponding results from direct numerical simulations, and both are consistent with observations and commonly held ideas regarding the shock initiation and sensitivity of heterogeneous solid explosives. The results also indicate that viscoplastic ‘hot-spot’ models described in the literature are built on an invalid assumption.Item Open Access MATLAB automatic differentiation using source transformation(2012-06-28) Kharche, R. V.; Forth, Shaun A.This thesis presents our work on compiler techniques to implement Algo- rithmic Di erentiation (AD) using source transformation in MATLAB. AD is concerned with the accurate and e cient computation of derivatives of complicated mathematical functions represented by computer programs. Source transformation techniques for AD, whilst complicated to imple- ment, are known to yield derivative code with better run-time e ciency than methods using overloading support of the underlying language. We present results from MSAD that con rm the increase in e ciency using source trans- formed code for MATLAB AD. Most importantly, we demonstrate the use of a unique compiler code specialisation method to implement AD. We also assert the need for compiler optimisations in MATLAB, especially in the con- text of AD, and showcase MSAD as an extensible infrastructure to implement new optimisations and algorithms for AD or other applications. Where other e orts on MATLAB AD are implemented using operator overloading or a mix of overloading and source transformation, MSAD (Springer LNCS, Vol. 3994, 2006) was the rst to generate di erentiated MATLAB code using source transformation alone. MSAD is also the only e ort to implement source transformed AD by resolving overloaded MAT- LAB code. The existing MAD package (ACM TOMS, 32, No.2, 2006) pro- vides a highly e cient overloaded implementation of MATLAB AD. MSAD uses compiler code specialisation techniques to specialise and inline fmad and derivvec overloaded operations of the MAD package in order to generate MATLAB AD code. The operator overloading overheads inherent in MAD are eliminated while preserving the derivvec class's optimised derivative combination operations. As a compiler framework for MATLAB, MSAD demonstrates a novel use of an existing e ective compiler algorithm (Sparse Conditional Constant Propagation) to infer properties of MATLAB variables such as type, rank, shape, sparsity and value by propagating a composite lattice of all the prop- erties together.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, 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.