Appendix/Ramblings/51BiPolytropeStability/BetterInterfacePt2

From jetwiki
Jump to navigation Jump to search

Better Interface for 51BiPolytrope Stability Study

This is Part 2 of an extended chapter discussion. For Part 1, go here.

Discretize for Numerical Integration (continued)

General Discretization

Fourth Approximation

Let's assume that we know the four quantities, xJ1,xJ,(xJ)'(dx/dr~)J, and (xJ1)'(dx/dr~)J1 and want to project forward to determine, xJ+1. We should assume that, locally, the displacement function x is cubic in r~, that is,

x =

a+br~+cr~2+er~3

dxdr~ =

b+2cr~+3er~2,

where we have four unknowns, a,b,c,e. These can be determined by appropriately combining the four relations,

(xJ)' =

b+2cr~J+3er~J2,

(xJ1)' =

b+2c(r~JΔr~)+3e(r~JΔr~)2,

xJ =

a+br~J+cr~J2+er~J3,

xJ1 =

a+b(r~JΔr~)+c(r~JΔr~)2+e(r~JΔr~)3,

The difference between the first two expressions gives,

(xJ)'(xJ1)' =

[2cr~J+3er~J2][2c(r~JΔr~)+3e(r~JΔr~)2]

  =

2cr~J+3er~J2[2cr~J2cΔr~+3e(r~J22r~JΔr~+Δr~2)]

  =

2cΔr~+6er~JΔr~3eΔr~2

2cΔr~ =

[(xJ)'(xJ1)']+3eΔr~26er~JΔr~

c =

[(xJ)'(xJ1)'2Δr~]+3e[Δr~2r~J].

And the difference between the last two expressions gives,

xJxJ1 =

[br~J+cr~J2+er~J3][b(r~JΔr~)+c(r~JΔr~)2+e(r~JΔr~)3]

  =

bΔr~+c(2r~JΔr~Δr~2)+er~J3e(r~JΔr~)(r~J22r~JΔr~+Δr~2)

  =

bΔr~+c(2r~JΔr~Δr~2)+er~J3e[(r~J)(r~J22r~JΔr~+Δr~2)(Δr~)(r~J22r~JΔr~+Δr~2)]

  =

bΔr~+c(2r~JΔr~Δr~2)e[3r~J2Δr~+3r~JΔr~2Δr~3]

  =

bΔr~+c(2r~JΔr~Δr~2)+e[3r~J2Δr~3r~JΔr~2+Δr~3]

bΔr~ =

[xJxJ1]+2cΔr~[Δr~2r~J]e[3r~J2Δr~3r~JΔr~2+Δr~3]

  =

[xJxJ1]+{[(xJ)'(xJ1)']+3eΔr~[Δr~2r~J]}[Δr~2r~J]3eΔr~[r~J2r~JΔr~+Δr~23]

  =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]+3eΔr~[Δr~22r~JΔr~]3eΔr~[r~JΔr~2r~J2]3eΔr~[r~J2r~JΔr~+Δr~23]

  =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]3eΔr~{[r~JΔr~Δr~22]+[r~JΔr~2r~J2]+[r~J2r~JΔr~+Δr~23]}

  =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]+eΔr~[3r~J23r~JΔr~+Δr~22].

Summary #1:

In terms of the coefficient, e

bΔr~ =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]+eΔr~[3r~J23r~JΔr~+Δr~22],

2cΔr~ =

[(xJ)'(xJ1)']+eΔr~[3Δr~6r~J].

Hence, from the first of the four relations, we find that,

(xJ)'Δr~3er~J2Δr~ =

(bΔr~)+(2cΔr~)r~J

  =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]+eΔr~[3r~J23r~JΔr~+Δr~22]+{[(xJ)'(xJ1)']+eΔr~[3Δr~6r~J]}r~J

  =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2]+eΔr~[3r~J23r~JΔr~+Δr~22]+eΔr~[3r~JΔr~6r~J2]

  =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2]+eΔr~[3r~J2+Δr~22]

