# Simulation of Fluid Dynamics Monitoring Using Ultrasonic Measurements
## 4 Implementation of Wave Propagation Modelling  
This thermal-hydraulic data obtained from a calculation with the CFD code \"TrioCFD\" was used to completely describe the medium in which ultrasounds propagate. The type of finite element of the meshes used in the two codes TrioCFD and SPECFEM3D is not the same, so we needed to perform preprocessing to import the result of CFD into our acoustic simulation. Figure 4 shows the entire workflow of this process. Tetrahedral elements with four nodes were used in the CFD calculation with TrioCFD. The total number of elements was 5,582,706, and the characteristic mesh length was set to 1.40 mm. The first 200 s of their calculation were removed so as to obtain a good stabilization of the flow state in this CFD calculation. Thus, this calculation eventually provided us with  
Figure 4: Data processing steps for mesh generation and preparation of the heterogeneous medium. Figure 5: Temperature differences during 1 ms.  
200 to 210 s of data of fluctuating flow status with a time step of 1 ms. The total number of time steps was 10,000. In the result data, temperature field values are defined at the center of each TrioCFD tetrahedral mesh element, and flow velocity values are defined on the vertex nodes. These values were to be transferred to our hexahedral mesh for SPECFEM3D. Interpolation onto each node of the SPECFEM3D hexahedral mesh was performed using the simulation data management tool called MEDCoulping. MEDCoulping is part of the pre-/postprocessing platform SALOME ([[https://www.salome-platform.org/downloads/current-version](https://www.salome-platform.org/downloads/current-version)]([https://www.salome-platform.org/downloads/current-version](https://www.salome-platform.org/downloads/current-version))) and is also available as a library. In order to prepare a mesh for SPECFEM3D calculation, we firstly selected a partial region for wave propagation simulation from the entire PLAJEST simulation model (Step 4 in Figure 4). This extraction of the domain was performed in order to eliminate acoustically uninteresting parts from the PLAJEST geometry, and this enabled us to reduce the required amount of computer memory, which is one of the limitations of wave simulations in large 3D models. After selecting the domain, we built the first-/second-order hexahedral mesh for SPECFEM3D using the meshing software CUBIT developed by Sandia National Laboratories (USA) (Step 5). The actual mesh type that SPECFEM3D uses is not a first- nor second-order hexahedral mesh but a fourth-order spectral element. Thus, we then performed this conversion as the final step of mesh preparation (Step 7). In order to speed up this conversion process, we used the IOSS (IO Systems) library. This library is included in the finite element analysis supporting software called SEACAS (Sandia National Laboratories). After finishing the preparation of mesh data, the temperature field transfer was carried out, i.e., interpolation of temperature values defined at the barycentre of each tetrahedral finite element to corner nodes of the hexahedral spectral elements (Step 8) using MEDCoulping. The MEDCoulping mesh-to-node transfer function does not support HEXA27 (second-order hexahedral finite elements); consequently, if the interpolation target mesh is of the HEXA27 type, we first split HEXA27 into eight parts of the HEXA8 type (first-order hexahedral finite elements) and then use the MEDCoulping interpolation function for those HEXA8 elements. Then, SPECFEM3D performed the interpolation of these values onto each Gauss-Lobatto-Legendre point in Step 9. The flow velocity data were not used for our simulation, as the temperature gradient has a greater influence on the wave path than the velocity vector field [22].