Open fophillips opened 10 years ago
Hi Fred,
I can't see this being difficult to implement, and so long as it's clear to the user what's going on then personally I have no problem with it being merged with the code. As far as I understand, the biofilm diffusivity is the same as in the bulk unless specified in the protocol, and the same thinking should apply here: the user should have to deliberately override the default settings to change individual relative diffusivities.
Whether or not it makes sense physically, I'm not the person to ask!
Regards, Rob Clegg Birmingham
So, I've been working on this a little bit here. I've used the fact that AgentContainer
already had a biomass concentration grid for each species called _speciesGrid
. I have made this public (speciesGrid
) and extracted the method fitSpeciesMassOnGrids
from writeGrids
to call it separately.
Now Domain.calculateComputationDomainGrids
checks if the species has a diffusivity as defined by an optional param
in the species markup and adds uses that diffusion coefficient instead.
A couple of problems so far:
calculateComputationDomainGrids
now depends on currentSim.agentGrid
to identify each species. This is fine once the simulation has been set up, but since introduction of self-attachment the Domain
constructor calls calculateComputationDomainGrids
before the agent grid object has been created.
Currently iDynoMiCS allows the user to specify the diffusivity of a solute in water, and the relative diffusivity of a solute in the biofilm compared to water. For the project I am working on, it would be useful to be able to specify the relative diffusivity compared with water on a per-species basis (my investigation centres on how one species may inhibit another's access to solute), is this a feature that has been considered for iDynoMiCS, and if I implement it is it a wanted feature, i.e. will a pull request be considered?
As far as I can tell, this would mean changing
Domain._biomassGrid
andDomain._biofilmDiffusivity
to arrays with an element for each species, and thenDomain.calculateComputationDomainGrids
will fetch the appropriate diffusivity for that species and map it onto_diffusivityGrid
.Thanks, Fred Phillips Edinburgh