Hi Natalie,

> Here my equations
>
> dt_c + V* nabla_c - D * laplace_c = 0   on omega (2D)    (V=velocity,
> D=const) with neumann-BC:  nabla_c *n =  q *c_old   on boundary_N
>
> solving this, as said, works well.
>
> But to get q, i have to solve (in the same time-step)
>
> dt_q =  q * c      (only) on boundary_N (1D)
> with c from above.

So if I understand this correctly, then q=q(x,t) is a variable that is 
defined on the boundary only. And because c(x,t) is a continuous function 
in space, q(x,t) should also be continuous as a function of x at all 
times, right?

One way to deal with this is to treat it as exactly this: a continuous 
function that happens to be only defined on the boundary. Or, if you 
wanted to, is extended by zero in the interior. So the way I'd probably 
approach this would be to do the following:

1/ Define a finite element that contains components for both c and q and a 
DoFHandler on it; alternatively, have two DoFHandlers defined on the same 
mesh for the two variables. The point is that I would define q as a field 
on all of Omega, not just on the boundary as this is mainly what deal.II 
is meant to do.

2/ The weak form for the c-equation is clear. For the q-equation, your weak 
form would be (let's assume you are just using a forward Euler scheme):
  (q_n-q_{n-1}, p)_{Gamma} = (q_{n-1}*c, p)_{Gamma}   forall p
where you have to integrate over the boundary Gamma instead of a domain. 
This you would do using the FEFaceValues class like in, for example, 
step-7 or step-9.

Does this help a bit?

Best
 W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to