|
[Sponsors] |
Calculating fluctuation flux (Reynolds flux) of scalar in LES? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 12, 2022, 03:15 |
Calculating fluctuation flux (Reynolds flux) of scalar in LES?
|
#1 | |
New Member
Shengjie Lu
Join Date: Sep 2020
Location: Nanjing,China
Posts: 12
Rep Power: 6 |
Hi FOAMer! I am using LES to simulate the scalar mixing in wall-bounded turbulent flow. The LES could calculate the transient velocity field U and scalar field s. With the fieldAverage function, the time-averaged value UMean and sMean could also be obtained.
Now I want to output the time-avearged flux and fluctuation flux of scalar, namely the <Us> and <U's'>, which requires to calculate the expression U*s and (U-UMean)*(s-sMean) and pass the result to fieldAverage function. After searching through the forum, maybe the easiest way is to impose coded functionObject in controlDict file. I adapt the code in thread HTML Code:
https://www.cfd-online.com/Forums/openfoam-post-processing/219817-fluctuating-component-scalar-quantity.html Quote:
Does anyone know the way to handle this, or any other workaround? |
||
April 12, 2022, 03:25 |
|
#2 |
New Member
Shengjie Lu
Join Date: Sep 2020
Location: Nanjing,China
Posts: 12
Rep Power: 6 |
For quick reference, I post the adapted code below, in which the flux1 represents the product of U and s.
Code:
fluctuation_flux1 { type coded; libs ("libutilityFunctionObjects.so"); enabled true; timeStart 74; timeEnd 200; writeControl adjustableRunTime; writeInterval 200; name fluctuation_flux1; codeExecute #{ const volVectorField& U = mesh().lookupObject<volVectorField>("U"); const volScalarField& s = mesh().lookupObject<volScalarField>("s"); obr_.store ( new volVectorField ( IOobject ( "flux1", obr_.time().timeName(), obr_, IOobject::NO_READ, IOobject::AUTO_WRITE ), U*s ) ); const volVectorField& flux1 = obr_.lookupObject<volVectorField>("flux1"); #}; } Code:
fieldAverage1 { type fieldAverage; functionObjectLibs ( "libfieldFunctionObjects.so" ); resetOnRestart true; resetOnOutput false; startTime 75; endTime 200; writeControl adjustableRunTime; writeInterval 200; fields ( flux1 { mean on; prime2Mean on; base time; } ); } |
|
Tags |
fluctuation, flux, les, openfoam, post-processing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating a transient .case file | scro1022 | EnSight | 0 | November 27, 2020 11:11 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
Issue symmetryPlane 2.5d extruded airfoil simulation | 281419 | OpenFOAM Running, Solving & CFD | 5 | November 28, 2015 14:09 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |
zero flux boundary for diffusion scalar | cmv | Siemens | 1 | April 15, 2005 06:42 |