User:Tohline/SSC/FreeEnergy/PolytropesEmbedded
From VisTrailsWiki
Contents

FreeEnergy Synopsis
 Tiled Menu  Tables of Content  Banner Video  Tohline Home Page  
All of the selfgravitating configurations considered below have an associated Gibbslike freeenergy that can be expressed analytically as a powerlaw function of the dimensionless configuration radius, . Specifically,



Equilibrium Radii and Critical Radii
The first and second (partial) derivatives with respect to are, respectively,












Equilibrium configurations are identified by setting the first derivative to zero. This gives,









We conclude, as well, that at this equilibrium radius, the second (partial) derivative assumes the value,









Hence, equilibrium configurations for which the second (as well as first) derivative of the free energy is zero are found at "critical" radii given by the expression,









Examples
PressureTruncated Polytropes
For pressuretruncated polytropes of index , we set, , in which case,










and 




Case M
More specifically, the expression that describes the "Case M" freeenergy surface is,

Hence, we have,









where the structural form factors for pressuretruncated polytropes are precisely defined here. Therefore, the statement of virial equilibrium is,












And we conclude that,





















ASIDE: Let's see what this requires for the case of , where everything is specifiable analytically. We have gathered together:
So, the radius of the critical equilibrium state should be,
whereas, each equilibrium configuration has,
So the equilibrium state that marks the critical configuration must have a value of that satisfies the relation,
The solution is: 
In addition, we know from our dissection of Hoerdt's work on detailed forcebalance models that, in the equilibrium state,






This means that, for any chosen polytropic index, the critical equilibrium state is the equilibrium configuration for which (needs to be checked),



We note, as well, that by combining the Horedt expression for with our virial equilibrium expression, we find (needs to be checked),



Case P
First Pass
Alternatively, let's examine the "Case P" freeenergy surface. Drawing on Stahler's presentation, we adopt the following radius and mass normalizations:
In terms of these new normalizations, we have,















and,












Rewriting the expression for the free energy gives,


















Therefore, in this case, we have,









where the structural form factors for pressuretruncated polytropes are precisely defined here. The statement of virial equilibrium is, therefore,



where,


















From a previous derivation, we have,















which, thankfully, matches! We conclude as well that the transition from stable to dynamically unstable configurations occurs at,



When combined with the statement of virial equilibrium at this critical point, we find,



























This also means that the critical radius is,


















The following parallel derivation was done independently. [Note that a factor of 2n/(n1) appears to correct a mistake made during the original derivation.] Beginning with the virial expression,



























Also from Stahler's work we know that the equilibrium mass and radius are,






Additional details in support of an associated PowerPoint presentation can be found here.
Reconcile






Taking the ratio, the RHS is,












while the LHS is,






Q.E.D.
Now, given that,






we have,









By inspection, in the specific case of (see above), this critical configuration appears to coincide with one of the "turning points" identified by Kimura. Specifically, it appears to coincide with the "extremal in r_{1}" along an M_{1} sequence, which satisfies the condition,












Hence, according to Kimura, the turning point associated with the configuration with the largest equilibrium radius, corresponds to the equilibrium configuration having,
This is, indeed, very close to — but decidedly different from — the value of determined, above!
Streamlined
Let's copy the expression for the "Case P" free energy derived above, then factor out a common term:









Defining a new normalization energy,






we can write,



in which case the coefficients of the generic freeenergy expression are,









where, as above,



Now, if we define the pair of parameters,






then the statement of virial equilibrium is,



and the boundary between dynamical stability and instability occurs at,



Combining these last two expressions means that the boundary between dynamical stability and instability is associated with the parameter condition,


















Case M









Hence,






So the dynamical stability conditions are:



and,









Together, then,












Case P









where, as above,



Hence,






So the dynamical stability conditions are:






and,






Together, then,






Compare
Let's see if the two cases, in fact, provide the same answer.






FiveOne Bipolytropes
For analytically prescribed, "fiveone" bipolytropes, and , in which case,




and 




More specifically, the expression that describes the freeenergy surface is,

