# calculate cell area and cell temperature

 Register Blogs Members List Search Today's Posts Mark Forums Read

 January 6, 2019, 01:23 calculate cell area and cell temperature #1 Senior Member   sunil Join Date: Jul 2012 Location: Bangalore Posts: 176 Rep Power: 12 Hello everyone, I want to calculate cell area and its temperature and count the number of cells falling within the specified range. The range also varies from case to case based on minimum, maximum and average temperatures. Below is the detailed problem description An circular enclosure filled with air, heated from bottom (by applying heat flux) and cooled from top (by specifying htc), side walls are adiabatic. I am interested to find out number of cells falling within the specified temperature range and each cell surface area. example On top surface 20 cell withing the range 20 C to 30 C 20 cell withing the range 30 C to 40 C Is it possible to get these kind of information via CEL or we need to use pearl programming. I tried with clip surface by specifying temperature range but it is not possible to specify the range dynamically, it will take some fixed values. Thank you in advance __________________ Regards, Suneel Last edited by sunilpatil; January 6, 2019 at 01:24. Reason: spelling correction

 January 6, 2019, 06:37 #2 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,144 Rep Power: 134 You say you can already generate the volumes for a single range - you can use the count() function to count the nodes but I would recommend you use the volume() function instead as the volume is likely to be more physically relevant. To automate processing of ranges you can use a session file. Record a session file and have a look at the text file it generates to see the syntax. You can use perl script to put conditional and looping functions into the script. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 January 6, 2019, 06:44 #3 Senior Member   sunil Join Date: Jul 2012 Location: Bangalore Posts: 176 Rep Power: 12 Hi Ghorrocks, Thank you for your reply. I am doing it on the surface. The count variable I want to use it as a output parameter for design optimization study. __________________ Regards, Suneel

 January 6, 2019, 17:40 #4 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,144 Rep Power: 134 OK, but doesn't my post answer your question, just replacing area with volume? __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 January 6, 2019, 21:01 #5 Senior Member   sunil Join Date: Jul 2012 Location: Bangalore Posts: 176 Rep Power: 12 I want to calculate temperature distribution on the surface, if we take only the top layer each cell volume temperature then replacing area with volume is ok. But how to do it. Since I want to create it as a parameter for optimization stydy. I guess with session file it is not possible. __________________ Regards, Suneel

 January 7, 2019, 05:46 #6 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,144 Rep Power: 134 I am very confused. Can you post an image of what you want to do and what you are trying to optimise? __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 January 7, 2019, 11:10 #7 Senior Member   sunil Join Date: Jul 2012 Location: Bangalore Posts: 176 Rep Power: 12 Hi Ghorrocks, Currently we can get the number of nodes on the top surface within the specified temperature range by plotting Iso clip and using count expression as shown in the images. If I want to generate the same kind of data using expression (CEL) or using perl programming how I need to do it. The main reason for me to get this data with CEL or perl is, it is not possible to specify minimum and maximum temperature range (highlighted in red circle) in Iso clip dynamically. In my simulation the min and max range varies from case to case. I want to use node count as optimization parameter. Please let me know if you need further details. __________________ Regards, Suneel Last edited by sunilpatil; January 7, 2019 at 11:13. Reason: image not posted

 January 7, 2019, 19:11 #8 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,144 Rep Power: 134 I see no justification in using the nodal count in this case. You should be using the area in your defined range. If you use the count your number will be affected by how even your mesh is. The area calculation will interpolate inside elements to give a more accurate answer. So you should consider using the area inside your defined range rather than the nodal count. The normal way of doing this, which should be easily scriptable in a session file, is: * Generate a contour object on your surface. Make sure that the contour object has the maximum and minimum temperatures of your range as contour levels. * Define a user surface from the contour object with the contour range with your temperature limits. * This will generate a new surface object which you can do all the normal CEL functions on such as area, count, etc. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 January 8, 2019, 21:51 #9 Senior Member   sunil Join Date: Jul 2012 Location: Bangalore Posts: 176 Rep Power: 12 Hi Ghorrocks, I aggree with considering area in the calculation. I will replot the things. I don't want to use session file coz I am running cfx and cfd post from workbench for design optimization study. For every parameter update session file will not run by its own. Thank you __________________ Regards, Suneel

 January 9, 2019, 04:48 #10 Super Moderator   Glenn Horrocks Join Date: Mar 2009 Location: Sydney, Australia Posts: 17,144 Rep Power: 134 If you want to run it inside a workbench optimisation thing then your only choice (that I am aware of, anyway) is to define a separate object for each temperature range you are looking at. Then you can output them to workbench optimisation and they can be part of the optimisation. __________________ Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum.

 Tags cel, scripting