Bernoulli's equation :
Do you mean : constant
question 1: can this be simulated with an ideal gas between the pistons?
Could you describe your model in more detail? I can not catch your ideas.
question 2: is Bernoulli's equation true for an ideal gas?
The Bernoulli's principle is valid for incompressible flows (e.g. most liquid flows) and also for compressible flows (e.g. gases) moving at low Mach numbers