Thanks Daniel for the fast answer as always. I am a bit confused : if I understood correctly, in this example, the boundary condition is that the normal component of the gradient of c is equal the velocity of the interface. and as you know the velocity of the interface (supposed to be propotional to the concentration c) then it's fine.
If you make a different assumption, for example you don't know anything about the speed of the interface (u don't know that the speed is proportional to concentration) so you can only say that the speed of the velocity is given by the gradient of concentration. you need another boundary condition (for example the concentration at the interface is null) how could I implement that ? do you have any idea ? Julien On Wed, Mar 23, 2011 at 4:47 PM, Daniel Wheeler <daniel.wheel...@gmail.com>wrote: > On Tue, Mar 22, 2011 at 1:23 PM, Julien Derr <julien.d...@gmail.com> > wrote: > > Hi everyone! > > I didn't bother you for a long time! I am back! > > Good to have you back. > > > in the simpletrenchsystem.py example, I have a question about the > boundary > > condition : > > > > metalEquation.solve(metalVar, dt = dt, > > boundaryConditions = metalEquationBCs) > > > > > > metalequation BCs defines the boundary condition on the top faces, but > what > > is exactly the boundary conditions with the interface, and how to change > it > > ? > > Take a look at < > http://www.ctcms.nist.gov/fipy/fipy/generated/models.levelSet.electroChem.html#module-fipy.models.levelSet.electroChem.metalIonDiffusionEquation > >. > It might help. > > If you want to change the way the boundary condition works, you can > extract the equation from > < > http://matforge.org/fipy/browser/trunk/fipy/models/levelSet/electroChem/metalIonDiffusionEquation.py#L150 > > > and build it in your script. > > You can then explicitly include the source term for the boundary > condition (see < > http://matforge.org/fipy/browser/trunk/fipy/models/levelSet/electroChem/metalIonSourceVariable.py#L88 > >). > > The important part of this is the > "self.distanceVar.cellInterfaceAreas" field, which gives an > approximation for the area of the boundary interface in a given cell. > > Hope this helps. > > -- > Daniel Wheeler >