/** # The SAG equation The SAG equation is a diffusion Fick equation of a specie $c$: $$ \nabla^2 c = 0 $$ with boundary condition of cristal growth on the substrate $\frac{\partial c}{\partial y} = bi\; c$ on $y=0$ ($bi$ is a kind of Biot number) and no growth $\frac {\partial c}{\partial y}=0$ on $y=0$ on the mask and far from the wall, there is a constant arrival of species $c(x,top)=1$, right and left are periodic conditions (or infinite domain), we solve it in 3D. This system can be solved with the poisson solver. */ //#include "grid/multigrid.h" #include "grid/multigrid3D.h" #include "poisson.h" #include "utils.h" /** Concentration source and flux, and some obvious variables */ scalar c[],s[],flux[]; double bi,dx; /** the exact solution without mask */ double cexact(double y) { double ce; ce = (bi*y+1)/(bi*L0+1); return ce; } /** the mask function */ double masque(double x, double z) { return ((fabs(x)<1 && z<0)? 1:0); } /** Boundary conditions: a given concentration at the top, no reaction on the mask (no flux: $\partial c(t)/\partial y=0$), a complete reaction on the cristal $\partial c(t)/\partial y = bi\; c(t)$ this mixed condition is written `(c[0,0]-c[bottom])/Delta = bi (c[0,0] + c[bottom])/2` */ c[top] = dirichlet(1); c[bottom] = ( masque(x,z))? neumann(0) :c[]*(2.-bi*Delta)/(2.+bi*Delta) ; c[right] = neumann(0); c[left] = neumann(0); c[back] = neumann(0); c[front] = neumann(0); flux[bottom] = neumann(0); /** ## Parameters The size of the domain `L0`. it is a cube of reacting surface on the plane $-L_0/21 ? $4: 1) not ~~~ ## Bibliography * N. Dupuis, J. Décobert, P.-Y. Lagrée, N. Lagay, D. Carpentier, F. Alexandre (2008): "Demonstration of planar thick InP layers by selective MOVPE". Journal of Crystal Growth issue 23, 15 November 2008, Pages 4795-4798 * N. Dupuis, J. Décobert, P.-Y. Lagrée , N. Lagay, C. Cuisin, F. Poingt, C. Kazmierski, A. Ramdane, A. Ougazzaden (2008): "Mask pattern interference in AlGaInAs MOVPE Selective Area Growth : experimental and modeling analysis". Journal of Applied Physics 103, 113113 (2008) Version 1: april 2015 ready for new site 09/05/19 */