I'm working on a 2d heat conduction problem with a deforming boundary. The material is exposed to a constant heat flux vector. My problem is that as the material deforms, part of the "exposed" boundary points away from the heat flux and is thus shielded from it. I tried using a conditional statement in the form:
n = FacetNormal(mesh)
q = conditional(gt(n[1], 0), dot(q_vector, n), Constant(0.0))
L = q*v*ds
When I look at the compile.log file I get errors saying that form header file is using undeclared identifiers 'n1' and 'n2'.
Does this idea make any sense? Is there something wrong with my implementation of it? I could remark the boundaries at every time step, but that seems excessive. Thanks.