[Nek5000-users] Variable density flows

nek5000-users at lists.mcs.anl.gov nek5000-users at lists.mcs.anl.gov
Sat Oct 12 11:34:55 CDT 2013


Hi Praveen,

That looks right... As always, it's best to run a test
to verify first.

Paul


----- Original Message -----
From: nek5000-users at lists.mcs.anl.gov
To: nek5000-users at lists.mcs.anl.gov
Sent: Saturday, October 12, 2013 11:17:06 AM
Subject: Re: [Nek5000-users] Variable density flows



Thanks to Paul and Ammar. I will try the variable density approach. 


I am first trying a case in which viscosity depends on temperature and a passive scalar. My uservp looks like this. Can I use "temp" and "PS" to get temperature and passive scalar as below ? 



subroutine uservp (ix,iy,iz,ieg) 
include 'SIZE' 
include 'TOTAL' 
include 'NEKUSE' 
common /mygeom/ xmin,xmax 
common /myparam/ r_k,Rey_no,Pr_no,Sc_no,visc_rat 


if(ifield.eq.1)then ! momentum equation 
utrans= 1.0 
udiff = exp(PS(1)*log(visc_rat) - temp)/Rey_no 
else if(ifield.eq.2)then ! temperature eqn 
utrans= 1.0 
udiff = PS(1)*(r_k - 1.0) + 1.0 
udiff = udiff/(Rey_no*Pr_no) 
else if(ifield.eq.3)then ! passive scalar 
utrans= 1.0 
udiff = 1.0/(Rey_no*Sc_no) 
else 
print*,'Only 3 fields' 
call exitt() 
endif 


return 
end 


Thanks 
praveen 
_______________________________________________
Nek5000-users mailing list
Nek5000-users at lists.mcs.anl.gov
https://lists.mcs.anl.gov/mailman/listinfo/nek5000-users


More information about the Nek5000-users mailing list