Jump to content

Geometry to Para­me­ter Mapping Based on Neural Networks

Parameter_Mapping_Neural_Network_Title

by Johanna Serr

In para­met­ric mod­el­ling, a geometry is gen­er­ated using a function of the model f and numer­i­cal input para­me­ters. In some cases, however, invert­ing the equation — hence extract­ing descrip­tive para­me­ters from a geometry by finding f‑1 — can be useful. The case pre­sented below is moti­vated by hull shape opti­miza­tion. However, the concept can be trans­ferred to many other scenarios.

Aim

In the process of hull — or any kind of geometry-based — opti­miza­tion, the problem of having to model a result­ing geometry without knowing the exact values of char­ac­ter­is­tic para­me­ters can arise. This can happen, e.g., in the context of a CAD-free opti­miza­tion with an adjoint CFD solver, where a discrete rep­re­sen­ta­tion of the geometry is deformed based on the adjoint sen­si­tiv­i­ties on the model surface. In order to open and further edit the opti­mized hull inside the CAESES envi­ron­ment, the para­me­ter set belong­ing to the new geometry needs to be determined.

Parameter Mapping Neural Network Concept

The use of neural networks offers a great oppor­tu­nity to solve this kind of problem since they are a powerful tool for con­struct­ing a pre­dic­tive model based on data. To process the data, the hull geome­tries can be rep­re­sented by point clouds. The aim of this work is to develop a pre­dic­tive model using neural networks (NN) that takes a point cloud as input and extracts char­ac­ter­is­tic para­me­ters of the geometry.

Parameter Mapping Neural Network Process

Back­ground Information

The concept behind neural networks orig­i­nates in the field of bionics and is inspired by the human brain and the way bio­log­i­cal neurons com­mu­ni­cate with each other. The struc­ture of neural networks allows the algo­rithm to learn patterns between given input and output data and to use the gained knowl­edge to make pre­dic­tions about new, unknown data. Having this ability, neural networks work as a powerful tool in problems that contain a lot of data, while being too complex to be solved using tra­di­tional programming.

The struc­ture of a simple neural network can be broken down to a single neuron, which mimics the way a bio­log­i­cal neuron trans­ports signals. From the numer­i­cal per­spec­tive, a neuron rep­re­sents a set of inputs, weights and an acti­va­tion function. The cor­re­spond­ing vari­ables are ini­tial­ized and tuned during the training process in order to map the input to output data. Stacking multiple neurons in parallel is called a layer. A more complex neural network consists of dif­fer­ent types of layers like dense or pooling layers; each type having its own task and purpose. A special type of neural network is the con­vo­lu­tional neural network (CNN), which uses so called con­vo­lu­tional layers. This type of layer is suited for extract­ing pivotal features from input data and is mostly used in image-driven problems like image classification.

The CNN archi­tec­ture devel­oped in this work is inspired by pointNet, a neural network for 3D clas­si­fi­ca­tion and seg­men­ta­tion based on point sets. For handling point clouds as input data, the irreg­u­lar struc­ture of the point cloud has to be considered.

Parameter Mapping Neural Network Architecture

The devel­oped neural network takes a point cloud of size Nx3 as input; N being the number of points inside of the 3D point cloud. Inside a mini-network, a feature trans­for­ma­tion is executed in order to make the data invari­ant to per­mu­ta­tions. Fol­low­ing the matrix mul­ti­pli­ca­tion, the features are being further extracted using con­vo­lu­tional and Max-Pooling layers. In a final step, a regres­sion is carried out using multi-layer per­cep­trons (MLP) and the output con­sist­ing of K descrip­tive para­me­ters is generated.

The main goal of devel­op­ing a neural network is creating a pre­dic­tive model that has the capa­bil­ity of gen­er­al­iza­tion — the ability to make accurate pre­dic­tions not only on training data but also on new, unseen data. For testing this property, the data set can be split into a training and a test set. The model is trained using the data from the training set; after training the model is tested using the unseen data from the test set. Com­par­ing the per­for­mances of the model on the training and test set, a state­ment about the capa­bil­ity of gen­er­al­iza­tion can be made.

Creating the Dataset using CAESES

