|
[Sponsors] |
Get position of minval/maxval of a simulated field |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 8, 2017, 20:31 |
Get position of minval/maxval of a simulated field
|
#1 |
New Member
Val Jewtoukoff
Join Date: May 2017
Posts: 4
Rep Power: 9 |
Hi all,
I would like to calculate the transient (x0, y0) position of the minimum of a field (pressure for example) projected on a horizontal section. I have looked online how to do this but couldn't find anything that does what I need. Does anyone please know how to do this? I need this to track the center of a simulated vortex and calculate angular momentum about its axis, using a user field function defined by: (x-x0)*v-(y-y0)*u, where (x, y) are horizontal coordinates, and (u, v) are the horizontal components of velocity. Thanks in advance! |
|
September 11, 2017, 08:16 |
|
#2 |
Senior Member
Ping
Join Date: Mar 2009
Posts: 556
Rep Power: 20 |
a series of reports and thresholds should be able to do this.
you could start with a min report to get the value of the require field. then create a user field function that is a very small fraction larger than that field report. then create a threshold of using the new user field as the input scalar in below mode and it will create a subset of cells hopefully just one that is the one required. then do an average report of this threshold part to report on cell centroid x. likewise for y and you have the require coordinates at each timestep. i am pretty sure if you search a bit wider on the steve support portal you will find related articles. |
|
September 11, 2017, 21:18 |
|
#3 |
New Member
Val Jewtoukoff
Join Date: May 2017
Posts: 4
Rep Power: 9 |
Thank you!
Your message helped me a lot. What I did was first to make a pressure isosurface (with a value close to the minimum), and then making a vertical threshold of that isosurface between 0 and 10 m above the surface. Finally, I make a report to calculate the surface average and get X and Y positions. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Foam::error::PrintStack | almir | OpenFOAM Running, Solving & CFD | 92 | May 21, 2024 08:56 |
creating an internal field? | maybee | OpenFOAM Programming & Development | 2 | February 4, 2021 18:15 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
field functions - table | crevoise | STAR-CCM+ | 3 | March 26, 2013 10:37 |
Import field from CFX5 result file top OpenFOAM 2.1.1 | konneym | OpenFOAM Pre-Processing | 0 | March 5, 2013 14:20 |