General

General

In a compressible mesh deformation case, the mass of fluid in the domain seems not to be conserved. What is the reason for this and how can I avoid it?

    • FAQFAQ
      Participant

      If the mass of fluid is calculated using with, e.g., volumeInt(Density)@Domain in a compressible mesh-motion simulation using second-order time-stepping, then this may appear to show that mass is not conserved in the simulation. Also, the lack of mass conservation may affect other aspects of the solution, such as variables not being completely periodic in simulations that should be. This is an expected behavior of second-order time-stepping in a mesh deformation calculation. The default startup option for 2nd order transient discretization uses 1st order discretization for the first timestep. Since 1st order discretization interprets the solution at the end of the timestep, and 2nd order disrecetization interprets the solution in the middle of the timestep, a conservation error occurs in the first step. If the mass of the fluid calculated using mass()@Domain, this will show better conservation than other formulas such as volumeInt(Density)@Domain. Furthermore, the overall mass conservation of the simulation can be improved by using the expert parameter setting ‘transient startup option = 1’ or by using first-order time-stepping for the continuity equation. The error can be further minimized by reducing the timestep.