  In a recent study [Phys. Rev. E \textbf{94}, 022103 (2016)] it has been shown
that, for a fluid film subject to critical adsorption, the resulting critical
Casimir force (CCF) may significantly depend on the thermodynamic ensemble.
Here, we extend that study by considering fluid films within the so-called
ordinary surface universality class. We focus on mean-field theory, within
which the OP profile satisfies Dirichlet boundary conditions and produces a
nontrivial CCF in the presence of external bulk fields or, respectively, a
nonzero total order parameter within the film. Our analytical results are
supported by Monte Carlo simulations of the three-dimensional Ising model. We
show that, in the canonical ensemble, i.e., when fixing the so-called total
mass within the film, the CCF is typically repulsive instead of attractive as
in the grand canonical ensemble. Based on the Landau-Ginzburg free energy, we
furthermore obtain analytic expressions for the order parameter profiles and
analyze the relation between the total mass in the film and the external bulk
field.