Hence, we have,









and conclude that,












Also, from our detailed force balance derivations, we know that,



ZeroZero Bipolytropes
General Form
In this case, we retain full generality making the substitutions, and , to obtain,




and 







And here, the expression that describes the freeenergy surface is,

Hence, we have,












where the definitions of and are given below. We immediately deduce that the critical equilibrium state is identified by,









From our associated detailedforcebalance derivation, we know that the associated equilibrium radius is,



Compare with FiveOne
It is worthwhile to set and in this expression and compare the result to the comparable expression shown above for the "FiveOne" Bipolytrope. Here we have,






whereas, rewriting the above relation gives,



And, here, we should conclude that the critical equilibrium configuration is associated with,



FreeEnergy of Truncated Polytropes
In this case, the Gibbslike free energy is given by the sum of three separate energies,






where the constants,

and 

and, as derived elsewhere,
Structural Form Factors for PressureTruncated Polytropes 




As we have shown separately, for the singular case of ,
where, 
In general, then, the warped freeenergy surface drapes across a fourdimensional parameter "plane" such that,



In order to effectively visualize the structure of this freeenergy surface, we will reduce the parameter space from four to two, in two separate ways: First, we will hold constant the parameter pair, ; giving a nod to Kimura's (1981b) nomenclature, we will refer to the resulting function, , as a "Case M" freeenergy surface because the mass is being held constant. Second, we will hold constant the parameter pair, , and examine the resulting "Case P" freeenergy surface, .
Virial Equilibrium and Dynamical Stability
The first (partial) derivative of with respect to is,



and the second (partial) derivative is,



The virial equilibrium radius is identified by setting the first derivative to zero. This means that,



This expression can be usefully rewritten in the following forms:
Virial Equilibrium Condition  
Case 1: 


Case 2: 


Case 3: 

Dynamical stability is determined by the sign of the second derivative expression evaluated at the equilibrium radius; setting the second derivative to zero identifies the transition from stable to unstable configurations. The criterion is,



Case 1 Stability Criterion
Using the "Case 1" virial expression to define the equilibrium radius means that the stability criterion is,












Case 2 Stability Criterion
Using the "Case 2" virial expression to define the equilibrium radius means that the stability criterion is,












Case 3 Stability Criterion
Using the "Case 3" virial expression to define the equilibrium radius means that the stability criterion is,












Case M
Now, in our discussion of "Case M" sequence analyses, the configuration's radius is normalized to,



Our "Case 3" stability criterion directly relates. We conclude that the transition from stability to dynamical instability occurs when,






Also in the "Case M" discussions, the external pressure is normalized to,



If we raise the "Case 1" stability criterion expression to the power, then divide it by the "Case 3" stability criterion expression raised to the fourth power, we find,


















Case P
Flipping around this expression for , we also can write,



Now, in our "Case P" discussions we normalized the mass to



Hence, we have,






where the constants,

and 

So we can furthermore conclude that,






Our expression for can also be combined with the "Case 2 stability criterion" to eliminate the mass entirely, giving,












Finally, recognizing that in our "Case P" discussions we normalized the radius to



we have,















Case M FreeEnergy Surface
It is useful to rewrite the freeenergy function in terms of dimensionless parameters. Here we need to pick normalizations for energy, radius, and pressure that are expressed in terms of the gravitational constant, , and the two fixed parameters, and . We have chosen to use,






which, as is detailed in an accompanying discussion, are similar but not identical to the normalizations used by Horedt (1970) and by Whitworth (1981). The selfconsistent energy normalization is,



As we have demonstrated elsewhere, after implementing these normalizations, the expression that describes the "Case M" freeenergy surface is,
Given the polytropic index, , we expect to obtain a different "Case M" freeenergy surface for each choice of the dimensionless truncation radius, ; this choice will imply corresponding values for and and, hence also, corresponding (constant) values of the coefficients, and .
Case P FreeEnergy Surface
Again, it is useful to rewrite the freeenergy function in terms of dimensionless parameters. But here we need to pick normalizations for energy, radius, and mass that are expressed in terms of the gravitational constant, , and the two fixed parameters, and . As is detailed in an accompanying discussion, we have chosen to use the normalizations defined by Stahler (1983), namely,






