I am trying to see if Vector fields(I am thinking of electric and magnetic fields) without sources(divergence less) can be represented by a pair of functions f and g such that the level surfaces of the functions represent flux lines. I am trying to solve this problem in R^3 with a euclidean metric. It seems there is a linear space generated by af+bg preserving the flux lines, so these functions are not uniquely defined.

I have some queries related to questions of this type.

- Can it be done locally ?( it seems this is the case)
- Can I also represent the magnitude of the vector fields(probably as a dual vector associated with df^dg and euclidean metric)
- Are there any topological obstructions when you try to solve the local problem and extend to all of
*R^3*
- Can it also be done if we include sources (remove the divergence free condition)
- Is there a general theory dealing with questions of this type? In specific if I have a manifold M of dimension d with a metric g and p-form fluxes, can I find d-p functions that can be used to represent these fluxes.
- Does this problem reduce to other mathematical quantities/results? Are there any general readings useful to approach these kinds of problems ?

Cross posted at https://math.stackexchange.com/questions/4197183/representing-flux-tubes-as-a-pair-of-level-surfaces-in-r3