Hello,
I followed the discussion and but still I am confused how all this stuff could be “transferred” into OpenFOAM.
As far as I understood now ensemble average mean that I do one experiments several times (like it is described here:http://www.cfd-online.com/Wiki/Intro...semble_average )

For example I can flip a coin. Tail gets the value 0 and head gets the value 1. I sum up the values I get by flipping the coin and after that I divided by the number N of experiments I did.

But how can I transfer this explanation to a simulation? What is the analogon to the experiment and to the number N?

As far as I understood now ensemble average mean that I do one experiments several times

correct

Quote:

Originally Posted by idefix

But how can I transfer this explanation to a simulation? What is the analogon to the experiment and to the number N?

The model will normally do that by itself. Consider a backward facing step in RANS. You will get an average profile of the velocity. If the RANS model works fine, you would get the same if you just average / add several DNS profiles of the same simulation at random time steps.

Quote:

Originally Posted by idefix

Am I right that I choose with the solver (the solver is stationary or instationary) if I calculate RANS or URANS?

The model will normally do that by itself. Consider a backward facing step in RANS. You will get an average profile of the velocity. If the RANS model works fine, you would get the same if you just average / add several DNS profiles of the same simulation at random time steps

Could you explain it a little bit more in detail?
I´ve got problems to understand the difference between the average velocity of the ensemble average and the velocity I get after every iteration when I consider a URANS simulation.
Just imagine the start of a URANS-simulation:
The velocity I get after the first iteration should be a mean velocity (because I am using URANS) but I can only calculate the mean (ensemble) velocity when I have more then one iteration, so more then one experiment.
So somewhere here I have my error in reasoning.

Exactly, I´ve got a constant velocity profile as inlet, pressure is constant.
I am using interFoam and k-epsilon-modell. In this case air (high velocity) is flowing over a thin water film (low velocity).
The simulation is running for a while but no steady state is reached.

The velocity I get after the first iteration should be a mean velocity (because I am using URANS) but I can only calculate the mean (ensemble) velocity when I have more then one iteration, so more then one experiment.
So somewhere here I have my error in reasoning.

The URANS or T-RANS equations are obtained from applying an averaging filter on top of your equations. This averaging is not a time-average (because than you would get the regular (i.e. steady) RANS equations) and you lose the transient terms (see, simpleFoam)). For the unsteady equations, you need some other averaging, which keeps the transient terms. You don't do this explicitly in the calculation, but you can see this averaging as averaging over multiple realisations, i.e. ensemble averaging.

But do you know where this averaging filter is explained in more detail?
It would be really interesting to know how it is working and how it changed the initial conditions to get the multiple realisations.

The filter isn't applied directly. All equation are derived with the general features of the filter, but they don't have to be specified further:
The filter has to have certain properties, such as linearity <alpha*u + v> = alpha * <u> + <v>. As a result the turbulent stresses will appear after applying the filter to the momentum equation. But again, this is independet of how the filter looks like in detail - just these general properties are needed.
The turbulence model determines the amount and implementation of equations that calculate the new stresses. Also here the filter doesn't appear explicitly.

But the answer is confusing me a little.
If I am right I need the mean velocity for the calculation of the turbulent stresses.
So my question is where the mean velocities are calculated. I understood the former thread in the following way:
I´ve got the averaged Navier-Stokes-equations. I use the averaging filter to these equations. Maybe (I don´t know if I am correct) the filter is working in the following way:
1) the filter solved the Navier-Stokes-equations and I get one velocity vector for one point (I just consider one point at the moment)
2) the filter changes the initial conditions or something like this a litte and calculates again the velocity vector
This is done by N times and afterwards the ensemble average of this N "experiments" is calculated and this is the velocity vector which is written in the time folder in a OpenFOAM-simulation.

The solver does not actually solve the equations N times to get the ensemble average. The model of the turbulent stresses (=turbulence model) has to be designed in a way, that the result of the equations acts as if it was solved N times and averaged. But in fact it is only solved once.

thanks for your explanation.
I hope I don´t bother you but I still have one question:
Do you know where I can find a documentation of this (except the code itself)?
I would really like to understand this in more detail.

I don't know, sorry.
But: I don't think there is such thing as a deeper insight into this. What I think about turbulence models is, that people just set up some universal differential equation for turbulence parameters and insert a few constants. Then they start to calibrate their model with DNS results to get the best values for their constants. The underlying differential equation isn't necessarily the correct physical description of what actually happens, but somehow it works in a wide range of applications.
When they notice that the model doesn't work at some special place (wall, ...) they insert some damping functions. That's it...