initialising variable without rtp in v 4.0
Posted: Mon Dec 07, 2015 6:15 pm
Hello, Im using v4.0 and am trying to initialise the flow field in case of no restart in cs_user_initialization and then initialise the velocity at my outlet face (for the purpose of a convective outlet). I am not sure what to do instead of rtp which I know no longer exists in version 4. Any help would be appreciated! I have copied what I had before (can't take credit for it, someone gave me it from their version 3 code).
if (isuite.eq.0) then
do iel = 1, ncel
rtp(iel,iu) = 1.d0
rtp(iel,iv) = 0.d0
rtp(iel,iw) = 0.d0
!call field_get_val_v(ivarfl(iu), cvar_vel)
!cvar_vel(1, iel) = 1.d0
!cvar_vel(2, iel) = 0.d0
!cvar_vel(3, iel) = 0.d0
enddo
endif
call init_convoutlet_module(nfabor)
call getfbr("OUTLET",nlelt,lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
iel = ifabor(ifac)
velf(1,ifac) = cvar_vel(1, iel)
enddo
I think I have to do something with this instead, is that the correct syntax?
call field_get_val_v(ivarfl(iu), cvar_vel)
cvar_vel(1, iel) = 1.d0
cvar_vel(2, iel) = 0.d0
cvar_vel(3, iel) = 0.d0
Thanks in advance!
if (isuite.eq.0) then
do iel = 1, ncel
rtp(iel,iu) = 1.d0
rtp(iel,iv) = 0.d0
rtp(iel,iw) = 0.d0
!call field_get_val_v(ivarfl(iu), cvar_vel)
!cvar_vel(1, iel) = 1.d0
!cvar_vel(2, iel) = 0.d0
!cvar_vel(3, iel) = 0.d0
enddo
endif
call init_convoutlet_module(nfabor)
call getfbr("OUTLET",nlelt,lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
iel = ifabor(ifac)
velf(1,ifac) = cvar_vel(1, iel)
enddo
I think I have to do something with this instead, is that the correct syntax?
call field_get_val_v(ivarfl(iu), cvar_vel)
cvar_vel(1, iel) = 1.d0
cvar_vel(2, iel) = 0.d0
cvar_vel(3, iel) = 0.d0
Thanks in advance!