0){
colorP1="#0080ff";
adtextP1=15;
}else {
colorP1="rgba(0,0,0,0)";
adtextP1=0;
}
if (kp==1 && P2>0){
colorP2="#0080ff";
adtextP2=15;
}else {
colorP2="rgba(0,0,0,0)";
adtextP2=0;
}
if (ha==h0){
adtextA=15;
}else {
adtextA=0;
}
if (Math.abs(ha-hb)<0.5){
adcura=(xb-rb)-(xa+ra);
colorbg="rgba(255,192,203,0.3)";
}else {
adcura=((xb-rb)-(xa+ra))/2-5;
colorbg="rgba(255,255,255,1)";
}
if (ha<41){
h1=41+83;
h2=(Volt-41*Aa)/Ab+83;
} else if (ha>117.5){
h1=117.5+83;
h2=(Volt-117.5*Aa)/Ab+83;
} else {
h1=ha+83;
h2=hb+83;
}
if (kma==1){
if (modeA==1 && ka==1){
xw=xa;
yw=h1+sizew/2;
}
if (modeB==1 && ka==2){
xw=xb;
yw=h2+sizew/2;
}
}
if (kmb==1){
if (modeA==1 && kb==1){
xe=xa+sizee/7;
ye=h1+sizee/2-4*Math.pow((Me/50),1/4);
}
if (modeB==1 && kb==2){
xe=xb+sizee/7;
ye=h2+sizee/2-4*Math.pow((Me/50),1/4);
}
}
if(xw==-20 && Math.abs(xw0-xa)<15){
modeA=0;
ka=0;
Pa=0;
P1=0;
xw0=xw;
}
if(xw==-20 && Math.abs(xw0-xb)<15){
modeB=0;
ka=0;
Pb=0;
P2=0;
xw0=xw;
}
if(xe==20 && Math.abs(xe0-xa)<15){
modeA=0;
kb=0;
Pa=0;
P1=0;
xe0=xe;
}
if(xe==20 && Math.abs(xe0-xb)<15){
modeB=0;
kb=0;
Pb=0;
P2=0;
xe0=xe;
}
]]>
This program simulates the changes in the height of the liquid surface and the pressure on the cross section when the pistons at different ends with different cross-sectional areas bear weights in a closed u-tube. In the simulation, the area under the left-handed piston is A1, the area under the right-handed piston is A2, and Aratio is the two cross-sectional area ratio (A2 / A1). In order to make it easier to observe the relationship between the change in load on the piston and the cross-sectional area ratio, the weights of the two pistons in the simulation are negligible. When there is no object on the two pistons, the liquid levels at both ends are the same. The user can adjust the size of the cross-sectional area at both ends, drag the weight and the elephant in the simulation to the top of the pistons, and change the weight of the two to observe the changes in the height of the liquid surface at both ends and the pressure on the section. Do you know what conditions should be set if you want the liquid level at the two ends to be equal, i.e. the weight of the elephant and the cross-sectional area of the two ends? At these conditions, which physical quantity will be equal?
A1: cross-sectional area A1 (square meters)
A2: cross-sectional area A2 (square meters)
Mw: Weight (kg)
Me: Elephant weight (kg)
Checkbox: Check to show the pressure arrows under each piston
1. Click and drag the elephant and/or weight to each of the pistons
2. Adjust parameters Mw, Me, A1 and A2 before running the simulation and observing the changes to height of each piston
3. Press reset to restart the simulation
]]>