Quantcast
Channel: Latest Discussions - COMSOL Forums
Viewing all articles
Browse latest Browse all 26527

Using a boundary condition in an equation

$
0
0

Hi!

I'm buildig a model in the "Transport of Concentrated Species" interface. The equation I'm using is Fick's law (time dependent). I have two species in the model, and I set up a flux boundary condition for each species in a specific boundary. Now, for the boundary condition of one of the species I need the concentration of the other species in that boundary, that is, I need the solution of the Fick's law in that specific boundary, for example:

Species 1: O
Species 2: R

The flux boundary condition for one species is a function of the concentration of the other species in that specific boundary. In the mathematic equations that were developed for this model, that boundary is x=0, so I have:

-Do*(dCo/dx)|x=0 = CR|x=0 multiplied for other things
-DR* (dCR/dx)|x=0 = Co|x=0 multiplied for other things.

D is the diffusion coefficient.
C is the concentration of a specific species

The expressions at the left side of the equations are fluxes, and I can set up flux boundary conditions in the interface I'm working on, so I just have to define a flux boundary condition, select the boundary and enter the right side of the equations. The problem is that those expressions on the right side are dependent of the concentration of the other species IN THAT SPECIFIC BOUNDARY.

My problem is, that I don't know how to tell to Comsol that I need the concentration of a species in that boundary. I know how to tell to the software to use the concentration of one species in the entire model, but I don't know how to specify the concentration in that specific position.

I would be very greatful if somebody can help me.


Viewing all articles
Browse latest Browse all 26527

Trending Articles