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 Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 7, 2023, 08: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 VTKs. 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, 02:57
Default
  #2
New Member
 
Mara Rosales
Join Date: Mar 2023
Location: Spain
Posts: 27
Rep Power: 2
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


All times are GMT -4. The time now is 11:05.