From: ben_nielsen20 on
Now there are no errors, but is says,
"GFORTRAN: CreateProcess: No such file or directory"

PROGRAM omega3
c version 1, 01-Nov-2001
c Calculate real temperature variation at a given frequency
c for a silicon plate heated by a thin metal strip.
c The calculation can be applied to plates composed of
c material other than silicon if the thermal conductivity
c and thermal diffusivity of that material are substituted
c in the indicated lines below.
c This is used for analyzing data obtained by the 3 omega
c method
c
c library routine 'dqagi' used for integration
c --------------------------------------------------------
c A data file named 'input.par' written in ASCII is needed
c
c A sample file is given in section A2. Just substitute data
c in the appropriate lines. Double precision is used.
c
c Function Fcomplex is written for a two layer system. The
c main program defines one of these layers as having zero
c thickness and having the same material parameters as
c the other layer.
c --------------------------------------------------------
c Nomenclature (not necessarily the same as in the standard)
c D =diffusivity
c k =conductivity
c L =substrate thickness
c lnth=heater length
c b =heater half-width
c b2 =heater full width
c w =angular frequency at 2 omega
c f =fundamental frequency
c f2 =frequency at 2 omega
c q =power input to specimen
c T =measurement temperature
c tr =substrate temperature signal at 2 omega
c
c --------------------------------------------------------
c define integration parameters for dqagi
double precision, external :: fr
c
double precision, parameter :: bound=0.d0
double precision, parameter :: epsabs=1.d-6
double precision, parameter :: epsrel=1.d-12
integer, parameter :: inf=1
integer, parameter :: limit=1000
integer, parameter :: lenw=limit*4
integer, parameter :: idim=2

c
double precision result, abserr, work(lenw), T
double precision f, f2, b2
integer neval, ier, last, iwork(limit)
character*30, label
c --------------------------------------------------------
c common variables
double precision w, b
double precision d(idim), k(idim), L(idim)
common w, d, k, L, b
c
double precision q, pi
double precision tr, lnth
c
1 format(A12)
2 format(A30)
3 format(6(1x,d13.6))
4 format(1x,A33,D12.4)
c --------------------------------------------------------
pi=4.d0*atan(1.d0)
c --------------------------------------------------------
open(1,file='input.par')
c
read (1,2)
read(1,2) label ; read(1,*) f
read(1,2) label ; read(1,*) q
read(1,2) label ; read(1,*) b2
read(1,2) label ; read(1,*) lnth
read(1,2) label ; read(1,*) L(1)
read(1,2) label ; read(1,*) T
c
f2=2*f
w=2.d0*pi*f2
b=b2/2.d0
c +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
c The thermal conductivity of Si as a function of
c temperature is computed in the line 90 below. If another
c material is wanted, replace line 90

90 k(1)=1.685d0-8.73d-3*T+3.62d-5*T*T-9.0d-8*T*T*T

c The thermal diffusivity of Si as a function of the
c thermal conductivity of Si is computed in line 96 below.
c If another material is wanted, replace line 96.

96 D(1)=0.093d0+0.268d0*k(1)+0.180d0*k(1)*k(1)

