synthetik-technologies / blastfoam

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

Tabulated thermodynamics model for the two phase system #71

Open Liu0813 opened 1 year ago

Liu0813 commented 1 year ago

Dear Author, I am simulating a two phase compressible fluid system. In my problem, the Tabulated thermodynamics model (eTabulated/tabulatedMG) was used. It works well for some single phase systems, like the example shockTube_tabulated. However, when the Tabulated thermodynamics model was used in the two phase system, some errors appeared. I have debugged the code and found the main reason. In the two phase system, the temperature is obtained by solving an equation, and the initial range of the iteration algorithm was set as (-great, great). But in a Tabulated thermodynamics model, the ranges of thermo quantities are usually finite, so the function value at the initial point cannot be evaluated.

Is it now possible to use the Tabulated thermodynamics model in a two phase compressible fluid system?

jheylmun commented 1 year ago

Hello, I believe the error is actually due to the way the tables are setup. Since this was initially done for a single phase system where the density will never be 0, the "ln" modifier is used (natural log). If you want to use this for a two phase case you will want to create new tables where the "none" modifier is used so that when you have pure phases it is okay.

Thanks, Jeff

Liu0813 commented 1 year ago

Hello, Thank you for your reply. I have created a new table and fixed this problem.
However, I still have some doubts about the two-phase thermodynamic model implemented in BlastFoam. BlastFoam expresses general equation of state in the Mie-Gruneisen form, and then derives the thermodynamic quantities in the mixed mesh under the isobaric assumption. Is this applicable to temperature-based equations of state? For my question, the equation of state is expressed in the form of p=p(rho,T), e=e(rho,T). In BlastFoam, the temperature is first calculated based on the total internal energy in the mixed mesh, and then the mixed mesh pressure is calculated using this temperature value. This process seems to use the isothermal assumption. For the general form of the equation of state, can this method ensure the equilibrium of pressure and temperature in mixed cells at the same time? In my test problem, pressure oscillations occur near the material interface, so I am not sure if this method is applicable to temperature-based equations of state.

Sincerely, Zhigang Liu