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

Counting intersections of streamlines with a planeI in an area of the domain

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

Like Tree1Likes
  • 1 Post By ghorrocks

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2025, 02:36
Default Counting intersections of streamlines with a planeI in an area of the domain
  #1
New Member
 
Join Date: Apr 2025
Posts: 1
Rep Power: 0
Mikado is on a distinguished road
Hello,
I am trying to count how many streamlines reach a certain area in my domain in CFD-Post.

So far I have defined two expressions to do this. One that defines the area such as number 2: if(X>0.9[mm],if(X<0.92[mm],1,0),0) and one that counts: countTrue(number 2)@Streamline 1. However, this approach does not seem to work properly. For a very small area near the start or the end of the streamlines the counted streamlines are correct. For any area in between to little streamlines are counted. I think this is due to the way countTrue works, but I am not sure how this actually counts the streamlines. With a finer grid the results tend to be a bit more accurate but still not accurate enough.

Another approach for this problem is to count the streamlines by exporting the data and counting them in Excel or Python. This approach is more accurate I think, but I am not sure if it will work for say 10000 streamlines.

Can someone explain how countTrue counts in this case and maybe if there is a way to make the first approach work? Or should I move on to the second approach?

Thanks in advance.
Mikado is offline   Reply With Quote

Old   April 15, 2025, 06:05
Default
  #2
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,944
Rep Power: 145
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Are you sure you are doing this the best way?

Why not use a additional variable as a convecting scalar which starts from where the streamlines start, and rerun the solver. In post processing you just need to do an area integral of the scalar at your surface. It is much simpler and will be resolved at full grid resolution, rather than being only as accurate as the number of streamlines you draw.
evcelica likes this.
__________________
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
cfd-post, streamlines

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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Streamlines in a closed domain collie FLUENT 0 November 27, 2018 07:42
Periodic Pressure drop cfd_begin CFX 10 May 25, 2017 07:09
Pressure distribution on a wall darazsbence CFX 17 October 6, 2015 10:38
CFX Solver Memory Error mike CFX 1 March 19, 2008 07:22


All times are GMT -4. The time now is 02:20.