**1. Introduction**

Consumer demand, government regulations, competitiveness, globalization, better educated end-users, environmental concerns, market differentiation, social media trends, and even influencers, they are all driving products manufacturers and industry to reduce production expenditures and final cost of goods, and at the same time improving the quality and reliability of the products with the lowest environmental impact. To reach these goals and to develop revolutionary products, the manufacturing sector is relying more on virtual prototypes, computer simulations, and design optimization.

Computational fluid dynamics (CFD), computational structural dynamics (CSD), computer-aided manufacturing (CAM), computer-aided design (CAD), multi-physics simulations, digital twins, the internetof-things (IoT) and the cloud, are among many of the tools increasingly being used to simulate and certify products by analysis and simulation before going into production and commercialization. Even before reaching the market, modern products have undergone some kind of heuristic or methodological optimization. Though the optimization might take different forms in different fields (e.g., finance, health, construction, operations, manufacturing, transportation, construction, engineering design, sales, public services, mail, and so on), the ultimate goal is always getting the best out of something under given circumstances, either by minimizing, maximizing, equalizing, or zeroing a quantity of interest (QoI).

Product optimization can be undertaken in two different ways, by using design space exploration (DSE) or by using design optimization (DO). Even a combination of both methodologies is possible. In DSE, we simply explore the design space in a methodological way, and while doing so, we extract knowledge. DSE is the process of discovering, expanding, evolving, and navigating the design space to extract knowledge to support better decision making [1]. It is not difficult to recognize that in DSE, we are not converging to an optimal value, we are only exploring the design space, but in doing so, we are gathering valuable information about the global behavior, and this information can be used to get a better design. Moreover, this knowledge can also be used to conduct surrogate-based optimization (SBO) studies. The SBO method consists of constructing a mathematical model (also known as a surrogate, response surface, meta-model, emulator) from a limited number of observations (CFD simulations, physical experiments, or any quantifiable metric) [2–5]. After building the surrogate, it can be explored and exploited. Conducting the optimization at the surrogate level is orders of magnitude faster than working at the high fidelity level [2].

Design optimization strategies, on the other hand, consist on formulating an optimization problem and converging to the optimal design. Here, it is assumed that the problem can be formulated before the search and convergence begin. A typical optimization problem can be formulated as follows,

$$\begin{aligned} \text{Find} \quad \mathbf{X} = \begin{Bmatrix} \mathbf{x}\_1 \\ \mathbf{x}\_2 \\ \vdots \\ \mathbf{x}\_n \end{Bmatrix} \end{aligned} \tag{1}$$

which minimizes, maximizes, equalizes, or zeroed,

$$f\_j(\mathbf{X}), \quad j = 1, 2, \cdots, q \tag{2}$$

subject to design constraints (linear and non-linear),

$$\begin{aligned} \text{l.g.} \left(\mathbf{X}\right) &\le 0, \quad j = 1, 2, \dots, m \\ \text{l.g.} \left(\mathbf{X}\right) &= 0, \quad j = 1, 2, \dots, p \end{aligned} \tag{3}$$

and variables bounds,

$$\mathbf{x}\_{i}^{lb} \le \mathbf{x}\_{i} \le \mathbf{x}\_{i}^{ub} \quad j = 1, 2, \cdots, n \tag{4}$$

where **X** is a *n*-dimensional vector called the design vector, *fj*(**X**) is the objective function or QoI, *gj*(**X**) are the inequality constraints, *lj*(**X**) are the equality constraints, and *xlb <sup>i</sup>* and *<sup>x</sup>ub <sup>i</sup>* are the variables lower and upper bounds, respectively. To find the optimal value we can use gradient-based methods or derivative-free methods [5–10]. Also, the problem formulation can be single-objective (one QoI to be optimized) or multi-objective (more than one QoI to be optimized simultaneously). Things can get even more complicated, as in some cases we might need to deal with design optimization problems incorporating many disciplines (e.g., aerodynamics, propulsion, structures, and performance). In this case, we say we are dealing with a multi-disciplinary design optimization problem (MDO) [11–16]. MDO allows designers and engineers to incorporate all relevant disciplines simultaneously. The optimum of the simultaneous problem is superior to the design found by optimizing each discipline sequentially since it can exploit the interactions between the disciplines. However, including all disciplines simultaneously significantly increases the complexity of the problem [7].

