|
[Sponsors] |
fieldAverage fails to continue averaging the fields |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 7, 2015, 17:10 |
fieldAverage fails to continue averaging the fields
|
#1 |
New Member
Fernando Soares Alves
Join Date: Oct 2013
Posts: 16
Rep Power: 13 |
Hi there dear Foamers,
I am currently running some simple LES cases and I wish to, during runTime, average some fields of interest. For instance I'm using fieldAverage in my controlDict in the following way Code:
funtions { fieldAverage { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; cleanRestart false; outputControl outputTime; resetOnOutput false; resetOnRestart false; fields ( U { mean on; prime2Mean on; base time; } p { mean on; prime2Mean off; base time; } ); } } Could any expert or someone who has already experienced a similar situation advise me? Thanks in advance and best regards, F. Soares. |
|
December 8, 2015, 05:12 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quick answer: I vaguely remember there was a bug related to this in one of OpenFOAM's older versions. I've found the bug report for it: http://www.openfoam.org/mantisbt/view.php?id=898
Which version of OpenFOAM are you using?
__________________
|
|
December 8, 2015, 08:48 |
|
#3 |
New Member
Fernando Soares Alves
Join Date: Oct 2013
Posts: 16
Rep Power: 13 |
Sorry, I should have attached the other threads I was reading about this issue. I currently use OpenFOAM 2.4.x.
|
|
December 8, 2015, 08:56 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
A few quick questions:
|
|
December 8, 2015, 13:30 |
|
#5 |
New Member
Fernando Soares Alves
Join Date: Oct 2013
Posts: 16
Rep Power: 13 |
According to 'blockMesh -help' I am currently
Code:
Using: OpenFOAM-2.4.x (see www.OpenFOAM.org) Build: 2.4.x-e713234c04f6 Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pisoFoam; startFrom startTime; startTime 200; stopAt endTime; endTime 3000; deltaT 2e-04; writeControl adjustableRunTime; writeInterval 0.25; purgeWrite 1; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep on; maxCo 0.250000; maxDeltaT 0.001500; functions { fieldAverage1 { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; cleanRestart false; outputControl outputTime; resetOnOutput false; resetOnRestart false; fields ( U { mean on; prime2Mean on; base time; } p { mean on; prime2Mean off; base time; } ); } epsilon { type epsilonTsr; UName U; UMeanName UMean; functionObjectLibs ("myTurbFieldsFunctionObjects.so"); enabled true; outputControl outputTime; } epsilonTrue { type epsilonTsrTrue; UName U; UMeanName UMean; functionObjectLibs ("myTurbFieldsFunctionObjects.so"); enabled true; outputControl outputTime; } pStrain { type pStrain; UName U; UMeanName UMean; pName p; pMeanName pMean; functionObjectLibs ("myTurbFieldsFunctionObjects.so"); enabled true; outputControl outputTime; } pU { type pU; UName U; UMeanName UMean; pName p; pMeanName pMean; functionObjectLibs ("myTurbFieldsFunctionObjects.so"); enabled true; outputControl outputTime; } triU { type triU; UName U; UMeanName UMean; functionObjectLibs ("myTurbFieldsFunctionObjects.so"); enabled true; outputControl outputTime; } fieldAverage2 { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; cleanRestart false; outputControl outputTime; resetOnOutput false; resetOnRestart false; fields ( epsilonTsr { mean on; prime2Mean off; base time; } epsilonTsrTrue { mean on; prime2Mean off; base time; } pStrain { mean on; prime2Mean off; base time; } pU { mean on; prime2Mean off; base time; } triU { mean on; prime2Mean off; base time; } ); } probes { type probes; functionObjectLibs ("libsampling.so"); enabled true; outputControl timeStep; outputInterval 10; fields ( // inst fields /* U p k */ // mean fields UMean pMean UPrime2Mean epsilonTsrMean epsilonTsrTrueMean pStrainMean pUMean triUMean ); probeLocations ( (0.125 0.95 0) (0.250 0.95 0) (0.375 0.95 0) (0.500 0.95 0) (0.625 0.95 0) (0.750 0.95 0) (0.875 0.95 0) (0.125 0.85 0) (0.250 0.85 0) (0.375 0.85 0) (0.500 0.85 0) (0.625 0.85 0) (0.750 0.85 0) (0.875 0.85 0) (0.125 0.7 0) (0.250 0.7 0) (0.375 0.7 0) (0.500 0.7 0) (0.625 0.7 0) (0.750 0.7 0) (0.875 0.7 0) (0.125 0.6 0) (0.250 0.6 0) (0.375 0.6 0) (0.500 0.6 0) (0.625 0.6 0) (0.750 0.6 0) (0.875 0.6 0) ); } } // ************************************************************************* // Once again thank you for your time and patience Mr. Santos, F. Soares. |
|
December 8, 2015, 14:39 |
|
#6 |
New Member
Fernando Soares Alves
Join Date: Oct 2013
Posts: 16
Rep Power: 13 |
I forgot to address a similar tutorial in my last reply. In $FOAM_TUTORIALS/incompressible/pisoFoam/les/pitzDaily there is a similar structure to the case I am trying to run here. However modifying the controlFidct file
Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application pisoFoam; //startFrom startTime; startFrom latestTime; startTime 0; stopAt endTime; //endTime 10e-05; endTime 20e-05; deltaT 1e-05; writeControl timeStep; writeInterval 1; purgeWrite 1; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { fieldAverage1 { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl outputTime; timeStart 3e-05; fields ( U { mean on; prime2Mean off; base time; } p { mean on; prime2Mean off; base time; } ); } fieldAverage2 { type fieldAverage; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl outputTime; timeStart 9e-05; fields ( U { mean on; prime2Mean on; base time; } ); } } // ************************************************************************* // Code:
Starting time loop fieldAverage fieldAverage1: Restarting averaging for fields: U iters = 5 time = 5e-05 fieldAverage fieldAverage2: Restarting averaging for fields: U iters = 5 time = 5e-05 |
|
December 8, 2015, 16:43 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi F. Soares,
This is starting to look like it's a somewhat severe bug. The case you prepared with the tutorial has the function objects prepared differently and that could be enough for the first one to not conflict with the second one, given that you gave two different start times and different averaging mechanisms. And I went looking for bug reports about "fieldAverage" and found the following issue still open: http://www.openfoam.org/mantisbt/view.php?id=1336 - it seems to be related to your issue. I'm adding this to my to-do list for the upcoming weekend. If you can figure out a way to reproduce this issue with the tutorial case, it would help a lot in isolating the origin of the problem and to fix it. The other possibility for the origin of this bug is if you are running in parallel at the University, which could potentially also bring up other problems. Best regards, Bruno |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Starting field averaging using libFunctionObject after certain time | eelcovv | OpenFOAM Programming & Development | 25 | December 7, 2015 23:28 |
How to restart averaging of the fields? | huangxianbei | OpenFOAM Running, Solving & CFD | 0 | March 21, 2014 06:21 |
a reconstructPar issue | immortality | OpenFOAM Post-Processing | 8 | June 16, 2013 12:25 |
an odd(at least for me!) reconstructPar error on a field | immortality | OpenFOAM Running, Solving & CFD | 3 | June 3, 2013 23:36 |
EULER-Forward-Method | freak | Main CFD Forum | 4 | June 12, 2001 10:19 |