---------- Forwarded message ----------
From: Daniel Wheeler <[email protected]>
Date: Tue, Jun 5, 2012 at 9:51 AM
Subject: Re: dynamic boundary condition
To: wang yunbo <[email protected]>


On Mon, Jun 4, 2012 at 4:05 PM, wang yunbo <[email protected]> wrote:
>
> In the example, the boundary condition is written like
> this: metalEquationBCs = FixedValue(faces=mesh.getFacesTop(),
> value=bulkMetalConcentration).

That boundary condition is the far field value. It is not the boundary
condition at the interface.

> What I don't quite understand is
> bulkmetalconcentration is a constant, but the boundary condition should be
> spacially variant. Do you mean that the new boundary will be set to have a
> concentration of that value?

The boundary condition that you are probably interested in is not
coded as a boundary condition, but as a source term. The source term
is added in metalIonDiffusionEquation.py.

 <http://matforge.org/fipy/browser/branches/version-2_1/fipy/models/levelSet/electroChem/metalIonDiffusionEquation.py#L142>

The source term is constructed in metalIonSourceVariable.py.

 <http://matforge.org/fipy/browser/branches/version-2_1/fipy/models/levelSet/electroChem/metalIonSourceVariable.py#L85>

> Can you explain how to apply that boundary condition if I want to build my
> own "MetalIonDiffusionEquation"?

Take a look at the source term. The
"self.distanceVar.getCellInterfaceAreas()" variable value is the area
of interface in a given cell. This is zero away from the interface.
This variable lets you create an internal boundary condition.

--
Daniel Wheeler


-- 
Daniel Wheeler

_______________________________________________
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