CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Finding the minimum of a field value

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2009, 09:34
Default Hallo again. To find the ce
  #1
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hallo again.

To find the cells containing the interface in interFoam I'm currently thinking about something like this.

If (gamma-0.5) has a minimum-value, than there should be the cell containing the interface.

min(gamma.internalField()[cellI]-0.5)

Well, how can I check if this min is true?

I think the coordinate of the cell containing the mininum can be accessed by .mesh().C()[cellI] ?

Any ideas?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   January 27, 2009, 12:14
Default Hallo, min will return the
  #2
New Member
 
Nat Trask
Join Date: Mar 2009
Location: Providence, RI
Posts: 17
Rep Power: 17
ntrask is on a distinguished road
Hallo,

min will return the global minimum of a field, when I want to do something like that I usually use the pos and neg functions.

i.e. pos(gamma-0.5) will return a volScalar field that is zero if gamma is less than 0.5 and 1 otherwise. neg(gamma-0.5) would return a 1 if its greater than 0.5.

You can then loop through the field and pick off the cells equal to 1.

-Nat
ntrask is offline   Reply With Quote

Old   March 10, 2009, 08:22
Default You mean I should loop through
  #3
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
You mean I should loop through the field an pick the cells where pos(gamma-0.5) and neg(gamma-0.5) both are equal to 1 ?

Or did I get it wrong?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   August 26, 2010, 10:12
Default
  #4
Senior Member
 
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,266
Blog Entries: 1
Rep Power: 24
nimasam is on a distinguished road
did you find any way to find those cells which contains interface ?
if yes what was ur solution ?
nimasam is offline   Reply With Quote

Reply

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
Minimum Y+? Tom FLUENT 3 April 25, 2008 20:40
Putting submesh field values into field on parent mesh helmut OpenFOAM Running, Solving & CFD 2 June 20, 2006 08:31
XY plot minimum? HP FLUENT 2 August 27, 2004 11:50
Custem field function: Aveage, minimum, maximum SAM FLUENT 0 August 16, 2004 06:15
minimum volume co2 FLUENT 2 January 1, 2004 05:35


All times are GMT -4. The time now is 11:29.