  In this paper we present the results of $N$-body simulations with a scalar
field coupled differently to cold dark matter (CDM) and baryons. The scalar
field potential and coupling function are chosen such that the scalar field
acquires a heavy mass in regions with high CDM density and thus behaves like a
chameleon. We focus on how the existence of the scalar field affects the
formation of nonlinear large-scale structure, and how the different couplings
of the scalar field to baryons and CDM particles lead to different
distributions and evolutions for these two matter species, both on large scales
and inside virialized halos. As expected, the baryon-CDM segregation increases
in regions where the fifth force is strong, and little segregation in dense
regions. We also introduce an approximation method to identify the virialized
halos in coupled scalar field models which takes into account the scalar field
coupling and which is easy to implement numerically. It is find that the
chameleon nature of the scalar field makes the internal density profiles of
halos dependent on the environment in a very nontrivial way.
