
[Sponsors] 
Imposing PIV (2D) experimental data at turbulentDFSEMInlet for LES 

LinkBack  Thread Tools  Search this Thread  Display Modes 
December 17, 2020, 03:43 
Imposing PIV (2D) experimental data at turbulentDFSEMInlet for LES

#1 
Senior Member
TomRobin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 197
Rep Power: 12 
I have 2D planar PIV data available from experiments (velocity field, Reynolds stresses and length scale information) and want to impose those at the inlet of the domain for the turbulentDFSEMInlet boundary condition.
Naturally, the PIV data  recorded at coordinates y and z (for the sake of argument here)  does not coincide with the coordinates y and z of the mesh at the inlet. Is there some functionality that can take the experimental data and y and z coordinates, interpolate the values onto the mesh and then write the required boundaryData file as an output within the constant/boundaryData/U/0/ directory? 

December 17, 2020, 04:20 

#2 
Senior Member

mapFields utility
see https://www.openfoam.com/documentati...mapFields.html including tutorials and Section A.2 of https://openfoam.com/documentation/u...utilities.php for broader scope 

December 17, 2020, 06:30 

#3 
Senior Member
TomRobin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 197
Rep Power: 12 
yes, I am aware of mapFields and how to use it to map solutions information from one simulation onto another, but I have experimental data in a non Openfoam format available (i.e. x, y and corresponding experimental value). The questing would then, probably, rather be, how do I get my experimental data into a form mapFields can understand?


December 17, 2020, 07:32 

#4 
Senior Member

Aha.
Your measured data is a scalar field on 2D planar grid, correct? Does is suffice to write measurement locations as a (quadrilateral?) mesh and the measured data as a scalar field on there mesh? 

December 17, 2020, 07:48 

#5  
Senior Member
TomRobin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 197
Rep Power: 12 
Quote:
Yes, that would work. My question is how I should format the data in a way mapFields, or a similar utility, can understand my essentially 2D structured dataset. In particular, the turbulentDFSEMInlet boundary condition is able to read boundary data (and also do some automatic mapping, it seems), but that data is just a single array of values and as far as I can see there is no grid location information attached to the datasets, so I wonder how I could resolve this mismatch in locations (and dimensions as well). 

January 21, 2021, 05:33 

#7 
Senior Member
TomRobin Teschner
Join Date: Dec 2011
Location: Cranfield, UK
Posts: 197
Rep Power: 12 
turned out to be actually not that difficult, i did some more digging and came up with the following (in case someone finds this in the future):
We need to provide a 1D list / array of data for the velocity U, reynolds stresses R and an integral length scale L. Then, we create 4 files in these locations (assuming we are currently in the root directry of the case, i.e. where we have the 0, constant and system directory): constant/boundaryData/points constant/boundaryData/<inletpatchname>/0/U constant/boundaryData/<inletpatchname>/0/R constant/boundaryData/<inletpatchname>/0/L where we need to insert the name of the inlet patch name here for <inletpatchname>. For example, if our inlet is called "velocityInlet", then the U file would be located at constant/boundaryData/velocityInlet/0/U. All files follow the same syntax and only the data entries are different for scalars, vectors and tensors: Code:
// scalar data ( scalar_0 scalar_1 scalar_2 ... scalar_N ) Code:
// vector data ( (vector.x_0 vector.y_0 vector.z_0) (vector.x_1 vector.y_1 vector.z_1) (vector.x_2 vector.y_2 vector.z_2) ... (vector.x_N vector.y_N vector.z_N) ) Code:
// tensor data ( (tensor.xx_0 tensor.xy_0 tensor.xw_0 tensor.vv_0 tensor.vw_0 tensor.zz_0) (tensor.xx_1 tensor.xy_1 tensor.xw_1 tensor.vv_1 tensor.vw_1 tensor.zz_1) (tensor.xx_2 tensor.xy_2 tensor.xw_2 tensor.vv_2 tensor.vw_2 tensor.zz_2) ... (tensor.xx_N tensor.xy_N tensor.xw_N tensor.vv_N tensor.vw_N tensor.zz_N) ) As an example, the points file could look like this (assuming data is only available at the inlet along a 1D line in the y direction): Code:
( (0 0 0) (0 0.1 0) (0 0.2 0) (0 0.3 0) (0 0.5 0) (0 0.98 0) (0 1 0) ) Code:
velocityInlet { type turbulentDFSEMInlet; delta 0.0127; // height of your inlet mapMethod nearestCell; value uniform (10 0 0); // place holder, ignored as far as I can see ... } By providing the data in the constant/boundaryData folder for the physical quantities, it also seems that the simulation does stall (as described here), though there still seems to be an issue with the velocity magnitude, but I did not have time as of now to investigate that further. Last edited by t.teschner; January 21, 2021 at 05:33. Reason: code snippet formatting changed 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
[OpenFOAM] How to get the coordinates of velocity data at all cells and at all times  vidyadhar  ParaView  9  May 20, 2020 21:06 
Computed Pressure Drop is lower than experimental data  Ash Kot  FLUENT  2  May 17, 2017 10:41 
UDF for Mapping 3D Experimental Data (Heat Generation) to Mesh  jbo214  Fluent UDF and Scheme Programming  1  May 15, 2017 16:47 
[General] 2 datas on one plot  Akuji  ParaView  46  December 1, 2013 15:06 
studying a valve case  mina.basta  OpenFOAM  33  August 30, 2013 05:46 