|
[Sponsors] |
Calculate maximum velocity components with functionObject |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 18, 2022, 16:01 |
Calculate maximum velocity components with functionObject
|
#1 |
New Member
Join Date: Jun 2022
Posts: 19
Rep Power: 4 |
Hello,
I would like to compute the maximum of the u,v,z components of velocity with a functionObject. I have been trying to use fieldMinMax as: Code:
fieldMinMax1 { // Mandatory entries (unmodifiable) type fieldMinMax; libs (fieldFunctionObjects); // Mandatory entries (runtime modifiable) mode component; fields (U); // Optional entries (runtime modifiable) location true; } But so far I always get the same value for max and min at the same cell. Does anyone know how to get the maximum/min of a component of a vectorField with a FO that will write the corresponding value to a log? |
|
July 19, 2022, 05:56 |
|
#2 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 6 |
Hey,
I can't say about monitoring specific components of the vector, but I recently used the minMax function and what worked for me was the following : Code:
{ type fieldMinMax; //enabled true; libs ("libfieldFunctionObjects.so"); writeControl timeStep; //write true; //writeInterval 1; //writeToFile yes; //log yes; location yes; mode magnitude; fields (U p_rgh); } EDIT: I forgot to mention that the output was written in a .dat file in postProcessing/fieldMinMax/0 |
|
July 19, 2022, 09:53 |
|
#3 |
New Member
Join Date: Jun 2022
Posts: 19
Rep Power: 4 |
Hi,
Thanks for the reply, but the goal is to know where the maximum and minimum of each component is located. I am aware of the magnitude mode. I wounder if it would be possible to split the components with one functionObject and "feed" it to fieldMinMax. |
|
July 19, 2022, 12:57 |
|
#4 |
Senior Member
Join Date: Dec 2021
Posts: 251
Rep Power: 6 |
Hi,
Oh I see, well maybe you could use Paraview to output the values of each field and their components, and save this as a csv file. Then use Excel to sort the rows of your datasheet by the component value (that is what I would do if I needed to do it once or twice). I did some reading to see if there was a way to access U's components directly through the fieldMinMax function (like U.component(0) or U.x) but no shot. Sorry ! Maybe someone else can be more helpful |
|
July 19, 2022, 13:22 |
|
#5 | |
New Member
Join Date: Jun 2022
Posts: 19
Rep Power: 4 |
Quote:
Code:
components1 { // Mandatory entries (unmodifiable) type components; libs (fieldFunctionObjects); field U; } fieldMinMax1 { // Mandatory entries (unmodifiable) type fieldMinMax; libs (fieldFunctionObjects); // Mandatory entries (runtime modifiable) mode magnitude; fields (Ux); // Optional entries (runtime modifiable) location true; } |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
time averaged and resolved velocity components | raunakjung | CFX | 0 | June 9, 2017 21:23 |
OpenFOAM Velocity BC two orthogonal components | viv123 | OpenFOAM | 1 | October 31, 2014 09:28 |
Plotting Radial and Circumferential Velocity Components for FSI modelling | ashtonJ | CFX | 1 | May 28, 2012 05:36 |
Compare 2D axi-symmetric and 3D. Is OpenFOAM calculate the velocity wrong? | RalphS | OpenFOAM | 6 | November 13, 2010 21:51 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |