This work presents some contributions to the mathematical and numerical modelling of fluids at nanometric scales. We are interested in two levels of modelling. The first level consists in an atomic description. We consider the problem of computing the shear viscosity of a fluid from a microscopic description. More precisely, we study the mathematical properties of the nonequilibrium Langevin dynamics allowing to compute the shear viscosity. The second level of description is a continuous description, and we consider a class of continuous models for equilibrium electrolytes, which incorporate on the one hand a confinement by charged solid objects and on the other hand non-ideality effects stemming from electrostatic correlations and steric exclusion phenomena due to the excluded volume effects. First, we perform the mathematical analysis of the case where the free energy is a convex function (mild non-ideality). Second, we consider numerically the case where the free energy is a non convex function (strong non-ideality) leading in particular to phase separation