CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   RANS modelling and URANS methods in unsteady flow simulations (https://www.cfd-online.com/Forums/openfoam-solving/118990-rans-modelling-urans-methods-unsteady-flow-simulations.html)

idefix December 4, 2013 09:36

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?


In my imagination the log-file gives me the following informations:
Iteration 1: result: U_1(x, t=1)
Iteration 2: result: U_2(x, t=2)


I get the averaged velocity (U_1 + U_2) / 2
That´s the averaged value for a RANS calculation. Is this right?


Now I changed to URANS:
In interation 1 the time derivation of U (dU / dt) is solved. But how can I get the averaged velocity for URANS?


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


Thanks a lot for your help
Idefix

RodriguezFatz December 4, 2013 09:47

Quote:

Originally Posted by idefix (Post 464802)
As far as I understood now ensemble average mean that I do one experiments several times

correct

Quote:

Originally Posted by idefix (Post 464802)
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 (Post 464802)
Am I right that I choose with the solver (the solver is stationary or instationary) if I calculate RANS or URANS?

yes.

idefix December 4, 2013 10:10

Thanks for the fast answer
Quote:

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.

Thanks for your help

RodriguezFatz December 4, 2013 10:25

What kind of simulation? Steady inlet/outlet and... ? Normally, a URANS simulation will converge to the steady-state, right? Only if you have bluff bodies you will switch to real URANS mode.

idefix December 4, 2013 10:36

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.

Bernhard December 4, 2013 11:38

Quote:

Originally Posted by idefix (Post 464815)
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.

idefix December 5, 2013 02:12

Hello Bernhard,

this is the missing piece - thanks a lot :)

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.

Thanks again
Idefix

RodriguezFatz December 5, 2013 04:47

Hi idefix,

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.

idefix December 5, 2013 08:11

Thanks again for your help.

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.

I would be really happy if someone could help me.

RodriguezFatz December 6, 2013 05:09

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.

idefix January 3, 2014 05:32

Hello,

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.

Thanks a lot
idefix

RodriguezFatz January 3, 2014 07:19

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... ;)


All times are GMT -4. The time now is 17:59.