In this week’s blog post, we are going to look på how to export and import flow field data när du använder Simcenter FLOEFD. Exporting data can, for example, be useful when du want to compare the simulation results with experimental data. Importing data can, for example, be useful when you want to specify a boundary condition which you have defined in terms of a table. To demonstrate the procedures an example will be carried out below, where results from a simulation will be exported, modified to fit as inlet boundary condition och sedan imported as a table into a new simulation.
The familiar geometry of a bended pipe will be used in this example, see picture below. A uniformed velocity field is defined at the inlet (flow from left side in the picture). At the outlet (at the right side in the picture) a fully developed pipe flow is obtained.
When the results are calculated, we can go to Export results in the bottom of the tree structure, see left part of picture below. Right-clicking and selecting Insert kommer open the menu to the right in the picture below. Select Mesh text som the wanted export format, and then select the wanted surface and flow field variable to the specified output file. The file format we are exporting to is .txt. Save the text file in the folder where the simulation is stored.
Modifying the data
The exported data will be in the format as in the picture below, one column for each: X coordinate, Y coordinate, Z coordinate, mesh cell surface size and flow field parameter value. In this example we are only interested in the coordinates and the flow field parameter (not the surface information), so those values should be copied to a new tab. Note that only the numbers are of interest, the first and second row including text should not be copied to the new tab.
Since both the Y och Z coordinates är different between the inlet and outlet surface för this example, both coordinates have to be modified before we can use the output data as input to a new simulation. By exporting data from the inlet as well as the outlet, I could change all Z coordinates of the outlet data to match the inlet surface (den total area of outlet and inlet is identical in this example), and for all Y coordinates I added the difference in location to all cells (den Y coordinates of the inlet is 5cm higher than for the outlet). The reason for adding a specific value to the Y coordinates instead of copying the coordinates for the inlet is that the values are not sorted. An additional thing to notice is that some coordinates that are exported do not have any corresponding flow field parameter value assigned to them, so these coordinates are not needed för använda (coordinates with blank values for the flow parameter). When the data modification is complete you should save the tab with this data as a text file with tab as delimiter, as shown in the picture below.
In the new simulation where modified data will be imported as inlet boundary condition, den settings are as in the picture below. The coordinate system should be set to the same coordinate system as for the data, in this case the global coordinate system (with X axis as refence axis). For the flow parameter a dependency (use the “fx" button) should be selected of format “F(x y z) – table”. The import of a table can be done in either .csv or .txt format, där .txt is used in this example.
The new simulation will give the results as shown in the picture below, where the fully developed pipe flow is already existing at the inlet.
We at Volupe hope that this blogginlägg är going to help you when handling data for your Simcenter FLOEFD simulations. If you have any questions regarding din simulations you are welcome to reach out to us at firstname.lastname@example.org.
Christoffer Johansson, M.Sc.