Hello, researchers. Excuse me. Currently, I am doing some work on biomass pyrolysis. But there are some issues that keep me from moving forward. Firstly, I modified the chemical reaction rate code, but I am not sure if it is correct, although there was no error reported when establishing gfortran. May I ask if this code can be used to describe the reaction rate of this reaction? If the code is incorrect, can you provide me with some suggestions for modification? I will make careful revisions based on your suggestions. Secondly, to prove whether the reaction occurred, I created a plane and monitored the tar content on that plane, but no matter how I modified the code and detection type, the content remained zero. This makes me believe that the reaction rate was not added to the equation. My question is, is there an error in the selected monitoring type? Why did the reaction products not produce? In response to this phenomenon, I don’t know where the problem is, and I have made many attempts, all of which have clearly failed. This problem has been bothering me for about two weeks, and I have no other way out.
I would greatly appreciate it if this issue could be resolved.
Finally, although I have encountered many problems, I am very interested in this software and will continue to learn about it and become familiar with it. In the future, if given the opportunity, after graduating with a PhD, I can consider going to the United States to further study Mfix software.
2dd_2023-09-17T223640.347780.zip (93.9 MB)
I took a quick look at your
usr_rates_des.f. The indentation in the file is a bit messy - it does not make the program structure clear. I suggest you take a moment to clean it up.
After doing this it becomes clear that everything between lines 136 and 174 is controlled by this line:
I reached for the tool I most freqeuently utilize when debugging: the lowly
write statement. When in doubt, print it out.
Inserting right before L136:
write(*,*) "pM", pM
and rebuilding and running the solver, I see that
pM is always 1 - so that block of code is never executing.
I do not understand the commented-out
ELSE at L169:
168 DES_RATES(AC1) = 4.13d12 * exp(-1.058d4/TsX) * c_ActiveCellulose
170 DES_RATES(AC1) = ZERO
That means that even if the computation at L168 was being reached, the resulting value would be immediately overwritten.
Hope this helps,
Hello, CGW, Thank you very much for your reply. Based on your response, I have made modifications to the code and adjusted the indentation format. Subsequently, I ran the example but still did not produce any products. Why is this?
2dd_2023-09-18T235445.098041.zip (93.8 MB)
I’m not sure if this is the whole problem, but I think you need to set the ReactionRates array size to 3:
This sets the variable
nrr. Maybe we should put up a warning if there are more reactions defined than
nrr or possibly set
nrr automatically. But for now at least you need to set this to the number of reactions you want to monitor.
I suggest you set this to 3, and also use print statements, I mean
write(*,*) to see if the lines of code inside the
if statements are executing, and what values they produce.
Thank you very much for your patient reply.