## 3 Opening Process Dynamic Characteristics Simulation Analysis
### Dynamic Mesh Setup and UDF Programming  
Dynamic mesh technology is a computational model that emerges to adapt to changes in the fluid computational domain by stretching and compressing the mesh, adding and subtracting from the mesh, and locally constructing a new mesh to adapt to changes in the computational domain. The dynamic mesh is divided into active and passive types. The active dynamic mesh realizes the active deformation of the mesh by predefining the rigid body motion mode. The molten salt swing check valve is a self-acting valve, its motion process cannot be predefined, the motion is determined by the calculation result of the previous step, and the mesh update is done automatically according to the boundary change in each iteration step. Additionally, using passive-type dynamic mesh can express the real state of the valve motion component of the molten salt swing check valve.  
The automatic grid update is based on the change of the boundary position at each time increment and is expressed as follows:  
\[\frac{\mathrm{d}}{\mathrm{d}t}\int\limits_{V}\rho\varphi\mathrm{d}V+\int \limits_{\partial V}\rho\varphi(u-u_{s})\mathrm{d}A=\int\limits_{\partial V}G \
abla\varphi\mathrm{d}A+\int\limits_{V}S_{\varphi}\mathrm{d}V \tag{6}\]  
where \(\rho\) is the molten salt density; \(u\) is the molten salt velocity vector; \(u_{s}\) is the mesh deformation velocity of the 3D dynamic mesh; \(G\) is the diffusion coefficient; \(A\) is the surface area of the control body; \(S_{\varphi}\) is the source term of the flux; \(\partial V\) is the boundary of the control body \(V\).  
The flow chart of the dynamic opening process of the molten salt swing check valve, simulated by CFD 3D passive-type dynamic mesh and UDF technology, is shown in Figure 5. The opening process of the swing check valve is a force balance process, which is drawn from [PERSON]'s second law, as shown in Equation (1). According to the SolidWorks software, the inertia of valve rotation \(I_{disc}=0.01866\) kg\(\cdot\)m\({}^{2}\) is calculated, and the angular  
Figure 4: Computational domain and meshing of the swing check valve.  
acceleration can be found by using UDF custom macros to find out the pressure and torque around the rotation axis of the valve motion components during the opening process.  
Based on the definition of angular acceleration, the amount of angular velocity change for one time step and the new angular velocity can be obtained. Then, based on the definition of angular velocity, the amount of angular change for each time step is calculated, and finally the new angle for the discrete time step is obtained.  
As Figure 6 shows in its depiction of the opening process 3D passive-type dynamic mesh update schematic, the tetrahedral mesh can ensure the integrity of individual meshes and provide the strongest mesh deformation adaptation capability to the greatest extent during the dynamic deformation pulling process of the main mesh edges in the basin until the single-side mesh reaches the maximum deformation. Spring smoothing and local remeshing are used to achieve the mesh deformation process to ensure better mesh convergence.  
The changing inlet boundary conditions are written using the macro DEFINE_PROFILE, and the rigid body (valve motion component) motion is controlled by compiling the DEFINE_CG_MOTION macro in the dynamic mesh UDF to complete the node position update in each time step until the valve is fully opened.  
Figure 5: Swing check valve opening process UDF program core steps.  
Figure 6: Opening process 3D passive-type dynamic mesh update.