[Nek5000-users] Setting self-defined variable properties in USERVP
nek5000-users at lists.mcs.anl.gov
nek5000-users at lists.mcs.anl.gov
Tue Nov 1 03:07:43 CDT 2016
Hello,neks
In my simulation, fluid density 'Rho', dynamic viscosity 'Visco', thermal diffusivity 'Conduct' are all the function of the temperature, so I define them in USERVP as below:
subroutine uservp (ix,iy,iz,ieg)
include 'SIZE'
include 'TOTAL'
include 'NEKUSE'
common /nob_coef/Kn(1:3),Bn(1:3),Cn(1:3),Dn(1:3),
$ En(1:3),Fn(1:3)
common /constant/Rhom,Cpm,Tm,Alpham,Kappam,Km,
$ Viscom,delta_T,rho0
real*8 Kn,Bn,Cn,Dn,En,Fn,
$ Rhom,Cpm,Tm,Alpham,Kappam,Km,
$ Viscom,delta_T,rho0
integer i,j,k,e,n,iel
Rhom = 0.9922*1e3
Cpm = 4.1690*1e3
Alpham = 3.8810*1e-4
Km = 0.6297
Kappam = 0.1528*1e-6
Viscom = 0.669*1e-6
Tm = 40
Kn=[ -175.9*1e-4,295.8*1e-6,-460*1e-8]
Bn=[23.52*1e-4,-14.9*1e-6,0.]
Cn= [-3.736*1e3,-3.98*1e3,0.]
Dn= [0.084*1e3,4.6*1e3,0.]
En = [195*1e-4,-159.8*1e-4,207*1e-4]
Fn=[21.99,-17.8,0.]
iel=gllel(ieg)
if (IFIELD.eq. 1)then
udiff = Rhom
utrans = 0.
rho0 = 0.
do i=1,3
utrans = utrans + Kn(i)*((temp-0.5)*delta_T)**i
rho0 = rho0 + Cn(i)*((temp-0.5)*delta_T)**i
enddo
utrans=utrans*Viscom+Viscom
rho0=rho0*Rhom+Rhom
utrans=utrans*rho0
endif
if (IFIELD.eq. 2)then
udiff = Rhom*Cpm
utrans = 0.
do i=1,3
utrans = utrans + Fn(i)*((temp-0.5)*delta_T)**i
enddo
utrans=utrans*Km+Km
endif
return
end
then I set p30=1 in .rea file. But the program cannot run, it seems that some errors occured when reading .rea file. I know from the user guide that variable properties are supported but I am little confused about if the properties which are the functions of other flow field variables(like u, v, w or temperature) also can be set correctly in USERVP. Did anyone meet problems like this before? Any help is appreciated.
regards,
Xu
--
Xu Bolun,
University of Science and Technology of China,
Hefei,Anhui,China
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/nek5000-users/attachments/20161101/995efe9c/attachment.html>
More information about the Nek5000-users
mailing list