Hello everyone
I have a small question here:
Now I'm working on the coupled problem between natural convection and radiation. I want to use the temperature in the domain and on the boundary. Here, I try to ouput the temperature on the hot wall, on which the temperature is constant. But the result got by the following code is variable.(The cordinates are correct)
!***************************************
open(21,file="chaud.dat")
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
iel = ifabor(ifac) ! associated boundary cell
write(21,*)cdgfbo(1,ifac),cdgfbo(3,ifac),rtpa(iel,ivar)
enddo
close(21)
!***************************************
I guess I couldn't use "rtpa(iel,ivar)" to get teh temperature on the boundary face. If somebody knows how to deal with it?
Thank you!
how to output the temperature on the boundary?
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
how to output the temperature on the boundary?
- Attachments
-
- cordiates.JPG
- (10.91 KiB) Downloaded 79 times
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: how to output the temperature on the boundary?
Hello,
There is an example (true if there is no wall function) in usproj (v2.2):
So we have:
_{I} \cdot \overrightarrow{II'})
Next, you need to reconstruct the value at the face (cf: theory guide (condli)):

To output the result, it is quite simple in sequential mode, in parallel you have to be prudent and to use synchronization functions (in this case paragv).
Best regards,
There is an example (true if there is no wall function) in usproj (v2.2):
Code: Select all
! Compute reconstructed value in boundary cells
compute grad T with grdcell -> gradT
do ifac = 1, nfabor (loop on boundary faces)
iel = ifabor(ifac) (boundary faces -> cell connectivity)
diipbx = diipb(1,ifac) (compute vector II', cf: theory guide)
diipby = diipb(2,ifac)
diipbz = diipb(3,ifac)
TempIp(ifac) = rtp(iel,isca(iscalt)) &
+ diipbx*gradT(iel,1) &
+ diipby*gradT(iel,2) &
+ diipbz*gradT(iel,3)
enddo
Next, you need to reconstruct the value at the face (cf: theory guide (condli)):
Code: Select all
iclvar = iclrtp(isca(iscalt), icoef)
do ifac = 1, nfabor (loop on boundary faces)
TempF(ifac) = coefa(ifac, iclvar) + coefb(ifac, iclvar)*TempIp(ifac)
enddo
Best regards,
Re: how to output the temperature on the boundary?
Thank you for your answer.
In fact, I use orthogonal mesh and I have two kinds of boundary conditions, one is Dirichlet, left and right wall, I can use "coefa" directly to get temperature; I apply the Neumann condition on the top and bottom walls, if I can also calculate the temperature the same way you show me?
Sincerely,
Chengan WANG
In fact, I use orthogonal mesh and I have two kinds of boundary conditions, one is Dirichlet, left and right wall, I can use "coefa" directly to get temperature; I apply the Neumann condition on the top and bottom walls, if I can also calculate the temperature the same way you show me?
Sincerely,
Chengan WANG
-
- Posts: 118
- Joined: Mon Feb 20, 2012 2:07 pm
Re: how to output the temperature on the boundary?
If you use orthogonal meshes you can use coefa and coefb directly. Same way for Neuman/Dirichlet BC.
In my previous post please note my edit in the 2nd "Code box" (iclvar added).
Best regards,
In my previous post please note my edit in the 2nd "Code box" (iclvar added).
Best regards,
Re: how to output the temperature on the boundary?
Hello,
If there is wall function (when I use LES), what should I do for ouput the exact temperature?
Best regardes
Chengan
If there is wall function (when I use LES), what should I do for ouput the exact temperature?
Best regardes
Chengan