  A chemodynamical model of our galaxy is fitted to data from DR17 of the
APOGEE survey supplemented with data from the StarHorse catalogue and gaia DR3.
Dynamically, the model is defined by action-based distribution functions for
dark matter and six stellar components plus a gas disc. The gravitational
potential jointly generated by the model's components is used to examine the
galaxy's chemical composition within action space. The observational data
probably cover all parts of action space that are populated by stars. The
overwhelming majority of stars have angular momentum J_\phi>0 implying that
they were born in the Galactic disc. High-alpha stars dominate in a region that
is sharply bounded by J_\phi \la J_\phi(solar). Chemically the model is defined
by giving each stellar component a Gaussian distribution in ([Fe/H],[Mg/Fe])
space about a mean that is a linear function of the actions. The model's 47
dynamical parameters are chosen to maximise the likelihood of the data given
the model in 72 three-dimensional velocity spaces while its 70 chemical
parameters are similarly chosen in five-dimensional chemo-dynamical space. The
circular speed falls steadily from 237\kms at R=4\kpc to 218\kms at R=20\kpc.
Dark matter contributes half the radial force on the Sun and has local density
0.011\msun\pc^{-3}, there being 24.5\msun\pc^{-2} in dark matter and
26.5\msun\pc^{-2} in stars within 1.1\kpc of the plane.
