- #1
chuakoktong
- 11
- 1
- TL;DR Summary
- Sorry this is very long but does it give a better insight to adiabatic process and free expansion process for a diatomic gas? I propose this sequence before and verified it is also an Euler method, using U=2.5PV, internal energy of diatomic gas and ##\frac{dU}{dv}=-p##
I verified with others the equation below is an Euler method as well with ##a## can be any value such that it give the same ##\frac{dE}{dv}=-1.4\frac{p}{v}## but with ##a## other than one, it have no meaning in physics. For anyone that already understand Euler method can omit the part i have underline.
So from the numerical integration(Euler method)
the first step is interpret as
The internal energy of a diatomic gas with internal energy U=2.5PV undergo an adiabatic expansion with a very small increase in volume from ##v_0## to ##v_0+h## and the condition for it to happen, it have to lost an amount which is equivalent to ##p_0h## where the value of p is define as instantaneous pressure when the gas with initial pressure ##p_0## just about to expand, which is p_0 in this case. In other word, if a gas with initial pressure ##p_0## just about to expand and not able to lose this amount of energy ##p_0h## then it cannot define as adiabatic expansion? Same goes if the gas with same condition being compress and not able to increase internal energy of ##p_0h## when it just about to compress, then it cannot consider as adiabatic compression?
##2.5p_0v_0-p_0(h)=2.5p_1(v_0+h)##
and compare ##p_1## from this equation ##p_0v_0^{1.4}=p_1(v_0+h)^{1.4}##
Both equation yield ##p_1=p_0-1.4h\frac{p_0}{v}## by using binomial approximation if h is very small value
Same goes for compression
##2.5p_0v_0-p_0(-h)=2.5p_1(v_0-h)##
and compare ##p_1## from this equation ##p_0v_0^{1.4}=p_1(v_0-h)^{1.4}##
##p_1## from both equation give ##p_1=p_0+1.4h\frac{p_0}{v_0}## when using binomial approximation if h is very small
For a free expansion, we can consider each step the lose in internal energy is 0 or ##\frac{dU}{dv}=0##
so this the numerical integration which result in PV=constant
##2.5p_0v_0+0(h)=2.5p_1(v_0+h)##
##2.5p_1(v_0+h)+0(h)=2.5p_2(v_0+2h)##
.
.
.
##2.5p_{n-1}(v_0+(n-1)h)+0(h)=2.5p_n(v_0+nh)##
whole sequence simplify to
##2.5p_0v_0=2.5p_n(v_0+nh)##_____________________________________________________________________________________________________________________
Consider the sequence below
##2.5p_0v_0-p_0(\frac{h}{n})=2.5p_1(v_0+\frac{h}{n})##
##2.5p_1(v_0+\frac{h}{n})-p_1(\frac{h}{n})=2.5p_2(v_0+2\frac{h}{n})##
.
.
.
##2.5p_{n-1}(v_0+(n-1)\frac{h}{n})-p_{n-1}(\frac{h}{n})=2.5p_n(v_0+h)##
and second sequence
##p_0v_0^{1.08687}-0.31313p_0v_0^{0.08687}(\frac{h}{n})=p_1(v_0+\frac{h}{n})^{1.08687}##
##p_1(v_0+\frac{h}{n})^{1.08687}-0.31313p_{1}(v_0+\frac{h}{n})^{0.08687}(\frac{h}{n})=p_2(v_0+2\frac{h}{n})^{1.08687}##
.
.
.
##p_{n-1}(v_0+(n-1)\frac{h}{n})^{1.08687}-0.31313p_{n-1}(v_0+(n-1)\frac{h}{n})^{0.08687}(\frac{h}{n})=p_n(v_0+h)^{1.08687}##
Does this make sense to say both sequence is the numerical integration for DE ##\frac{dp}{dv}=-1.4\frac{p}{v}##,when n tend to infinity where the exact solution of this DE is ##p_0v_0^{1.4}##=constant consider ##p(v_0)=p_0## which is actually the adiabatic process in diatomic gas.
I treat the first sequence ##E=u(p,v)=2.5pv## and ##\frac{dE}{dv}=g(p,v)=-p##
using
##u_p\frac{dp}{dv}+u_v##
##2.5v\frac{dp}{dv}+2.5p=-p##
##\frac{dp}{dv}=-1.4\frac{p}{v}##
and second sequence ##E=u_1(p,v)=pv^{1.08687}##, ##\frac{dE}{dv}=g_1(p,v)=-0.31313p##
did the same as above which yield ##\frac{dp}{dv}=-1.4\frac{p}{v}##
Attached also printscreen of python of the sequence but I afraid practically is not possible to show exactly the same so theoretically if n tend to infinity, is $p_n$ the same for both sequence? Consider ##p(v_0)=p_0## and h is constant.first sequence
[1]: https://i.stack.imgur.com/l6lyV.jpg
second sequence
[2]: https://i.stack.imgur.com/tiok9.jpg
Where the algorithm calculate ##p_n=p(v)=p(51)## using ##n=50000,h=50,p(1)=1## while the exact solution using ##pv^{1.4}##=constant is ##p(51)=\frac{1}{51^{1.4}}=0.00406819##
This is the answer verified by other people
Yes, the explicit Euler method is convergent with order 1. As the differential equations are equivalent and all are regular for ##v\in[1,51]## with smooth right sides, the method is applicable, converges for these ODE, and in the limit will converge to equivalent solutions.
If ##q=pv^a##, then ##\frac{dq}{dv}=v^a\frac{dp}{dv}+apv^{a-1}=(-1.4+a)pv^{a-1}=(-1.4+a)\frac{q}v## and the Euler method for this equation reads
$$
q_{n+1}=q_n+\Delta v\,(-1.4+a)\frac{q_n}{v_n}\iff p_{n+1}v_{n+1}^a=p_{n}v_{n}^a-\Delta v\,(1.4-a)p_{n}v_{n}^{a-1}
$$
In your case, ##a=1## or ##a=1.08687## (with ##1.4-a=0.31313##).
So from the numerical integration(Euler method)
the first step is interpret as
The internal energy of a diatomic gas with internal energy U=2.5PV undergo an adiabatic expansion with a very small increase in volume from ##v_0## to ##v_0+h## and the condition for it to happen, it have to lost an amount which is equivalent to ##p_0h## where the value of p is define as instantaneous pressure when the gas with initial pressure ##p_0## just about to expand, which is p_0 in this case. In other word, if a gas with initial pressure ##p_0## just about to expand and not able to lose this amount of energy ##p_0h## then it cannot define as adiabatic expansion? Same goes if the gas with same condition being compress and not able to increase internal energy of ##p_0h## when it just about to compress, then it cannot consider as adiabatic compression?
##2.5p_0v_0-p_0(h)=2.5p_1(v_0+h)##
and compare ##p_1## from this equation ##p_0v_0^{1.4}=p_1(v_0+h)^{1.4}##
Both equation yield ##p_1=p_0-1.4h\frac{p_0}{v}## by using binomial approximation if h is very small value
Same goes for compression
##2.5p_0v_0-p_0(-h)=2.5p_1(v_0-h)##
and compare ##p_1## from this equation ##p_0v_0^{1.4}=p_1(v_0-h)^{1.4}##
##p_1## from both equation give ##p_1=p_0+1.4h\frac{p_0}{v_0}## when using binomial approximation if h is very small
For a free expansion, we can consider each step the lose in internal energy is 0 or ##\frac{dU}{dv}=0##
so this the numerical integration which result in PV=constant
##2.5p_0v_0+0(h)=2.5p_1(v_0+h)##
##2.5p_1(v_0+h)+0(h)=2.5p_2(v_0+2h)##
.
.
.
##2.5p_{n-1}(v_0+(n-1)h)+0(h)=2.5p_n(v_0+nh)##
whole sequence simplify to
##2.5p_0v_0=2.5p_n(v_0+nh)##_____________________________________________________________________________________________________________________
Consider the sequence below
##2.5p_0v_0-p_0(\frac{h}{n})=2.5p_1(v_0+\frac{h}{n})##
##2.5p_1(v_0+\frac{h}{n})-p_1(\frac{h}{n})=2.5p_2(v_0+2\frac{h}{n})##
.
.
.
##2.5p_{n-1}(v_0+(n-1)\frac{h}{n})-p_{n-1}(\frac{h}{n})=2.5p_n(v_0+h)##
and second sequence
##p_0v_0^{1.08687}-0.31313p_0v_0^{0.08687}(\frac{h}{n})=p_1(v_0+\frac{h}{n})^{1.08687}##
##p_1(v_0+\frac{h}{n})^{1.08687}-0.31313p_{1}(v_0+\frac{h}{n})^{0.08687}(\frac{h}{n})=p_2(v_0+2\frac{h}{n})^{1.08687}##
.
.
.
##p_{n-1}(v_0+(n-1)\frac{h}{n})^{1.08687}-0.31313p_{n-1}(v_0+(n-1)\frac{h}{n})^{0.08687}(\frac{h}{n})=p_n(v_0+h)^{1.08687}##
Does this make sense to say both sequence is the numerical integration for DE ##\frac{dp}{dv}=-1.4\frac{p}{v}##,when n tend to infinity where the exact solution of this DE is ##p_0v_0^{1.4}##=constant consider ##p(v_0)=p_0## which is actually the adiabatic process in diatomic gas.
I treat the first sequence ##E=u(p,v)=2.5pv## and ##\frac{dE}{dv}=g(p,v)=-p##
using
##u_p\frac{dp}{dv}+u_v##
##2.5v\frac{dp}{dv}+2.5p=-p##
##\frac{dp}{dv}=-1.4\frac{p}{v}##
and second sequence ##E=u_1(p,v)=pv^{1.08687}##, ##\frac{dE}{dv}=g_1(p,v)=-0.31313p##
did the same as above which yield ##\frac{dp}{dv}=-1.4\frac{p}{v}##
Attached also printscreen of python of the sequence but I afraid practically is not possible to show exactly the same so theoretically if n tend to infinity, is $p_n$ the same for both sequence? Consider ##p(v_0)=p_0## and h is constant.first sequence
[1]: https://i.stack.imgur.com/l6lyV.jpg
second sequence
[2]: https://i.stack.imgur.com/tiok9.jpg
Where the algorithm calculate ##p_n=p(v)=p(51)## using ##n=50000,h=50,p(1)=1## while the exact solution using ##pv^{1.4}##=constant is ##p(51)=\frac{1}{51^{1.4}}=0.00406819##
This is the answer verified by other people
Yes, the explicit Euler method is convergent with order 1. As the differential equations are equivalent and all are regular for ##v\in[1,51]## with smooth right sides, the method is applicable, converges for these ODE, and in the limit will converge to equivalent solutions.
If ##q=pv^a##, then ##\frac{dq}{dv}=v^a\frac{dp}{dv}+apv^{a-1}=(-1.4+a)pv^{a-1}=(-1.4+a)\frac{q}v## and the Euler method for this equation reads
$$
q_{n+1}=q_n+\Delta v\,(-1.4+a)\frac{q_n}{v_n}\iff p_{n+1}v_{n+1}^a=p_{n}v_{n}^a-\Delta v\,(1.4-a)p_{n}v_{n}^{a-1}
$$
In your case, ##a=1## or ##a=1.08687## (with ##1.4-a=0.31313##).