c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
write(*,4)'thermal conductivity of Si, W/cm/K ', k(1)
write(*,4)'thermal diffusivity of Si, cm2/s ', D(1)
k(2)=k(1)
D(2)=D(1)
L(2)=0.d0
c
c --------------------------------------------------------
c Calculate the temperature variation
c
c calculate average temperature (real and imaginary) using
c dqagi
c
call dqagi(fr,bound,inf,epsabs,epsrel,result,
* abserr,neval,ier,limit,lenw,last,iwork,work)
if (ier.gt.0) then
call list(bound,inf,epsabs,epsrel,result,
* abserr,neval,ier,limit,lenw,last,'fr')
end if
c
tr=result*q/pi/lnth
c
write(*,4) 'substrate thermal signal ', tr
c --------------------------------------------------------
close(2)
end
c
c *******************************************************
function fr(x)
c real part of integrand for dqagi
double precision x, fr
complex*8 fcomplex
c
fr=real(fcomplex(x))
return
end function fr
c
c *******************************************************
function fcomplex(x)
c
c complex integrand for 2 layers in vacuum
c
c common variables
double precision w, b
double precision d(2), k(2), L(2)
common w, d, k, L, b
c
double precision x
complex*8 u(2), ea1, ea2
complex*8 ci, gp, gm, ex1, ex2, bp, bm, ftr, fcomplex
c
ci=(0,1.d0)
u(1)=sqrt(x*x-ci*w/d(1))
u(2)=sqrt(x*x-ci*w/d(2))
gp=u(1)*k(1)+u(2)*k(2)
gm=u(1)*k(1)-u(2)*k(2)
ea1= 2.d0*u(1)*L(1)
if (real(ea1).gt.160) then
ex1=0.d0
else
ex1= exp(-ea1)
end if
ea2= 2.d0*u(2)*L(2)
if (real(ea2).gt.160) then
ex2=0.d0
else
ex2= exp(-ea2)
end if
bp=(gp*ex2 + gm)*ex1
bm=(gm*ex2 + gp)
ftr=(bm+bp)/(bm-bp)/u(1)/k(1)
if(x.eq.0.d0) then
fcomplex=ftr
else
fcomplex=ftr*sin(x*b)*sin(x*b)/x/x/b/b
end if
c print*,'end of fcomplex'
return
end function fcomplex
c
c *******************************************************
subroutine list(bound,inf,epsabs,epsrel,result,
* abserr,neval,ier,limit,lenw,last,ri)
c
double precision bound,epsabs,epsrel,result,abserr
integer inf,limit,lenw,neval,ier,last
character*2 ri
c
print*,'list parameters from dqagi call to ', ri
print*, 'epsabs=', epsabs
print*, 'epsrel=', epsrel
print*, ' limit=', limit
print*, 'result=', result
print*, ' neval=', neval
print*, ' ier=', ier
print*, ' last=', last
print*, ' '
return
end subroutine list
c *******************************************************

From: mintoo on
i am not an expert but, i noticed one thing:

open(1,'input.par')
close(2)

I did'nt run that program but i am not sure if that's right thing to do

From: Tom Micevski on
ben_nielsen20(a)yahoo.com wrote:
> On Apr 19, 4:59 pm, "Michael Metcalf" <michaelmetc...(a)compuserve.com>
> wrote:
>> Please note that this is a fixed source form program: labels must be in
>> columns 1-5, a continuation mark in column 6, and the statements in columns
>> 7-72. That's the first thing to check. The file suffix will normally have to
>> be .f and not .f90 (which normally implies free form source).
>>
>> HTH
>>
>> Mike Metcalf
>
> Hi Mike,
>
> I have it down to one error for this line:
> open(1, 'input.par')
>
> It says "Error: Syntax error in open statement at (1)
> line 71, column 13

you need to add an extra space (so OPEN starts in column 7, not column 6
like it is now).

From: Michael Metcalf on
Is that because you call a library procedue, DQAGI, that is not supplied
(see the comment lines!).

Regards,

Mike Metcalf


From: ben_nielsen20 on
I downloaded DQAGI.f and saved it in the same folder as my 3omega.f
program. Where will my program look for the DQAGI program?

I also noticed my program has this statement:
call dqagi(fr,bound,inf,epsabs,epsrel,result,
* abserr,neval,ier,limit,lenw,last,iwork,work)

Whereas, in the DQAGI program it reads:
SUBROUTINE DQAGI(F,BOUND,INF,EPSABS,EPSREL,RESULT,ABSERR,NEVAL,
1 IER,LIMIT,LENW,LAST,IWORK,WORK)

It has an "f" instead of an "fr". Could this be the problem?

Thanks,

Ben

First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7
Prev: Libraries on Linux
Next: Write to file from DLL