CFD Online Discussion Forums

CFD Online Discussion Forums (
-   FLUENT (
-   -   Problem with adding surface monitors (

kotimari March 28, 2013 00:37

Problem with adding surface monitors

I am trying to add surface monitors to measure pressure. I need quite a few of them, at least 18. However, after adding 6 or 7, FLUENT stops responding. Is there any trick to add more monitors?


blackmask March 28, 2013 02:50

I have used up to around one hundred monitors and do not see a restriction on the number of monitors. However, it takes unbearable long time to write data for those data under parallel environment that I use the /report command instead of /monitor. You have to

Below is the python and shell codes that I used to produce the fluent text command and to extract the time history of variables. You can change the code to fit your purpose.

if __name__ == '__main__':
xl = range(8)
zl = range(6)
probes = []
for i in range(len(xl)):
for j in xrange(len(zl)):
k = "{0:d}{1:d}".format(i,j)
print '''/surface/point-surface probe-{k} {x} 0.0 {z} '''.format(k=k, x=xl[i], z=zl[j])
#print '''/solve/monitors/surface/set-monitor umon-{k} "Vertex Average" x-velocity probe-{k} () no no yes "./monitor/u{k}" 1 yes flow-time'''.format(k=k)
#print '''/solve/monitors/surface/set-monitor vmon-{k} "Vertex Average" y-velocity probe-{k} () no no yes "./monitor/v{k}" 1 yes flow-time'''.format(k=k)
#print '''/solve/monitors/surface/set-monitor wmon-{k} "Vertex Average" z-velocity probe-{k} () no no yes "./monitor/w{k}" 1 yes flow-time'''.format(k=k)
#print '''/solve/monitors/surface/set-monitor pmon-{k} "Vertex Average" pressure probe-{k} () no no yes "./monitor/p{k}" 1 yes flow-time'''.format(k=k)
print '''/solve/execute-commands/add-edit command-1 1 "time-step" "/report/surface-integrals/vertex-avg {probes} () x-velocity yes ./monitor/u.srp"'''.format(probes=' '.join(probes))
print '''/solve/execute-commands/add-edit command-2 1 "time-step" "/report/surface-integrals/vertex-avg {probes} () y-velocity yes ./monitor/v.srp"'''.format(probes=' '.join(probes))
print '''/solve/execute-commands/add-edit command-3 1 "time-step" "/report/surface-integrals/vertex-avg {probes} () z-velocity yes ./monitor/w.srp"'''.format(probes=' '.join(probes))
print '''/solve/execute-commands/add-edit command-4 1 "time-step" "/report/surface-integrals/vertex-avg {probes} () pressure yes ./monitor/p.srp"'''.format(probes=' '.join(probes))

#!/usr/bin/awk -f

function mean_var(a) {
s = 0.; v = 0.; cnt = 0;
for (j in a) {
e = a[j];
s += e;
v += e**2;
cnt ++;
if (cnt <= 0) {
return "0 0 0";
} else {
m = s/cnt;
sig = sqrt(v/cnt - m**2);
return cnt" "m" "sig;


$1 ~ "probe-.*" {
a[$1] = a[$1]" "$2;
} END {
n = asorti(a, ind);
for(i=1; i <= n; i++) {
split(a[ind[i]], arr);
print ind[i], mean_var(arr);
gsub(" ", "\n", a[ind[i]]);
print a[ind[i]] > ind[i]

kotimari March 28, 2013 03:10

Hi blackmask,

Thanks for the code. I am exporting data (File>Export) instead of adding surface monitors. Let me see how it works.


All times are GMT -4. The time now is 10:04.