  We propose an approach that links density functional theory (DFT) and
molecular dynamics (MD) simulation to study fluid behavior in nanopores in
contact with bulk (macropores). It consists of two principal steps. First, the
theoretical calculation of fluid composition and density distribution in
nanopore under specified thermodynamic conditions using DFT. Second, MD
simulation of the confined system with obtained characteristics. Thus, we
investigate an open system in a grand canonical ensemble. This method allows us
to investigate both structural and dynamic properties of confined fluid at
given bulk conditions and do not require computationally expensive simulation
of bulk reservoir. In this work, we obtain equilibrium density profiles of pure
methane, ethane and carbon dioxide and their binary mixtures in slitlike
nanopores with carbon walls. Good agreement of structures obtained by theory
and simulation confirms the applicability of the proposed method.
