Studying carbon formation at elevated pressure