CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Visualizing Patch Motion

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   June 26, 2007, 12:46
Default Visualizing Patch Motion
  #1
Senior Member
 
Join Date: Mar 2009
Posts: 248
Rep Power: 18
jaswi is on a distinguished road
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
jaswi is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 07:42.