Closed iquasere closed 1 year ago
This is a bug. I will fix that. Instead of set to 0, you can remove fix diffusion command to avoid any diffusion for now. Regarding keeping methane at the bottom, I think if diffusion coeff > 0, the substrate can always diffuse to the entire box with sufficient long time (e.g, biological timestep)
Thank you, Bowen! Didn't think of the timestep, since I'm only printing every 10th, it might be diffusing too fast for that.
@shelllbw , seems to me this is still not fixed, is that correct? Does that also impact creating different local pHs, i.e., the pH is always a global homogeneous value?
I think if diffusion coeff > 0, the substrate can always diffuse to the entire box with sufficient long time
If I set the diffusion coeff to a small enough value (when it is fixed), it should be in line with biological processes, no?
seems to me this is still not fixed, is that correct?
The averaging is switched off in the previous commit. Is your code update-to-date?
Does that also impact creating different local pHs, i.e., the pH is always a global homogeneous value?
There is no pH in the system, the fix has not been migrated to the -dev version. fix nufeb/growth/energy and pH would be separate fixes.
If I set the diffusion coeff to a small enough value (when it is fixed), it should be in line with biological processes, no?
Sorry, I don't understand the question. Could you explain more?
The averaging is switched off in the previous commit. Is your code update-to-date?
You are absolutely correct, I forgot to pull the code on the remote server, only did it in my local laptop! It works perfectly now!
There is no pH in the system, the fix has not been migrated to the -dev version. fix nufeb/growth/energy and pH would be separate fixes.
I'll keep it out for now, then. Makes sense to keep them separate, and I might hack something now that diffusion can be used to create local values of metabolites...
Sorry, I don't understand the question. Could you explain more?
Chemical species diffusion is much quicker than biological processes, as you said. But I want to simulate the sequestration of substrates by nanomaterials, and setting the diffusion to much lower values (justified by the effects of the nanoparticles) might allow to simulate this. Also, mechanisms of quorum sensing might also be simulated by release of qs signals with much lower diffusion coefficients.
You've given me a lot of tools to work here, is what I mean. Thank you very much!
Now I think I understand better. The consistency between biological and diffusion processes would be the timesteps rather than diffusion coeff. Say the timestep for bio process is 100s and the timestep for diff is 1e-4s. In theory, we need to run diffusion for 1e6 steps in order to make the two processes consistent. But in the code, we use the mechanism of pseudo-steady state and frozen state to speed up the simulation for both open and closed systems.
I'm trying to create local scarcity of nutrients, using this script
and pointing at the lines
I thought I would have no diffusion of all metabolites. However, I still get quite a lot of it.
https://user-images.githubusercontent.com/16226371/220677536-36b5f29a-0593-4e7b-bca5-8d6c183f68e6.mp4
In this example, I would expect the methane produced to be kept at the bottom, however it fills everywhere at almost the same rate. Shouldn't it be kept at the bottom?