home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.ee.pdx.edu
/
2014.02.ftp.ee.pdx.edu.tar
/
ftp.ee.pdx.edu
/
pub
/
users
/
gerry
/
ME448
/
onechannel.MAC
< prev
Wrap
Text File
|
2004-02-26
|
5KB
|
212 lines
! --- Star-CD commands to build a mesh for
! --- Conjugate heat transfer in a microchannel
clrm, reverse
! --- Define parameters used in this macro
! Fluid and thermal boundary values: velocity and heat flux
*set VIN 0.3
*set TIN 25
*set RHOIN 997.56
*set QIN 50000 ! Heat flux input: W/m^2
! Set physical lengths. All dimensions in millimeters
*set TF2 0.05
*set TC2 0.05
*set HBOT 0.1
*set HCHAN 0.4
*set HTOP HBOT
*set LEN 10
! Set number of cells along coordinate directions
! NZPIPE is number of cells along axis of the pipe
! NXDUCT, NYDUCT, NZDUCT are numbers of cells along x-, y- and z-directions
! of the rectangular duct
*set NXF 5
*set NXC 5
*set NYBOT 5
*set NYC 20
*set NYTOP 5
*set NZ 50
! --- Define the cell types for the shell and fluid volumes
! FLUCL is cell type the fluid. SOLCL is cell type for the solid
*set FLUCL 1
*set SOLCL 2
ctab, FLUCL, fluid, 5, , FLUCL, , 1
ctab, SOLCL, solid, 2, , SOLCL, , 2
! Add names for these types
ctname, FLUCL, fluidCells
ctname, SOLCL, solidCells
! --- Build the mesh from six blocks. Start with five solid blocks
*set XMAX TF2 + TC2
*set YCTOP HBOT + HCHAN
*set YMAX YCTOP + HTOP
CTYPE SOLCL
VC3DGEN 0, TF2, NXF, 0, HBOT, NYBOT, 0, LEN, NZ
VC3DGEN TF2, XMAX, NXC, 0, HBOT, NYBOT, 0, LEN, NZ
VC3DGEN 0, TF2, NXF, HBOT, YCTOP, NYC, 0, LEN, NZ
VC3DGEN 0, TF2, NXF, YCTOP, YMAX, NYTOP, 0, LEN, NZ
VC3DGEN TF2, XMAX, NXC, YCTOP, YMAX, NYTOP, 0, LEN, NZ
! --- Add the fluid channel
CTYPE FLUCL
VC3DGEN TF2, XMAX, NXC, HBOT, YCTOP, NYC, 0, LEN, NZ
! --- Merge vertices to create a unified surface mesh
batch on
vmerge, all,,0.001,,,,,,,low,delete
batch off
! --- Draw the mesh
! cset, all
! vset, all
! spls, all
! view, 1, 1, 1
! cplot
! ---------------------------------------------
! --- Set material properties
! --- Turn on conjugate heat transfer, relaxation factor 1.0
RADIATION OFF
SOLAR OFF
CONJUGATEHEAT ON 1
! --- Set fluid properties
PMATERIAL, 1, FLUID, H2O
DENSITY, CONSTANT, RHOIN
SPECIFICHEAT, CONSTANT, 4181.72
LVISCOSITY, CONSTANT, 0.0008887
CONDUCTIVITY, CONSTANT, 0.62027
! --- Set solid properties, data from Incropera and Dewitt
PMATERIAL, SOLCL, SOLID, Aluminum_2024-T6
DENSITY, CONSTANT, 2770
SPECIFICHEAT, CONSTANT, 875
CONDUCTIVITY, CONSTANT, 177
! ---------------------------------------------
! --- Apply boundary conditions
! --- Define Handles for Boundary Regions
*set INCHAN 1
*set OUTCHAN 2
*set SYM1 3
*set SYM2 4
*set HEATER 5
! --- Select fluid cells and apply inlet and outlet BC
CSET All
CSET NEWSET FLUID
view 0, 0, -1
CPLOT
bzone INCHAN ALL
! Set BC values here. Multiple lines required for some reason
RDEFINE INCHAN, INLET
0, 0, VIN, 1, 0, TIN, RHOIN
RNAME INCHAN inletChannel
! --- Orient to view duct inlet surface, define it as an outlet
view 0, 0, 1
angle, 0
CPLOT
bzone OUTCHAN ALL
RDEFINE OUTCHAN, OUTLET, STANDARD, SPLIT 1 $
RNAME OUTCHAN
! --- Select all cells to apply symmetry BCs and heater BC
CSET ALL
view -1, 0, 0
CPLOT
bzone SYM1 ALL
RDEFINE SYM1, SYMPLANE, STANDARD $
RNAME SYM1 sym1Plane
view 1, 0, 0
CPLOT
bzone SYM2 ALL
RDEFINE SYM2, SYMPLANE, STANDARD $
RNAME SYM2 sym1Plane
view 0, -1, 0
CPLOT
bzone HEATER ALL
! Set BC values here. Multiple lines required for some reason
RDEFINE HEATER, WALL STANDARD
NOSLIP, STANDARD, 9,
0, 0, 0, 1, 0
FLUX QIN
RNAME HEATER heater
! --- Plot boundaries
cset, all
cset, add, baffle
pltype, ehid
edge on
bset all
bdisp on
view 1,1,1
cplot
! --- Define a vertex set used to select the monitor cell
! The monitor cell is near the center of the domain
*set DY, HCHAN / NYC
*set DZ, LEN / NZ
*set DX, TC2 / NXC
*set YCH2, HCHAN / 2
*set XMAX, TF2 + TC2
*set XMIN, XMAX - DX - DX
*set YMAX, HBOT + YCH2
*set YMIN, YMAX - DY + DY
*set ZMIN, LEN / 5
*set ZMAX, ZMIN + DZ + DZ
VSET newset, GRANGE XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX
CSET newset, VSET ANY
CSET DELETE, SOLID
CPLOT
*GET MCELL MNCSET
! --- Define a vertex set used to select the solid reference cell
*set YMIN 0
*set DY HBOT / NYBOT
*set YMAX, YMIN + DY + DY
VSET newset, GRANGE XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX
CSET newset, VSET ANY
CSET DELETE, FLUID
CPLOT
*GET SCELL MNCSET
! --- Define a vertex set used to select the pressure reference cell
*set YMAX, HBOT + YCH2
*set YMIN, YMAX - DY - DY
*set ZMAX, LEN
*set ZMIN, LEN - DX - DX
VSET newset, GRANGE XMIN, XMAX, YMIN, YMAX, ZMIN, ZMAX
CSET newset, VSET ANY
CSET DELETE SOLID
CPLOT
*GET PCELL MNCSET
! -- Set monitoring cells
PMATERIAL 1, FLUID,
PRES 1e5, PCELL
MONI MCELL
PMATERIAL SOLCL, SOLID,
MONI SCELL
TDAT, TIN
! --- Save the model
save oneChannel.mdl
! --- Write Geometry and Problem file in preparation for solve
GEOM, oneChannel.geom, 0.001, BINARY, CHECK, SERIAL,