Replies: 1 comment 1 reply
-
A few thoughts:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, my name is Thomas I'm a Master student in the Universidade Federal do Rio Grande do Sul (UFRGS) from Brazil, me and my research team are studying detonations, using the PeleC to do some simulations. We develop a code based on the article "Numerical investigation of the effect of equivalence ratio on the propagation characteristics and performance of rotating detonation engine - from Chen et al., 2023", so basically, we simulate a two-dimensional rotating detonation engine, and implemented the equations demonstrated by Chen et al., 2023, to represent the different conditions in of the injectors. Follow a schematic of our domain of what we are trying to simulate, basically we are imposing a shock-wave (a high pressure and high temperature region), in the domain and we want to investigate the interactions of the shock with the incoming flow of reactants, important to point here that all the simulations were performed with no chemical reactions..
I was obtaining NAN errors on my recent simulations, so I made two main different codes, to test different approaches to the problem, the none numerical error seems to be appearing at the interaction of the shock-wave with the incoming flow of the injectors:
First, I tested with my already developed non-premixed routine, this is what I will call code 1 in the attached files, in this code I used the following boundary conditions:
Also, I used the following physics and numerical methods options:
In this code I tried to implement functions to enhance the solution of my code, but none of these functions worked, seems like the PeleC simply ignored it. I made more than one test, so I will provide the simulation files (code_1) and the logs. The first function that I tried was related to mass fraction at the EB, I observed some negative values of mass fractions in some of my simulations, so tried this (https://amrex-combustion.github.io/PeleC/geometry/EB.html):
But, even after implementing this function on the code I still observed negative values of mass fraction.
I also wanted to enhance the refinement of my mesh, creating a specific region where I set the AMR equal to 4, I found some reference of how to implement it on the documentation (https://amrex-combustion.github.io/PeleC/InputFiles.html), follow my refinement setup:
REFINEMENT / REGRIDDING
amr.max_level = 2 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.blocking_factor = 8 # block factor in grid generation
amr.max_grid_size = 8
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est
amr.grid_eff = 0.7
SPECIFIC MESH REFINEMENT
tagging.refinement_indicators = yLow magvel
tagging.yLow.in_box_lo = 0.0 0.0 0.0
tagging.yLow.in_box_hi = 13.5 0.5 0.0
tagging.refinement_indicators = magvel
tagging.magvel.max_level = 4
tagging.magvel.value_greater = 1
tagging.magvel.field_name = MachNumber
But checking the grid on ParaView seems that it didn’t create a finer mesh at the bottom region of the mesh, so it seems that the code ignored the function, or it is not well implemented.
To implement these functions, I made different tests but as you will check on the log file from the code 1, the simulation simple stopped, and I’m not sure why. Follow the code 1 files - code_1.zip
After doing some testing with this code, I tried a simplified version, with premixed injection, simplified physics, still no chemical reactions and this time I set AMR = 0 and used a mesh of 1200 x 400, this will be referred to as code 2. The only function that I tried to use in this code was the “clipping method”, testing three conditions:
Tests 1, 2 and 3 resulted in nan and in the log files I also observed negative mass fractions values. In these cases, the shock-wave is swept by the incoming flow at the bottom, but even so it was possible to observe the interactions of the wave with the first instances of the flow entering the domain, and what caught my attention is that the nan appears in a similar position to that find in the first image error that I shared in the beginning of the post.
Follow the setup that I used on code 2:
And also the files code_2.zip
So, after these tests I have doubts of what can be the source of this nan error? Because I tested two different codes, with different BC, and conditions, I also tested with finer meshes and more conservative cfl values, and even them have nan errors.
Other question is regarding the functions, why even after using the mass fraction EB function I obtained negative values for the mass fractions? Is the function not well implemented? And the specific mesh refinement that I tried to create also seems not to work well, there is any other way to do that? The idea was to refine just the bottom region of the domain where the shock-wave will interact with the injection flow.
And finally, I would like to ask the developers if there is any specific function, or other ways to represent a shock-wave in PeleC? Maybe imposing the shock in the domain in a different way, or by calling a specific function in the simulation code, any suggestion would be nice, it needs to be a shock-wave that propagates in the domain.
Please, if possible, try running the simulations, I think it could give a better idea of what we are trying to simulate, and also a chance to better understand the errors that we are finding. Thanks in advance.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions