  We compare the structural properties and dark matter content of star-forming
galaxies taken from the CAMELS cosmological simulations to the observed trends
derived from the SPARC sample in the stellar mass range $[10^{9},
10^{11}]\,\textrm{M}_{\odot}$, to provide constraints on the value of
cosmological and astrophysical (SN- and AGN-related) parameters. We consider
the size-, internal DM fraction-, internal DM mass- and total-stellar mass
relations for all the 1065 simulations from the IllustrisTNG, SIMBA and ASTRID
suites of CAMELS, and search for the parameters that minimize the $\chi^{2}$
with respect to the observations. For the IllustrisTNG suite, we find the
following constraints for the cosmological parameters: $\Omega_{\textrm{m}} =
0.27_{-0.05}^{+0.01}$, $\sigma_{8} = 0.83_{-0.11}^{+0.08}$ and $S_{8} =
0.78_{-0.09}^{+0.03}$, which are consistent within $1\sigma$ with the results
from the nine-year WMAP observations. SN feedback-related astrophysical
parameters, which describe the departure of outflow wind energy per unit star
formation rate and wind velocity from the reference IllustrisTNG simulations,
assume the following values: $A_{\textrm{SN1}} = 0.48_{-0.16}^{+0.25}$ and
$A_{\textrm{SN2}} = 1.21_{-0.34}^{+0.03}$, respectively. Therefore, simulations
with a lower value of outflow wind energy per unit star formation rate with
respect to the reference illustrisTNG simulation better reproduce the
observations. Simulations based on SIMBA and ASTRID suites predict central dark
matter masses substantially larger than those observed in real galaxies, which
can be reconciled with observations only by requiring values of
$\Omega_{\textrm{m}}$ inconsistent with cosmological constraints for SIMBA, or
simulations characterized by unrealistic galaxy mass distributions for ASTRID.
