Hello,

I am trying to use FiPy to build a system to simulate oxygen diffusion in
tissues in 3D.

My grid is a 20x20x20 mesh, defined as:

mesh=Grid3D(dx=dx,dy=dy,nx=nx,ny=ny, dz=dz, nz=nz)

Where nx = ny = nz = 20 and dx = dy = dz = 1. This approach is taken
from examples.diffusion.mesh1D, where nx was set to 50 and dx to 1 to
represent unity.

I setup my equation as:

eq=TransientTerm()==DiffusionTerm(coeff=D) + sourceGrid - sinkGrid

My oxygen diffusion coefficient (D) is 0.001 mm2/s. Each cell is my grid
corresponds to 0.042 mm3. So (Δx)^3 = 0.042mm^3 which implies (Δx^2)
~=0.121 mm2.

I understand that for 3D problems the Fourier number (Fo) has to be less
than or equal to 1/8.

With Fo = DΔt/(Δx^2)  <= 1/8 so Δt <= (Δx^2)/(8D) where replacing values I
get  Δt <= 15.125 .

>From the above, would it be sensible to setup my script as?
---
nx = ny = nz = 20
dx = dy = dz = 1
dt = 1
D = 0.121
mesh=Grid3D(dx=dx,dy=dy,nx=nx,ny=ny, dz=dz, nz=nz)

phi=CellVariable(name="solutionvariable",mesh=mesh,value=0.)

eq=TransientTerm()==DiffusionTerm(coeff=D) + sourceGrid - sinkGrid

eq.solve(var=phi,dt=dt)
---

Or am I missing something/have interpreted something wrong?

Kind Regards,
Dario
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to