  Knotted fields enrich a variety of physical phenomena, ranging from fluid
flows, electromagnetic fields, to textures of ordered media. Maxwell's
electrostatic equations, whose vacuum solution is mathematically known as a
harmonic field, provide an ideal setting to explore the role of domain topology
in determining physical fields in confined space. In this work, we show the
uniqueness of a harmonic field in knotted tubes, and reduce the construction of
a harmonic field to a Neumann boundary value problem. By analyzing the harmonic
field in typical knotted tubes, we identify the torsion driven transition from
bipolar to vortex patterns. We also analogously extend our discussion to the
organization of liquid crystal textures in knotted tubes. These results further
our understanding about the general role of topology in shaping a physical
field in confined space, and may find applications in the control of physical
fields by manipulation of surface topology.
