The short answer is yes, but it's not a one-liner. If you already have your setup to compress the material, then rather than directly setting the wall pressure, think of creating a servo-controlled boundary problem. You can use the tracker class to track the walls that you use for compression, then you can get the normal force using that tracker, and divide that by the area of the wall, you get the pressure. Adjust the wall velocity (or position) based on the difference between the current pressure and your target pressure. This creates a feedback loop that drives the system toward the desired pressure.
Let me know if there are further questions.
Ruochun