|
[Sponsors] |
April 2, 2014, 10:36 |
probe of mag(U)
|
#1 |
New Member
Join Date: Oct 2013
Posts: 21
Rep Power: 12 |
Hi,
i am trying , to probe the magnitude of the U-field at a specific position. I have already tried the following code in my controldict, but i always get the U-field in components or nothing: Code:
functions { probes { type probes; functionObjectLibs ("libsampling.so"); enabled true; outputControl timeStep; outputInterval 1; probeLocations ( (-0.2 -0.05 0) ); fields ( U magU mag(U) ); } } Thanks! |
|
April 3, 2014, 07:31 |
|
#2 |
Senior Member
|
Hi,
I am not sure if it can be done within the controldict, but this command on the terminal will give you the magnitude of U for each probed timestep: Code:
sed 's/(/ /g' postProcessing/probes/0/U | sed 's/)/ /g' | awk '{print $1 " " sqrt($2*$2+$3*$3+$4*$4)}' > postProcessing/probes/0/magU Tom |
|
April 9, 2014, 04:10 |
|
#3 |
New Member
Join Date: Oct 2013
Posts: 21
Rep Power: 12 |
thx, but i calculated the magnitude with excel^^
|
|
April 9, 2014, 07:48 |
|
#4 | |
Senior Member
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21 |
Quote:
Code:
tr "()" " " |
||
January 25, 2021, 09:08 |
|
#5 |
New Member
Harald Radlwimmer
Join Date: Sep 2020
Location: Vienna, Austria
Posts: 5
Rep Power: 5 |
Hello,
today I faced the same challenge as you did a few years ago. After some elaboration, I managed to calculate the mag(U)-probes directly with OpenFOAM-8. To do the same, you have to: 1) include the mag(U)-function in controlDict Code:
functions { #includeFunc mag(U); } Code:
foamGet probes Code:
fields (p U mag(U)); probeLocations ( (0 0 0) ); Code:
postProcess -func "mag(U)" 5) get the probes Code:
postProcess -func probes Code:
for x in mag\(U\) probes do runApplication -append postProcess -func "${x}" done Kind regards, Harald Last edited by Harald; January 25, 2021 at 10:20. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Using Probe for part of a patch | ndr | OpenFOAM Running, Solving & CFD | 7 | April 4, 2019 06:26 |
Line Probe Smoothing | badger1 | STAR-CCM+ | 1 | May 21, 2013 22:36 |
Heat transfer/Temperature along a tube and probe. | moienfar-CFD | FLUENT | 4 | March 4, 2013 11:29 |
new atmospheric probe design | manobianco | Main CFD Forum | 0 | May 12, 2012 15:04 |
functionObject Probe: it's possible to stop and restart? | ivan_cozza | OpenFOAM Post-Processing | 0 | September 28, 2010 04:42 |