  We develop a volume penalization method for inhomogeneous Neumann boundary
conditions, generalizing the flux-based volume penalization method for
homogeneous Neumann boundary condition proposed by Kadoch et al. [J. Comput.
Phys. 231 (2012) 4365]. The generalized method allows us to model scalar flux
through walls in geometries of complex shape using simple, e.g. Cartesian,
domains for solving the governing equations. We examine the properties of the
method, by considering a one-dimensional Poisson equation with different
Neumann boundary conditions. The penalized Laplace operator is discretized by
second order central finite-differences and interpolation. The discretization
and penalization errors are thus assessed for several test problems.
Convergence properties of the discretized operator and the solution of the
penalized equation are analyzed. The generalized method is then applied to an
advection-diffusion equation coupled with the Navier-Stokes equations in an
annular domain which is immersed in a square domain. The application is
verified by numerical simulation of steady free convection in a concentric
annulus heated through the inner cylinder surface using an extended square
domain.
