Hello
i have a problem in the the boundary conditions subroutine cs_user_boundary_conditions.f90, when i set the temperature change by time in the code as :
call getfbr('16',nlelt,lstelt)
if (ttcabs.lt.3.8d0) then
do ilelt = 16, nlelt
ifac = lstelt(ilelt)
rcodcl(ifac,isca(iscalt),16) = 20.d0 + 100.d0*ttcabs
enddo
else
do ilelt = 16 , nlelt
ifac = lstelt(ilelt)
rcodcl(ifac,isca(iscalt),16) = 400.d0
enddo
endif
call getfbr('18',nlelt,lstelt)
if (ttcabs.lt.3.8d0) then
do ilelt = 18, nlelt
ifac = lstelt(ilelt)
rcodcl(ifac,isca(iscalt),18) = 20.d0 + 100.d0*ttcabs
enddo
else
do ilelt = 18 , nlelt
ifac = lstelt(ilelt)
rcodcl(ifac,isca(iscalt),18) = 400.d0
enddo
endif
in two inlets, which are above the cylinder , i notice in paraview that they have same variation (in red )as the other two inlets which are in the side of cylinder) , as shown in the picture attached
does that means the temperature variation by time are not working properly ?
Thank you
subroutine problem
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4210
- Joined: Mon Feb 20, 2012 3:25 pm
Re: subroutine problem
Hello,
Did you check the values prescribed at different time steps ?
Imposing a time-varying value through user subroutines should always work.
Regards,
Yvan
Did you check the values prescribed at different time steps ?
Imposing a time-varying value through user subroutines should always work.
Regards,
Yvan
Re: subroutine problem
the problem is that the temperature result , is not showing the maximum temperature as prescribed in the subrouting where i impose in these two inlets , when t >= 3.8 sec , Temp = 400, as shown in the picture , time is more than 3.8 sec (5sec)
PS : i put in the other 4 inlets in the side of cylinder , a constant temperature of 15°
where we have the max Temp is only 75°, PS : i put in the other 4 inlets in the side of cylinder , a constant temperature of 15°
-
- Posts: 4210
- Joined: Mon Feb 20, 2012 3:25 pm
Re: subroutine problem
Hello,
There may be something wrong in your setup. Following the forum usage recommendations will help provide the needed info.
Regards,
Yvan
There may be something wrong in your setup. Following the forum usage recommendations will help provide the needed info.
Regards,
Yvan
-
- Posts: 284
- Joined: Fri Dec 04, 2015 1:42 pm
Re: subroutine problem
Hello,
Did you check the documentation for coding of non-standard boundary conditions in the user guide?
In your setup you start from the position #16 of the face list. Why ?
do ilelt = 16, nlelt
and when you set the temperature at the face you set the #16 also...
rcodcl(ifac,isca(iscalt),16) = 20.d0 + 100.d0*ttcabs
For a dirichlet BC you should use
Regards,
Luciano
Did you check the documentation for coding of non-standard boundary conditions in the user guide?
In your setup you start from the position #16 of the face list. Why ?
do ilelt = 16, nlelt
and when you set the temperature at the face you set the #16 also...
rcodcl(ifac,isca(iscalt),16) = 20.d0 + 100.d0*ttcabs
For a dirichlet BC you should use
Code: Select all
If icodcl(ifac,ivar)=1: Dirichlet condition at the face ifac for the variable ivar.
→ rcodcl(ifac,ivar,1) is the value of the variable ivar at the face ifac.
Luciano