If $M$ is a compact oriented manifold with boundary then by Poincaré duality the cohomology of $\Omega(M)$ (de Rham cohomology of $M$) is dual to the cohomology of $\Omega\_0(M)$, where $\Omega\_0(M)$ denotes differential forms vanishing on $\partial M$. This question is about a generalization of this fact to more complicated boundary conditions.


Suppose $M$ is a compact oriented $C^\infty$ manifold with corners. Its boundary is decomposed (by the corners) to faces (of dimension $\dim M -1$).


Let $V$ be a finite-dimensional vector space, and let us choose for every face $F\subset\partial M$ a subspace $V\_F\subset V$. Let us consider the complex (of $V$-valued differential forms with boundary conditions given by $V\_F$'s)
$$\Omega(M)\_{V,\{V\_F\}}=
\{\alpha\in\Omega(M)\otimes V;\quad \alpha|\_F\in\Omega(F)\otimes V\_F\text{ for all faces }F\}\subset\Omega(M)\otimes V.$$


The "naive dual" of $\Omega(M)\_{V,\{V\_F\}}$ is $\Omega(M)\_{V^\*,\{\text{ann} V\_F\}}$ with the pairing given by integration over $M$ ($\text{ann} V\_F\subset V^\*$ denotes the annihilator of $V\_F$).


**Is there a condition under which the pairing between the cohomologies of** $\Omega(M)\_{V,\{V\_F\}}$ **and of** $\Omega(M)\_{V^\*,\{\text{ann} V\_F\}}$ **is perfect? What is the reason for the fact that the pairing is not always perfect?**


Some remarks: 


* The "dual complex" $\Omega(M)\_{V^\*,\{\text{ann} V\_F\}}$ can be described as
$$\{\alpha\in\Omega(M)\otimes V^\*;\quad \int\_M\langle\alpha\wedge d\beta\rangle=
 (-1)^{\deg\alpha +1}\int\_M\langle d\alpha\wedge \beta\rangle\quad \forall\beta\in \Omega(M)\_{V,\{V\_F\}} \}.$$
* If $V\_F=0$ for all $F$'s then we get the standard Poincaré duality for manifolds with boundary.
* It is possible that manifolds with corners is not the right picture; the question might be about any "reasonable" division of $\partial M$ into "faces" (of dimension $\dim\partial M$).



Poincaré duality with boundary conditions
An example where the duality fails is when $M^n$ is the closed unit ball $B^3 \subset \mathbb{R}^3$, and its boundary $S^2$ is divided into four quarters by 2 great circles. If $V = \mathbb{R}$, $V\_F = V$ for 2 opposite quarters $F$ and $V\_F = 0$ for the other two, then $H^1\_{V, \{ V\_F \}}(M) = 0$ while $H^2\_{V^\*, \{\text{ann} V\_F\}} \cong \mathbb{R}$ (essentially, they are $H^1\_c$ and $H^2\_c$, respectively, of the product of an open 2-disc and a closed interval).


In a sense, the reason that the duality fails is that near the intersection of the two great circles, the set of boundary points where the forms are allowed to be non-zero is disconnected, and that no matter how small a neighbourhood we choose in $B^3$ for the intersection point, its cohomology will therefore not be entirely elementary. This can be prevented by demanding that every point in $\partial M$ has an "elementary" neighbourhood $U \cong \mathbb{H}^{n}$ such that


1. the subdivision of $\partial U$ into faces is diffeomorphic to a complete fan (a subdivision of $\mathbb{R}^{n-1}$ into simplicial cones),
2. $V$ has a basis $\{e\_i\}$ such that for each face $F$ meeting $U$,
$V\_F$ is spanned by a subset,
3. for each $e\_i$, the interior in $U$ of the union of the faces $F$ such that $e\_i \not\in V\_F$ is connected.


Essentially, 1. says that the subdivision of $\partial M$ is sensible, 3. prevents situations like in the example above, and 2. makes sure we can state 3. sensibly when $\dim V > 1$ (see example in Trial's comment below).
I think that if $M^n$ is oriented with boundary and possesses such "elementary" neighbourhoods, then
$$H^k\_{V, \{V\_F\}}(M) \cong H^{n-k}\_{c, V^\*, \{ \text{ann} V\_F\}}(M)^\*$$
where the subscript $c$ indicates the cohomology of a complex with compact supports. It should be possible to prove this using induction on a good cover (and the duality between the Mayer-Vietoris sequences for normal and compactly supported de Rham cohomology) like for standard Poincaré duality, provided that the statement is true for open subsets $U \subset M$ diffeomorphic to $\mathbb{R}^n$ and for the "elementary" neighbourhoods.


For $U \cong \mathbb{R}^n$ this is just usual Poincaré duality tensored with $V$. For an "elementary" neighbourhood $U$,
$$H^k\_{V, \{V\_F\}}(U) = \bigoplus\_i H^{k}\_{V\_i, \{V\_F \cap V\_i\}}(U) $$
$$H^k\_{c, V^\*, \{\text{ann} V\_F\}}(U) = \bigoplus\_i H^{k}\_{c, V\_i^\*, \{\text{ann} (V\_F \cap V\_i) \}}(U), $$
where $V\_i$ is the span of the element $e\_i$ of the basis from condition 2.
The terms on the right hand side all vanish, except that if $e\_i \in V\_F$ for all $F$ meeting $\partial U$ then $H^0\_{V\_i, \{V\_F \cap V\_i\}} \cong V\_i$ and $H^{n}\_{c, V\_i^\*, \{\text{ann} (V\_F \cap V\_i)\}}(U) \cong V\_i^\*$
(3. is used to show that $H^{n-1}\_{c, V\_i^\*, \{\text{ann} (V\_F \cap V\_i)\}}(U) = 0$). So the duality holds for the "elementary" neighbourhoods.


