|
[Sponsors] |
"functions" subdictionary in controlDict for chtMultiRegionFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 22, 2018, 17:27 |
"functions" subdictionary in controlDict for chtMultiRegionFoam
|
#1 |
Member
Join Date: Oct 2018
Location: France
Posts: 34
Rep Power: 7 |
Dear all,
using e.g. the simpleFoam solver I was able to save the residuals and display their evolution during solving by including "#includefunc residuals" in the subdictionary "functions" of the controlDict. However, if I do that with chtMultiRegionFoam, no "postProcessing" folder is created and no residuals are saved. I also tried to include a function object based on the information here (https://www.openfoam.com/documentati...ieldValue.html) reading several threads here (according to which this should be possible, but they are quite old though). I tried to keep it simple for the first trials: T0 { type volFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl writeTime; writeFields true; regionType all; name titanium; //name of the solid region operation none; fields ( T ); } In my understanding this function object should just copy the temperature field and name it "T0". Like with the residuals, there is no output, no error message, no info at all. However, could you tell where my mistake is or if this is not possible in chtMultiRegionFoam ? Thanks in advance, stockzahn |
|
October 23, 2018, 04:39 |
|
#2 | |
Member
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 12 |
Hallo stockzahn,
there is a discussion here on how to capture the field residuals for cht solvers. I still do it the old fashioned way by using PyFOAM. As for your second try with functionObject. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.3.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application chtMultiRegionSimpleFoam; startFrom latestTime; startTime 0; . . . runTimeModifiable true; functions { minMax { type fieldMinMax; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; log false; write true; region air; // Specify the region fields ( T ); } } Regards, Ricky PS: I am still using OF-2.3.x, OpenFOAM has come a long way since then. Quote:
__________________
If it is easy, then something is fishy! |
||
October 23, 2018, 10:11 |
|
#3 |
Member
Join Date: Oct 2018
Location: France
Posts: 34
Rep Power: 7 |
Thanks Ricky for your help. That's my status:
I tried it with Code:
#includeEtc "caseDicts/postProcessing/numerical/residuals.cfg" Code:
--> FOAM FATAL ERROR: Cannot open etc file "caseDicts/postProcessing/numerical/residuals.cfg" while reading dictionary "/home/run/InTrCoilQ1/system/controlDict.functions.residualsTitanium" From function static bool Foam::functionEntries::includeEtcEntry::execute(Foam::dictionary&, Foam::Istream&) in file db/dictionary/functionEntries/includeEtcEntry/includeEtcEntry.C at line 127. FOAM exiting Code:
writeControl timeStep; writeInterval 1; Code:
functions { residualsTitanium { type residuals; libs ("libutilityFunctionObjects.so"); writeControl timeStep; writeInterval 1; regionType all; region titanium; fields (T); } sumT0 { type volFieldValue; libs ("libfieldFunctionObjects.so"); writeControl timeStep; writeInterval 1; //writeFields true; //regionType all; region titanium; operation sum; fields (T); } } Do you have or does anybody has an idea how to save the residual values in the .dat-file? |
|
October 24, 2018, 05:01 |
|
#4 |
Member
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 95
Rep Power: 16 |
You should monitor "h", not T, as chtMultiRegionFoam solves for h.
|
|
October 24, 2018, 07:12 |
|
#5 |
Member
Join Date: Oct 2018
Location: France
Posts: 34
Rep Power: 7 |
Thanks! So obvious, that wasn't very glorious of me ...
|
|
Tags |
chtmultiregionfoam, function objects, residuals |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
InterFoam (PimpleFoam) not obeying DeltaT in ControlDict | walakaka | OpenFOAM Running, Solving & CFD | 2 | March 1, 2018 12:57 |
sampleDict and controlDict | musahossein | OpenFOAM Post-Processing | 39 | July 17, 2016 10:00 |
controlDict and sampleDict giving different results | Shenan | OpenFOAM Post-Processing | 2 | November 15, 2014 10:15 |
Forces not calculated when including a library in controlDict | fusij | OpenFOAM | 2 | May 13, 2011 07:25 |
writing controlDict as otherfields | ubaid | OpenFOAM | 5 | September 29, 2010 07:28 |