Abstract

Purpose This paper aims to investigate the convergence and error properties of a finite volume-based heat conduction code that uses automatic differentiation to evaluate derivatives of solutions outputs with respect to arbitrary solution input(s). A problem involving conduction in a plane wall with convection at its surfaces is used as a test problem, as it has an analytical solution, and the error can be evaluated directly. Design/methodology/approach The finite volume method is used to discretize the transient heat diffusion equation with constant thermophysical properties. The discretized problem is then linearized, which results in two linear systems; one for the primary solution field and one for the secondary field, representing the derivative of the primary field with respect to the selected input(s). Derivatives required in the formation of the secondary linear system are obtained by automatic differentiation using an operator overloading and templating approach in C++. Findings The temporal and spatial discretization error for the derivative solution follows the same order of accuracy as the primary solution. Second-order accuracy of the spatial and temporal discretization schemes is confirmed for both primary and secondary problems using both orthogonal and non-orthogonal grids. However, it has been found that for non-orthogonal cases, there is a limit to the error reduction, which is concluded to be a result of errors in the Gauss-based gradient reconstruction method. Originality/value The convergence and error properties of derivative solutions obtained by forward mode automatic differentiation of finite volume-based codes have not been previously investigated.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.