CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

calculate cell area and cell temperature

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 6, 2019, 02:23
Smile calculate cell area and cell temperature
  #1
Senior Member
 
sunilpatil's Avatar
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 13
sunilpatil is on a distinguished road
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,
Sunil

Last edited by sunilpatil; January 6, 2019 at 02:24. Reason: spelling correction
sunilpatil is offline   Reply With Quote

Old   January 6, 2019, 07:37
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   January 6, 2019, 07:44
Default
  #3
Senior Member
 
sunilpatil's Avatar
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 13
sunilpatil is on a distinguished road
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,
Sunil
sunilpatil is offline   Reply With Quote

Old   January 6, 2019, 18:40
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   January 6, 2019, 22:01
Default
  #5
Senior Member
 
sunilpatil's Avatar
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 13
sunilpatil is on a distinguished road
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,
Sunil
sunilpatil is offline   Reply With Quote

Old   January 7, 2019, 06:46
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   January 7, 2019, 12:10
Default
  #7
Senior Member
 
sunilpatil's Avatar
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 13
sunilpatil is on a distinguished road
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,
Sunil

Last edited by sunilpatil; January 7, 2019 at 12:13. Reason: image not posted
sunilpatil is offline   Reply With Quote

Old   January 7, 2019, 20:11
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Old   January 8, 2019, 22:51
Default
  #9
Senior Member
 
sunilpatil's Avatar
 
sunil
Join Date: Jul 2012
Location: Bangalore
Posts: 179
Rep Power: 13
sunilpatil is on a distinguished road
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,
Sunil
sunilpatil is offline   Reply With Quote

Old   January 9, 2019, 05:48
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,665
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
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.
ghorrocks is offline   Reply With Quote

Reply

Tags
cel, scripting

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate cell area?? sat_fire Fluent UDF and Scheme Programming 9 September 15, 2021 02:29
How to calculate free-surface area in a computational cell cfdstar Fluent UDF and Scheme Programming 6 July 12, 2018 14:24
[OpenFOAM] Problem with cell area calculation in a slice daniel87 ParaView 5 October 24, 2015 17:18
Storing Surface Area of each cell in a file? Markus Alzon FLUENT 0 June 21, 2007 09:38
How to calculate the cell area Le FLUENT 0 February 18, 2007 23:15


All times are GMT -4. The time now is 22:32.