CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to interpolate point data from a VTK file to the cell centers of a given mesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2023, 07:42
Default How to interpolate point data from a VTK file to the cell centers of a given mesh
  #1
New Member
 
Aina
Join Date: Jan 2020
Location: Spain
Posts: 9
Rep Power: 6
Aina is on a distinguished road
Dear Users,

We currently have an unstructured mesh and velocities in the form of VTK files for said-mesh. Our goal is to initialize a simulation using the velocity values in the VTK´s. The only problem is that the data given in our VTK files is in the form of point data.

Our question, is whether there is some executable in OpenFOAM that can interpolate this point data to the cell centers of our mesh (As we all know, OpenFOAM works with cell-centered values). Any help would be appreciated.

Regards
Aina is offline   Reply With Quote

Old   November 9, 2023, 01:57
Default
  #2
Member
 
María Rosales
Join Date: Mar 2023
Location: Spain
Posts: 41
Rep Power: 3
MMRC is on a distinguished road
Hello Aina,



Is that VTK comming from another simulation done in openfoam?



if so, you have the the utility mapFields that will read the .C files of each field from the folder of solution (the time step you set) of your previous simulation . MapFields works even if mesh are different (example: in one you have an object that was not in the 1st mesh) and even for different B.C. It initializes the whole domain with previous data.
MMRC is offline   Reply With Quote

Reply

Tags
cell center, initialization, interpotation, unstructured mesh, vtk


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
[openSmoke] LaminarSMOKE compilation error mdhfiz OpenFOAM Community Contributions 8 July 2, 2024 10:32
[Other] refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 2 November 11, 2021 11:04
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
[Other] Adding solvers from DensityBasedTurbo to foam-extend 3.0 Seroga OpenFOAM Community Contributions 9 June 12, 2015 17:18
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02


All times are GMT -4. The time now is 01:47.