|
[Sponsors] |
successful compilation of new function object BUT nothing is written in time folders |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 19, 2018, 01:42 |
successful compilation of new function object BUT nothing is written in time folders
|
#1 |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 9 |
Dear foamers,
I am trying to create a new post-processing tool. To do that, I followed this tutorial: http://www.tfd.chalmers.se/~hani/kur...CFD_Report.pdf . I can compile successfully but nothing is written in my time folders. I tried to copy one of the case in OpenFOAM-4.x/src/functionObjects/field/, give it another name, change the name in .C and .H file and mention this name in "file" located in OpenFOAM-4.x/src/functionObjects/field/Make/. No success. There is no compilation error and when I run rhoCentralFoam -postProcess -func newFunction as a command line, the necessary fields are read but nothing is written. To be more precise, when we execute for instance MachNo, we have : Reading field U Creating turbulence model Selecting turbulence model type laminar functionObjects::MachNo MachNo writing field: Ma In my case withe newFunction, the line "functionObjects::MachNo MachNo writing field: Ma" (with Ma or MachNo = new names) is missing. I tried also to include the following line in my controlDic: functions { k { // Type of functionObject type k; // Where to load it from (if not already in solver) libs ("libfieldFunctionObjects.so"); // Function object enabled flag enabled true; // When to output the average fields writeControl writeTime; } } But neither, nothing is written in my time folders. I know that by modifying the solver, we can make it write the same variables that we write by executing postProcess commands, but I want to learn where in my procedure of creating new functionObjects, I am wrong. I appreciate your help dear foamers, regards |
|
August 22, 2018, 05:45 |
|
#2 |
Member
K
Join Date: Jul 2017
Posts: 97
Rep Power: 9 |
No one could help me ?
|
|
March 8, 2019, 02:35 |
OpenFOAM Post-Processing
|
#3 |
New Member
Ali Shahanaghi
Join Date: Nov 2016
Posts: 3
Rep Power: 9 |
you need to add following lines to your .C - main function
Foam::timeSelector::addOptions(); #include "addRegionOption.H" #include "addDictOption.H" #include "setRootCase.H" #include "createTime.H" Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args); #include "createNamedMesh.H" forAll(timeDirs, timeI) { runTime.setTime(timeDirs[timeI], timeI); Foam::Info<< "Time = " << runTime.timeName() << Foam::endl; mesh.readUpdate(); Foam::Yourfunction(args, runTime, mesh); Foam::Info<< Foam::endl; |
|
Tags |
functionobjects, openfoam, postprocess, utility |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
pimpleDyMFoam computation randomly stops | babapeti | OpenFOAM Running, Solving & CFD | 5 | January 24, 2018 06:28 |
Running UDF with Supercomputer | roi247 | FLUENT | 4 | October 15, 2015 14:41 |
[blockMesh] error message with modeling a cube with a hold at the center | hsingtzu | OpenFOAM Meshing & Mesh Conversion | 2 | March 14, 2012 10:56 |