|
[Sponsors] |
How can I write selective additional fields using functionObjects? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 29, 2011, 13:31 |
How can I write selective additional fields using functionObjects?
|
#1 |
New Member
Fatemeh
Join Date: Apr 2011
Location: Boston
Posts: 9
Rep Power: 15 |
Hi everybody,
I want to have the positions of cell centers (x,y,z) as out put in my time directories. I know that the utility "writeCellCenters" do what I want, but I prefer to get them automatically. I searched and found out that functionObjects are capable of doing so. I found from http://openfoamwiki.net/index.php/Co...unctionObjects that the type writeAdditionalFields is exactly what I want. I found this example in their documentations: Code:
functions ( writeEnthalpy { functionObjectLibs ("libsimpleFunctionObjects.so"); type writeAdditionalFields; fieldNames ( h mu ); after 0.1; } ); Any help is appreciated. |
|
June 30, 2011, 03:51 |
|
#2 |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
can i ask you, why? is ur mesh moving ? if its fixed why do u need to have them in each time step?
however maybe you can add something like to ur solver and compile it: volVectorField cellCenter //add ( IOobject ( "cellCenter", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh.Cp() ); |
|
June 30, 2011, 11:31 |
|
#3 |
New Member
Fatemeh
Join Date: Apr 2011
Location: Boston
Posts: 9
Rep Power: 15 |
Hi Nima,
Thanks for your hint. Actually I do not want to have my grid in every time step. That would be fine to have the grid in all time directories although it's not necessary for me now. You are right. It's possible to obtain the mesh changing the solver, but I do not want to do so. Fatemeh |
|
July 14, 2011, 18:41 |
|
#4 |
New Member
Fatemeh
Join Date: Apr 2011
Location: Boston
Posts: 9
Rep Power: 15 |
Hi,
I want to be more specific about my question posted on June 29th. About using that example I found in functionObject documentations; there are two points:
Fatemeh |
|
Tags |
cellcenters, functionobjects |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 14:06 |
Where to define which fields to write? | bgoeppner | OpenFOAM | 8 | July 15, 2011 12:00 |
emag beta feature: charge density | charlotte | CFX | 4 | March 22, 2011 10:14 |
PostChannel | maka | OpenFOAM Post-Processing | 5 | July 22, 2009 10:15 |
Replace periodic by inlet-outlet pair | lego | CFX | 3 | November 5, 2002 21:09 |