CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

Reading Lagrangian Position Data

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2023, 03:26
Default
  #21
New Member
 
Join Date: Mar 2022
Posts: 2
Rep Power: 0
xhan is on a distinguished road
Quote:
Originally Posted by xhan View Post
Hi,
Thanks for sharing your idea, cjc96.
However, when i followed all your comment above and compiled my new intermediate, there was always an error message "class 'Foam::KinematicParcel<parceltype>'does not have any field named globalpos".
I have no idea how to deal with this. could you please tell us more details of your idea?
i have solved this error and i can see the global position now.
it's helpful. Thanks a lot!!!
xhan is offline   Reply With Quote

Old   July 31, 2023, 05:21
Default
  #22
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 112
Rep Power: 5
joshwilliams is on a distinguished road
Quote:
Originally Posted by xhan View Post
Hi,
Thanks for sharing your idea, cjc96.
However, when i followed all your comment above and compiled my new intermediate, there was always an error message "class 'Foam::KinematicParcel<parceltype>'does not have any field named globalpos".
I have no idea how to deal with this. could you please tell us more details of your idea?
You need to add 'globalPos' to the header files (you are defining a new field, adding to headers is a standard task in C++). Also, he did not share the code for the actual IO part. Since the p.position already exists, my suggestion is just modify KinematicParcelIO.C



You can copy the code in the IO C file, where a particle field is defined such as p.UTurb() and add similar code for p.position().
joshwilliams is offline   Reply With Quote

Old   July 31, 2023, 11:30
Default
  #23
Member
 
Conor Crickmore
Join Date: Jan 2020
Location: Leicestershire, United Kingdom
Posts: 36
Rep Power: 6
cjc96 is on a distinguished road
Quote:
Originally Posted by xhan View Post
i have solved this error and i can see the global position now.
it's helpful. Thanks a lot!!!

Hey Xhan,
I'm glad you sorted it!


Figured I'd post a link to my GitHub repository that includes these changes as well as others, in case they are of use to you, or anyone else:


https://github.com/ttcjc/OpenFOAM/tree/dev
__________________
Conor Crickmore
PhD Researcher in Automotive Aerodynamics
Aeronautical and Automotive Engineering
Loughborough University
LE11 3TU
cjc96 is offline   Reply With Quote

Reply


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
Lagrangian particle position data at runtime vishwesh OpenFOAM Programming & Development 3 July 11, 2018 09:48
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
Tecplot reading particle data error ali hemmati FLUENT 1 February 13, 2016 06:17
Cht tutorial in 15 braennstroem OpenFOAM Running, Solving & CFD 197 June 10, 2015 03:02
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52


All times are GMT -4. The time now is 21:48.