Modern requirements in defense and aerospace technologies are no longer limited to robust engineering solutions alone; they now mandate an AI-supported infrastructure. This is why National CMPS (Computational Fluid Dynamics) software was developed from the outset to be fully compatible with artificial intelligence and deep learning technologies.
So what does this mean? For those unfamiliar with the topic, here is a brief question-and-answer explanation.
What are the current machine learning methods?
Almost all modern methods are gradient-based and involve backpropagation. To achieve this, specialized data types carrying graph structures or tensors directly are used. These data types either generate the Jacobian tensors of dependent variables (backward types) or propagate them forward (forward types). In essence, the derivative relationships of the loss function with respect to every parameter in a deep learning model are constructed using these types and then employed for machine learning. This structure has significantly contributed to the advancement of modern machine learning techniques.
How does CMPS support this?
CMPS was designed from the outset with its own native data types, mirroring the data infrastructure found in machine learning software. Within CMPS, you can think of it as a process where tensor data is processed via an optimized flow during computations. (Incidentally, Google TensorFlow is named as a metaphor representing the flow of tensors through a directed graph during computations. CMPS also possesses an infrastructure that optimizes tensor-based data transfers, but it should not be directly equated with the same conceptual framework.)
Does this structure make the code complex?
On the contrary. This architecture actually forms the basis of the implicit solver, thereby eliminating the need for analytical or numerical Jacobian calculations. Developers only need to use specially aliased data types in place of the standard double, which simplifies the code considerably.
Does this architecture compromise performance?
No. CMPS is highly templated code, compiled with optimizations tailored to each data type and size. This process is automated, and each automatically compiled version of the code is selected at runtime. In performance-critical sections, forward-type tensor data types are employed, and when necessary—such as in machine learning—these data are propagated using a simple chain rule (recall the derivatives of composite functions from high school mathematics). Within CMPS, there is almost no use of dynamic data types; for every tensor size, fixed-size data types are generated at compile time. These data types can be easily vectorized and are conducive to GPU computing if needed.
Are there any points where the tensor flow is broken?
Yes, for instance in the stiff solver required for chemical reactions. As in most commercial and similar software, CVODE is used as the industry standard for solving such stiff ODEs. Writing CVODE from scratch as a template-based solver is not feasible. Instead, a simpler approach is employed by using CVODES, which can provide sensitivity values as part of the solution. These values can partially compensate for the derivative information lost during the resolution of reaction mechanisms. The remaining aspects must be designed by the developer in accordance with the intended objectives. Another significant challenge in maintaining tensor integrity arises in high-order solutions; a definitive solution for this issue has yet to be established.
Why was such an infrastructure adopted for CMPS?
Unfortunately, Turkey often begins work on many fronts much later than Western countries. If it does not commence with innovative technology, it risks falling further behind. The best example of this is TOGG’s decision to develop an electric vehicle. With internal combustion vehicles, matching the West’s century-long experience was nearly impossible; however, electric vehicles represent a new technology for everyone. Similarly, artificial intelligence has seen a sudden surge in adoption across all fields in recent years, and it now occupies the category of high-strategic technology for nations. Currently, a fully developed AI-based CMPS solver is not widely available commercially. Existing solutions generally rely on simple, ad hoc, naive neural networks (surrogates) tailored to outcomes.
What about compatibility with ready-made machine learning libraries?
CMPS was developed from the beginning to be compatible with the data types used in these methods, leveraging the template capabilities of C++. For example, PyTorch’s AutoGrad and TensorFlow’s native data types can be fully utilized within CMPS. Alternatively, the tensors embedded within CMPS’s data types can be transferred to the graph structures of these external libraries.
Is there currently an integrated machine learning infrastructure within it?
Yes. An advanced user (or developer) can employ the entire range of PyTorch architectures and evaluate all the information provided by the solver for this purpose. Although there is presently no infrastructure targeted at end-users, CMPS does offer a framework for professionals working in machine learning who possess the requisite expertise.