The selfconsistent energy normalization is,



After implementing these normalizations — see our accompanying analysis for details — the expression that describes the "Case P" freeenergy surface is,



Given the polytropic index, , we expect to obtain a different "Case P" freeenergy surface for each choice of the dimensionless truncation radius, ; this choice will imply corresponding values for and and, hence also, corresponding (constant) values of the coefficients, and .
Summary
DFB Equilibrium  Onset of Dynamical Instability  

Case M: 






Case P: 






In all four cases, the expression on right intersects (is equal to) the expression on the left when the following condition applies:

If (for ) we adopt the shorthand notation,



and 




then the critical condition becomes,



and at the critical state, the expressions for the structural formfactors become,

































Hence (1),









Q.E.D.
And (2),















Q.E.D.
And (3),












Q.E.D.
And (4),












Q.E.D.
FreeEnergy of Bipolytropes
In this case, the Gibbslike free energy is given by the sum of four separate energies,



In addition to specifying (generally) separate polytropic indexes for the core, , and envelope, , and an envelopetocore mean molecular weight ratio, , we will assume that the system is fully defined via specification of the following five physical parameters:
 Total mass, ;
 Total radius, ;
 Interface radius, , and associated dimensionless interface marker, ;
 Core mass, , and associated dimensionless mass fraction, ;
 Polytropic constant in the core, .
In general, the warped freeenergy surface drapes across a fivedimensional parameter "plane" such that,



Order of Magnitude Derivation
Let's begin by providing very rough, approximate expressions for each of these four terms, assuming that and .


















In writing this last expression, it has been necessary to (temporarily) introduce a sixth physical parameter, namely, the polytropic constant that characterizes the envelope material, . But this constant can be expressed in terms of via a relation that ensures continuity of pressure across the interface while taking into account the drop in mean molecular weight across the interface, that is,









Hence, the fourth energy term may be rewritten in the form,






Putting all the terms together gives,















where,






Equilibrium Radius
Order of Magnitude Estimate
This means that,



Hence, because equilibrium radii are identified by setting , we have,



Reconcile With Known Analytic Expression
From our earlier derivations, it appears as though,






This implies that,












Focus on FiveOne FreeEnergy Expression
Approximate Expressions
Let's plug this equilibrium radius back into each term of the freeenergy expression.
























From Detailed ForceBalance Models
In the following derivations, we will use the expression,



Keep in mind, as well — as derived in an accompanying discussion — that,



where,
From the accompanying Table 1 parameter values, we also can write,






where,



Let's also define the following shorthand notation:






Gravitational Potential Energy of the Core
Pulling from our detailed derivations,









Out of equilibrium, then, we should expect,






which, in comparison with our above approximate expression, implies,



Thermal Energy of the Core
Again, pulling from our detailed derivations,









Out of equilibrium, we should then expect,



In comparison with our above approximate expression, we therefore have,






Gravitational Potential Energy of the Envelope
Again, pulling from our detailed derivations and appreciating, in particular, that (see, for example, our notes on equilibrium conditions),










and 

we have,















So, in equilibrium we can write,









And out of equilibrium,



This, in turn, implies that both in and out of equilibrium,



Thermal Energy of the Envelope
Again, pulling from our detailed derivations,












So, in equilibrium we can write,









And, out of equilibrium,



Combined in Equilibrium
Notice that, in combination,









Also, from above,






So, in equilibrium, these terms from the core and envelope sum to zero, as they should.
Out of Equilibrium
And now, in combination out of equilibrium,



Hence, quite generally out of equilibrium,



Let's see what the value of this derivative is if the dimensionless radius, , is set to the value that has been determined, via a detailed forcebalanced analysis, to be the equilibrium radius, namely, . In this case, we have,



But, according to the virial theorem — and, as we have just demonstrated — the four terms inside the curly braces sum to zero. So this demonstrates that the derivative of our outofequilibrium freeenergy expression does go to zero at the equilibrium radius, as it should!
Summary51
In summary, the desired out of equilibrium freeenergy expression is,















