USER1 arguments and common blocks
Calling convention
subroutine user1(gg,t,c,q,qd,r,time,dt,it,
+ kode,nocon,maxno,iconv,dum1,dum2,dtp,tf)
C
C Arguments
C
real gg(*), t(*), c(*), q(*), qd(*), r(*)
real time, dt, dum1, dum2, dtp, tf
integer it, kode, nocon, maxno, iconv(*)
character*7 name
C
C Common block variables
C
real tdmax, prtflg, params(80000), grav, gv(3), tabs, rgas
real pstd, tstd, sigma
integer irun, ir(1), maxn1, maxn2
C
C Common block definitions
C
common/tdmax/tdmax
common/prtflg/prtflg
common/irun/irun,ir
common/maxnoq/maxn1,maxn2
common/params/params
common/grav/grav,gv(3),tabs,rgas,pstd,tstd,sigma
double precision t,time,dt
save
..
return
end
Argument definitions
Arguments | Definition | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c
|
c(i) is the capacitance of internal element i . Temperatures of elements with c(i ) < 0 are not computed with the normal heat balance equations. MCV elements and sink elements are assigned c(i ) < 0 . |
||||||||||||
dt
|
The current integration time step for transient runs. | ||||||||||||
dtp
|
The printout time increment for transient runs. | ||||||||||||
gg
|
gg(j) is the current value of the resistance j , that is, the inverse of the conductance J . If J is a radiative conductance, then gg(j) is the inverse of its current linearized value, that is, the temperature difference between its elements divided by the heat flow through it. |
||||||||||||
grav
|
The magnitude of the gravity acceleration. | ||||||||||||
gv
|
gv(i) is the component of the unit gravity vector in direction i , expressed in global coordinates. |
||||||||||||
iconv
|
iconv(j) is the real element number of internal element k . Thermal solver assigns an internal number for each element. The real element numbers are stored in array iconv . The function k = kconv (j ) retrieves the internal element number k of real element j . |
||||||||||||
irun
|
The current run number. | ||||||||||||
ir
|
The parameter to execute the run number (irun) when irun>
1 . ir(irun) is set to the Card 2b - Analyzer Control Card – Optional GRADNT parameter value: 0 for steady state runs and –2, –3, –4, or –5 for transient runs. For more information, see the Thermal Solver Reference Manual PDF. |
||||||||||||
it
|
The current iteration counter value. | ||||||||||||
kode
|
= 1 if the subroutine USER1 is entered before calculating the temperatures. = = = = |
||||||||||||
maxn1
|
The number of non–hydraulic elements (cannot be changed). | ||||||||||||
maxn2
|
The number of hydraulic elements (cannot be changed). | ||||||||||||
maxn0
|
The number of elements (
|
||||||||||||
nocon
|
The number of conductances (cannot be changed). | ||||||||||||
params
|
General-purpose common block for analyzer parameters.
|
||||||||||||
prtflg
|
The print flag.
|
||||||||||||
pstd
|
The standard pressure from Card 9 - HYDENV Hydraulic Element Environment Definition Card - Optional. For more information, see the Thermal Solver Reference Manual PDF. | ||||||||||||
q |
The heat load to internal element k . q(j) is re-initialized at each iteration or time step. To change its value permanently, you have to change it every time USER1 is entered with KODE = 1 . |
||||||||||||
qd(k)
|
The fraction of phase–change element k in its higher temperature phase. k is an internal element number. |
||||||||||||
r(j)
|
The conductance parameter of conductance J . r(j) is not altered during the run, except for temperature-dependent radiative conductances. The value of r(j) for a linear conductance is the inverse of its initial conductance, that is, R(J) is a resistance. r(j) is the value for a radiative conductance (area * emissivity * gray body view factor * Stefan–Boltzmann constant) . For Oppenheim's Method (Card 9 - PARAM Parameter Card - Optional OPPENHEIM) the gray body view factor between an element and its surface element is 1/(1–emissivity). For more information, see the Thermal Solver Reference Manual PDF.For example, to change the value of a radiative coupling in a user-written subroutine, modify the value of both For a convective conductance, |
||||||||||||
rgas
|
The universal gas constant. | ||||||||||||
sigma
|
The Stefan–Boltzmann's Constant. | ||||||||||||
t
|
The contents of the
Both Analyzer calculates temperatures in double precision. |
||||||||||||
tabs
|
The absolute value of the absolute zero temperature (273 ). Thermal solver assumes that the model zero is never below absolute zero. |
||||||||||||
tdmax
|
The current value of the maximum temperature difference of any element between the current iteration and the previous one for steady-state run. If tdmax is set to 0 with KODE = 2 for steady state runs, the run is forced to terminate. |
||||||||||||
time
|
The current time value for transient runs. time is in single precision by default. To specify dt , t and time in double precision variables to USER1, include the following line: double precision t, time, dt |
||||||||||||
tf
|
The maximum number of iterations for a steady state run. If tf is set to 0 , the run is forced to terminate. |
||||||||||||
tstd
|
The standard temperature for fluid properties. |