The field we are concerned with in this manuscript is that of engineering design; nevertheless, this by no means limits the range of applicability of the current work; it simply reflects the authors' interests and fields of expertise.

In engineering design, we are often interested in optimizing the geometry. To do so, two approaches are available, direct modeling and parametric modeling. In direct modeling, we modify the geometry by pushing and pulling points, lines, and surfaces (like working with clay). This gives designers and engineers a lot of flexibility when it comes to shape the geometry; however, in the process of doing so, we give up geometry parametrization in favor of creating organic shapes that might be difficult to manufacture. In parametric modeling, the user defines relationships, constraints, parametric variables, and configurations when creating the solid model. Then, by changing these variables, the user can easily create endless variations on the original geometry with complete control and millimetric precision.

However, when conducting fully automatic DSE or DO studies, introducing the CAD tools is not very straightforward. Most of the times the CAD applications are not compatible with the operating system (OS) where the numerical simulations are being performed (usually Unix-like OS), or simply, it is not possible to connect the optimization loop with the CAD tool due to the fact that the user can only interact with it using a graphical user interface (GUI), which cannot be used in an automatic optimization loop driven by a command-line interface (CLI).

To overcome this problem, many commercial simulation frameworks are adding a monolithic design environment to integrate all the applications needed to conduct design space exploration and design optimization studies, namely CAD, multi-physics solver, optimizer, and post-processing. While commercial frameworks have proven to be reliable, they come with a price tag that often is unreachable by small and medium-sized enterprises (SMEs), hobbyists, researchers or personal users. Hereafter, we propose the integration of open-source and freeware tools to conduct DSE and DO studies.

To perform the numerical simulations, we use the multi-physics solver OpenFOAM (version 7.0) [17,18] or the programming language Python. The optimization algorithms and the code coupling interface is provided via the Dakota library [19,20] (version 6.10). All the real-time data analytics, quantitative and qualitative post-processing, and data analytics are performed using Python, VTK [21], and bash scripting. Finally, to create and modify the geometry we use Onshape [22], which is a cloud-based parametric CAD and product development application. Onshape's application programming interface (API) is open-source; therefore, it can be deployed in any platform with an internet connection. The API is implemented in Python, and the calls to Onshape's server are done using RESTful requests. Onshape offers two subscription plans, a pay-up plan and a free one. Both subscriptions plans have the same professional capabilities, the only difference is the level of product support offered and the access to enterprise options.

The purpose of this manuscript is two-fold. First, we want to use the cloud to support CAD parametrization in DSE or DO design loops, which undoubtedly will give users enormous flexibility as the CAD application does not need to be installed locally, and there is no need for a monolithic CAD/Simulation software integration. Secondly, we want to deploy fully automatic, fault-tolerant, and scalable engineering design loops using in-house computational resources, the cloud, or HPC centers; and everything based on open-source and freeware tools. We hope that this contribution will offer guidelines to designers and engineers working with design optimization and design space exploration, will help them at implementing their own optimization loops, and to some extent, it will help to address some of the findings and recommendations listed in the NASA contractor report *"CFD Vision 2030 Study: A Path to Revolutionary Computational Aerosciences"* [23], where it is stated the following: *"Included in this desired set of capabilities is a vision for how CFD in 2030 will be used: a vision of the interaction between the engineer/scientist, the CFD software itself, its framework and all the ancillary software dependencies (databases, modules, visualization, etc.), and the associated HPC environment. A single engineer/scientist must be able to conceive, create, analyze, and interpret a large ensemble of related simulations in a time-critical period (e.g., 24 h), without individually managing each simulation, to a pre-specified level of accuracy"*.

The rest of the manuscript is organized as follows. Section 2 gives an overview of the methodology used. In Section 3 we describe the numerical experiments carried out to demonstrate the usability and flexibility of the framework. Finally, in Section 4 we present the conclusions and future perspectives.
