When soap/shampoo bubble/film enclosing a small pressure in a small volume is formed on a (relatively hard) flat surface or inside parts of a circular cone/funnel, it forms a hemispherical bubble or respectively a segment of a sphere (as per Young-Laplace Law)

$$\kappa_1+\kappa_2 = H = p/T \tag1 $$

( Pressure differential $p$, surface tension $T$ are constants). The CMC (constant mean curvature) surface integrates to a spherical shape whose curvature increases with $ p/T.$

Similarly when a bubble forms enclosing air with pressure on an arbitrary patch of shape $f(x,y,z)=0,$ what would be the shape of the interfacial closed oval closed ring that is seen to definitely form, as a function of $(p/T, f)?$

When soap bubble moves to a new location, the ring changes shape conforming to new function $f$ of rigid shape.

We divide (1) by the following Boyle's Law to eliminate pressure $p$

$$ p \cdot V = C, \tag 2$$

getting constant pressure and volume $V$ of enclosure, since the RHS are physical and geometrical invariants:

$$ V= C/ T H \quad p = T H; \tag3 $$

Boyle's Law acts at constant temperature ..like when pressure is released volume increases in an automobile cylinder and the gas is compressed to low volume by piston moving in creating high pressure. Also a gas balloon expands due to rarified gas pressure at higher altitude would shrink back when brought back near ground.

As another example of the carrier rigid surface if a bubble is trapped inside a transparent glass torus, enclosing let us say a tenth of its inside volume $ 2 \pi^2 a^2 b $ then it forms a definite shape inside the torus ( up to arbitrary polar positions). we are attempting to find out here what shape has the film and its boundary described through differential equations.

EDIT1:

I thought in terms of Lagrangian $ H + \lambda V $ with orthogonality of film/surface as boundary in a variational problem. Assuming Monge form $ z=z(x,y) $ a functional to be extremized could be of a form

$$ \int\int \left(\frac{r}{(1+p^2)^{\frac32}}+\frac{t}{(1+q^2)^{\frac32}}-2 \lambda \, z(x,y)\right) dx\,dy$$