(xJ)'Δr~ =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2]+e[Δr~32]

e[Δr~32] =

[xJxJ1][(xJ)'(xJ1)'][Δr~2]+(xJ)'Δr~

  =

[xJ1xJ]+[(xJ1)'+(xJ)']Δr~2

eΔr~3 =

2[xJ1xJ]+[(xJ1)'+(xJ)']Δr~.

Finally, from the third of the four relations, we can evaluate the coefficient, a; specifically,

xJaer~J3 =

br~J+cr~J2

  =

r~JΔr~{bΔr~}+r~J22Δr~{2cΔr~}

  =

r~JΔr~{[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]+eΔr~[3r~J23r~JΔr~+Δr~22]}+r~J22Δr~{[(xJ)'(xJ1)']+eΔr~[3Δr~6r~J]}

  =

{r~JΔr~[xJxJ1]+r~JΔr~[(xJ)'(xJ1)'][Δr~2r~J]+er~J[3r~J23r~JΔr~+Δr~22]}+{r~J22Δr~[(xJ)'(xJ1)']+er~J22[3Δr~6r~J]}

  =

r~JΔr~[xJxJ1]+[(xJ)'(xJ1)'][r~J2r~J22Δr~]+e[3r~J33r~J2Δr~+r~JΔr~22]+e[3r~J2Δr~23r~J3]

  =

r~JΔr~[xJxJ1]+12Δr~[(xJ)'(xJ1)'][r~JΔr~r~J2]+eΔr~2[r~JΔr~3r~J2].

That is,

a =

xJr~JΔr~[xJxJ1]12Δr~[(xJ)'(xJ1)'][r~JΔr~r~J2]e{Δr~2[r~JΔr~3r~J2]+r~J3}

  =

xJr~JΔr~[xJxJ1]12Δr~[(xJ)'(xJ1)'][r~JΔr~r~J2]eΔr~3{12Δr~2[r~JΔr~3r~J2]+(r~JΔr~)3}

Summary #2:

In terms of the coefficient, e

a =

xJr~JΔr~[xJxJ1]12Δr~[(xJ)'(xJ1)'][r~JΔr~r~J2]eΔr~3{12Δr~2[r~JΔr~3r~J2]+(r~JΔr~)3},

bΔr~ =

[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]+eΔr~3[3r~J2Δr~23r~JΔr~+12],

cΔr~2 =

[(xJ)'(xJ1)']Δr~2+eΔr~3[323r~JΔr~],

eΔr~3 =

2[xJ1xJ]+[(xJ1)'+(xJ)']Δr~.

This is test ...

r~J=r~i+Δr~ Δr~ xJ xJ1 (xJ)' (xJ1)'
0.01740039 0.001936393 -4.695376 -4.547832 -116.0119 -76.19513
a =

3.369552.76645eΔr~3(608.9698)=232.7874,

bΔr~ =

0.5067329+eΔr~3(215.7856)=+80.819698,

cΔr~2 =

0.0385505+eΔr~3(25.45794)=9.51370,

eΔr~3 =

0.3721883.

Hence,

xJ =

a+bΔr~(r~JΔr~)+cΔr~2(r~JΔr~)2+eΔr~3(r~JΔr~)3

  =

232.7874+726.2442768.2108+270.0593=4.68369.

Higher precision value (from Excel) is xJ=4.695376, which precisely matches the input value. Also from Excel, xJ1=4.547832 and xJ+1=3.803455.

As a result,

xJ+1 =

{a}+(r~J+Δr~){b}+(r~J+Δr~)2{c}+(r~J+Δr~)3{e}

  =

{a}+(r~JΔr~+1){bΔr~}+(r~JΔr~+1)2{cΔr~2}+(r~JΔr~+1)3{eΔr~3}

  =

