This code can be used to reproduce the results shown in figure 7 of the manuscript
"Adjoint-aided homogenization for flows through heterogeneous membranes", submitted to the
Journal of Fluid Mechanics.

Please consider citing our work if you use this code.

Authors:
Wittkowski Kevin (LFMI, EPFL)
Edouard Boujo (LFMI, EPFL)
Francois Gallaire (LFMI, EPFL)
Giuseppe Antonio Zampogna (LFMI, EPFL)

%%%%%% ABOUT THE CODE %%%%%%
This code is intended for demonstrational purpose only and we encorage you to independently validate our results.
The code has been developed using COMSOL Multiphysics 6.0 and Matlab R2021a in a Windows 10 environment.
These software packages are proprietary software of their respective owners. Please consider citing them.
We cannot guarantee compatibility with other machines or software versions.

%%%%%% HOW TO USE OUR CODE %%%%%%
The folder /comsol_code contains the COMSOL files needed to reproduce the shape sensitivities S1 and S2
for the permeability (M_nn) and slip (M_tt) quantities. These instructions run the direct and adjoint 
microscopic problems and compute S1 and S2. These data is then manually exported to Matlab for plotting.

For your convenience, the average values of M_nn, M_tt and the S1 and S2 quantities are also reported in the text 
files with corresponding names in this folder. The Matlab files "Mnn.m" and "Mtt.m" are used to reproduce panels 
c-h of figure 7 in the manuscript. 

