Modelling Diffusion of Oxygen

56 views
Skip to first unread message

Yas Oloumi

unread,
Aug 5, 2020, 7:05:00 PM8/5/20
to HAL Q and A
I have been trying to model oxygen diffusion. However, the dimensionless diffusion coefficient I calculate is 29160 which is bigger than the stability limit of 0.25 of the HAL Diffusion function. The diffusion coefficient I'm using is the realistic value for oxygen which is 1.62*10^(-5) cm^2/sec with a time step of 2 hrs (2/24 days) and a space step of 20 microns. See picture attached for exact calculations. How am I able to incorporate this realistic diffusion coefficient without the dimensionless value being bigger than the limit of 0.25? Thanks. 
IMG_2163.HEIC

Rafael Bravo

unread,
Aug 6, 2020, 6:40:47 PM8/6/20
to HAL Q and A
Yas,

The issue you are facing is very common in hybrid models. How to reconcile the relatively fast diffusion rates of molecules with the relatively slow proliferation and movement of cells? When the timesteps of the dynamics differ this much, what we typically do is resolve the PDEs to steady state between each cell behavior step. Oddly enough, I don't have a hal Example or a spot in the Manual to point you to. I will give a pseudo-code description here instead. Assume MAX_PDE_STEPS and THRESHOLD are constants that you set based on the level of accuracy you want your PDE to maintain.

for(int i=0;i<MAX_PDE_STEPS;i++){

//do PDE stuff here

if(PDE.MaxDelta()<THRESHOLD){

PDE.Update();
break;

}

PDE.Update();

}

note that you have to call MaxDelta() before calling PDE.Update(), this is because MaxDelta() takes the maximum of the changes that you are going to add when Update() is called. these are erased when Update() runs so MaxDelta() must be called first.

Yas Oloumi

unread,
Aug 12, 2020, 1:34:42 PM8/12/20
to HAL Q and A
That make a lot of sense. Thanks Rafael! 
Reply all
Reply to author
Forward
0 new messages