Or, in terms of the ratio,
and pulling from the above expressions,
























we have the streamlined,



or, better yet,
OutofEquilibrium, FreeEnergy Expression for BiPolytropes with 



where,












From the accompanying Table 1 parameter values, we also can write,






Radial Derivatives  

Consistent with our generic discussion of the stability of bipolytropes and the specific discussion of the stability of bipolytropes having , it can straightforwardly be shown that is satisfied by setting ; that is, the equilibrium condition is,



Furthermore, the equilibrium configuration is unstable whenever , that is, it is unstable whenever,



Table 1 of an accompanying chapter — and the reddashed curve in the figure adjacent to that table — identifies some key properties of the model that marks the transition from stable to unstable configurations along equilibrium sequences that have various values of the meanmolecular weight ratio, .
Focus on ZeroZero FreeEnergy Expression
Here, we will draw heavily from the following accompanying chapters:
From Detailed ForceBalance Models
Equilibrium Radius
First View
In an accompanying chapter we find,



where,









Here, we prefer to normalize the equilibrium radius to . So, let's replace the central pressure with its expression in terms of . Specifically,












Or, in terms of ,



Second View
Alternatively, from our derivation and discussion of analytic detailed forcebalance models,



where,



In order to show that this expression is the same as the other one, above, we need to show that,












Let's see …





















Q.E.D.
Hence, the equilibrium radius can also be written as,



or, in terms of the polytropic index,



Gravitational Potential Energy
Also from our accompanying discussion, we have,









Internal Energy Components
First View
Before writing out the expressions for the internal energy of the core and of the envelope, we note from our separate detailed derivation that, in either case,






where, in equilibrium,









So, copying from our accompanying detailed derivation, we have,


















Furthermore,















Hence, we have,









Second View
In our accompanying discussion of energies associated with detailed force balance models, we used the notation,



which allows us to rewrite the above quoted relationship between the central pressure and the radius of the bipolytrope as,
We also showed that, in equilibrium, the relationship between the central pressure and the interface pressure is,
This means that, in equilibrium, the ratio of the interface pressure to the central pressure is,



or given that (see above),






we have,



This is exactly the pressureratio expression presented in our "first view" and unveils the notation association,



From our separate derivation, we have, in equilibrium,
























Finally, switching from the notation to the notation gives,






which, after setting , precisely matches the above, "first view" expression. Also from our previous derivation, we can write,


















And, finally, switching from the notation to the notation gives,









which, after setting , precisely matches the above, "first view" expression.
Summary00
In summary, the desired out of equilibrium freeenergy expression is,



where,









Or, in a more compact form,



where,









Let's examine the behavior of the first radial derivative.



Let's see whether the sum of terms inside the square brackets is zero at the derived equilibrium radius, that is, when and, hence, when
























Q.E.D.
Even slightly better:



or, better yet,
OutofEquilibrium, FreeEnergy Expression for BiPolytropes with Structural 



where, keeping in mind that,



we have,






























As before, the equilibrium system is dynamically unstable if . We have deduced that the system is unstable if,



Overview
BiPolytrope51
Key Analytic Expressions
OutofEquilibrium, FreeEnergy Expression for BiPolytropes with 



where,












From the accompanying Table 1 parameter values, we also can write,






Consistent with our generic discussion of the stability of bipolytropes and the specific discussion of the stability of bipolytropes having , it can straightforwardly be shown that is satisfied by setting ; that is, the equilibrium condition is,






where the last expression has been cast into a form that more clearly highlights overlap with the expression, below, for the equilibrium radius for zerozero bipolytropes. Furthermore, the equilibrium configuration is unstable whenever,
that is, it is unstable whenever,



