Hi,
I have a 1D-diffusion, in which at r = 0, the flux for the variable phi is 0. And at r = R, the flux for phi is

C * (P - phi(R)) = D \frac{\partial phi}{\partial r}

where C and D are constants, P is a term that is dependent on time, and phi(R) is the value of phi at r = R.

I have no problem calculating P, as I have a time variable, and at each time step, I calculate P accordingly.

I set up the boundary condition for phi as (at each time step):

X = (C/D)*(P-phi.value[len(phi.value)-1])
BCs = (FixedFlux(faces=mesh.getFacesRight(),value= X), \
          FixedFlux(faces=mesh.getFacesLeft(),value=0.))


The resulting values for phi is several magnitudes lower than it should be. Is this because I did not delineate phi(R) correctly? Should it be a separate variable...but how?

Elizabeth

Reply via email to