|
[Sponsors] |
How to code the the coupling of velocity and concentration fluctuations? |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 13 ![]() |
Hi,
to study the fluctuations of the velocity and the fluctuations of the concentration of a passive scalar, I've inserted this in my controlDict file: fieldAverage { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so"); [...] fields ( U { mean on; prime2Mean on; ![]() base time; } s { mean on; prime2Mean on; ![]() base time; } ); } #includeFunc scalarTransport As you know, this will give me U_prime2mean and s_prime2mean (indicated with arrows) Now, I want to couple both fluctuations and get uprime_sprime_mean. Does anyone know how? |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,680
Blog Entries: 6
Rep Power: 49 ![]() ![]() ![]() |
Hi,
maybe you can use the new fields and use a calc function. E.g. Code:
postProcess -func calc ... It might also work on the fly, by using the calc function directly inside the controlDict but for this, the new generated fields should be registered in the database. Out of the box, I am not sure, if this can be done on the fly.
__________________
Keep foaming, Tobias Holzmann |
|
![]() |
![]() |
![]() |
![]() |
#3 | |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 13 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Fuenlabrada
Posts: 308
Rep Power: 13 ![]() |
Hi Pedro,
I faced the same problem when performing LES. I think you want to do something similar, isn't it? What you would need is to create a functionObject that reads U, UMean and T,TMean and computes ut=(U-UMean)*(T-TMean) You can do this, of course, directly in your solver by calling TMean and UMean, defining ut... In my case I went farther (other turbulent statistics) and I modified a function object in order to generate the fluctuating fields. |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 13 ![]() |
Gracias, Agustín!
do you mean I need to write a separate solver (copy-paste the files of an existent one) and adapt two things: In the fields.H file, all variables are defined. I can add my new variable there; In the solver, in the while loop of the time, after the flow equations are solved, add the operation for you new variable. For example: newVariable = c * U; is this your suggestion? |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Fuenlabrada
Posts: 308
Rep Power: 13 ![]() |
De nada Pedro
Yes, it is. Remember that you must include not only ut, but also UMean and TMean in your new solver. You can run it as you prefer, but please wait until you have a converged UMean and TMean! |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 13 ![]() |
Yes, ok, but I already get that from here:
U { mean on; prime2Mean on;\leftarrow base time; } no? |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Fuenlabrada
Posts: 308
Rep Power: 13 ![]() |
Effectively. You must run first a simulation averaging U and T (with your usual solver), and once UMean and TMean have converged you can use the second solver.
|
|
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 13 ![]() |
aaaaah, I get it now, thanks a lot!!!
|
|
![]() |
![]() |
![]() |
![]() |
#10 | |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 13 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#11 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 13 ![]() |
||
![]() |
![]() |
![]() |
Tags |
average field, concentration, fluctuations, passive scalar |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
dispersion with radial velocity | CharlineF | OpenFOAM Programming & Development | 3 | September 13, 2019 13:24 |
Unsteady field advected by steady velocity field | t.oliveira | OpenFOAM Running, Solving & CFD | 2 | December 28, 2015 14:42 |
Velocity from varying particle's concentration | nombood | Fluent Multiphase | 2 | April 25, 2014 10:32 |
velocity in diffusion process | reyeszjj | Main CFD Forum | 1 | March 21, 2010 04:24 |
How to solve velocity & concentration seperately? | Cloudy | Phoenics | 5 | March 11, 2002 23:13 |