code-mphi / ECOGEN

A CFD open source code dedicated to multiphase compressible flows
https://code-mphi.github.io/ECOGEN/
Other
100 stars 34 forks source link

UEq model #28

Closed NiruBhai closed 1 week ago

NiruBhai commented 1 year ago

Dear all,

Greetings! I am simulating near-wall bubble collapse and am using pressure disequilibrium model with infinite relaxation. I have read here that UEq model with infinte relaxation converges to PUEq model/ Kapila's model. This should mean for a given cell, the liquid pressure and gaseous pressure should be same as both are in equilibrium in terms of pressure. However when I check simulation results, I see that both differ. Am I understanding the model wrong?

Thanking you in advance Niranjan K. Sabu

kevinschmidmayer commented 1 year ago

Hi Niranjan,

You are understanding the model correctly, so pressures in a given cell should be the same (unique pressure) when an infinite pressure relaxation is computed. Are you sure the model XML file is correctly setup? If you can't find an error on your side, please forward your files so I can do a quick check.

Best, Kevin

NiruBhai commented 1 year ago

Dear @kevinschmidmayer

IMG20221214092858

For the default squaretocirclesymmetry test case in UEq, ECOGEN, I see that the results are compatible with the infinite relaxation settings.

IMG20221214091249 IMG20221214091217

But when I run the default nonsphericalbubblecollapse test case (without any settings change, default relaxation being infinite) I find that the F0_Pressure is not equal to F1_pressure. Or is it that I am comparing the wrong quantities? Please help me. For reference, I am attaching the xml files here.

Regards, Niranjan

initialConditionsV4.xml.pdf mainV5.xml.pdf meshV5.xml.pdf modelV4.xml.pdf

kevinschmidmayer commented 1 year ago

I get it now. This is normal: The relaxation, infinite or finite, is computed only when phases are not pure. In your non-spherical bubble collapse example, both phases are initially pure (volume fraction equal to 1 for the pure phase and 0 for the other phase). If a phase is pure within a cell, the other phase is not present within it, so the relaxation is not necessary.

Regarding how this aspect is dealt during computation, the behavior is the following:

Furthermore, note that UEq and surface tension are not compatible yet.

Best, Kevin

NiruBhai commented 1 year ago

Oh, I did not know this. Thank you, @kevinschmidmayer !

Regards, Niranjan

NiruBhai commented 1 year ago

I get it now. This is normal: The relaxation, infinite or finite, is computed only when phases are not pure. In your non-spherical bubble collapse example, both phases are initially pure (volume fraction equal to 1 for the pure phase and 0 for the other phase). If a phase is pure within a cell, the other phase is not present within it, so the relaxation is not necessary.

Regarding how this aspect is dealt during computation, the behavior is the following:

  • If alpha=0 is false, relaxation is always computed. However, you can't have perfectly pure phases so a minor phase could grow if enough tension is applied. This could be an unwanted behavior when you treat highly resolved interfaces and you are not expecting multiphase behavior (appearance or disappearance of phases within almost "pure" ones).
  • If alpha=0 is true, relaxation is computed only when the volume fraction of the main phase is inferior to (1 - thresholdAlpha). This threshold can be changed within the code and it is currently setup to 1.e-5 and 1.e-8 for infinite and finite pressure relaxation rates, respectively. The reason why it is done like this is mainly to avoid numerical issues from division by 0. Note that this behavior is present for both UEq and PUEq model.

Furthermore, note that UEq and surface tension are not compatible yet.

Best, Kevin

Could you please confirm whether AMR and viscosity causes any interference with this model or not?

kevinschmidmayer commented 1 year ago

Hi Niranjan,

Please note that the feature compatibilities are listed in the documentation: https://code-mphi.github.io/ECOGEN/docs/sphinx_docs/Chap3_4featuresModels.html

However, I realize that the additional physics (surface tension, viscosity and conduction) are listed as "Yes" for the UEq model (VelocityEq) but we didn't test the viscous and conductive ones while surface tension is not working. Those "Yes" are errors. Sorry for that. It will be corrected as soon as possible. UEq model is still a work in progress.

In conclusion, AMR is working with UEq and viscosity is problably not (to try with attention and to check everything is good, specifically global mixture total energy).

Best, Kevin

NiruBhai commented 1 year ago

Oh, okay. Thank you @kevinschmidmayer !

Regards Niranjan

NiruBhai commented 3 weeks ago

Hi Niranjan,

Please note that the feature compatibilities are listed in the documentation: https://code-mphi.github.io/ECOGEN/docs/sphinx_docs/Chap3_4featuresModels.html

However, I realize that the additional physics (surface tension, viscosity and conduction) are listed as "Yes" for the UEq model (VelocityEq) but we didn't test the viscous and conductive ones while surface tension is not working. Those "Yes" are errors. Sorry for that. It will be corrected as soon as possible. UEq model is still a work in progress.

In conclusion, AMR is working with UEq and viscosity is problably not (to try with attention and to check everything is good, specifically global mixture total energy).

Best, Kevin

Dear Kevin,

I see that there has been a new update in ECOGEN. I would like to confirm whether viscosity and surface tension are working for UEq model. Additionally, in the additional physics test cases folder I still don't see any case for viscosity. So, does viscosity work in PUEq model?

Basically, it would be very ideal if I am able to model viscosity and surface tension simultaneously for bubble collapse phenomenon. Is there any such test case?

Regards, Niranjan

kevinschmidmayer commented 2 weeks ago

Dear Niranjan,

Unfortunately we didn't find the time yet to tackle the viscosity and surface-tension modelling for UEq model. This is however on our to-do list and based on your needs and from others, we are probably going to work on it from this winter.

Regarding viscosity and surface tension for PUEq model, they are working with it. Although, I have been informed of a bug that can happen (low probability) with viscosity. This is as well high on our to-do list.

Also note that if you wish to tackle this modelling on our side to accelerate the process and therefore help us on this end, I could "supervise" you on this task.

Best, Kevin

NiruBhai commented 1 week ago

Thank you for the information, Kevin! I am glad you invited me to contribute but unfortunately, I have no background in developing software and I am still occupied with learning the science behind bubble collapse.

Regards,

Niranjan