Table 1 of an accompanying chapter — and the reddashed curve in the figure adjacent to that table — identifies some key properties of the model that marks the transition from stable to unstable configurations along equilibrium sequences that have various values of the meanmolecular weight ratio, .
Behavior of Equilibrium Sequence
Here we reprint Figure 1 from an accompanying chapter wherein the structure of fiveone bipolytropes has been derived. It displays detailed forcebalance sequences in the plane for a variety of choices of the ratio of meanmolecularweights, , as labeled.
Limiting Values
Each sequence begins at the origin, that is, at . As , however, the sequences terminate at different coordinate locations, depending on the value of . In deriving the various limits, it will be useful to note that,
























Examining the three relevant parameter regimes, we see that:
 For , that is, …
















and 
















 For , that is, …
















and 







 For , that is, …



















and 
















Summarizing:
 For , that is, …
 For , that is, …
 For , that is, …
Turning Points
Let's identify the location of two turning points along the sequence — one defines and the other identifies . They occur, respectively, where,

and 

In deriving these expressions, we will use the relations,






where,
Given that,



we find,












And, given that,



we find,






In summary, then, the turning point occurs where,



and the turning point occurs where,









NOTE: As we show above, for the special case of — that is, when , precisely — the equilibrium sequence (as ) intersects the axis at precisely the value, . As is illustrated graphically in Figure 1 of an accompanying chapter, no turning point exists for values of . 
For the record, we repeat, as well, that the transition from stable to dynamically unstable configurations occurs along the sequence when,












In order to clarify what equilibrium sequences do not have any turning points, let's examine how the turningpoint expression behaves as .















The leadingorder term is unity on both sides of this expression, so they cancel; let's see what results from keeping terms .















We therefore conclude that the turning point does not appear along any sequence for which,






FiveOne Bipolytrope Equilibrium Sequences in Plane  
Full Sequences for Various 
Magnified View with Turning Points and Stability TransitionPoints Identified 
Graphical Depiction of FreeEnergy Surface
Figure 1: FreeEnergy Surface for and  

For purposes of reproducibility, it is incumbent upon us to clarify how the values of the free energy were normalized in order to produce the freeenergy surface displayed in Figure 1. The normalization steps are explicitly detailed within the fortran program, below, that generated the data for plotting purposes; here we provide a brief summary. We evaluated the normalized free energy, , across a zone grid of uniform spacing, covering the following domain:






(With this specific definition of the ycoordinate grid, is associated with zone 70.) After this evaluation, a constant, , was added to in order to ensure that the free energy was negative across the entire domain. Then (inorm = 1), for each specified interface location, , employing the equilibrium value of the free energy,
the free energy was normalized across all values of via the expression,
Finally, for plotting purposes, at each grid cell vertex ("vertex") — as well as at each grid cell center ("cell") — the value of the free energy, , was renormalized as follows,
Via this last step, the minimum "vertex" energy across the entire domain was 0.0 while the maximum "vertex" energy was 1.0.
FORTRAN Program Documentation  Example Evaluations(See also associated Table 1)  

Coord. Axis  Coord. Name  Associated Physical Quantity  
xaxis  bsize  
yaxis  csize  
Relevant Lines of Code  
eta = 3.0d0*muratio*bsize/(1.0d0+bsize**2) Gami = 1.0d0/etabsize frakL = (bsize**41.0d0)/bsize**2 + & & DATAN(bsize)*((1.0d0+bsize**2)/bsize)**3 frakK = Gami/eta + ((1.0d0+Gami**2)/eta)*(pii/2.0d0+DATAN(Gami)) E0 = ((5.0d0*frakL) + (4.0d0*frakK)& &  (3.0d0*frakL+12.0d0*frakK))/bsize**2+Efudge fescalar(j,k) = (csize**(0.6d0)*(5.0d0*frakL)& & + csize**(3.0d0)*(4.0d0*frakK)& &  (3.0d0*frakL+12.0d0*frakK)/csize)/bsize**2 + Efudge if(inorm.eq.1)fescalar(j,k)=fescalar(j,k)/DABS(E0) & &  E0/DABS(E0) 

Variable  Represents  Value calculated via the expression …  
eta 


Gami  
frakL  
frakK  
E0  Efudge 

Figure 2: FreeEnergy Surface for and  

