samiam1000 |
July 31, 2014 05:44 |
Writing a function object
1 Attachment(s)
Dear Foamers,
I am writing a function object and I do have some issues to be solved. I hope someone can help:
I am attaching a very simple case. Could you have a look?
I case: Enter the case directory and launch: "scalarTransportFoam"
Everything is ok. In the 10 dir I have the T*2 field.
II case: Enter the case directory and launch: "scalarTransportFoam -noFunctionObjects" and as a post processing run "execFlowFunctionObjects -noZero -latestTime" I get this error:
Code:
samuele@pc-zampini:~/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry$ execFlowFunctionObjects -noZero -latestTime
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.3.0-f5222ca19ce6
Exec : execFlowFunctionObjects -noZero -latestTime
Date : Jul 31 2014
Time : 10:53:20
Host : "pc-zampini"
PID : 21188
Case : /home/samuele/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 10
Using dynamicCode for functionObject difference at line 57 in "/home/samuele/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry/system/controlDict.functions.difference"
Time = 10
Reading phi
Reading U
Reading p
--> FOAM Warning :
--> FOAM FATAL IO ERROR:
cannot find file
file: /home/samuele/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry/10/p at line 0.
From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 73.
samuele@pc-zampini:~/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry$
Hence, I copy a "p" file in the 10 directory. Nevertheless, I get this:
Code:
samuele@pc-zampini:~/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry$ execFlowFunctionObjects -noZero -latestTime
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 2.3.0-f5222ca19ce6
Exec : execFlowFunctionObjects -noZero -latestTime
Date : Jul 31 2014
Time : 10:52:07
Host : "pc-zampini"
PID : 21126
Case : /home/samuele/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 10
Using dynamicCode for functionObject difference at line 57 in "/home/samuele/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry/system/controlDict.functions.difference"
Time = 10
Reading phi
Reading U
Reading p
Looking up field T
--> FOAM FATAL ERROR:
request for volScalarField T from objectRegistry region0 failed
available objects of type volScalarField are
1(p)
From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/samuele/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.
FOAM aborting
#0 Foam::error::printStack(Foam::Ostream&) in "/home/samuele/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/samuele/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/samuele/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#3 Foam::mixingEvaluationFunctionObject::write() at /usr/include/c++/4.7/bits/basic_string.h:536
#4 Foam::OutputFilterFunctionObject<Foam::mixingEvaluationFunctionObject>::execute(bool) at ~/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.C:173
#5 Foam::functionObjectList::execute(bool) in "/home/samuele/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6
in "/home/samuele/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/execFlowFunctionObjects"
#7
in "/home/samuele/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/execFlowFunctionObjects"
#8 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9
in "/home/samuele/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/execFlowFunctionObjects"
Annullato
samuele@pc-zampini:~/Documenti/PhD/02tesiDomenico/workingDirLocal/dummyCase/passiveScalarBaseGeometry$
Could anyone help?
Also, one more question: how abaout if I want to get an average on each section?
Thanks a lot,
Samuele
|