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!
initialising variable without rtp in v 4.0
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: initialising variable without rtp in v 4.0
Hello,
Yes, this seems OK.
To all those having this sort of doubt, note that in the Doxygen documentation, there is a section providing the translations from "rtp" to "field_...". See http://code-saturne.org/doxygen/src/cs_var_dico.html or the Doxygen documentation from your local install.
Regards,
Yvan
Yes, this seems OK.
To all those having this sort of doubt, note that in the Doxygen documentation, there is a section providing the translations from "rtp" to "field_...". See http://code-saturne.org/doxygen/src/cs_var_dico.html or the Doxygen documentation from your local install.
Regards,
Yvan
Re: initialising variable without rtp in v 4.0
Thanks Yvan