|
[Sponsors] |
How to code the the coupling of velocity and concentration fluctuations? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 13, 2019, 09:25 |
How to code the the coupling of velocity and concentration fluctuations?
|
#1 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
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? |
|
December 15, 2019, 16:45 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
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 |
|
December 15, 2019, 16:53 |
|
#3 | |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
Quote:
|
||
December 16, 2019, 06:50 |
|
#4 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
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. |
|
December 16, 2019, 07:22 |
|
#5 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
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? |
|
December 16, 2019, 07:25 |
|
#6 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
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! |
|
December 16, 2019, 07:34 |
|
#7 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
Yes, ok, but I already get that from here:
U { mean on; prime2Mean on;\leftarrow base time; } no? |
|
December 16, 2019, 07:50 |
|
#8 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
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.
|
|
December 16, 2019, 07:51 |
|
#9 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
aaaaah, I get it now, thanks a lot!!!
|
|
January 22, 2020, 08:41 |
|
#10 | |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
Quote:
|
||
February 24, 2020, 09:30 |
|
#11 |
Member
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14 |
||
Tags |
average field, concentration, fluctuations, passive scalar |
|
|
Similar Threads | ||||
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 |