AMReX-Combustion / PeleMP

Multiphysics models for use with the Pele suite of codes.
https://amrex-combustion.github.io/PeleMP/index.html
Other
10 stars 8 forks source link

Questions about abramzon_test #11

Closed CAIROCharlie closed 1 year ago

CAIROCharlie commented 1 year ago

I use PeleLMeX to run Abramzon Test and compare the calculated results with the results in the article(“Droplet vaporization model for spray combustion calculations”, B. Abramzon and W. A. Sirignano, Int. J. Heat Mass Transfer, Vol 32, No. 9, pp 1605-1618 (1989)_), and it is found that there may be differences in quantitative aspects. May I ask if this is the impact of physical parameters or the difference in computational dimensions?Or other aspects? image

ldowen commented 1 year ago

Differences in the physical parameters like mass diffusivity, thermal conductivity, etc. are likely significant in producing different droplet changes over time. However, after diving deeper into this, I have found a small bug in the code related to the $\phi$ parameter presented by Abramzon and Sirignano. In the code, the value for $\phi$ uses $c{p,v}$ on top when it should use $c{p,F}$. I have just fixed this bug. See the attached plot below. The plot labeled Original is what was in the code, and Fixed uses the updated code. ref is the reference solution from the literature. Thank you for bringing this to my attention! phi_val_plot

CAIROCharlie commented 1 year ago

Thank you for your reply! But there are some differences after the changes. Can we input multiple physical parameters corresponding to different temperature and interpolate them? Or construct a function for each physical parameter? By the way, PeLeLMeX would encounter some issues when compiling with the new PeleMP, and may need to modify PeleLMSprayParticles.cpp. Thank you again!

ldowen commented 1 year ago

The parameters for the gas phase are determined from the thermodynamic and transport routines in PelePhysics. The liquid parameters are specified directly in the input file. At the moment, if you wanted to use specific parameters in the evaporation routine, you would have to hard-code them in. I'm not sure of a good way around that. The issue is that the mass diffusivity, thermal conductivity, and dynamic viscosity are computed within the "film" of the droplet. So it assumes the state is a mixture of the gas phase and evaporated species (using the one-third rule). One would have to set transport parameters for all species involved, not just the liquid fuel species. That would require new routines to totally recreate what is done in PelePhysics.

There is yet another possible source of discrepancy. When solving for the Reynolds number and drag , we use the density in the film vapor, which is computed using the vapor state. However, it seems like the reference uses the gas phase density for the Reynolds number and drag force. I will look further into this to determine which formulation is best.

Sorry about the issues. I am making some changes and working on getting them pushed upstream to PeleC and PeleLMeX. At the moment, you should be able to use this branch of PeleLMeX https://github.com/AMReX-Combustion/PeleLMeX/tree/Landon/spray_post_func I will try to get the issue resolved ASAP.

CAIROCharlie commented 1 year ago

Thanks a lot! I will also try it.

CAIROCharlie commented 1 year ago

Hello!

When solving the Reynolds number and drag, I used the gas phase density. But it seems that the calculation results using the density in the film vapor are better. I'm not sure if this is accurate.

Thank you.

ldowen commented 1 year ago

I found that the lifetime of the droplet increased when I switched to using the gas phase density for the Abramzon case. However, when I ran other single droplet tests, I found the results became worse. I think I will leave the current formulation in place. Unless you have any objections, I will close this issue. This has been extremely helpful. I appreciate you reaching out regarding this.

Also, the development branch in the PeleLMeX repo should be back up to date and working again.

CAIROCharlie commented 1 year ago

Thank you for your reply.

Finally, which liquid heating model is used for PeleMP?

ldowen commented 1 year ago

We use the infinite thermal conductivity assumption, so the droplet temperature is spatially uniform. Droplet heating is modeled using the formulation put forward by Abramzon and Sirignano in their 1989 paper. There is more information in the documentation here https://amrex-combustion.github.io/PeleMP/Equations.html

CAIROCharlie commented 1 year ago

Thank you very much.

May I ask if the calculated two-dimensional or three-dimensional results have been compared with the simulation or experiment in the literature?

ldowen commented 1 year ago

There are many different single droplet and non-reacting spray comparisons that have been made with both numerical and experimental results in the literature. We are currently writing a paper that should include all of these components. I also am working on compiling and including verification/validation into the documentation. I hope to have all of this done very soon. I apologize for not having it available right now. If you have any concerns or issues regarding the implementations or modeling behavior, please don't hesitate to reach out.

CAIROCharlie commented 1 year ago

Thank you very much for your reply and help!

CAIROCharlie commented 1 year ago

Sorry to bother you, but the program reported an error when running the working condition of a stationary droplet under stagnant ambience conditions. I added the case that Reynolds number is equal to 0 in the program, but it was useless. The program can only operate normally when the relative velocity of gas and liquid droplet is greater than 1E-2. May I ask how to solve this problem.

Thank you very much.

ldowen commented 1 year ago

What was the error it reported? Is it because the time step becomes too high? The time step is set based on the velocities of the gas or droplets, so if both are stationary, you will likely have to set a fixed time step size using amr.fixed_dt = in the input file. I can add a check to be sure this occurs for the single droplet tests. Do you think this is the issue?

CAIROCharlie commented 1 year ago

Thank you very much for your reply and help. I calculated the evaporation of a stationary ethanol droplet and compared it well with the experimental results. Btw,${PELELMEX_HOME}/Exec/Cases/CounterFlowSpray There is a bug where the density is not correctly expressed(SprayParticlesInitInsert.cpp:43). My current solution is to give the fuel density in the input file. Thank you again.

ldowen commented 1 year ago

Thanks for confirming that! Did you notice the results improved when the cp_skin was replaced by cp_fuel in the evaporation routines? Or was the change not significant?

