|
[Sponsors] |
Question about bcdefw.f for wall temperature bc. |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 13, 2008, 14:49 |
Question about bcdefw.f for wall temperature bc.
|
#1 |
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 |
|
March 14, 2008, 05:51 |
Re: Question about bcdefw.f for wall temperature b
|
#2 |
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.
|
|
March 14, 2008, 09:50 |
Re: Question about bcdefw.f for wall temperature b
|
#3 |
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 |
|
March 15, 2008, 12:40 |
Re: Question about bcdefw.f for wall temperature b
|
#4 |
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).
|
|
March 17, 2008, 06:24 |
Re: Question about bcdefw.f for wall temperature b
|
#5 |
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 |
|
March 17, 2008, 14:56 |
Re: Question about bcdefw.f for wall temperature b
|
#6 |
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 |
|
March 17, 2008, 15:03 |
Re: Question about bcdefw.f for wall temperature b
|
#7 |
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 |
|
March 18, 2008, 03:28 |
Re: Question about bcdefw.f for wall temperature b
|
#8 |
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 |
|
March 18, 2008, 10:13 |
Re: Question about bcdefw.f for wall temperature b
|
#9 |
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 |
|
March 18, 2008, 11:02 |
Re: Question about bcdefw.f for wall temperature b
|
#10 |
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 |
|
March 18, 2008, 16:28 |
Re: Question about bcdefw.f for wall temperature b
|
#11 |
Guest
Posts: n/a
|
Andreas,
Thanks for the advice. I will try it, and let you know for sure. Jimmy |
|
|
|
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 |