xJr~JΔr~[xJxJ1]12Δr~[(xJ)'(xJ1)'][r~JΔr~r~J2]eΔr~3{12Δr~2[r~JΔr~3r~J2]+(r~JΔr~)3}

   

+(r~JΔr~+1){[xJxJ1]+[(xJ)'(xJ1)'][Δr~2r~J]+eΔr~3[3r~J2Δr~23r~JΔr~+12]}

   

+[(r~JΔr~)2+2r~JΔr~+1]{[(xJ)'(xJ1)']Δr~2+eΔr~3[323r~JΔr~]}

   

+(r~JΔr~+1)[(r~JΔr~)2+2r~JΔr~+1]{eΔr~3}

xJ+1 =

xJr~JΔr~[xJxJ1]12Δr~[(xJ)'(xJ1)'][r~JΔr~r~J2]+[xJxJ1](r~JΔr~+1)+[(xJ)'(xJ1)'][Δr~2r~J](r~JΔr~+1)+[(r~JΔr~)2+2r~JΔr~+1][(xJ)'(xJ1)']Δr~2

   

+eΔr~3[3r~J2Δr~23r~JΔr~+12](r~JΔr~+1)+eΔr~3[323r~JΔr~][(r~JΔr~)2+2r~JΔr~+1]+eΔr~3(r~JΔr~+1)[(r~JΔr~)2+2r~JΔr~+1]eΔr~3{12Δr~2[r~JΔr~3r~J2]+(r~JΔr~)3}

  =

2xJxJ112[(xJ)'(xJ1)'][r~Jr~J2Δr~]+12[(xJ)'(xJ1)'][Δr~2r~J](r~JΔr~+1)+[r~J2Δr~+2r~J+Δr~][(xJ)'(xJ1)']12

   

+eΔr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J14xJ]+[4(xJ)'+2(xJ1)']Δr~=5.15132.

Fifth Approximation

Let's assume that we know the three quantities, xJ1,xJ,(xJ)'(dx/dr~)J, and want to project forward to determine, xJ+1. Here we will assume that, locally, the displacement function x has only an even-power dependence on r~, that is,

x =

a+br~2+cr~4

dxdr~ =

2br~+4cr~3,

where we have three unknowns, a,b,c. These can be determined by appropriately combining the three relations,

(xJ)' =

2br~J+4cr~J3,

xJ =

a+br~J2+cr~J4,

xJ1 =

a+b(r~JΔr~)2+c(r~JΔr~)4,

Determine Coefficients

The difference between the last two expressions gives,

xJxJ1 =

[br~J2+cr~J4][b(r~JΔr~)2+c(r~JΔr~)4]

  =

br~J2+cr~J4b(r~J22r~JΔr~+Δr~2)c(r~J22r~JΔr~+Δr~2)(r~J22r~JΔr~+Δr~2)

  =

cr~J4+2br~JΔr~bΔr~2c[r~J2(r~J22r~JΔr~+Δr~2)2r~JΔr~(r~J22r~JΔr~+Δr~2)+Δr~2(r~J22r~JΔr~+Δr~2)]

  =

cr~J4+2br~JΔr~bΔr~2c[r~J42r~J3Δr~+r~2Δr~22r~J3Δr~+4r~J2Δr~22r~JΔr~3+r~J2Δr~22r~JΔr~3+Δr~4]

  =

b[2r~JΔr~Δr~2]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

  =

2br~JΔr~[1Δr~2r~J]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4].


Repeat, to check …

xJxJ1

=

[br~J2+cr~J4][b(r~JΔr~)2+c(r~JΔr~)4]

 

=

[br~J2+cr~J4][b(r~J22r~JΔr~+Δr~2)+c(r~J22r~JΔr~+Δr~2)(r~J22r~JΔr~+Δr~2)]

 

=

[cr~J4]+b[2r~JΔr~Δr~2]c[r~J2(r~J22r~JΔr~+Δr~2)2r~JΔr~(r~J22r~JΔr~+Δr~2)+Δr~2(r~J22r~JΔr~+Δr~2)]

 