The data set is created using a hull model provided as sample in CAESES. Using the para­met­ric mod­el­ling func­tion­al­ity, four para­me­ters are set as design vari­ables, which allows access to these para­me­ters in batch-mode. Two dif­fer­ent types of para­me­ters are chosen — lengths and angles. Each para­me­ter is varied within a given interval, thereby creating a data set of 4000 hull geome­tries with unique shapes. The main dimen­sions, i.e., length overall, height, and width are fixed to ensure a constant bounding box of all geometries.

The influ­ence of the selected para­me­ters on the hull shape is illus­trated as follows.

LENGTH OF FLAT SIDE

Length of flat side

STEM LENGTH

Stem length

WATER­LINE ENTRANCE ANGLE

Waterline entrance angle

FRAME GRADIENT AT THE WATER­LINE DISTRIBUTION

The curve defining the gradient of the frames along the water­line, shown as red curve in the fol­low­ing ani­ma­tion, is con­trolled by the tangent angle at the start. A low value for the tangent angle causes a high section gradient at the water­line close to the forward shoulder, and thereby, a bulkier hull. Although out of all the para­me­ters this one is varied within the largest interval, its vari­a­tion has the least impact on the shape of the hull.

Frame gradient at the waterline distribution 

Frame gradient at the waterline distribution

After auto­mat­i­cally gen­er­at­ing the geome­tries in batch-mode in CAESES, the point clouds are extracted using a random uniform dis­tri­b­u­tion on the surface of the hull.

Results

The training of the neural network is executed using the Keras and Ten­sor­flow libraries. As val­i­da­tion method, the k‑fold cross val­i­da­tion is carried out using k = 5; result­ing in a training set size of 3200 and test set size of 800. The size of the point cloud is set to N = 1024 points. The results of one rep­re­sen­ta­tive training cycle are listed in the table below.

The neural network model is able to achieve high values for the R2 score in training and test set. However, compared to the other para­me­ters, the para­me­ter βWL scores the lowest. This can be explained by the fact that the vari­a­tion of the angle βWL has the smallest impact on the general hull shape, in com­par­i­son to the three other para­me­ters, hence making the pre­dic­tion of βWL a more complex problem. Using a more complex neural network could result in a more accurate pre­dic­tion of βWL. To make the results more tangible, a single example is chosen from the test set and the hull is modelled using true and pre­dicted values.

Visually com­par­ing both hulls, their geome­tries show a great resem­blance. As expected, the pre­dic­tion of the angle βWL shows the greatest absolute devi­a­tion from the true value. However, as it has the least impact on the general hull shape, its devi­a­tion of almost 7° is hardly notice­able in the result­ing geometry.

Con­clu­sion

In this study, a method of mapping geometry to para­me­ter data is inves­ti­gated in order to create a pre­dic­tive model which is able to find descrip­tive para­me­ters for a given geometry. Neural networks are used in the devel­op­ment of this method. The results show that the estab­lished neural network is able to make accurate predictions.

Two dif­fer­ent types of para­me­ters — lengths and angles — are tested and no dif­fer­ence in per­for­mance is found. However, looking at the para­me­ter βWL, the impact of the para­me­ter on the geometry shape has an influ­ence on the per­for­mance and accuracy. It is con­cluded that the smaller the impact of the para­me­ter, the more complex the problem and the less accurate the prediction.

About the Author

Johanna Serr is a graduate student of mechan­i­cal engi­neer­ing at the Tech­ni­cal Uni­ver­sity Hamburg-Harburg (TUHH) with a spe­cial­iza­tion in numerics and infor­mat­ics. Her special field of interest is com­pu­ta­tional fluid dynamics. The study pre­sented here is part of her project thesis.

Johanna Michaele Serr

With the help of CAESES I was able to create the dataset for my research with minimal effort. The para­met­ric mod­el­ling func­tion­al­ity in CAESES as well as the easy access to the vari­ables in batch-mode were espe­cially helpful. These two features combined, CAESES turned out to be a powerful instru­ment and a key com­po­nent for the progress of my study.

Working with CAESES is very intu­itive. Thanks to the well-written and detailed tuto­ri­als, I was quickly able to learn how to navigate inside of the CAESES envi­ron­ment and inte­grate the CAESES func­tion­al­i­ties into my auto­mated workflow.”

Johanna Serr
MSc Student at the TUHH

More articles

Latest from the blog

All articles

Stay up to date

Receive latest news to your inbox.

Subscribe to newsletter