Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convection into enclosure in Ansys Workbench/Mechanical

Status
Not open for further replies.

flash3780

Mechanical
Dec 11, 2009
829
Good morning,
I'm using Ansys Mechanical 12.1 (although I just got 13.0), and I'm trying to model convection in an enclosure in my model. I don't want to run a full CFD analysis, but I want to be sure that my energy balances (i.e. that the heat going into the enclosure plus the heat leaving the enclosure equal zero). However, using surface-based convection elements, I'm unable to have Ansys solve for the temperature of the air in the enclosure. Sure, I could model the air as a solid, but it would be difficult to capture the proper convective coefficients.
What I've seen people do in the past is to create convective link elements from the nodes along the surface of the enclosure to a single thermal mass element representing the air in the enclosure. The problem is, I can't find any examples showing me how to do that.
I asked the guys from Ansys and their first response was "we can't do that" but when I pressed them, they simply stated, "You'll have to use command objects". Great. I'm not a pro at APDL syntax, so without an example to go by, I'm stuck. I'm thinking that I can use the "E" command to create the link elements, and the EL command to assign their type? From there would I specify the convective coefficient as a function of the temperatures with the KEYOPT command? Uugh... I'm a bit frustrated at the moment. Any help would be greatly appreciated.
 
Replies continue below

Recommended for you

Ok, so I finally got a bit of help from the guys at ANSYS for modeling enclosures. Had to wedge it out of them with a crowbar (it seems like they're not encouraging folks to use APDL). You need to write an APDL script to create a node (N command), select the nodes on the convecting surface (CMSEL command), and then loop through the node numbers (*DO loop) creating LINK34 elements between the new node and the nodes along the surface. I'll need the ARNODE(XX) command to set the KEYOPT for the surface area represented by the LINK34 elements. I'll also want to set a tabular convection based on the temperature differential across the LINK34s.

If I get something working, I'll post it on here. It boggles my mind that ANSYS doesn't have any examples set up for modeling enclosures in a thermal model. It's not supported by the GUI in their Workbench platform, and they're not encouraging people to use Classic.

I'm not out in left field to say that this is the proper way to model an enclosure, am I? Energy in = energy out?
 
Still working on this, but I'm closer to a solution. I'm having trouble using the ARNODE command to set the area of the convective link elements. Does anyone have an example ginned up?

I've attached a picture of the geometry that I'm using to test my script and the script for adding the convective links (a square tube). I've yet to make the HTC tabular with temperature (*DIM, I assume) and I'm having trouble getting ANSYS to determine the area represented by the LINK34s (ARNODE command?).

Mesh
Result

I got some help from the guys at ANSYS to put together the script below, but it still isn't quite working. Anyone have any suggestions?

Code:
/prep7

*GET,n_max,node,,num,max	! Get the maximum node number
nc = n_max+1		! Set the number of the center node
n,nc,0,0,0		! Create node at 0,0,0 to tie convective elements to

cmsel,s,inside_surface	! Select convective surface
*GET,nn,node,,count	! Get number of nodes along surface
nsel,a,node,,nc		! Also select node representing enclosure (eg. air)

et,99,34		! Set element type 99 to link34
r,99,5			! Set area of element type 99
mp,hf,99,5000		! Set heat flux for element type 99

type,99			! Set element type to 99
mat,99			! Set element material to 99 (i.e. HTC=5000)
real,99			! Set element area to 5

*do,i,1,nn,1		! Loop through nodes on convective surface
 *GET,n1,node,,num,min	! Get min node number in set
 nodearea=arnode(n1)	! Get area per node for link34s (not working)
 r,99,nodearea		! Set area of link 34 elements
 e,nc,n1		! Create element from center node to minimum node in set
 nsel,u,node,,n1	! Unselect minimum node in set
*enddo

elist
allsel

/solu
 
I did eventually get the convective link elements working, but I recently found a better way to do free convection with SURF152 elements. I posted at the tail end of my "Radiation to Ambient" thread, but I'm going to repost here since it's more relevant and someone may end up here instead of there in a search. Here is a link to the other thread:
Since I mentioned free convection, I think that I should elaborate on how ANSYS handles convective coefficients. ANSYS has several options for calculating convective coefficients based on the KEYOPTs that you set. For free convection, the physical equations lend themselves to the following:
HTC = (film coef)*|T1-T2|^n
Note that for turbulent flows, n is generally equal to 1/3; when you're using SURF152 elements, n is set with real constant 13.
A great reference for computing the film coefficient for various situations is the following: Incropera, DeWitt: Fundamentals of Heat and Mass Transfer

The ANSYS developers smartly give you several options for computing HTC; for free convection SURF152 elements, KEYOPT 5 allows you to associate the elements with an extra node (space node). The temperature at the extra node can be defined with D,NODE(X,Y,Z),TEMP,myTEMP for convection to the environment. For convection to an enclosure, the temperature of the node will be calculated by ANSYS and will depend on the temperatures and convective coefficients of the associated surfaces. You'll also want KEYOPT 6 = 0, which tells the elements to use the temperature of the extra node as the bulk temperature. To parameterize the HTC according to the above equation, you'll want to set KEYOPT 7 = 1, which will multiply the "film coefficient" by the "empirical term", |T1-T2|^n. The "film coefficient" may be defined as a material property versus the average of the bulk fluid and the wall temperature (MPTEMP&MPDATA). To tell ANSYS to compute the film coefficient at the average temperature, set KEYOPT 8 = 2.

Once the SURF152 element properties are set, you'll want to create the elements as was mentioned in my earlier post (select nodes, issue ESURF, NODE(X,Y,Z) command, select elements, and use the SFE command). Note the syntax for associating the surface elements with the extra node.

When you issue SFE command, it should look something like this:
SFE,ALL,1,CONV,1,-my_MATERIAL
Where my_MATERIAL is the material number which the convective coefficients are associated with. Notice the negative sign in front of my_MATERIAL, which tells ANSYS you've entered a material number rather than a single value for the film coefficient.

As it turns out, all of these commands are a bit of a pain-in-the-butt to issue in Ansys/Mechanical when compared to Ansys/Mechanical APDL (Classic). Still, once you get the process down, it's not so bad. The tricky part is confirming that everything made it onto the model the way you think it did. I generally flip over to Classic look over my boundary conditions, but you can also output images with some APDL commands if that tickles your fancy.

Hope this helps. I found convection in enclosures to be less than intuitive. My first method of dealing with it involved do-loops and convective link elements. SURF152 elements seem to work better. I'd encourage you to follow the link in the second post and look at Sheldon Imaoka's presentation on surface effect elements. He provides a lot of great information.

There's a lot of great information on SURF152 elements and all other things ANSYS on Sheldon Imaoka's page at:
I hope that this helps someone out there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor