CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CD (http://www.cfd-online.com/Forums/star-cd/)
-   -   Heterogeneous heat flux (http://www.cfd-online.com/Forums/star-cd/65934-heterogeneous-heat-flux.html)

Kev July 1, 2009 10:13

Heterogeneous heat flux
 
Dear friends,

I am using StarCD 3.26.
I would like to apply a heat flux on a plane face. I have created a wall boundary on this face. Under "Wall heat", i have replaced Adiabatic by Flux. It allows me to specify a Heat Flux value, explained in W/m2. This setting results in a uniform heat flux on the face.

My goal is to create a heat flux profile (flux = f(x,y)).
Is there any way to do that with Star-CD without creating multiple boundaries (which are limited to 200) ?

Thanks for your help,

Kevin

Pauli July 2, 2009 11:40

A varying profile on one boundary region can be achieved with either a table or user subroutine (bcdefw.f).

Kev July 3, 2009 05:30

Thank you Pauli
I'm trying to use table but Star-cd is crashing when i type values in the matrix. (bus error or segmentation fault).
So i'm trying to generate tbl file externally, using Matlab. Formatting the tbl file is not easy, it contains a lot of space; tabulation, etc...

Do you have an example of bcdefw.f that discretise a wall boundary ?
The default file contains this example, but the boundary is discretised versus region, not versus space dimension
C IF(IREG.EQ.5) THEN
C U=
C V=
C W=
C TORHF=
C SCALAR(1)=
C RESWT=
C RSTSC(1)=
C ENDIF
C-------------------------------------------------------------------------

Pauli July 6, 2009 14:00

Starting with the sample code, change boundary region number 5 (IREG.EQ.5) to your boundary region number. Then add your profile (TORHF = f(x,y)) & remove the other parameters. Parameters not defined in the use subroutine will default to the values specified in the GUI's BC panel.

Kev July 7, 2009 04:48

Thank you Pauli,

I have found this topic :
http://www.cfd-online.com/Forums/cd-...rature-bc.html
Jimmy was trying to set varying temperature versus x,y,z. It's a bit like my problem. So i have adapted the code to my case, and it seems to work fine.

Kevin


All times are GMT -4. The time now is 12:42.