=

b[2r~JΔr~Δr~2]c[(2r~J3Δr~+r~J2Δr~2)+(2r~J3Δr~+4r~J2Δr~22r~JΔr~3)+(r~J2Δr~22r~JΔr~3+Δr~4)]

 

=

2br~JΔr~[1Δr~2r~J]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

Hence,

xJxJ1

=

[(xJ)'Δr~4cr~J3Δr~][1Δr~2r~J]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

 

=

[(xJ)'Δr~][112(Δr~r~J)]+c[4r~J3Δr~][Δr~2r~J1]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

xJxJ1(xJ)'Δr~[112(Δr~r~J)]

=

c[2r~J2Δr~24r~J3Δr~]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

 

=

c[4r~J2Δr~2+4r~JΔr~3Δr~4]

4cr~J4𝒜

=

xJ1xJ+(xJ)'Δr~[112(Δr~r~J)]

 

=

xJ1xJ+(xJ)'r~J[(Δr~r~J)12(Δr~r~J)2]

where,

𝒜

[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4].

Also,

2br~J2

=

(xJ)'r~J4cr~J4

2br~J2𝒜

=

(xJ)'r~J𝒜{xJ1xJ+(xJ)'r~J[(Δr~r~J)12(Δr~r~J)2]}

 

=

xJxJ1+(xJ)'r~J[𝒜(Δr~r~J)+12(Δr~r~J)2].


From the first expression, we also see that,

2br~JΔr~

=

(xJ)'Δr~4cr~J3Δr~.

Therefore we have,

xJxJ1 =

[(xJ)'Δr~4cr~J3Δr~][1Δr~2r~J]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

  =

[(xJ)'Δr~][1Δr~2r~J]+[2cr~J2Δr~][Δr~2r~J]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

  =

[(xJ)'Δr~][1Δr~2r~J]+c[2r~J2Δr~24r~J3Δr~]+c[4r~J3Δr~6r~J2Δr~2+4r~JΔr~3Δr~4]

  =

[(xJ)'Δr~][1Δr~2r~J]+c[4r~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xJ)'r~J[𝒜(Δr~r~J)+12(Δr~r~J)2]

 

=

xJxJ1+(xJ)'Δr~{1+32(Δr~r~J)(Δr~r~J)2+14(Δr~r~J)3},

4cr~J4𝒜

=

xJ1xJ+(xJ)'Δr~[112(Δr~r~J)],

where,

𝒜

[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4].

Project Forward

Let's now determine the expression for xJ+1. We begin by writing …

xJ+1 =

a+b(r~J+Δr~)2+c(r~J+Δr~)4

  =

a+b(r~J2+2r~JΔr~+Δr~2)+c[r~J2(r~J2+2r~JΔr~+Δr~2)+2r~JΔr~(r~J2+2r~JΔr~+Δr~2)+Δr~2(r~J2+2r~JΔr~+Δr~2)]

  =

a+br~J2[1+2Δr~r~J+(Δr~r~J)2]+c[(r~J4+2r~J3Δr~+r~J2Δr~2)+(2r~J3Δr~+4r~J2Δr~2+2r~JΔr~3)+(r~J2Δr~2+2r~JΔr~3+Δr~4)]

  =

a+br~J2[1+2Δr~r~J+(Δr~r~J)2]+c[r~J4+4r~J3Δr~+6r~J2Δr~2+4r~JΔr~3+Δr~4]

  =

a+br~J2[1+2(Δr~r~J)+(Δr~r~J)2]+cr~J4[1+4(Δr~r~J)+6(Δr~r~)2+4(Δr~r~J)3+(Δr~r~J)4]

  =

a+2br~J2[12+(Δr~r~J)+12(Δr~r~J)2]+4cr~J4[14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4].

This means that,

𝒜xJ+1 =

a𝒜

   

+2br~J2𝒜[12+(Δr~r~J)+12(Δr~r~J)2]

   

+4cr~J4𝒜[14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]

  =

xJ1xJ4+xJ[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4]+(xJ)'Δr~[1458(Δr~r~J)+12(Δr~r~J)218(Δr~r~J)3]

   

+{xJxJ1+(xJ)'Δr~[1+32(Δr~r~J)(Δr~r~J)2+14(Δr~r~J)3]}[12+(Δr~r~J)+12(Δr~r~J)2]

   

+{(xJ)'Δr~[1Δr~2r~J]xJ+xJ1}[14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]

  =

14xJ114xJ+xJ[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4]+(xJ)'Δr~[1458(Δr~r~J)+12(Δr~r~J)218(Δr~r~J)3]

   

+{xJxJ1}[12+(Δr~r~J)+12(Δr~r~J)2]

   

+(xJ)'Δr~[1+32(Δr~r~J)(Δr~r~J)2+14(Δr~r~J)3][12+(Δr~r~J)+12(Δr~r~J)2]

   

+{xJ+xJ1}[14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]

   

+(xJ)'Δr~[1Δr~2r~J][14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]

Keep going …

𝒜xJ+1 =

xJ[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4]

   

+{xJxJ1}[14+12+(Δr~r~J)+12(Δr~r~J)214(Δr~r~J)32(Δr~r~)2(Δr~r~J)314(Δr~r~J)4]

   

+(xJ)'Δr~[1458(Δr~r~J)+12(Δr~r~J)218(Δr~r~J)3]

   

+(xJ)'Δr~[1+32(Δr~r~J)(Δr~r~J)2+14(Δr~r~J)3][12(Δr~r~J)2]

   

+(xJ)'Δr~[1+32(Δr~r~J)(Δr~r~J)2+14(Δr~r~J)3][(Δr~r~J)]

   

+(xJ)'Δr~[1+32(Δr~r~J)(Δr~r~J)2+14(Δr~r~J)3][12]

   

+(xJ)'Δr~[14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]

   

+(xJ)'Δr~[Δr~2r~J][14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]

midpoint
  =

xJ[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4]+{xJxJ1}[(Δr~r~)2(Δr~r~J)314(Δr~r~J)4]

   

+(xJ)'Δr~[1458(Δr~r~J)+12(Δr~r~J)218(Δr~r~J)3]

   

+(xJ)'Δr~[12(Δr~r~J)2+34(Δr~r~J)312(Δr~r~J)4+18(Δr~r~J)5]

   

+(xJ)'Δr~[(Δr~r~J)+32(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4]

   

+(xJ)'Δr~[12+34(Δr~r~J)12(Δr~r~J)2+18(Δr~r~J)3]

   

+(xJ)'Δr~[14+(Δr~r~J)+32(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]

   

+(xJ)'Δr~[18(Δr~r~J)12(Δr~r~J)234(Δr~r~)312(Δr~r~J)418(Δr~r~J)5]

---- next in line ----
  =

xJ[2(Δr~r~J)3]+xJ1[(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]+(xJ)'Δr~[2(Δr~r~)212(Δr~r~J)4]

  =

xJ[2(Δr~r~J)3]+{2xJ1(Δr~r~J)32xJ1(Δr~r~J)3}+xJ1[(Δr~r~)2+(Δr~r~J)3+14(Δr~r~J)4]+2(xJ)'Δr~[(Δr~r~)214(Δr~r~J)4]

𝒜xJ+1 =

(xJxJ1)[2(Δr~r~J)3]+𝒜xJ1+2(xJ)'Δr~[(Δr~r~)214(Δr~r~J)4].

Grouping terms with like powers of (Δr~/r~J) we find,

0 =

(Δr~r~J)2[(xJ1xJ+1)+2(xJ)'Δr~]+(Δr~r~J)3[xJ12xJ+xJ+1]+14(Δr~r~J)4[(xJ1xJ+1)2(xJ)'Δr~].



New Summary:
4a𝒜 =

(4𝒜1)xJ+xJ1+(xJ)'Δr~{152(Δr~r~J)+2(Δr~r~J)212(Δr~r~J)3},

2br~J2𝒜

=

{xJxJ1+(xJ)'Δr~[1+32(Δr~r~J)(Δr~r~J)2+14(Δr~r~J)3]},

4cr~J4𝒜

=

{xJ1xJ+(xJ)'Δr~[112(Δr~r~J)]},

where,

𝒜

[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4].

Try again …

xJ+1 =

a+b(r~J+Δr~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14(Δr~r~J)3][2+4(Δr~r~J)+2(Δr~r~J)2]

   

+[112(Δr~r~J)][1+4(Δr~r~J)+6(Δr~r~J)2+4(Δr~r~J)3+(Δr~r~J)4]}

  =

4𝒜xJ+4(xJxJ1){[(Δr~r~J)2+(Δr~r~J)3+14(Δr~r~J)4]}

   

+(xJ)'Δr~{[152(Δr~r~J)+2(Δr~r~J)212(Δr~r~J)3]

   

+[2+3(Δr~r~J)2(Δr~r~J)2+12(Δr~r~J)3]

   

+[4(Δr~r~J)+6(Δr~r~J)24(Δr~r~J)3+(Δr~r~J)4]

   

+[2(Δr~r~J)2+3(Δr~r~J)32(Δr~r~J)4+12(Δr~r~J)5]

   

+[1+4(Δr~r~J)+6(Δr~r~J)2+4(Δr~r~J)3+(Δr~r~J)4]+[12(Δr~r~J)2(Δr~r~J)23(Δr~r~J)32(Δr~r~J)412(Δr~r~J)5]}

  =

4𝒜xJ+4(xJxJ1){[(Δr~r~J)2+(Δr~r~J)3+14(Δr~r~J)4]}+(xJ)'Δr~{[8(Δr~r~J)22(Δr~r~J)4]}.

Grouping terms with like powers of (Δr~/r~J) we find,

0 =

(xJxJ+1)[(Δr~r~J)2(Δr~r~J)3+14(Δr~r~J)4]+(xJ1xJ)[(Δr~r~J)2+(Δr~r~J)3+14(Δr~r~J)4]+(xJ)'Δr~[2(Δr~r~J)212(Δr~r~J)4]

  =

(Δr~r~J)2[xJ1+2(xJ)'Δr~xJ+1]+(Δr~r~J)3[xJ12xJ+xJ+1]+14(Δr~r~J)4[xJ12(xJ)'Δr~xJ+1]

This EXACTLY MATCHES our above first derivation and grouping!

Improve First Approximation

After slogging through the preceding "Second thru Fifth" approximations, I have come to appreciate that the approach used way back in the "First Approximation" was a good one, but that the attempt to introduce an implicit dependence was misguided. I now think I have discovered the preferable implicit treatment. Let's repeat, while improving this approach.

2nd-Order Explicit Approach

As was done in our earlier First Approximation, let's set up a grid associated with a uniformly spaced spherical radius, where the subscript J denotes the grid zone at which all terms in the finite-difference representation of the governing relations will be evaluated. More specifically,

r~J1 =

r~JΔr~

      and       r~J+1 =

r~J+Δr~;

also,

(dxdr~)J

(xJ+1xJ1)2Δr~

      and       (dpdr~)J

(pJ+1pJ1)2Δr~.

And at each grid location, the governing relations establish the local evaluation of the derivatives, that is,

(dxdr~)J =

1r~J[3x+pγg]J,

      and       (dpdr~)J =

ρ~JP~J[(4x+p)M~rr~2+τc2ω2r~x]J.

So, integrating step-by-step from the center of the configuration, outward, once all the variable values are known at grid locations J and (J1), the values of x and p at (J+1) are given by the expressions,

xJ+1 =

xJ12Δr~{1r~[3x+pγg]}J,

      and       pJ+1 =

pJ1+2Δr~{ρ~P~M~rr~2[(4x+p)+σc2(2π3ρ~cr~3M~r)x]}J.

Then we will obtain the "xJ" and "pJ" values via the average expressions,

xJ =

12(xJ1+xJ+1),

      and       pJ =

12(pJ1+pJ+1).

Convert to Implicit Approach

Consider implementing an implicit finite-difference analysis that improves on our earlier First Approximation. The general form of the source term expressions is,

xJ+1 =

xJ1+2Δr~{𝔄xJ+𝔅pJ}

where,

𝔄

{3r~}J,

      and       𝔅

{1γgr~}J;

and,

pJ+1 =

pJ1+2Δr~{xJ+𝔇pJ}

where,

{𝔇[4+σc2(2π3ρ~cr~3M~r)]}J,

      and       𝔇

{ρ~P~M~rr~2}J.

Now, wherever a "J+1" index appears in the source term, replace it with the average expressions; specifically, xJ+1(2xJxJ1) and pJ+1(2pJpJ1). For the fractional radial displacement, we have,

xJ =

xJ1+Δr~{𝔄xJ+𝔅pJ};

and for the fractional pressure displacement,

pJ =

pJ1+Δr~{xJ+𝔇pJ}.

Solving for pJ in this second expression, we obtain,

pJ[1𝔇Δr~] =

pJ1+(Δr~)xJ

in which case the first expression gives,

xJ =

xJ1+(𝔄Δr~)xJ+(𝔅Δr~)[pJ1+(Δr~)xJ][1𝔇Δr~]1

xJ[1𝔇Δr~] =

{xJ1+(𝔄Δr~)xJ}[1𝔇Δr~]+(𝔅Δr~)[pJ1+(Δr~)xJ]

  =

xJ1[1𝔇Δr~]+(𝔅Δr~)pJ1+(𝔄Δr~)xJ[1𝔇Δr~]+(𝔅Δr~)(Δr~)xJ

  =

xJ1(1𝔇Δr~)+(𝔅Δr~)pJ1+[(𝔄Δr~)(1𝔇Δr~)+(𝔅Δr~)(Δr~)]xJ

xJ{(1𝔇Δr~)[(𝔄Δr~)(1𝔇Δr~)+(𝔅Δr~)(Δr~)]} =

xJ1(1𝔇Δr~)+(𝔅Δr~)pJ1

xJ{1[(𝔄Δr~)+(𝔅Δr~)(Δr~)(1𝔇Δr~)]} =

xJ1+[(𝔅Δr~)(1𝔇Δr~)]pJ1

xJ =

{xJ1+[(𝔅Δr~)(1𝔇Δr~)]pJ1}{1[(𝔄Δr~)+(𝔅Δr~)(Δr~)(1𝔇Δr~)]}1.

Then,

pJ(1𝔇Δr~) =

pJ1+(Δr~)xJ

  =

pJ1+(Δr~){xJ1+[(𝔅Δr~)(1𝔇Δr~)]pJ1}{1[(𝔄Δr~)+(𝔅Δr~)(Δr~)(1𝔇Δr~)]}1

This is test of our "implicit" scheme for the (nc,ne)=(5,1) bipolytrope with μe/μc=0.31 and (Model A) ξi=9.12744; here, we also assume σc2=0.000109 and J=i+2. Here are the quantities that we assume are known

r~ ρ~ P~ M~r ρ~c 𝔄 𝔅 𝔇 𝔇
0.0193368 192.21728 1913.1421 0.3403116 3359266.406 -155.14459 -25.85743 4.0162932 91.443479
Δr~ xJ1 pJ1 determined
xJ
determined
pJ
0.001936393 -4.755073 32.25497 -4.999355 34.874915
xJ =

{xJ1+[(𝔅Δr~)(1𝔇Δr~)]pJ1}{1[(𝔄Δr~)+(𝔅Δr~)(Δr~)(1𝔇Δr~)]}1

  =

{xJ1+[0.06084379]pJ1}{1[0.3436910]}1=4.999354;

pJ(1𝔇Δr~) =

[pJ1+(Δr~)xJ](1𝔇Δr~)1=34.87491.

Best values:
Nodes 0:  n/a
Nodes 1:  σc2=8.958784×105
Nodes 2:  σc2=3.021×104
Nodes 3:  σc2=6.09×104

Interface

CORE:   When J=(i1) (where i means interface), we can obtain the fractional displacements at the interface, xi and pi, via the expressions,

xi =

xi22Δr~{1r~[3x+pγg]}i1,

      and       pi =

pi2+2Δr~{ρ~P~M~rr~2[(4x+p)+σc2(2π3ρ~cr~3M~r)x]}i1.

Then, setting J=i, the pair of radial derivatives at the interface and as viewed from the perspective of the core is given by the expressions,

(dxdr~)i|core =

1r~i[3xi+pi6/5],

      and       (dpdr~)i|core =

(ρ~i)coreP~iM~corer~i2[(4xi+pi)+σc2(2π3ρ~cr~i3M~core)xi].

It is important to recognize that, throughout the core, (dx/dr~) has been evaluated by setting γg=6/5. If we continue to use this value of γg at the interface, we are determining the slope as viewed from the perspective of the core.


ENVELOPE:   On the other hand, as viewed from the perspective of the envelope, all parameters used to determine (dx/dr~)i at the interface (and throughout the entire envelope) are the same except γg, which equals 2 instead of 6/5. Specifically at the interface, we have,

(dxdr~)i|env =

1r~i[3xi+pi2],

      and       (dpdr~)i|env =

(ρ~i)envP~iM~corer~i2[(4xi+pi)+σc2(2π3ρ~cr~i3M~core)xi].

(See, for example, our related discussion.) Hence, we appreciate that there is a discontinuous change in the value of this slope at the interface. We note as well — for the first time (8/17/2023)! — that there must also be a discontinuous jump in the slope of the "pressure perturbation." All of the variables used to evaluate (dp/dr~)i are the same irrespective of your core/envelope point of view except the leading density term. As viewed from the perspective of the core, (ρ~i)|core=msurf5(μe/μc)10θi5 whereas, from the perspective of the envelope, (ρ~i)|env=msurf5(μe/μc)9θi5ϕi. Appreciating that ϕi=1, this means that the slope of the "pressure perturbation" is a factor of μe/μc smaller as viewed from the perspective of the envelope.

Then the value of the fractional radial displacement and the value of the pressure perturbation at the first zone outside of the interface are obtained by setting J=i. That is,

xi+1 =

xi12Δr~{1r~[3x+p2]}i,

      and       pi+1 =

pi1+2Δr~{(ρ~i)|envP~M~rr~2[(4x+p)+σc2(2π3ρ~cr~3M~r)x]}i.

But, as written, these two expressions are unacceptable because the values just inside the interface, xi1 and pi1, are not known as viewed from the perspective of the envelope. However, we can fix this by drawing from the "average" expressions as replacements, namely,

xi =

12(xi1+xi+1)xi1=(2xixi+1),

      and       pi =

12(pi1+pi+1)pi1=(2pipi+1),

in which case we have,

2xi+1 =

2xi2Δr~{1r~[3x+p2]}i,

      and       2pi+1 =

2pi+2Δr~{(ρ~i)|envP~M~rr~2[(4x+p)+σc2(2π3ρ~cr~3M~r)x]}i.

Compare Core With Analytic Displacement Functions

See Also

Tiled Menu

Appendices: | VisTrailsEquations | VisTrailsVariables | References | Ramblings | VisTrailsImages | myphys.lsu | ADS |