Hi Giulio in RANS the time average of the fluctuations is zero by definition, and so will its gradients. In case you want to compute the time-average of the gradients of the product of fluctuations (for instance, the gradients of the components of the Reynolds stress), then, as differentiating and taking the mean commute, you could get the gradients of the time-average of the product of fluctuations as follows: 0. keep in mind that avg(fluct-u*fluct-u) = avg(u*u) - avg(u)*avg(u) 1. get in pyfr the time average of the the variable and its square, say u and u*u 2. either compute the gradients of the time-average solution in Paraview or export the solution with the gradients as mentioned in the previous post. 3. in Paraview, compute the (gradients of) the product of fluctuations as the difference between the (gradients of) time-average of u*u and the (gradients of) time-average u squared: avg(u*u) - avg(u)*avg(u)
best Giorgio On Tuesday, January 21, 2020 at 10:13:18 AM UTC, Giulio Ortali wrote: > > Hi Giorgio, > Thanks for the reply! > > Last question, is there an easy way to compute the time average of the > gradient of the fluctuation? Where the fluctuation is u - avg-u. > > Giulio. > > Il giorno martedì 21 gennaio 2020 11:03:45 UTC+1, Giorgio Giangaspero ha > scritto: >> >> Hi Giulio >> >> you can use the time-average plugin to compute the running average of any >> combination of the primitive variables. See [soln-plugin-tavg] in the user >> guide. >> For instance you can have the averages of the primitive variables with: >> >> avg-rho = rho >> avg-u = u >> avg-v = v >> avg-w = w >> avg-p = p >> >> products: >> avg-p2 = p*p >> >> and gradients: >> avg-grad-u-x = grad_u_x >> avg-grad-v-z = grad_v_z >> >> Note also that you can have the gradients of the variables stored in a >> pyfr solution file computed and exported to Paraview by adding the -g >> option to the export command, for instance: >> >> pyfr export -g mesh.pyfrm solution.pyfrs solution.vtu >> >> >> Best >> Giorgio >> >> On Tuesday, January 21, 2020 at 9:41:56 AM UTC, Giulio Ortali wrote: >>> >>> Hi to all, >>> >>> I need to compute some mean-field and turbulent features of a pyfr >>> simulation. In particular I need to have velocity and pressure mean fields, >>> k, omega, epsilon and nu_t, in order to compare them to RANS results. To do >>> this I need to compute, inside pyfr: >>> >>> * time averages of velocity and pressure >>> * fluctuations in time (instantaneous field - average field) for velocity >>> * space gradients of the velocity fluctuations computed above >>> * time averages of some transformations (products and sums) of the >>> gradients computed above >>> >>> Is It possible to complete one or some of this tasks inside pyfr? right >>> now I'm using paraview to perform this but it's quite inefficent. It would >>> be good enough to have the space gradients of the velocity field for each >>> timestep, being the most expensive part. >>> >>> Thanks in advance, >>> Giulio >>> >> -- You received this message because you are subscribed to the Google Groups "PyFR Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/pyfrmailinglist/1c0ce469-94a7-4043-a93d-d6bc997c6be0%40googlegroups.com.
