|
[Sponsors] |
June 26, 2007, 12:46 |
Visualizing Patch Motion
|
#1 |
Senior Member
Join Date: Mar 2009
Posts: 248
Rep Power: 18 |
Dear OpenFoam Users
Hello. I need to visualize the motion of a patch as it moves. As recommended by Hrv, I added following to the main solver file : added --> #include "OFstream.H" before -->main() then declared a variable label wallPatchID = mesh.boundaryMesh().findPatchID("walls"); and then just after-->runTime.write(); OFstream of("myFile.txt"); This way I could save just once instance of the patch motion. What i am wondering is that can it be done the way one saves the pressure , velocity and gamma fields and then animate the fields in paraFoam What I have in mind is something like this to be added to --> createFields.H 1)capture the label for the desired patch label wallPatchID = mesh.boundaryMesh().findPatchID("walls"); 2) Get the pint list for the captured label const labelList listOfWallPatchPointLabels mesh.boundaryMesh()[wallPatchID].meshPoints(); 3) make an IOobject IOobject WallPos ( "listofWallPatchPointLabels", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ); Or alternatively declare a pointField comprising of the desired patch and then create an IOobject using it. In that --> runTime.write(); shall write the position of the desired patch as a time instance as it writes for the other variables declared in createFields.H My problem is that I do not know how IOobject syntax is organized. Please help if anybody has done this before or knows how to accomplish this With Best Regards Jaswinder |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Wedge patch '*' is not planar | LilumDaru | OpenFOAM Meshing & Mesh Conversion | 6 | January 12, 2021 05:55 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 13:48 |
[Commercial meshers] Fluent msh and cyclic boundary | cfdengineering | OpenFOAM Meshing & Mesh Conversion | 48 | January 25, 2013 03:28 |
chtMultiRegionFoam Tutorial | m.nichols19 | OpenFOAM | 12 | September 9, 2010 11:56 |
[mesh manipulation] Using createPatch in place of couplePatches | sripplinger | OpenFOAM Meshing & Mesh Conversion | 8 | November 13, 2009 07:14 |