I wrote the message in stackechange but I prefer to save it in the case they delete question. Maybe, here, if someone want to help me ?
-------------------------------------------------------------------
FIRST CASE
-------------------------------------------------------------------
I compute sum of energy in a cycle and I don't find 0, could you help me to find the error ? I started an equivalent thread in another physics forum but nobody understand. I hope my english is clear enough for understand the problem.
The system is under gravity and everywhere outside R1 and R2 there is 0.1 bar. It's a theoretical problem.
R1 = big volume, with gas at low pressure 0.1 bar for example.
R2 = small volume, this volume is constant always, it has gas under pressure 1 bar inside. It's very important to understand that R2 has only 4 walls when it is in R1. Slopes walls are assured by R1 and gaskets. Each wall of R2 is independant from each other. So, like pressure inside/outside each wall of R2 is different, each wall is unstable. So I need to use hydraulic cylinder not for add pressure, but for control the position of each wall.
Gaz inside R1, R2 and outside are at the same temperature T. It's only the pressure that is different inside R2.
1/ Move up R2 above R1, this cost energy e0
2/ Change walls of R1 for have R2 in R1, this don't cost energy in theory
3/ **Destroy slopes walls of R2** (put walls in R2 and imagine very thin walls), R1 is fixed. In this step it's very important to destroy slopes walls of R2. Sure, this need gasket and theorical walls, but it's poosible to build it.
4/ R2 move down with **volume of R2 = constant**, this gives energy 110000 J and gives energy e0.
5/ Rebuild walls of R2, Dettach it
6/ Rechaped R2 like need in step 1/ this don't cost energy
Repeat the cycle.
**I done numerical application:**
Sum of energy (energy giving in each cycle) is 110000 J
H = 5 m
P = 1 bar
Pl = 0.1 bar
p = 1 m
S1 at start 0.892 m (around)
S2 at start = 1 m
α = 15 °
e = 0.2 m
e' : volume of R2 is: h*(S2-2*e*tan(α))*p = 0.189 m3. So e' is e'(S2'-2*e'*tan(α))=V=0.189 so e'=0.05 m.
$$E_{step4} = \int_e^H p(P-Pl)S2(1+2xtan(\alpha)) dx - $$
$$\int_0^{H-e'} p(P-Pl)S1(1+2xtan(\alpha)) dx$$
Integrales with WxMaxima:
float(integrate(1*(100000-10000)*1*(1+2*x*tan(15)),x ,0.2,5)-integrate(1*(100000-10000)*1*(1+2*x*tan(15)),x ,0,4.
);
When R2 move down, S2>S1 all the time. So, pressure P inside R2 give a net force to the bottom. But, pressure outside R2 is lower at 0.1 bar, pressure P give more energy than pressure of 0.1 bar. It's possible to give oustide R1 and R2 atmospheric pressure (near 1bar), inside R1 at 1 bar too, and inside R2 2bars. The advantage to use water in R1 is to change fixed pressure more easily in R1 than with 2 gases.
Like S2 > S1 all the time when R2 move down, Gas in R2 works more for S2 than S1 works for gas, so for me gas is decelerating when R2 move down. And this is not possible in thermodynamics I think ?
-------------------------------------------------------------------
SECOND CASE
-------------------------------------------------------------------
It's possible to study this case:
All the system is on Earth, all around the system there is atmospheric air gas at temperature 10°C.
I use the cycle :
1/ R2 is like image shows
2/ I move down R2 with volume = constante. R2 has no slopes, there are gaskets like first case
3/ At bottom, I build walls for R2 on slopes (imagine thin walls), like that R2 is closed
4/ I modify the shape of R2, this don't cost energy in theory
5/ I move up R2 this cost only energy for move up walls and gas but it is recover at step 2, or it is possible to have the gravity perpendicular to the screen
6/ I "destroy" slope walls of R2 (in fact, destroy it and put it in R2)
Repeat cycle
There is gas under pressure at 1 bar and temperature T = 10°C in R2. R2 give energy from gas under pressure when it move down. Sure strictly vacuum is not possible but with iron (walls), for example, the vapor pressure can be very low. Each cycle, R2 lost temperature I think, it's possible to increase temperature inside R2 from the external temperature with a wall of R2 (side view) in contact with atmospheric temperature. Even the small gas inside vacuum container is at 10°C like the pressure is very low, the temperature of vacuum area increase very slowly, and it's possible to cool it with external gas I think.
Note, it's possible to do the same with a liquid inside R2 and nothing outside R2. A liquid can be under pressure easily and it's possible to recover energy from liquid's pressure (in theory). So, move R2 like show allow to recover energy from nothing in fact.