From: Terence on

On Oct 10, 2:32 pm, "[LINK] == http://www.meami.org"
<scribe...(a)aol.com> wrote:
> ***************************************************************************­**
> *
> *              Nine October 2009
> *              M. Michael Musatov
> *              Algorithm and Natural Pattern Engineering Section
> *              Symmetry Engineering Department
> *              College of Earth
> *              The State University
> *              Los Angeles, California
> *
> *              M.S. thesis
> *              Advisor. Dr. Walter C. Christie
> *
> *              ©2009 M.Michael Musatov [http://meami.org]
> *              All Rights Reserved in Perpetuity
> *
> ***************************************************************************­**
> *
> *                      Program ALPHATEST (FORTRAN 77)
> *
> ***************************************************************************­**
> *
> *          This program calculates values of the vapor fraction,
> *          given equilibrium ratios, Ki, and feed mole fractions,
> *          zi. It may be used to reproduce experimental results of
> *          equilibrium flashes.
> *
> *          ALPHATEST calls ALPHACOEFF, BUDAN, ALPHAPLOT, and
> *                           ALPHAROOT
> *
> *          ALPHACOEFF calls subroutine SYMFUNCTION
> *          SYMFUNCTION calls subroutine DETERM and function FACTOR
> *
> *          VARIABLES: alpha = calculated system vapor fraction
> *                               beta = experimental system liquid
> fraction
> *                               coefficient = coefficient of alpha
> polynomial
> *                               Ki = equilibrium ratio for component i
> *
> *                               molefrac =feed mole fraction of
> component i
> *                               Ncomp = number of components in feed
> *                               Npress = number of data sets to be
> evaluated
> *                               Pi = system pressure, psia
> *                               Ti = system temperature, F
> *                               xalpha = experimental system vapor
> fraction
> *
> *          It is formatted to input zi, temperature, pressure, liquid
> *          mole fraction, and Ki
> *
> ***************************************************************************­**
>
>         IMPLICIT REAL*8(a-h,o-z)
>         REAL*8 Ki(500,100),molefrac(0:100)
>         PARAMETER(Npress= 16.Ncomp= l0)
>         DIMENSION alpha(500), beta(500), coefficien(0:100),
>         @          Pi(500), Ti(500), tarray(2), xalpha(500)
> *
> *          Data Input
> *
>
> *         The number of components (Ncomp) and the number of data sets
> *         to be run (Npress) are specified as PARAMETERs'
>
>     *
>     * Open and Rewind Input and Output Files
>     *
>
>    OPEN(unit= 1 ,file='indata'status= 'old')
>    OPEN(unit=-7,file='table',status='unknown')
>    OPEN(unit=8,file= 'plot',status='unknown')
>
>    REWIND(unit= 1)
>    REWIND(unit=-7)
>    REWIND(unit=-8)
>
>    read(1,*) (molefrac(i), i = 1, Ncomp)
>    do 1000 j = 1, Npress
>
>        read(1,*) Pi(j), Ti(j), beta(j)
>        read(l,*) (Kij,i), i = 1, Ncomp)
>        xalpha(j) = 1.d0 - beta(j)
>
>  1000 continue
> *
> *           Choose between single or multiple runs
> *
>        write(6,*)  'Evaluate one data set? enter 1'
>        write(6,*)  'Evaluate one data set? enter 2'
>        read(5,*') numsets
>
>        if(numsets .EQ. 1) then
>             write(6,*) 'Enter number of data set for this run'
>             read(5,*) j
>             go to 2 100
>         end if
>
>         do 2000 j = 1, Npress
>
>  2100     write(7,*) ' '
>            write(7,*) '
>            write(7,*) '                        RUN 'j
>            write(6,*) 'J =',j
>            write(7,2500) Pi(j),Ti(j),beta(j)
>  2500     format('PIrssure = ',f6.1,' psia Temperature = ,f6.1,' F
>       @Liquid Mole Fraction = ',f6.4)
> *
> *         Call subroutines
> *
> *         Calculate coefficients of polynomial
> *
>           call APHACOEFF(Ncomp,Npressj,molefrac,Ki,coefficient)
> *
> *         Predict the number of roots on [0,1] by Founier-Budan
> theorem
> *
>             call BUDAN(jNcomp,coefficientnumroot)
> *
> *           Solve for the roots by Newton-Raphson method
> *
>              call ALPHAROOT(j,Ncomp,coefficient,xalpha,numroot,alpha)
> *
> *           Generate various plots (EDIT the file to remove comments
> for specific
> *           options)
> *
>
>              call ALPHAPLOT(Ncompj,molefrac,alpha,coefficient,Ki)
>
> *           ALPHAROOT has internal output section to compile a table
> *           listing statistics on the determination of alpha
>
>  2000 continue
>
> ***************************************************************************­**
> *       Produce this format to plot data points as dots:
> *                            (PLOTFAT=20)
> *
> *                             2
> *                             x(1) y(1)
> *                             x(1) y(l)
> *                             2
> *                             x(2) y(2)
> *                             x(2) y(2)
> *                                 etc.
>
>       do 3000 j = 1, Npress
>
>              write(8,3500) alpha(j),xalphaj),alpha(j),xalpha(j)
>  3500       format("2 'j,el 6.9,10x,e 16.9j,e 16.9,10x,e 16.9)
>
>  3000 continue
>
>        CLOSE(unit=1)
>        CLOSE(unit=7)
>        CLOSE(unit=8)
>
>        stop
>        end
>
> ***************************************************************************­**

You don't say why you are posting this.
It is not F77 code but F90 code (e.g. the use of KIND and
status='unknown' and varibe names longer than 6 characters and
comments defiened as an asterisk in column 1 instead of "C").

And no compiler I have used recently will accept a negative integer as
a unit number (perhaps this is permitted in some compilers of this
century). It may very well be be a compiler-specific trick to pass a
parameter to the open statement. I see the same positive unit numbers
are used later.

What's the problem? (Unless you cannot compile it with and F77
compiler; in which case try F90.)
From: Eli Osherovich on
On Oct 10, 9:09 am, Terence <tbwri...(a)cantv.net> wrote:
> On Oct 10, 2:32 pm, "[LINK] ==http://www.meami.org"
>
>
>
> <scribe...(a)aol.com> wrote:
> > ***************************************************************************­**
> > *
> > *              Nine October 2009
> > *              M. Michael Musatov
> > *              Algorithm and Natural Pattern Engineering Section
> > *              Symmetry Engineering Department
> > *              College of Earth
> > *              The State University
> > *              Los Angeles, California
> > *
> > *              M.S. thesis
> > *              Advisor. Dr. Walter C. Christie
> > *
> > *              ©2009 M.Michael Musatov [http://meami.org]
> > *              All Rights Reserved in Perpetuity
> > *
> > ***************************************************************************­**
> > *
> > *                      Program ALPHATEST (FORTRAN 77)
> > *
> > ***************************************************************************­**
> > *
> > *          This program calculates values of the vapor fraction,
> > *          given equilibrium ratios, Ki, and feed mole fractions,
> > *          zi. It may be used to reproduce experimental results of
> > *          equilibrium flashes.
> > *
> > *          ALPHATEST calls ALPHACOEFF, BUDAN, ALPHAPLOT, and
> > *                           ALPHAROOT
> > *
> > *          ALPHACOEFF calls subroutine SYMFUNCTION
> > *          SYMFUNCTION calls subroutine DETERM and function FACTOR
> > *
> > *          VARIABLES: alpha = calculated system vapor fraction
> > *                               beta = experimental system liquid
> > fraction
> > *                               coefficient = coefficient of alpha
> > polynomial
> > *                               Ki = equilibrium ratio for component i
> > *
> > *                               molefrac =feed mole fraction of
> > component i
> > *                               Ncomp = number of components in feed
> > *                               Npress = number of data sets to be
> > evaluated
> > *                               Pi = system pressure, psia
> > *                               Ti = system temperature, F
> > *                               xalpha = experimental system vapor
> > fraction
> > *
> > *          It is formatted to input zi, temperature, pressure, liquid
> > *          mole fraction, and Ki
> > *
> > ***************************************************************************­**
>
> >         IMPLICIT REAL*8(a-h,o-z)
> >         REAL*8 Ki(500,100),molefrac(0:100)
> >         PARAMETER(Npress= 16.Ncomp= l0)
> >         DIMENSION alpha(500), beta(500), coefficien(0:100),
> >         @          Pi(500), Ti(500), tarray(2), xalpha(500)
> > *
> > *          Data Input
> > *
>
> > *         The number of components (Ncomp) and the number of data sets
> > *         to be run (Npress) are specified as PARAMETERs'
>
> >     *
> >     * Open and Rewind Input and Output Files
> >     *
>
> >    OPEN(unit= 1 ,file='indata'status= 'old')
> >    OPEN(unit=-7,file='table',status='unknown')
> >    OPEN(unit=8,file= 'plot',status='unknown')
>
> >    REWIND(unit= 1)
> >    REWIND(unit=-7)
> >    REWIND(unit=-8)
>
> >    read(1,*) (molefrac(i), i = 1, Ncomp)
> >    do 1000 j = 1, Npress
>
> >        read(1,*) Pi(j), Ti(j), beta(j)
> >        read(l,*) (Kij,i), i = 1, Ncomp)
> >        xalpha(j) = 1.d0 - beta(j)
>
> >  1000 continue
> > *
> > *           Choose between single or multiple runs
> > *
> >        write(6,*)  'Evaluate one data set? enter 1'
> >        write(6,*)  'Evaluate one data set? enter 2'
> >        read(5,*') numsets
>
> >        if(numsets .EQ. 1) then
> >             write(6,*) 'Enter number of data set for this run'
> >             read(5,*) j
> >             go to 2 100
> >         end if
>
> >         do 2000 j = 1, Npress
>
> >  2100     write(7,*) ' '
> >            write(7,*) '
> >            write(7,*) '                        RUN 'j
> >            write(6,*) 'J =',j
> >            write(7,2500) Pi(j),Ti(j),beta(j)
> >  2500     format('PIrssure = ',f6.1,' psia Temperature = ,f6.1,' F
> >       @Liquid Mole Fraction = ',f6.4)
> > *
> > *         Call subroutines
> > *
> > *         Calculate coefficients of polynomial
> > *
> >           call APHACOEFF(Ncomp,Npressj,molefrac,Ki,coefficient)
> > *
> > *         Predict the number of roots on [0,1] by Founier-Budan
> > theorem
> > *
> >             call BUDAN(jNcomp,coefficientnumroot)
> > *
> > *           Solve for the roots by Newton-Raphson method
> > *
> >              call ALPHAROOT(j,Ncomp,coefficient,xalpha,numroot,alpha)
> > *
> > *           Generate various plots (EDIT the file to remove comments
> > for specific
> > *           options)
> > *
>
> >              call ALPHAPLOT(Ncompj,molefrac,alpha,coefficient,Ki)
>
> > *           ALPHAROOT has internal output section to compile a table
> > *           listing statistics on the determination of alpha
>
> >  2000 continue
>
> > ***************************************************************************­**
> > *       Produce this format to plot data points as dots:
> > *                            (PLOTFAT=20)
> > *
> > *                             2
> > *                             x(1) y(1)
> > *                             x(1) y(l)
> > *                             2
> > *                             x(2) y(2)
> > *                             x(2) y(2)
> > *                                 etc.
>
> >       do 3000 j = 1, Npress
>
> >              write(8,3500) alpha(j),xalphaj),alpha(j),xalpha(j)
> >  3500       format("2 'j,el 6.9,10x,e 16.9j,e 16.9,10x,e 16.9)
>
> >  3000 continue
>
> >        CLOSE(unit=1)
> >        CLOSE(unit=7)
> >        CLOSE(unit=8)
>
> >        stop
> >        end
>
> > ***************************************************************************­**
>
> You don't say why you are posting this.
> It is not F77 code but F90 code (e.g. the use of KIND and
> status='unknown' and varibe names longer than 6 characters and
> comments defiened as an asterisk in column 1 instead of "C").
>
> And no compiler I have used recently will accept a negative integer as
> a unit number (perhaps this is permitted in some compilers of this
> century). It may very well be be a compiler-specific trick to pass a
> parameter to the open statement. I see the same positive unit numbers
> are used later.
>
> What's the problem? (Unless you cannot compile it with and F77
> compiler; in which case try F90.)

Therence,

There is no question in this post.
It's a regular spam from Mr. Musatov, I assume.
From: Geordie La Forge on


Terence wrote:
> On Oct 10, 2:32 pm, "[LINK] == http://www.meami.org"
> <scribe...(a)aol.com> wrote:
> > ***************************************************************************­**
> > *
> > *              Nine October 2009
> > *              M. Michael Musatov
> > *              Algorithm and Natural Pattern Engineering Section
> > *              Symmetry Engineering Department
> > *              College of Earth
> > *              The State University
> > *              Los Angeles, California
> > *
> > *              M.S. thesis
> > *              Advisor. Dr. Walter C. Christie
> > *
> > *              ©2009 M.Michael Musatov [http://meami.org]
> > *              All Rights Reserved in Perpetuity
> > *
> > ***************************************************************************­**
> > *
> > *                      Program ALPHATEST (FORTRAN 77)
> > *
> > ***************************************************************************­**
> > *
> > *          This program calculates values of the vapor fraction,
> > *          given equilibrium ratios, Ki, and feed mole fractions,
> > *          zi. It may be used to reproduce experimental results of
> > *          equilibrium flashes.
> > *
> > *          ALPHATEST calls ALPHACOEFF, BUDAN, ALPHAPLOT, and
> > *                           ALPHAROOT
> > *
> > *          ALPHACOEFF calls subroutine SYMFUNCTION
> > *          SYMFUNCTION calls subroutine DETERM and function FACTOR
> > *
> > *          VARIABLES: alpha = calculated system vapor fraction
> > *                               beta = experimental system liquid
> > fraction
> > *                               coefficient = coefficient of alpha
> > polynomial
> > *                               Ki = equilibrium ratio for component i
> > *
> > *                               molefrac =feed mole fraction of
> > component i
> > *                               Ncomp = number of components in feed
> > *                               Npress = number of data sets to be
> > evaluated
> > *                               Pi = system pressure, psia
> > *                               Ti = system temperature, F
> > *                               xalpha = experimental system vapor
> > fraction
> > *
> > *          It is formatted to input zi, temperature, pressure, liquid
> > *          mole fraction, and Ki
> > *
> > ***************************************************************************­**
> >
> >         IMPLICIT REAL*8(a-h,o-z)
> >         REAL*8 Ki(500,100),molefrac(0:100)
> >         PARAMETER(Npress= 16.Ncomp= l0)
> >         DIMENSION alpha(500), beta(500), coefficien(0:100),
> >         @          Pi(500), Ti(500), tarray(2), xalpha(500)
> > *
> > *          Data Input
> > *
> >
> > *         The number of components (Ncomp) and the number of data sets
> > *         to be run (Npress) are specified as PARAMETERs'
> >
> >     *
> >     * Open and Rewind Input and Output Files
> >     *
> >
> >    OPEN(unit= 1 ,file='indata'status= 'old')
> >    OPEN(unit=-7,file='table',status='unknown')
> >    OPEN(unit=8,file= 'plot',status='unknown')
> >
> >    REWIND(unit= 1)
> >    REWIND(unit=-7)
> >    REWIND(unit=-8)
> >
> >    read(1,*) (molefrac(i), i = 1, Ncomp)
> >    do 1000 j = 1, Npress
> >
> >        read(1,*) Pi(j), Ti(j), beta(j)
> >        read(l,*) (Kij,i), i = 1, Ncomp)
> >        xalpha(j) = 1.d0 - beta(j)
> >
> >  1000 continue
> > *
> > *           Choose between single or multiple runs
> > *
> >        write(6,*)  'Evaluate one data set? enter 1'
> >        write(6,*)  'Evaluate one data set? enter 2'
> >        read(5,*') numsets
> >
> >        if(numsets .EQ. 1) then
> >             write(6,*) 'Enter number of data set for this run'
> >             read(5,*) j
> >             go to 2 100
> >         end if
> >
> >         do 2000 j = 1, Npress
> >
> >  2100     write(7,*) ' '
> >            write(7,*) '
> >            write(7,*) '                        RUN 'j
> >            write(6,*) 'J =',j
> >            write(7,2500) Pi(j),Ti(j),beta(j)
> >  2500     format('PIrssure = ',f6.1,' psia Temperature = ,f6.1,' F
> >       @Liquid Mole Fraction = ',f6.4)
> > *
> > *         Call subroutines
> > *
> > *         Calculate coefficients of polynomial
> > *
> >           call APHACOEFF(Ncomp,Npressj,molefrac,Ki,coefficient)
> > *
> > *         Predict the number of roots on [0,1] by Founier-Budan
> > theorem
> > *
> >             call BUDAN(jNcomp,coefficientnumroot)
> > *
> > *           Solve for the roots by Newton-Raphson method
> > *
> >              call ALPHAROOT(j,Ncomp,coefficient,xalpha,numroot,alpha)
> > *
> > *           Generate various plots (EDIT the file to remove comments
> > for specific
> > *           options)
> > *
> >
> >              call ALPHAPLOT(Ncompj,molefrac,alpha,coefficient,Ki)
> >
> > *           ALPHAROOT has internal output section to compile a table
> > *           listing statistics on the determination of alpha
> >
> >  2000 continue
> >
> > ***************************************************************************­**
> > *       Produce this format to plot data points as dots:
> > *                            (PLOTFAT=20)
> > *
> > *                             2
> > *                             x(1) y(1)
> > *                             x(1) y(l)
> > *                             2
> > *                             x(2) y(2)
> > *                             x(2) y(2)
> > *                                 etc.
> >
> >       do 3000 j = 1, Npress
> >
> >              write(8,3500) alpha(j),xalphaj),alpha(j),xalpha(j)
> >  3500       format("2 'j,el 6.9,10x,e 16.9j,e 16.9,10x,e 16.9)
> >
> >  3000 continue
> >
> >        CLOSE(unit=1)
> >        CLOSE(unit=7)
> >        CLOSE(unit=8)
> >
> >        stop
> >        end
> >
> > ***************************************************************************­**
>
> You don't say why you are posting this.
> It is not F77 code but F90 code (e.g. the use of KIND and
> status='unknown' and varibe names longer than 6 characters and
> comments defiened as an asterisk in column 1 instead of "C").
>
> And no compiler I have used recently will accept a negative integer as
> a unit number (perhaps this is permitted in some compilers of this
> century). It may very well be be a compiler-specific trick to pass a
> parameter to the open statement. I see the same positive unit numbers
> are used later.
>
> What's the problem? (Unless you cannot compile it with and F77
> compiler; in which case try F90.)

Thanks, how were you able to distinguish?
From: Richard Maine on
Terence <tbwright(a)cantv.net> wrote:
[code elided]
> You don't say why you are posting this.

I'm puzzled by that one also that either.

> It is not F77 code but F90 code (e.g. the use of KIND and
> status='unknown' and varibe names longer than 6 characters and
> comments defiened as an asterisk in column 1 instead of "C").

I see no usage of kind here. The real*8 syntax is not a kind parameter.
It is neither Fortran 77 nor Fortran 90, but instead is a common
nonstandard feature. Although the feature is common in both f77 and f90
compilers, it is a feature associated more with f66 and f77 than with
f90 as it predates kind parameters.

Status='unknown' and comments using an asterisk in column 1 are both
perfectly standard f77. If anything, the asterisk comment style is more
an f77 one than an f90 one, insomuch as it applies only to fixed source
form, which is even obsolescent as of f95.

Variable names longer than 6 characters are indeed a feature new to the
standard as of f90, but they are one of the most common extensions out
there in f77 compilers. If one is going to be quite that strict about
the matter, one might also note the use of lower case as being a
similarly nonstandard feature in f77, along with the use of the @
character, which isn't in the f77 character set.

If I were going to get real picky about "legalisms", I'd probably note
that the "in Perpetuity" part of "All Rights Reserved in Perpetuity"
doesn't follow standards either, but that's a very different set of
standards from the Fortran ones. :-)

> And no compiler I have used recently will accept a negative integer as
> a unit number

There are several things here that no compiler of any vintage would
accept. I suppose it is vaguely possible that the consequent compilation
errors are supposed to be the question. Most of them are easy to miss in
a quick skim. I don't know whether this was posted here before throwing
it at a compiler or perhaps this was manually transcribed here or done
with OCR. For example, I see a missing parens in the statement before
3500. And the format in 3500 just looks garbled in a wy I can't figure
out. I suspect the -7 unit number to be some kind of simillar
transcription error or typo, as positive 7 seems to be used later.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: robin on
"Terence" <tbwright(a)cantv.net> wrote in message
news:5070296e-cce1-463d-a367-bbd717f73ddb(a)v15g2000prn.googlegroups.com...

>You don't say why you are posting this.
>It is not F77 code but F90 code (e.g. the use of KIND and
>status='unknown' and varibe names longer than 6 characters and
>comments defiened as an asterisk in column 1 instead of "C").

Looks like F77 to me.
* was common in F77.

>And no compiler I have used recently will accept a negative integer as
>a unit number (perhaps this is permitted in some compilers of this
>century). It may very well be be a compiler-specific trick to pass a
>parameter to the open statement. I see the same positive unit numbers
>are used later.

Looks like a typo.


 |  Next  |  Last
Pages: 1 2 3 4
Prev: Python 1 , Lisp 0
Next: icanhaz.cnt 1-2-1 baby!