BiPolytrope00
OutofEquilibrium, FreeEnergy Expression for BiPolytropes with Structural 



where,


















The associated equilibrium radius is,



We have deduced that the system is unstable if,



Fortran Code
This is the program that generated the freeenergy data for the "fiveone" bipolytrope that is displayed in the above, Figure 1 image/animation.
PROGRAM BiPolytrope real*8 pii real*8 bmin,bmax,cmin,cmax,db,dc real*8 c(200),b(200),chalf(199),bhalf(199) real*8 bsize,csize,emin,emax real*8 fepoint(200,200),fescalar(199,199) real*8 ell(200),ellhalf(199) real*8 muratio,eta,Gami,frakK,frakL real*8 eshift,ediff real xx(200),yy(200),cell(199,199),vertex(200,200) real valuemin,minlog,valufudge real*8 q,nu,chiEq,Enorm,E0,Efudge integer j,k,n,nmax,inorm 101 format(4x,'bsize',7x,'csize',8x,'xi',10x,'A',12x,'B',12x,& &'fM',13x,'fW',11x,'fA',/) ! 102 format(1p8d12.4) 103 format(2i5,1p3d14.6) 201 format(5x,'valuemin = ',1pe15.5,//) 205 format(5x,'For Cellcenter ... emin, emax = ',1p2d14.6,/) 206 format(5x,'For Cellvertex ... emin, emax = ',1p2d14.6,/) 701 format(5x,1p10d10.2) 700 format(8x,'xi',9x,'ell',8x,'eta',8x,'Lambda',5x,'frakK',& & 5x,'frakL',8x,'q',5x,'nu',5x,'chiEq',8x,'E0',/) !!!!!!!! !!!!!!!! inorm=1 pii = 4.0d0*datan(1.0d0) muratio = 1.0d0 bsize = 0.0d0 csize = 0.0d0 Efudge = 10.0d0 write(*,101) ! write(*,102)bsize,csize,xival,coefA,coefB,fM,fW,fA !!!!!!!!!!! ! ! In this freeenergy routine, c = X = chi/chi_eq and b = xi_i ! !!!!!!!!!!! nmax = 200 bmin = 1.0d0 bmax = 3.0d0 db = (bmaxbmin)/dfloat(nmax1) b(1) = bmin ell(1) = b(1)/dsqrt(3.0d0) ! These values of cmin and cmax ensure that X=1 occurs at zone 70 cmin = 0.469230769d0 cmax = 2.00d0 dc = (cmaxcmin)/dfloat(nmax1) c(1) = cmin do n=2,nmax b(n) = b(n1)+db c(n) = c(n1)+dc ell(n) = b(n)/dsqrt(3.0d0) enddo do n=1,nmax1 bhalf(n) = 0.5d0*(b(n)+b(n+1)) chalf(n) = 0.5d0*(c(n)+c(n+1)) ellhalf(n) = bhalf(n)/dsqrt(3.0d0) enddo ! ! BEGIN LOOP to evaluate free energy (cell center) ! emin = 0.0d0 emax = 0.0d0 write(*,700) do j=1,nmax1 bsize = ellhalf(j) eta = 3.0d0*muratio*bsize/(1.0d0+bsize**2) Gami = 1.0d0/etabsize frakL = (bsize**41.0d0)/bsize**2 + & & DATAN(bsize)*((1.0d0+bsize**2)/bsize)**3 frakK = Gami/eta + ((1.0d0+Gami**2)/eta)*(pii/2.0d0+DATAN(Gami)) q = 1.0d0/(1.0d0 + (0.5d0*pii+DATAN(Gami))/eta) nu = bsize*q/dsqrt(1.0d0+Gami**2) chiEq = dsqrt(pii/8.0d0)*(nu**2/(q*bsize**2))& & *((1.0d0+bsize**2)/(3.0d0*bsize))**3 Enorm = 16.0d0*(q/nu**2)*chiEq E0 = ((5.0d0*frakL) + (4.0d0*frakK)& &  (3.0d0*frakL+12.0d0*frakK))/bsize**2+Efudge write(*,701)b(j),bsize,eta,Gami,frakK,frakL,q,nu,chiEq,E0 do k=1,nmax1 csize=chalf(k) fescalar(j,k) = (csize**(0.6d0)*(5.0d0*frakL)& & + csize**(3.0d0)*(4.0d0*frakK)& &  (3.0d0*frakL+12.0d0*frakK)/csize)/bsize**2 + Efudge if(inorm.eq.1)fescalar(j,k)=fescalar(j,k)/DABS(E0) & &  E0/DABS(E0) if(fescalar(j,k).gt.0.5d0)fescalar(j,k)=0.5d0 if(fescalar(j,k).lt.emin)emin=fescalar(j,k) if(fescalar(j,k).gt.emax)emax=fescalar(j,k) ! write(*,103)j,k,bsize,csize,fescalar(j,k) enddo enddo write(*,205)emin,emax ! ! BEGIN LOOP to evaluate free energy (cell vertex) ! emin = 0.0d0 emax = 0.0d0 do j=1,nmax bsize = ell(j) eta = 3.0d0*muratio*bsize/(1.0d0+bsize**2) Gami = 1.0d0/etabsize frakL = (bsize**41.0d0)/bsize**2 + & & DATAN(bsize)*((1.0d0+bsize**2)/bsize)**3 frakK = Gami/eta + ((1.0d0+Gami**2)/eta)*(pii/2.0d0+DATAN(Gami)) q = 1.0d0/(1.0d0 + (0.5d0*pii+DATAN(Gami))/eta) nu = bsize*q/dsqrt(1.0d0+Gami**2) chiEq = dsqrt(pii/8.0d0)*(nu**2/(q*bsize**2))& & *((1.0d0+bsize**2)/(3.0d0*bsize))**3 Enorm = 16.0d0*(q/nu**2)*chiEq E0 = ((5.0d0*frakL) + (4.0d0*frakK)& &  (3.0d0*frakL+12.0d0*frakK))/bsize**2 + Efudge do k=1,nmax csize=c(k) fepoint(j,k) = (csize**(0.6d0)*(5.0d0*frakL)& & + csize**(3.0d0)*(4.0d0*frakK)& &  (3.0d0*frakL+12.0d0*frakK)/csize)/bsize**2 + Efudge if(inorm.eq.1)fepoint(j,k)=fepoint(j,k)/DABS(E0) & &  E0/DABS(E0) if(fepoint(j,k).gt.0.5d0)fepoint(j,k)=0.5d0 if(fepoint(j,k).lt.emin)emin=fepoint(j,k) if(fepoint(j,k).gt.emax)emax=fepoint(j,k) ! write(*,103)j,k,bsize,csize,fepoint(j,k) enddo enddo write(*,206)emin,emax ! ! Now fill singleprecision arrays for plotting. ! do n=1,nmax ! xx(n)=b(n)/b(nmax) ! yy(n)=c(n)/c(nmax) xx(n)=b(n)bmin yy(n)=c(n)cmin ! xx(n)=b(n) ! yy(n)=c(n) enddo valuemin= emin valufudge = 1.0d0/(emaxemin) do k=1,nmax do j=1,nmax vertex(j,k)=fepoint(j,k)+valuemin vertex(j,k)=vertex(j,k)*valufudge enddo enddo do k=1,nmax1 do j=1,nmax1 cell(j,k)=fescalar(j,k)+valuemin cell(j,k)=cell(j,k)*valufudge enddo enddo call XMLwriter01(nmax,xx,yy,cell,vertex) stop END PROGRAM BiPolytrope Subroutine XMLwriter01(imax,x,y,cell_scalar,point_scalar) real x(200),y(200),z(1) real cell_scalar(199,199),point_scalar(200,200) integer imax integer extentX,extentY,extentZ integer ix0,iy0,iz0 integer norm(200,3) ! imax=200 ix0=0 iy0=0 iz0=0 extentX=imax1 extentY=imax1 extentZ=0 z(1) = 0.0 ! Set normal vector 1D array do i=1,imax norm(i,1)=0 norm(i,2)=0 norm(i,3)=1 enddo 201 format('<?xml version="1.0"?>') 202 format('<VTKFile type="RectilinearGrid" version="0.1" byte_order="LittleEndian">') 302 format('</VTKFile>') 203 format(2x,'<RectilinearGrid WholeExtent="',6I4,'">') 303 format(2x,'</RectilinearGrid>') 204 format(4x,'<Piece Extent="',6I4,'">') 304 format(4x,'</Piece>') 205 format(6x,'<CellData Scalars="cell_scalars" Normals="magnify">') 305 format(6x,'</CellData>') 206 format(8x,'<DataArray type="Float32" Name="magnify" NumberOfComponents="3" format="ascii">') 207 format(8x,'<DataArray type="Float32" Name="cell_scalars" format="ascii">') 399 format(8x,'</DataArray>') 208 format(6x,'<PointData Scalars="colorful" Normals="direction">') 308 format(6x,'</PointData>') 209 format(8x,'<DataArray type="Float32" Name="colorful" format="ascii">') 210 format(6x,'<Coordinates>') 310 format(6x,'</Coordinates>') 211 format(8x,'<DataArray type="Float32" format="ascii" RangeMin="0" RangeMax="5">') 212 format(8x,'<DataArray type="Float32" format="ascii">') 213 format(8x,'<DataArray type="Float32" Name="direction" NumberOfComponents="3" format="ascii">') 501 format(10f9.5) 502 format(10f9.5) 503 format(5x,9(1x,3I2)) 504 format(10f9.5) 505 format(5x,10(1x,3I2)) !!!!! ! ! Begin writing out XML tags. ! !!!!! write(*,201) !<?xml write(*,202) !VTKFile write(*,203)ix0,extentX,iy0,extentY,iz0,extentZ ! RectilinearGrid write(*,204)ix0,extentX,iy0,extentY,iz0,extentZ ! Piece write(*,205) ! CellData write(*,207) ! DataArray(cell_scalars) do j=1,imax1 write(*,501)(cell_scalar(i,j),i=1,imax1) enddo write(*,399) ! /DataArray write(*,206) ! DataArray(cell_scalars) do j=1,imax1 write(*,503)(norm(i,1),norm(i,2),norm(i,3),i=1,imax1) enddo write(*,399) ! /DataArray write(*,305) ! /CellData write(*,208) ! PointData write(*,209) ! DataArray(points) write(*,502)((point_scalar(i,j),i=1,imax),j=1,imax) write(*,399) ! /DataArray write(*,213) ! DataArray(cell_scalars) do j=1,imax write(*,505)(norm(i,1),norm(i,2),norm(i,3),i=1,imax) enddo write(*,399) ! /DataArray write(*,308) ! /PointData write(*,210) ! Coordinates write(*,212) ! DataArray(xdirection) write(*,504)(x(i),i=1,imax) write(*,399) ! /DataArray write(*,212) ! DataArray(ydirection) write(*,504)(y(i),i=1,imax) write(*,399) ! /DataArray write(*,212) ! DataArray(zdirection) write(*,504)z(1) write(*,399) ! /DataArray write(*,310) ! /Coordinates write(*,304) ! /Piece write(*,303) ! /RectilinearGrid write(*,302) !/VTKFile return end
Nonstandard Examination
In our introductory remarks, above, we said the warped freeenergy surface drapes across a fivedimensional parameter "plane" such that,



From a more pragmatic point of view, we should have said that the "fiveone" freeenergy surface drapes across a fivedimensional parameter "plane" such that,



In our initial, standard examination of the structure of this warped freeenergy surface, we held three parameters fixed — namely, — and plotted . Now, let's fix and plot . The following plot shows how a portion of the grid maps onto the traditional plane. The numerical labels identify lines of constant — 7 (light green), 9 (pink), and 12 (orange) — and lines of constant — 0.330 (purple), 0.315 (dark green), and 0.305 (white/blue).
See Also
© 2014  2020 by Joel E. Tohline 