synthetik-technologies / blastfoam

A CFD solver for multi-component compressible flow with application to high-explosive detonation, explosive safety and air blast
Other
219 stars 96 forks source link

Is the pressure gradient included in momentum and energy equations? #53

Closed wengzf20 closed 2 years ago

wengzf20 commented 2 years ago

Hello, I checked the source code of blastfoam and found the pressure gradient missing in momentum equation ($\nabla \cdot P$) and energy equation ($\nabla \cdot P\mathbf{u}$).

Take the momentum equation as an example. The code firstly solve the convection part, i.e. $\left(\frac{\partial(\rho \mathbf{u})}{\partial t}\right)_{I}+\nabla \cdot(\rho \mathbf{u}\otimes \mathbf{u}) = 0$ (neglect the gravity). Next, the code considers the diffusion correction, i.e. $\left(\frac{\partial \rho \mathbf{u}}{\partial t}\right) = \nabla \cdot \overline{\overline{\tau}}$

It seems that the pressure gradient ($\nabla \cdot P$) is not included in the equation. Is it true? And why does the code do this?

Thank you.

jheylmun commented 2 years ago

Hello, The pressure gradient is incorporated in the calculation of the rhoUPhi and rhoEPhi terms which is handled by the Riemann solvers. This is done because the choice of the pressure flux varies based on the Riemann solver.

wengzf20 commented 2 years ago

Thank you for your information. I will double check the code.