<div dir="ltr">Thanks to Paul and Ammar. I will try the variable density approach.<div><br></div><div style>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 ?</div>
<div style><br></div><div style><div> subroutine uservp (ix,iy,iz,ieg)</div><div> include 'SIZE'</div><div> include 'TOTAL'</div><div> include 'NEKUSE'</div><div> common /mygeom/ xmin,xmax</div>
<div> common /myparam/ r_k,Rey_no,Pr_no,Sc_no,visc_rat</div><div><br></div><div> if(ifield.eq.1)then ! momentum equation</div><div> utrans= 1.0</div><div> udiff = exp(PS(1)*log(visc_rat) - temp)/Rey_no</div>
<div> else if(ifield.eq.2)then ! temperature eqn</div><div> utrans= 1.0</div><div> udiff = PS(1)*(r_k - 1.0) + 1.0</div><div> udiff = udiff/(Rey_no*Pr_no)</div><div> else if(ifield.eq.3)then ! passive scalar</div>
<div> utrans= 1.0</div><div> udiff = 1.0/(Rey_no*Sc_no)</div><div> else</div><div> print*,'Only 3 fields'</div><div> call exitt()</div><div> endif</div><div><br></div><div>
return</div><div style> end</div><div style><br></div><div style>Thanks</div><div style>praveen</div></div></div>