I didn't realize those cases in LMeX existed. I will make changes to update them right now. Thanks for pointing that out!

CAIROCharlie commented 1 year ago

Thank you very much for your reply. Sorry, I only used cp_ fuel. The plot labeled Ref is the result of the code in the literature, which uses the Spalding model as the evaporation model,Ex is the experimental result,PeleLMeX is the solution from the LMeX. image

CAIROCharlie commented 1 year ago

Sorry to bother you,

May I ask if the droplet size must be smaller than the grid size in PeleMP ?

Thank you very much

ldowen commented 1 year ago

PeleMP spray modeling relies on the dilute spray assumption, which means the volume of the liquid is negligible relative to the volume of the gas in a cell. So ideally, yes the droplet size should be much smaller than the grid. In practice, this isn't always the case and it isn't uncommon to have larger liquid volume fractions in certain regions like near the jet inlet. This can cause numerical issues in those regions.

CAIROCharlie commented 1 year ago

Thank you very much for your reply. Can I use the 117 micron grid to calculate 100 micron droplet?

ldowen commented 1 year ago

There isn't a hard a fast rule about what you "can" do. For that particular case, the volume of a single parcel (assuming the number of droplets per parcel is 1) would represent about 33% of the volume of a cell. The rule of thumb for dilute sprays is no more than 10%. This is only a rule of thumb. The formulations are still valid even for higher volume fractions. However, the potential for numerical issues can increase as volume fraction increases. So in short, if it isn't causing numerical issues, like crashing the solution or creating unphysical values of density or temperature in the gas phase, it should be ok.

CAIROCharlie commented 1 year ago

Thanks a lot for your help!!

ldowen commented 1 year ago

No problem! Thanks for reaching out!

ldowen commented 1 year ago

I figured out why the plots I posted comparing with Abramzon results differ so much. I was computing (D/D_0)^2 instead of D/D_0. Here is the correct plot. The results are much better now. The increase at the early times is due to a temperature dependent liquid density in Pele, as opposed to a constant liquid density in the reference case. abram_comp

CAIROCharlie commented 1 year ago

Great result! Thank you for your support. I calculated monodisperse(100 microns) spray combustion using a grid with a base size of 234 microns. At an encryption level of 3 near the flame surface (minimum mesh size of 30 microns), no unphysical values appeared.

ldowen commented 1 year ago

That's good to know!

CAIROCharlie commented 1 year ago

Hello! Sorry to bother you. https://github.com/AMReX-Combustion/PeleLMeX/tree/development/Exec/Cases/CounterFlowSpray The SprayParticlesInitInsert.cpp in the above path has a bug.It has some differences from what is mentioned in the documentation. I found that I can successfully run the Counterflowspray using SprayParticlesInitInsert.cpp in 'spray_flame', and the results seem to be quite accurate. May I ask what is the difference between these two SprayParticlesInitInsert.cpp?May I use the SprayParticlesInitInsert.cpp in 'spray_flame' for calculating counterflow spray in the future? Thank you !

ldowen commented 1 year ago

Ah right! I forgot to update that file. The 'spray_flame' case in PeleMP is a single injection reacting spray case, while the Counterflowspray has a fuel injection on one side and an opposing air injection on the other with outflows on the top and bottom. The file in Counterflowspray was created by another developer and hasn't been updated to match the latest code. I will take care of that today and create a PR. The injection routines are designed to be as flexible as possible, so you should be able to use the SprayParticlesInitInsert.cpp from 'spray_flame' for a counterflow as long as you change the inputs associated with spray.jet1. to your specific needs.

CAIROCharlie commented 1 year ago

Thank you for your reply!! Yes, that's what I did. I established gas counterflow field through pelelm_prob.H, and then injected droplets through the SprayParticlesInitInsert.cpp from "spray_flame".

CAIROCharlie commented 1 year ago

Hello! Sorry to bother you. How can I change the output of PeleMP? such as add the energy source terms(_gpv.fluid_engsrc) to the output. Thank you very much!!

ldowen commented 1 year ago

If you are running a case with only one droplet, the easiest way would be to just do a print statement like

printf("engsrc %g\n", gpv.fluid_eng_src);

If you want it outputted for each droplet it would be a bit more involved. You would have to add a new particle component in SprayFuelData.H like

static const int pstateEng = pstateY + SPRAY_FUEL_NUM; static const int pstateNum = pstateEng + 1;

and a variable name in SprayIO.cpp. Then at the bottom of Drag.H you would assign the value as

p.rdata(SprayComps::pstateEng) = gpv.fluid_eng_src;

CAIROCharlie commented 1 year ago

This solved my problem, thanks!

CAIROCharlie commented 5 months ago

@ldowen Hello! Sorry to disturb you, but I'm encountering a slight issue with my 2D axisymmetric model in PeleLMeX(please find a schematic diagram attached for reference). It seems that at a specific time step, I'm receiving a amrex::Abort::0::Bad injection particle !!! error message. I was wondering if you might have any suggestions on how to resolve this matter? Your assistance would be greatly appreciated. Thank you very much! question

ldowen commented 5 months ago

Hi @CAIROCharlie the spray model is not setup to work in the axisymmetric configuration. Also, be aware that this repo is no longer maintained and the spray model has been moved here https://github.com/AMReX-Combustion/PelePhysics/tree/development/Source/Spray

drummerdoc commented 5 months ago

...if you think about it, an axisymmetric particle would be....interesting. :) (it'd be a ring that grew and shrunk with motion in the radial direction). I'd be interested to know if there's an application where that's what you'd actually want.

CAIROCharlie commented 3 months ago

Thank you very much for your response. I have considered changing my computational strategy.