CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

Question about bcdefw.f for wall temperature bc.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 13, 2008, 14:49
Default Question about bcdefw.f for wall temperature bc.
  #1
Jimmy
Guest
 
Posts: n/a
Hello friends,

I am working on cooling flow simulation with given wall temperature distribution. It looks like that the user subroutine bcdefw.f is more efficient to set up the wall temperature bc than a table.

With the subroutine bcdefw.f, I need to apply the given wall temperatures to certain cells on the wall. Now my questions are:

(1) The wall temperature needs to be assigned to the cell-face center of a corresponding fluid cell near the wall. There is no problem for me to find those fluid cells near the wall. But I don't know how to obtain the information of the cell-face centers of those cells. Please help me with it.

(2) I am thinking to use the following line to assign the temperature to a fluid cell near the wall:

torhf(ncell)=temp

Here ncell is the fluid cell no. near the wall, temp is the temperature given on the wall where the cell is located at. Is this correct?

Thanks,

Jimmy

  Reply With Quote

Old   March 14, 2008, 05:51
Default Re: Question about bcdefw.f for wall temperature b
  #2
A
Guest
 
Posts: n/a
I'm not sure what it is you're trying to do. Why are you assining the Temperature to the adjacent fluid cell and not the boundary itself? I just read your previous posts about mapping a given tempertur field to a boundary. To do so you need to find the corresponding boundary for each of your coordinates and not the corresponding fluid cell for each of your boundaries. Is this still the same problem your working on? If yes I could provide you some sample coding on how to map Temperatures in bcdefw.
  Reply With Quote

Old   March 14, 2008, 09:50
Default Re: Question about bcdefw.f for wall temperature b
  #3
Jimmy
Guest
 
Posts: n/a
Good morning,

I just realized that I made a mistake with the Star-CD user subroutine. Now torhf should be just for one cell, but not an array in bcdefw.f. You are right that I just need to map the given temperatures to one particular boundary. If you can provide me with the sample subroutine, it will be great. My email is: jimmyfox205@yahoo.com.

Thank you in advance,

Jimmy

  Reply With Quote

Old   March 15, 2008, 12:40
Default Re: Question about bcdefw.f for wall temperature b
  #4
vladimir
Guest
 
Posts: n/a
I am not sure what are you trying to achieve, but the tutorial code is always in the subroutine itself. Just look at the commented lines (starting with C).
  Reply With Quote

Old   March 17, 2008, 06:24
Default Re: Question about bcdefw.f for wall temperature b
  #5
A
Guest
 
Posts: n/a
Hi Jimmy,

here's the coding. I'll post it here in case anyone wants to contribute. It reads a file I called T.inp containing your coordinate and temperatures. You need to add the number of meassurent points as a heading in this file.

c number of meassurement points

integer nb

c nearest boundary

integer bndnear

c parameter has to be greater than the number of meassurement points:

integer pnb

parameter (pnb=200000)

c coordinates and temperatures of measurement points

real xf, yf, zf, tamb

c distance measurement point-boundary

real dist, mindist

dimension xf(pnb), yf(pnb), zf(pnb)

dimension tamb(pnb)

c----------------------------------------------

c reads in file (T.inp)

if (ireg.eq.1) then

if (intflg(1).ne.1) then ! makes sure T.inp is only read once

open(unit=90,file=T.inp)

read(90,*) nb ! number of Temperatures to be read

do 100 k=1,nb

read(90,*) xf(k),yf(k),zf(k),tamb(k)

c scale to millimeters

xf(k)=xf(k)/1000.

yf(k)=yf(k)/1000.

zf(k)=zf(k)/1000.

100 continue

close(90)

intflg(1)=1

endif

c--------------------------------------------------

c finds nearest boundary

mndist=1.0e10

bndnear(ibp)=0

do 250 k=1,nb

dist=sqrt((x-xf(k))**2

& +(y-yf(k))**2

& +(z-zf(k))**2)

if(dist.lt.mndist) then

mndist=dist

bndnear(ibp)=k

endif

250 continue

TORHF=tamb(bndnear(ibp))

endif

Unfortunately the editor messes up the format before posting. 6 blanks have to be added before every uncommented line. Contact me any time if you got further questions.

regards andreas
  Reply With Quote

Old   March 17, 2008, 14:56
Default Re: Question about bcdefw.f for wall temperature b
  #6
Jimmy
Guest
 
Posts: n/a
Hi Andras,

Thanks for your subroutine. It really works with my case. The only problem may be that this subroutine needs to open and read the data file for each wall cell in each iteration, which takes a lot of computer time when the data file is large and the wall has a lot of cells.

Thanks again,

Jimmy

  Reply With Quote

Old   March 17, 2008, 15:03
Default Re: Question about bcdefw.f for wall temperature b
  #7
Jimmy
Guest
 
Posts: n/a
Hi Andras,

I didn't notice that you are using "intflg(1).ne.1" to make sure the file is only read once. So, there should be no problem with it. Sorry about it.

Jimmy
  Reply With Quote

Old   March 18, 2008, 03:28
Default Re: Question about bcdefw.f for wall temperature b
  #8
A
Guest
 
Posts: n/a
Hi Jimmy,

yes the soubroutine reads the file only once. I used an intflg statement instead of an iter statement so the subroutine can be called at any time of the run. Glad it works.

andreas
  Reply With Quote

Old   March 18, 2008, 10:13
Default Re: Question about bcdefw.f for wall temperature b
  #9
Jimmy
Guest
 
Posts: n/a
Andreas,

It seems that the subroutine trys to find the nearest FEA node and assign wall temperature in every iteration. Therefore, it takes a lot of computation, especially for my case with a lot of boundary cells, in repeating the same process with the iteration. I am thinking how to improve this.

Jimmy
  Reply With Quote

Old   March 18, 2008, 11:02
Default Re: Question about bcdefw.f for wall temperature b
  #10
A
Guest
 
Posts: n/a
Hi Jimmy,

you're right. I had no model to check the subroutine, so I overlooked that. Try to expand the if(intflg(1).ne.1) statement also to the mapping algorith. Alternatively add an if(iter.lt.1) statement to the mapping algorithm.

Regards Andreas
  Reply With Quote

Old   March 18, 2008, 16:28
Default Re: Question about bcdefw.f for wall temperature b
  #11
Jimmy
Guest
 
Posts: n/a
Andreas,

Thanks for the advice. I will try it, and let you know for sure.

Jimmy
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Termperatur of solid cell in BCDEFW Matthias Fitl Siemens 0 May 22, 2007 07:44
user subroutine BCDEFW for velocity Abe Siemens 2 December 12, 2003 10:29
BCDEFW and attached fluid cells Joern Beilke Siemens 3 July 8, 2003 19:24
About fix wall temperature in wall boundary joon Siemens 2 March 10, 2003 02:41
sub.BCDEFW yang Siemens 0 June 11, 2001 10:37


All times are GMT -4. The time now is 18:53.