The foil bearing is an enabling technology for turbomachinery systems, which has the potential to enable cost efficient supercritical CO2 cycles. The direct use of the cycle's working fluid within the bearings results in an oil-free and compact turbomachinery system; however, these bearings will significantly influence the performance of the whole cycle and must be carefully studied. Moreover, using CO2 as the operating fluid for a foil bearing creates new modeling challenges. These include highly turbulent flow within the film, non-negligible inertia forces, high windage losses, and nonideal gas behavior. Since the flow phenomena within foil bearings is complex, involving coupled fluid flow and structural deformation, use of the conventional Reynolds equation to predict the performance of foil bearings might not be adequate. To address these modeling issues, a three-dimensional flow and structure simulation tool has been developed to better predict the performance of foil bearings for the supercritical CO2 cycle. In this study, the gas dynamics code, eilmer, has been extended for multiphysics simulation by implementing a moving grid framework, in order to study the elastohydrodynamic performance of foil bearings. The code was then validated for representative laminar and turbulent flow cases, and good agreement was found between the new code and analytical solutions or experiment results. A separate finite difference code based on the Kirchoff plate equation for the circular thin plate was developed in Python to solve the structural deformation within foil thrust bearings, and verified with the finite element analysis from ansys. The fluid-structure coupling algorithm was then proposed and validated against experimental results of a foil thrust bearing that used air as operating fluid. Finally, the new computational tool set is applied to the modeling of foil thrust bearings with CO2 as the operating fluid.